Kubernetes

= This is a work-in-process Page =

The following set of files works with release 19.01 and later for a manual build and containerizing an already configured database. If you use local file authentication, you need to modify the Dockerfile to copy over your .htaccess file, accordingly. If you are unsure what that is, I point back to the header at the top of this page - this is pre-release, work-in-process. Don't distract developers from actually completing work by asking them how to do things that they are trying to automate in the first place.

You should migrate your /pictures and /drawings folders to shared storage, such as NFS, which is used in the example deployment.yaml file. You will then change your paths in the openDCIM Configuration tab to assets/pictures and assets/drawings, and then run the

Dockerfile
Modify for your locale.

tzscript.sh
Modify for your timezone.

php.ini
We'll have a full php.ini file when we tidy all of this up. Here are the few important bits modified from a standard distribution php.ini file.

000-default.conf
Leave the logfile definitions as-is. The Dockerfile creates a symlink from them to /dev/stdout so that standard container logging includes the apache2 logs.

Once you have those files, you can run (substitute MY_REPO with your repository information):

configmap.yaml
These are your environment variables that will change the behavior of openDCIM. They are dynamically updated, so as soon as you make a change in the configMap, it will change the values in the running containers.

service.yaml
This defines a service so that it can be exposed through a LoadBalancer or, in this example, an ingress rule.

ingress.yaml
Definition of the inbound rule for ingress to the service. Swap out dcim.YOURDOMAIN.COM with the URL you are using. This ingress rule assumes that you are running cert-manager for automatic certificate management. Adjust accordingly.

cert.yaml
This only works if you have CertManager installed and running in your Kubernetes cluster, otherwise you have to follow documentation on how to add the opendcim-tls secret the old fashioned way.

deployment.yaml
This is the main controller. Suggested minimum of 2 replicas for some level of fault tolerance, but that is only useful if your MySQL/Maria database is a fault-tolerant cluster. There are plenty of example online for how to set up a Galera cluster, including some in Kubernetes.