Using an Existing PostgreSQL Database
If you plan to use an existing database—one that is not created by default by the Operator-based installer—you must configure the relevant database parameters in the dairelease_cr.yaml
file.
If you have already run Release instance check Migrate to Existing Database.
Skip this section if you do not want to use your own database instance. You can have the Digital.ai Release's Operator-based installer create a PostgreSQL instance at the time of installation or upgrade. This procedure is for those who want to use an existing PostgreSQL database server with Digital.ai Release.
Configure an External Database During installation
Create the PostgreSQL database and user in your existing PostgreSQL server if not done already. See the following SQL commands, for example:
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>;
Once you have your database up and running, you can set the following parameters in the dairelease_cr.yaml
file.
They are set by answering to the question during installation:
Edit database external setup:
.
Here example of the setup the answer to that question:
external.db.main.url: jdbc:postgresql://<postgres-service-name>.<namespace>.svc.cluster.local:5432/<xlr-database-name>
— the existing PostgreSQL database server URLexternal.db.main.username: Database User for xl-release
— PostgreSQL database user nameexternal.db.main.password: Database Password for xl-release
— PostgreSQL database passwordexternal.db.report.url: jdbc:postgresql://<postgres-service-name>.<namespace>.svc.cluster.local:5432/<xl-report-database-name>
— the existing PostgreSQL reporting database server URLexternal.db.report.username: Database User for xl-release-report db
— PostgreSQL reporting database user nameexternal.db.report.password: Database Password for xl-release-report db
— PostgreSQL reporting database password
Here's an example of the content that you need to replace with values that referencing your DB:
main:
url: jdbc:postgresql://xlr-production-postgresql.default.svc.cluster.local:5432/<xlr-database-name>
username: <xlr-username>
password: <xlr-password>
report:
url: jdbc:postgresql://xlr-production-postgresql.default.svc.cluster.local:5432/<xl-report-database-name>
username: <xl-report-username>
password: <xl-report-password>
If the configured main or report database password contains special characters, each of the special characters need to be escaped by \
(backslash) when inputting in the above snippet.
For example, if the configured existing database password is NcfxZQ1%?b<b%c3^)
containing special characters. The value to be input for password should be NcfxZQ1\%\?b\<b\%c3\^\)