The Blueworx Configuration Profile Database (CPD) uses a PostgreSQL database to store data used by the Blueworx platform. This database can be hosted locally on the BRM server or remotely on a hosted PostgreSQL database image, either through a cloud platform offering or a remote VM running the PostgreSQL server software.
The prerequisites for installing the CPD component are:
Blueworx CPD installation is a 2 stage process:
The following instructions provide the detailed steps for both a local installation and a remote installation.
Installation of packages:
Install both the postgresql*-server package and the postgresql* package on the same system as the CPD (i.e. the blueworx-db) package, where * is the version number.
For instructions on how to install the postgresql packages, see the PostgreSQL documentation : https://www.postgresql.org/download/linux/redhat/.
You must now follow the instructions in the "PostgreSQL Yum Repository" section
Ensure that you complete all the installation steps including initialising the database and enabling automatic start.
When you have completed all steps the /var/lib/pgsql*/data directory, where * is the version number, will contain sub-directories.
Initialization of the CPD database:
bdb installscript provided in the blueworx-db package. Ensure that BRM is not started and then run the following:
/opt/blueworx/db/bin/bdb install
This section describes how to set up the Blueworx CPD on a remote VM that you have direct access to, including the ability to install packages and run commands.
Installation of packages:
Install the postgresql*-server package on the remote server, where * is the version number.
Install the postgresql* client package, where * is the version number, on the same system as the CPD (i.e. the blueworx-db) package.
For instructions on how to install the postgresq packages, see the PostgreSQL documentation: https://www.postgresql.org/download/linux/redhat/.
Ensure that you complete all the installation steps including initialising the database and enabling automatic start on the remote database server.
Initialisation of the CPD database:
Remote server:
systemctl start postgresql-*
Create bwadmin user and database:
su – postgres
psql
CREATE ROLE bwadmin CREATEDB LOGIN PASSWORD 'password';
CREATE DATABASE bwadmin OWNER bwadmin;
\q(to exit psql)
Allow, as required, BRM, BAM and/or BSM server to have remote access to PostgreSQL
/var/lib/pgsql/*/data/pg_hba.conf
host all all X.X.X.X/24 md5where
X.X.X.Xare the BRM , BAM and BSM (if installed) server IP addresses.
/var/lib/pgsql/*/data/postgresql.conf
listen_addresses = '*'
port = 5432
systemctl restart postgresql-*
CPD server:
Allow remote access to the PostgreSQL server by creating a .pgpass as described in the PostgreSQL help pages here: https://www.postgresql.org/docs/12/static/libpq-pgpass.html The page shown as an example is for version 12 of postgresSQL. The page matching the version installed should be used.
Use the bwadmin user and password specified in the CREATE ROLE command issued on the remote server running PostgreSQL.
The format of the .pgpass file allows the user to configure multiple passwords allowing access to multiple databases from the same PostgreSQL client machine.
In order to configure the Blueworx databases, the .pgpass file can be set up in a generic way using the wildcard character for most of the entries:
*:*:*:*:password
If you need to fully define those entries, for enhanced security or if you are managing multiple databases, then the fully defined entries required for Blueworx are the following:
hostname:port:bwadmin:bwadmin:password
hostname:port:bw_db:bwadmin:password
hostname:port:template1:bwadmin:password
In each case, hostname and port (default to use is 5432) should be replaced with the fully qualified hostname and port of the remote database and password should be replaced by the password for that database.
Initialise the Configuration Profile Database on the remote database:
/opt/blueworx/db/bin/bdb install hostname port