/helm-wordpress-mariadb

helm-project

Apache License 2.0Apache-2.0

Helm Wordpress chart

A Helm chart for the deployment of "Wordpress" server with "MariaDB" database as a backend.

📔 Table of Contents

🌟 About the Project

The purpose of this project is to deploy a Wordpress server in the cloud as a microservice in an easy and automated way. It is not intended to be used in production environment since many features like security, high availablity and scaling are absent in this release. However it is a perfect base for a start or as a personal project.

Chart architecture

  • Chart.yaml: Main chart file.

  • LICENSE.txt: License file.

  • README.md: Readme file formatted for Github, with information about the chart.

  • /docs: Directory containing media files.

  • /templates: Directory containing the chart templates. --> Press on the file names below for description.

    mysql-storage-class.yaml:
      - Defining a storage class which will we will use for the creation and assignment of MySQL persistent volume.
    mysql-pv.yaml::
      - Configuration file to create a Persistent Volume for MySQL to store the working directory in a persistent way.
    mysql-pvc.yaml:
      - Configuration file to create a Persistent Volume Claim for MySQL, to claim the created above Persistent Volume.
    mysql-configmap.yaml:
      - ConfigMap to define variables for MySQL deployment in a dynamic rather than a static way.
    mysql-deployment.yaml:
      - Main configuration file for the deployment of MySQL database as a micro-service in kubernetes.
    mysql-service.yaml:**
      - Configuration file to create a ClusterIP service for MySQL depoyment, so Wordpress can find it and connect to it.

    values.yaml: Default configuration values for the Helm chart.

    secret.yaml: Configuration file for storing MySQL database password as a Kubernetes secret, the password is stored in Base64 format.

    NOTES.txt: File with instructions to be shown after deployment.


    Wordpress-storage-class.yaml:
      - Defining a storage class which will we will use for the creation and assignment of Wordpress persistent volume.
    Wordpress-pv.yaml::
      - Configuration file to create a Persistent Volume for Wordpress to store the working directory in a persistent way.
    Wordpress-pvc.yaml:
      - Configuration file to create a Persistent Volume Claim for Wordpress, to claim the created above Persistent Volume.
    Wordpress-configmap.yaml:
      - ConfigMap to define variables for Wordpress deployment in a dynamic rather than a static way.
    Wordpress-deployment.yaml:
      - Main configuration file for the deployment of Wordpress database as a micro-service in kubernetes.
    Wordpress-service.yaml:**
      - Configuration file to create a LoadBalancer service for internet access to Wordpress platform.

Notes:

  1. All values for the configuration of the chart components are defined in the values.yaml file.
  2. For this project 2GB of disk space were defined for each service, for actual use you would like to define 20GB or more.
  3. The password for the database is Base64 encoded as a Kubernetes secret.

👾 Tech Stack

Client
Server
Database

🧰 Getting Started

‼️ Prerequisites

  • AWS or any other cloud based Kubernetes cluster with "Helm" installed.
  • Git installed (sudo apt/yum/dnf install git).
  • Hosted zone in "Route53" or any other domain manager, with a domain or a sub.domain defined for Wordpress server.

⚙️ Installation

  1. Clone the repo:
git clone https://github.com/eli-pavlov/helm-wordpress-mariadb.git
  1. Install the chart using "Helm":
helm install wordpress helm-wordpress-mariadb
  1. Add an "A" record in the hosted zone pointing to "Alias" of the "wordpress" LoadBalancer service.

  2. Login to "Wordpress" and create your website.

  3. Enjoy!!!

⚠️ License

Distributed under the Apache License 2.0 License. Please note that this chart includes official WordPress and MariaDB images, which have their own respective licenses.

WordPress: https://hub.docker.com/_/wordpress
MariaDB: https://hub.docker.com/_/mariadb

See LICENSE.txt for more information.

🤝 Contact

Eli Pavlov - www.weblightenment.com - admin@weblightenment.com

Project Link: https://github.com/eli-pavlov/helm-wordpress-mariadb.git

💎 Acknowledgements