Configure a PostgreSQL database
for User Management Services (UMS) single sign-on and teams
options.
Procedure
-
Using psql create a database and grant your database user privileges to
create resources:
CREATE DATABASE umsdb OWNER db_user ENCODING UTF8;
GRANT ALL PRIVILEGES ON DATABASE umsdb to db_user;
Where
umsdb is the name of the database and
db_user
is the database user.
-
Make a note of your values for the following configuration parameters that you will need later
to add to the
datasource_configuration
section of the custom resource:
datasource_configuration:
dc_ums_datasource: # credentials are read from ums_configuration.admin_secret_name
# oauth database config
dc_ums_oauth_type: postgresql
dc_ums_oauth_host: host_name
dc_ums_oauth_port: 5432
dc_ums_oauth_name: umsdb
dc_ums_oauth_driverfiles: postgresql-42.2.9.jar
# teamserver database config
dc_ums_teamserver_type: postgresql
dc_ums_teamserver_host: host_name
dc_ums_teamserver_port: 5432
dc_ums_teamserver_name: umsdb
dc_ums_teamserver_driverfiles: postgresql-42.2.9.jar
Important: If you configured PostgreSQL for high availability following the Patroni
architecture with an HAproxy for load balancing, make sure that you specify the host name and port
number of the HAproxy as the values for dc_ums_oauth_host and
dc_ums_teamserver_host
and dc_ums_oauth_port and
dc_ums_teamserver_port
.