Before you install, create PostgreSQL databases for IBM Business Automation Workflow, Business Automation
Studio, IBM FileNet® Content Manager, and IBM
Business Automation Navigator.
Before you begin
Use the latest PostgreSQL JDBC driver
and make sure the PostgreSQL database is
configured correctly for the customer workload.
Adjust the following parameters in the postgresql.conf file of the database
server:
Table 1. PostgreSQL parameters
Parameter |
Setting |
Description |
shared_buffers |
minimum 1024 MB |
The normal PostgreSQL performance
tuning recommendation is to use about 25% of the memory for the shared buffer. Adjustments to the
Linux® kernel configuration might also be required; check the
PostgreSQL tuning guides. |
work_mem |
minimum 20 MB |
This parameter applies to each session, and a large number of user sessions can cause large
memory usage. This memory is critical because it is used for sort operations. The running time can
increase significantly (over an hour for toolkit deployments, for example) if the value is set too
low. |
max_prepared_transactions |
for example, 200 |
This value should be at least as large as the max_connections setting. |
max_wal_size |
for example, 6 GB |
For larger workloads, the default value must be increased. You can find advice in the
PostgreSQL server log files if an increase
is required. |
log_min_duration_statement |
for example, 5000 |
You can optionally set this parameter. It allows additional logging of statements that exceed
the specified running time in milliseconds (which corresponds to 5 seconds in this example) to
identify bottlenecks and tuning areas. |
About this task
Restriction: You cannot use the same database and database user for IBM Business Automation Workflow Authoring and Business Automation
Studio or other components. You can use a shared
database but you must use a different database user for each component.
Procedure
-
To create the database for IBM Business Automation Workflow:
-
Create a
CREATEDB_AUTHORING_POSTGRESQL.sql
file and copy it to your PostgreSQL server.
-- create the user
CREATE ROLE AUTHORING_USER_NAME PASSWORD 'AUTHORING_USER_PASSW0RD' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
-- create the database:
CREATE DATABASE AUTHORING_DB_NAME WITH OWNER AUTHORING_USER_NAME ENCODING 'UTF8';
GRANT ALL ON DATABASE AUTHORING_DB_NAME to AUTHORING_USER_NAME;
-- Connect to your database and create schema
\c AUTHORING_DB_NAME;
SET ROLE AUTHORING_USER_NAME;
CREATE SCHEMA IF NOT EXISTS AUTHORING_USER_NAME AUTHORIZATION AUTHORING_USER_NAME;
where
AUTHORING_USER_NAME
is the username that Workflow Authoring
uses to connect to the database
AUTHORING_USER_PASSWORD
is the password that Workflow
Authoring uses to connect to the database
AUTHORING_DB_NAME
is the database name for the Workflow
Authoring database. It is case-sensitive.
Log in to the
PostgreSQL server and
run the following command:
psql -f createdb_authoring_postgresql.sql;
- Optional:
To ensure that all communications between Workflow Authoring and PostgreSQL are encoded, import the database
certificate authority (CA) certificate to Workflow Server.
- To create a secret to store the certificate, run the following
command:
kubectl create secret generic ibm-dba-baw-instance1-postgresql-tlscert --from-file=tls.crt=ssl_certificate_file
Don't
change tls.crt
as the key name.
- Add the secret to the database configuration in the
workflow_authoring_configuration
section of the custom resource file. For example,
the name of the secret could be
baw-instance1-postgresql-ssl-secret
.workflow_authoring_configuration:
- name: instance1
...
database:
enable_ssl: true
db_cert_secret_name: " baw-instance1- postgresql-ssl-secret"
...
- Optional:
To configure high availability disaster recovery (HADR) for the Workflow Server database, ensure that
Workflow Server automatically
retrieves the necessary failover server information when it first connects to the database. As part
of the setup, provide a comma-separated list of failover servers and failover ports.
For example, if there are two failover servers, such as:
- server1.postgresql.customer.com on port 5432
- server1.postgresql.customer.com on port 5433
you can specify these hosts and ports in the custom resource configuration YAML file as
follows:
database:
... ...
hadr:
standbydb_host: server1.postgresql.customer.com, server2.postgresql.customer.com
standbydb_port: 5432,5433
retryintervalforclientreroute: default_value_is_10_min
maxretriesforclientreroute: default_value_is_5
... ...
-
To create the database for Business Automation
Studio,
follow the instructions in Creating a PostgreSQL database.
-
To create the databases for IBM FileNet Content Manager,
create a database for the Content Platform Engine global configuration database (GCD) and databases
for the content stores. Follow the instructions in Preparing the databases.
Business Automation Workflow needs four different object
stores (DOCS, TOS, DOS, and AEOS). If you are installing the Workflow capability, you must run the
instructions to create the PostgreSQL database and table spaces four times. If you are installing
only the Workstreams capability, you need two object stores (DOCS and AEOS).
-
To create the database for Business
Automation Navigator, follow the instructions in Preparing the database.
-
To create the database for UMS, follow the instructions in Preparing the database for the User Management Services.
-
If you want to enable data persistence (see Optional: Configuring Application Engine with data persistence), follow the instructions in the final step in Creating a PostgreSQL database for Application
Engine.