Configuring a PostgreSQL database for Altair SLC Hub

Ian Balanzá-Davis
Ian Balanzá-Davis
Altair Employee
edited May 2 in Altair RapidMiner

Altair SLC Hub requires a PostgreSQL database in order to store information. This consists of the configuration information, user information, and so on that defines the behaviour of Altair SLC Hub at your site.

You must ensure that the PostgreSQL database has sufficient resources and is properly backed up. We recommend that the database is on a different machine than the Altair SLC Hub installation to ensure that any resource conflicts do not cause the database to be compromised. Currently only the PostgreSQL database is supported, version 13 or later.

The basic configuration requirements are available at https://hubdoc.worldprogramming.com/ in the Planning section under Database.

The Altair SLC Hub initialisation procedure dbmigrate is the step that adds the necessary tables to an existing PostgreSQL database, so the database must be running and ready to use before you start the Altair SLC Hub installation.

If you do not have a PostgreSQL database then the following tips should help you get started. Please note that Altair does not supply the PostgreSQL database or take responsibility for ongoing maintenance and support (unless you are one of our Managed Services customers where Altair manage your servers on your behalf). You should study the PostgreSQL website and documentation for full information.

  • A Windows installer for PostgreSQL can be downloaded from https://www.postgresql.org/download/windows/ and similarly a Linux installer for PostgreSQL can be downloaded from https://www.postgresql.org/download/linux/.
  • Once downloaded, run the installer and remember the username and password. Start PGAdmin and create a new server:
    server name: local_server hostname: localhost
  • Define a password for the postgreSQL user. Right click local_server, select Create and click Login/Group Role. Enter the required information, for example:
    Name: slchub Password: slchub
  • Ensure the account has can login privilege. Then expand local_server, right-click Databases, select Create and click Database. Enter the required information, for example:
    database name: slchub  Owner: slchub

Under Security, Create a new privilege:

Grantee: slchub privileges: all Grantor: postgres 

The connection to the database is configured using the database configuration section. A list of the configuration settings and comments on their use is found in the file C:\Program Files\Altair\SLC Hub\etc\config.d\database.yaml (Windows) or /opt/worldprogramming/slchub/etc/config.d/database.yaml (Linux) within the hub installation.

In order to configure an external database connection, take a copy of this file and save it to a file in the same directory with a lexigraphically greater name. For example, make a copy of database.yaml called database_custom.yaml. Then modify the settings in that file appropriately as shown below:

type: postgresql  host: localhost  port: 5432  database: slchub user: slchub  password: slchub  sslMode: disable  

Before continuing it is necessary to verify that the connection information for the database is correct. This can be done using the hubctl commands, as follows:

hubctl verifydb 

Database table creation: Having created the database within the PostgreSQL server it is necessary to perform database schema migration. This also serves to verify the connection settings. To do this use the hubctl command:

hubctl dbmigrate 

If there are any errors, during the process they will be printed out. Otherwise the command will complete with the message All <n> steps completed successfully.

Maintenance

Your IT staff should monitor and maintain the postgres database following standard IT practices. The disk containing the postgres files should be regularly backed-up and be recoverable in the event of a disaster recovery.

The 'pg_dump' utility provides a useful command for backing up the contents of a postgres database. e.g.: pg_dump -p PORT -h HOST -U wpsadmin -d WPSHub > wpshub.dump