Changing Database Password In Container Deployments(3.0)

Changing the database password is not totally unlike an upgrade of . It requires you to stop the platform and batch workflows, changing the password and then upgrading the helm charts.

  1. Make sure all ECs are disconnected.

    mzcli mzadmin/<password> disconnect <ec name> ...
  2. To change the database password the platform must be stopped. We do this by setting replicas to 0.

    kubectl scale --replicas=0 statefulset/platform

    Verify that the platform pod have stopped by checking that there is no platform appearing after the command below.

    kubectl get pods
  3. Modify the password in the database. Update the Oracle, PostgreSQL or SAP HANA passwords to correspond to the ones you set in the next step.

  4. Upgrade the  helm chart either by editing the kubernetes env-secrets or by passing the arguments with helm.

    Env-secrets approach:
    Refer to Bootstrapping System Certificates and Secrets - Private Cloud(3.0) if you opt for editing the kubernetes env-secrets. When done, continue with step 5.

    kubectl edit secret env-secrets


    The password must be entered in base64 encoded format

    Helm approach:
    If you choose to pass arguments with helm then you need to make sure that you also pass any arguments you passed in when  was installed. The example below we have installed the
     chart as "mz-chart" from the path "mz-path".

    helm upgrade --install mz-chart mz-path --set=platform.db.jdbcPassword=mynewpassword
  5. Increase the replica count again.

    kubectl scale --replicas=1 statefulset/platform
  6. Once the platform have restarted a new password will be set. If the platform pod is ready you have verified that the password works.

    kubectl get pod platform-0