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 10 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 postgresql10-server package and the postgresql10 package on the same system as the CPD (i.e. the blueworx-db) package.
For instructions on how to install the postgresql10 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/10/data directory 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 postgresql10-server package on the remote server.
Install the postgresql10 client package on the same system as the CPD (i.e. the blueworx-db) package.
For instructions on how to install the postgresql0 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:
Start the Postgresql server
systemctl start postgresql-10
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/10/data/pg_hba.conf
host all all X.X.X.X/24 md5where
X.X.X.Xare the BRM , BAM and BSM server IP addresses.
/var/lib/pgsql/10/data/postgresql.conf
listen_addresses = '*'
port = 5432
Become root again and restart PostgreSQL as follows:
systemctl restart postgresql-10
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/10/static/libpq-pgpass.html
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.
Add URL for the remote system and password for bwadmin into the BRM configuration file brm.config See here for details: Main Database Configuration Options
Initialise the Configuration Profile Database on the remote database:
/opt/blueworx/db/bin/bdb install hostname port