Configuration of an external database
You can configure an external database for HCL DevOps Test Hub (Test Hub) by using a Helm chart to control and manage your resources. You can host the database in the same cluster as Test Hub or in a remote cluster. You can configure the external database either during a new installation or by upgrading an existing installation of Test Hub.
Prerequisites
- Installed Test Hub.Note:This prerequisite applies only when you upgrade an existing instance and connect to an external database.
- Installed PostgreSQL 15.
- Obtained user credentials for the external database with the following
permissions:
- Data manipulation permissions for insert, delete, update, and select.
- Schema modification permissions to alter a table, create a table, truncate, drop, and create or modify an index.
- Ensured that the database has sufficient connections. The recommended value for max_connections is 100.
External database support in Test Hub
|
Parameter |
Description |
Default value |
|---|---|---|
|
postgresql.external |
Flag to indicate whether the external database connection is used. |
false |
|
postgresql.hostname |
Hostname or IP address of the external database server. |
NA |
|
postgresql.username |
Username to access the database. |
postgres |
|
postgresql.existingPassword |
Password to access the database. |
NA |
|
postgresql.port |
Port for the database connection. Note:
This parameter is optional. The
default port is 5432. Configure it only
if your database uses a different port. |
5432 |
|
postgresql.params.sslmode |
Server certificate validation mode. Note:
This parameter is optional. The
recommended value is verify-full, as it
provides the most secure SSL validation. |
verify-full |
|
global.privateCaBundleSecretName |
Secret name where the self-signed certificates are stored. |
NA |
helm upgrade main --install --reuse-values . \
--timeout 810s \
--create-namespace \
-f ./values-k3s.yaml \
--set global.domain=172.22.132.41.nip.io \
-n devops-system \
--set-literal passwordSeed=secretSauce \
--set signup=true \
--set hclLicensingURL=https://license.brr.com \
--set hclLicensingID=2yzfernw \
--set imageRegistry=registry.brr.com \
--set postgresql.external=true \
--set postgresql.hostname=pgdb.postgres.database.azure.com \
--set postgresql.username=judgejudy \
--set postgresql.existingPassword=Secret!0wl \
--set demo.enabled=true
--reuse-values
to prevent helm upgrade from overwriting existing
customizations and reverting to default values.Methods for configuring an external database connection
You can configure the Helm chart to connect to an external database by using one of the following methods:
- Database with a trusted certificate authorityyou must specify the following parameters in the Helm chart:
--set postgresql.external=true \ --set postgresql.hostname=kmpg.postgres.database.azure.com \ --set postgresql.username=theadmin \ --set postgresql.existingPassword=theadminpassword - Database within your network by using a self-signed certificateYou must specify the following parameters in the Helm chart:
--set global.privateCaBundleSecretName=my-internal-ca-bundle \ --set postgresql.external=true \ --set postgresql.hostname=mydbhost.corp.example.com \ --set postgresql.username=postgres \ --set postgresql.existingPassword=changeme