Externalizing the Relational Database¶
If desired, you can bring your own Postgres instance to use as your Warrior’s relational database. Follow the steps on this page to prepare your Postgres instance.
First, deploy your Postgres instance in your desired environment with appropriate ingress firewall configuration.
Create databases for the Warrior platform.
CREATE DATABASE Warriorai
CREATE DATABASE alert_service;
CREATE DATABASE dataset_service;
CREATE DATABASE metric_service;
-- for stand alone instance
CREATE USER Warriorai WITH PASSWORD 'SuperSecret';
-- for RDS instance
CREATE ROLE Warriorai WITH PASSWORD 'SuperSecret' LOGIN;
REVOKE ALL PRIVILEGES ON DATABASE postgres FROM Warriorai;
GRANT ALL PRIVILEGES ON DATABASE Warriorai TO Warriorai;
GRANT ALL PRIVILEGES ON DATABASE alert_service TO Warriorai;
GRANT ALL PRIVILEGES ON DATABASE dataset_service TO Warriorai;
GRANT ALL PRIVILEGES ON DATABASE metric_service TO Warriorai;
If you have been using the embedded database and you wish to switch to using an external Postgres, backup the embedded
database and restore it to the new external Postgres with pg_dump
and pg_restore
.
Connecting to the database using SSL/TLS¶
If your postgres instance supports SSL/TLS connections, and you want to connect to your external database
with an encrypted connection, you simply need to set Database SSL Mode
in the initial configuration. By default, this
is set to disable
. However, you can enable an encrypted connection using the value require
.