Create your PostgreSQL database for your production environment.
Before you begin
The steps for preparing the Document Processing engine databases require scripts
and additional files that are provided in GitHub repositories. When you prepared your cluster for
deployment, you created a copy of the Git repository that contains supporting configuration files
and scripts for the Cloud Pak for Business Automation deployment.
- Locate the
cert-kubernetes
repository that you extracted from the https://github.com/icp4a/cert-kubernetes/tree/24.0.0 URL in
Preparing a client to connect to the cluster. This repository contains the
scripts that you need to prepare and initialize your databases.
- Change the directory to
cert-kubernetes
. Then, copy the
ACA/configuration-ha/PG folder to your PostgreSQL server or to a host that has
a PostgreSQL client (psql) that can connect to the PostgreSQL server.
Tip: If you need to know which database versions are supported for your
installation, use this
IBM Support page to generate a software compatibility
report.
About this task
The provided scripts can be used to both create and initialize the databases for
Document Processing engine. If you prefer to create
your own databases and use the scripts only to initialize the databases, then the databases that you
create must meet these minimum requirements for the Base and Project databases:
- Encoding UTF8
- Grant admin privileges to the database user that is used to access the database.
Procedure
If you are creating and initializing the Base database by using the provided scripts,
do the following steps:
-
From the
PG
folder, run the script CreateBaseDB.sh
to create
and initialize the Base database. The run user must have privileges to run the psql
command line and admin privileges on PostgreSQL.
- Go directly to step 4.
If you created your own Base database instead of running
CreateBaseDB.sh
, do the following to initialize the Base database:
- From the
PG
folder, run the script InitBaseDB.sh
to
initialize the Base database. The run user must have privileges to run psql
command
line and admin privileges for the Base database.
Note: When you specify the parameter values in the CR YAML, you use values for this database in the
following parameters:
datasource_configuration
dc_ca_datasource
database_servername: YOUR_DATABASE_SERVER
database_name: YOUR_DATABASE_NAME
database_port: YOUR_DATABASE_PORT
If you are creating and initializing the Project databases by using the provided
scripts, do the following steps:
- From the
PG
folder, run the script AddTenant.sh
to
create and initialize the project database. The run user must have privileges to run the
psql
command line and admin privileges on PostgreSQL. When prompted by
the script for a project ID, provide a unique value that is not being used by an existing
project.
- Repeat step 4 for each project database you need to create.
If you created your own Project database instead of running
AddTenant.sh
, do the following to initialize the Project database:
- From the
PG
folder, run the script InitTenantDB.sh
to
initialize your Project database. The run user must have privileges to run psql
command line and admin privileges for the Project database. When prompted by the script
for a project ID, provide a unique value that is not being used by an existing
project.
- Repeat for each project database you need to initialize.
Note: When you specify the parameter values in the CR YAML, you use values for this database in the
following parameters, for example if your project databases are named
proj01db
and
proj02db
:
dc_ca_datasource:
tenant_databases:
- proj01db
- proj02db
This is the same location where you specify additional databases if you
need to create more for additional projects.
What to do next
If you did not use the cp4a-prerequisites.sh script to generate the YAML
template files for the database secrets, go to Creating secrets to protect sensitive Document Processing configuration data.