Skip to content

A Docker Container to run to deploy the MariaDB Operator

License

Notifications You must be signed in to change notification settings

mariadb-kester/docker-operator

Repository files navigation

docker-operator

A Docker Container to run to deploy the MariaDB Operator

Terraform Demo to build MariaDB Enterprise in Containers

License GitHub stars GitHub forks

This project is designed to create a containerised Kubernetes infrastructure on DigitalOcean, and deploy the following using automation:

  • MariaDB Kubernetes Operator
  • Photo App test application

For this demonstration to work, you will require various third party accounts.


Terms of use

Nothing in this demonstration is designed to be used in production and this is not supplied, supported or endorsed by MariaDB.

Please note the free $200 credit is enough to run this demonstration, however, if you do not decommission your services, or you use more than the free credit you will be liable for the cost.


Prerequisites

You!

You require a certain level of technical knowledge to complete this, as you are required to install some tools to your computer.

The demonstration is designed to run within a Docker Environment.

Third Party Accounts

You will require FREE accounts for:

Digital Ocean supports Single Sign On (SSO) using your GitHub account. SSO allows easy navigation between the services and allows you to link the accounts together.

It is important to create your Github account before creating the other accounts.


Getting Started

Hopefully you have already created the Third Party Accounts required.

You can now fork the required repositories.

Copy the .env.example file and add your API KEY from Digital Ocean.

Once you have forked the repositories, you need to build the dockerfile and run the created container.

docker compose build --no-cache
docker compose up -d

To make it easy, there is a make script to set up your kubernetes environment. Connect in to your Docker Container.

make init-demo
make plan-demo
make apply-demo

Once your Kubernetes Cluster is built you can run the following commands:

make initialise-helm
make prepare-operator

You need to wait about 30 seconds for the operator to become available and then you can:

make install-operator

After three minutes you can check the pods are available: kubectl get pods

You should now have a fully running Kubernetes Cluster with a MariaDB database environment. To install the application run:

make install-photo

After a few minutes you can get the services information and connect:

kubectl get svc 

Find the maxscale-gui IP and connect to it via the IP address:8989 --> mariadb-operator / MaxScale11!

You will also find the service IP address for the Application.

destroy

The destroy command will delete the infrastructure. This is important, if you have finished using it, to stop getting charged. But please note, some resources such as Load Balancers and Storage will remain. Clearly, do not run this until you have finished.

make destroy-demo

If you are running the destroy command, it will ask you to confirm by typing yes at the prompt.

Contributing to this project

To contribute to this repository, follow these steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b <branch_name>.
  3. Make your changes and commit them: git commit -m '<commit_message>'
  4. Push to the original branch: git push origin my-helm-repo/<location>
  5. Create the pull request.

Alternatively see the GitHub documentation on creating a pull request.

Contact

If you want to contact me you can reach me at [email protected].

License

This project uses the following license: MIT.

Disclaimer

Whilst, I might currently work for MariaDB, this work was originally created before my employment by MariaDB and any development to these scripts is done strictly in my own time. It is therefore not endorsed, supported by or recommend by MariaDB.

About

A Docker Container to run to deploy the MariaDB Operator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published