camunda-community-hub / camunda-7-community-helm

Camunda public Kubernetes Helm repo and charts
Apache License 2.0
40 stars 38 forks source link

Managed databases in Camunda BPM chart #4

Closed Kirkirillka closed 3 years ago

Kirkirillka commented 3 years ago

I suggest providing users the opportunity to bootstrap an RDMS instance for their Camunda BPM installation.

During installation, an user may specify either tags.managed-postgresql=true or tags.managed-mysql=true` to install a subchart (but not to use them both). For PostgreSQL it may use bitnami/postgresql and for MySQL the bitnami/mysql charts accordingly:

With postgres:

helm install camunda-with-managed-db camunda-bpm-platform --set tags.managed-postgres=true

Output:


-> % kubectl get all -l app.kubernetes.io/instance=camunda-with-managed-db
NAME                                                                READY   STATUS    RESTARTS   AGE
pod/camunda-with-managed-db-camunda-bpm-platform-58587cb6ff-j6s5m   1/1     Running   3          5m51s
pod/camunda-with-managed-db-mysql-0                                 1/1     Running   0          5m50s

NAME                                                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
service/camunda-with-managed-db-camunda-bpm-platform   ClusterIP   10.105.94.252   <none>        8080/TCP   5m51s
service/camunda-with-managed-db-mysql                  ClusterIP   10.102.218.18   <none>        3306/TCP   5m51s
service/camunda-with-managed-db-mysql-headless         ClusterIP   None            <none>        3306/TCP   5m51s

NAME                                                           READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/camunda-with-managed-db-camunda-bpm-platform   1/1     1            1           5m51s

NAME                                                                      DESIRED   CURRENT   READY   AGE
replicaset.apps/camunda-with-managed-db-camunda-bpm-platform-58587cb6ff   1         1         1       5m51s

NAME                                             READY   AGE
statefulset.apps/camunda-with-managed-db-mysql   1/1     5m51s

With MySQL:

helm install camunda-with-managed-db camunda-bpm-platform --set tags.managed-mysql=true

Output:

-> kubectl get all -l app.kubernetes.io/instance=camunda-with-managed-db                                                                                                                                             
NAME                                                                READY   STATUS    RESTARTS   AGE
pod/camunda-with-managed-db-camunda-bpm-platform-5668b78d4d-f5wj6   1/1     Running   3          2m13s
pod/camunda-with-managed-db-mysql-0                                 1/1     Running   0          2m13s

NAME                                                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
service/camunda-with-managed-db-camunda-bpm-platform   ClusterIP   10.105.201.228   <none>        8080/TCP   2m13s
service/camunda-with-managed-db-mysql                  ClusterIP   10.105.207.167   <none>        3306/TCP   2m13s
service/camunda-with-managed-db-mysql-headless         ClusterIP   None             <none>        3306/TCP   2m13s

NAME                                                           READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/camunda-with-managed-db-camunda-bpm-platform   1/1     1            1           2m13s

NAME                                                                      DESIRED   CURRENT   READY   AGE
replicaset.apps/camunda-with-managed-db-camunda-bpm-platform-5668b78d4d   1         1         1       2m13s

NAME                                             READY   AGE
statefulset.apps/camunda-with-managed-db-mysql   1/1     2m13s

Due to the fact, that the feature uses already existing charts, we may benefit from others' contributions. In the case of managed databases, it is possible to alter their parameters (persistence, HA, replication, and so on).

Warning: the persistence mode is not enabled for managed database by default. This is due to ambiguity when a DB was created, but the user tries to do helm upgrade with new DB user\pass - neither managed DB will updates the already initialized database.

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

aabouzaid commented 3 years ago

Hi @Kirkirillka doing that is not recommended in general in Helm where it will be coupled and complex. (Camunda platform supports 9 databases types!) You can use Kustomize to composite multi charts together.