Configuring an external database for Measure and Release

You can configure Measure and Release to use an external MongoDB database by creating a Kubernetes secret to store the database connection URL and updating the Helm chart to reference this secret.

Before you begin

You must have completed following tasks:

  • Ensured a running MongoDB instance is available.
  • Ensured that the following information is available:
    • MONGO_HOST
    • MONGO_PORT
    • Mongo_DATABASE
    • Mongo_USER
    • Mongo_PASSWORD
  • Ensured that the database user has the permission to access the required database.

Procedure

  1. Create a Kubernetes secret mongodb-url-secret in the target namespace, storing the MongoDB connection URL as the password.
    MONGO_HOST=<mongo-host>
    MONGO_PORT=3306
    MONGO_DATABASE=<database-name>
    MONGO_USER=<database-name>
    MONGO_PASSWORD=<password>
    MONGO_URL="mongodb://${MONGO_USER}:${MONGO_PASSWORD}@${MONGO_HOST}:${MONGO_PORT}/${MONGO_DATABASE}"
    
    kubectl create secret generic mongodb-url-secret --namespace ${NAMESPACE} \
      --from-literal=password="${MONGO_URL}"
  2. Add the following to the HELM_OPTIONS section of the installation script to reference the MongoDB secret:
    --set hcl-ucv-prod.secrets.database=mongodb-url-secret

Results

After you run the installation script, DevOps Loop is installed, and the Measure and Release capabilities use the external MongoDB instance through the Kubernetes secret.

What to do next

You must install DevOps Loop to apply the configuration. See Installation of DevOps Loop.