Using your own DB
If you are planning to use an existing database, you will need to configure the environment variables, in the values.yaml
file.
See this documentation link for a basic understanding of environment variables used in the Digital.ai Release helm chart.
Using an existing or external database
Note: Skip this section if you do not want to use your own database instance. The Digital.ai Release Helm chart will deploy a single instance of PostgreSQL by default.
However, if you plan on using your own database with Digital.ai Release, then you need to follow the steps given below.
Edit the following in the values.yaml
file:
- Change
'postgresql.install' to 'false'
UseExistingDB.Enabled: true
UseExistingDB.XLR_DB_URL: jdbc:postgresql://<postgres-service-name>.<namespace>.svc.cluster.local:5432/<xlr-database-name>
UseExistingDB.XLR_DB_USER: Database User for xl-release
UseExistingDB.XLR_DB_PASS: Database Password for xl-release
UseExistingDB.XLR_REPORT_DB_URL: jdbc:postgresql://<postgres-service-name>.<namsepace>.svc.cluster.local:5432/<xl-report-database-name>
UseExistingDB.XLR_REPORT_DB_USER: Database User for xl-report db
UseExistingDB.XLR_REPORT_DB_PASS: Database Password for xl-report db
Note: To specify the values for the steps above, you must first create these two databases in your existing postgresql instance, using the steps given below:
CREATE USER <xlr-username> WITH
NOSUPERUSER
NOCREATEDB
NOCREATEROLE
ENCRYPTED PASSWORD '<xlr-password>';
CREATE USER <xl-report-username> WITH
NOSUPERUSER
NOCREATEDB
NOCREATEROLE
ENCRYPTED PASSWORD '<xl-report-password>';
CREATE DATABASE <xlr-database-name>;
CREATE DATABASE <xl-report-database-name>;
GRANT <xlr-database-name> TO postgres;
GRANT <xl-report-database-name> TO postgres;
ALTER ROLE <xlr-username> WITH PASSWORD '<xlr-password>';
ALTER ROLE <xl-report-username> WITH PASSWORD '<xl-report-password>';
ALTER DATABASE <xlr-database-name> OWNER to <xlr-username>;
ALTER DATABASE <xl-report-database-name> OWNER to <xl-report-username>;
The postgres-service-name
is obtained by executing command
kubectl get service
Example:
UseExistingDB:
Enabled: true
# If you want to use an existing database, change the value to "true".
#Uncomment the following lines and provide the values.
XLR_DB_URL:
jdbc:postgresql://xlr-production-postgresql.default.svc.cluster.local:5432/<xlr-database-name>
XLR_DB_USER: <xlr-username>
XLR_DB_PASS: <xlr-password>
XLR_REPORT_DB_URL:
jdbc:postgresql://xlr-production-postgresql.default.svc.cluster.local:5432/<xl-report-database-name>
XLR_REPORT_DB_USER: <xl-report-username>
XLR_REPORT_DB_PASS: <xl-report-password>
Note: If you have database instances running outside the cluster. Configure the parameters given above to match your setup.
Note: Database username and passwords are now stored in kubernetes secrets.