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.
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 address
Database port (default: 5432)
Database name
Database user name
Database password
You must update the installation script so that the Test capability connects to the
external database. The modifications include defining database variables and passing the
database parameters to Helm during installation.
-
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 certificates
These variables define the connection details for the external PostgreSQL
database used by the Test.
-
Update the
HELM_OPTIONS in the script to include the external
database connection parameters:
HELM_OPTIONS="${HELM_OPTIONS} \
--set ibm-devops-prod.postgresql.external=true \
--set ibm-devops-prod.postgresql.hostname=${TEST_DB_HOST} \
--set ibm-devops-prod.postgresql.port=${TEST_DB_PORT} \
--set ibm-devops-prod.postgresql.username=${TEST_DB_USER} \
--set ibm-devops-prod.postgresql.existingPassword=${TEST_DB_PASSWORD}"
Note: By default the sslmode is set to
verify-full.
If the database uses a self-signed certificate, add the following
parameter:
--set ibm-devops-prod.global.privateCaBundleSecretName=${TEST_CA_SECRET}
After you run the installation script, DevOps Loop is
installed and the Test capability connects to the external PostgreSQL database by using
the parameters defined in the script.
You must install DevOps Loop to apply the configuration.
See Installation of DevOps Loop.