Skip to main content
Version: Deploy 23.1

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 daideploy_cr.yaml file.

note

Skip this section if you do not want to use your own database instance. The Digital.ai Deploy Operator creates a PostgreSQL instance by default. This procedure is for those who want to use an existing PostgreSQL database server with Digital.ai Deploy.

Using an Existing Database​

Create the PostgreSQL database in your existing PostgreSQL server if not done already. See the following SQL commands, for example.

CREATE USER <xld-username> WITH
NOSUPERUSER
NOCREATEDB
NOCREATEROLE
ENCRYPTED PASSWORD '<xld-password>';

CREATE DATABASE <xld-database-name>;
GRANT <xld-database-name> TO postgres;

ALTER ROLE <xld-username> WITH PASSWORD '<xld-password>';
ALTER DATABASE <xld-database-name> OWNER to <xld-username>;

Once you have your database up and running, set the following parameters in the daideploy_cr.yaml file:

  • postgresql.install: false—with this setting, the Operator-based installer skips the default PostgreSQL database installation.
  • UseExistingDB.Enabled: true—with this setting, Deploy is being set up to use an existing database.
  • UseExistingDB.XL_DB_URL: jdbc:postgresql://<postgres-service-name>.<namespace>.svc.cluster.local:5432/<xld-database-name>—the existing PostgreSQL database server URL
  • UseExistingDB.XL_DB_USERNAME: Database User for xl-deploy—PostgreSQL database user name
  • UseExistingDB.XL_DB_PASSWORD: Database Password for xl-deploy—PostgreSQL database password

Here's an 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.
XL_DB_URL: jdbc:postgresql://xld-production-postgresql.default.svc.cluster.local:5432/<xld-database-name>
XL_DB_USERNAME: <xld-username>
XL_DB_PASSWORD: <xld-password>
note

If you have your database instance running outside the cluster, configure the parameters above to match your setup.