Configuring an external database for Test
You can configure an external PostgreSQL database for the Test capability in DevOps Loop and provide the database connection details in the Helm chart so that Test connects to the external database instead of using the PostgreSQL instance that is installed in the cluster by default.
Before you begin
You must have completed the following tasks:
- Prepared the external PostgreSQL instance, and ensured that it is accessible from the Kubernetes cluster.
-
Ensured that the database user has permissions for insert, update, delete, select, and schema modifications (create, alter, drop tables and indexes).
-
Ensured that the Kubernetes cluster can reach the database host and port.
- Ensured that the following information is available:
Database host name or IP addressDatabase port (default: 5432)Database nameDatabase user nameDatabase password
About this task
Procedure
-
Add the required external database variables to the beginning of the
installation script:
TEST_DB_HOST=<database-host> TEST_DB_PORT=5432 TEST_DB_NAME=testhubdb TEST_DB_USER=postgres TEST_DB_PASSWORD=<database-password> TEST_CA_SECRET=<ca-secret-name> # Optional, if using self-signed certificatesThese variables define the connection details for the external PostgreSQL database used by the Test.
-
Update the
HELM_OPTIONSin the script to include the external database connection parameters:HELM_OPTIONS="${HELM_OPTIONS} \ --set hcl-devops.postgresql.external=true \ --set hcl-devops.postgresql.hostname=${TEST_DB_HOST} \ --set hcl-devops.postgresql.port=${TEST_DB_PORT} \ --set hcl-devops.postgresql.username=${TEST_DB_USER} \ --set hcl-devops.postgresql.existingPassword=${TEST_DB_PASSWORD}"Note:By default thesslmodeis set toverify-full.If the database uses a self-signed certificate, add the following parameter:
--set hcl-devops-prod.global.privateCaBundleSecretName=${TEST_CA_SECRET}