Configuring remote PostgreSQL database storage

You can deploy i2 Analyze with PostgreSQL database storage that is remote from the i2 Analyze server. When i2 Analyze is configured to deploy with a remote instance of PostgreSQL, the database is created and updated remotely without the i2 Analyze deployment toolkit present on the server that hosts the PostgreSQL instance.

About this task

By default, PostgreSQL deployments support connections only from localhost. You must update the PostgreSQL configuration to allow external connections before you can configure i2 Analyze to connect to it.

To deploy with remote storage, the i2 Analyze configuration must contain certain information about your PostgreSQL instances. After you update the configuration, the specified databases can be created and updated by the deployment toolkit on the remote server.

Procedure

  1. Enable PostgreSQL to support remote connections.

    1. In a text editor, open the pg_hba.conf file in the data folder on your PostgreSQL database server.

      1. To allow connection from any host to all PostgreSQL databases, using any PostgreSQL user and password, add these lines to the end of the pg_hba.conf file:

        host    all     all     0.0.0.0/0       scram-sha-256
        host    all     all     ::/0            scram-sha-256

        If you need to set restrictions, see the instructions at the top of the pg_hba.conf file and modify the file as required.

    2. In a text editor, open the postgresql.conf file in the data folder.

      1. Set the listen_addresses to '*' to allow connection from any host.If you need to set restrictions, see the comments for listen_addresses in the postgresql.conf file and modify the file as required.

        Note: When you allow connections from any host, this includes connections from localhost.

  2. In the i2 Analyze configuration, edit the configuration\environment\topology.xml file. Update the host-name and port-number attribute values of the database element to match the values of your remote PostgreSQL instance, for example:

    <database database-type="InfoStore" dialect="postgres" database-name="ISTORE" xa="false" id="infostore" host-name="hostname" port-number="5432" os-type="WIN"/>
  3. Edit the configuration\environment\opal-server\environment.properties file, to specify the details of your remote and local instance of PostgreSQL:

    • Ensure that the db.installation.dir property is set to the client 'Command Line Tools' installation folder.

    • Ensure that the db.database.location.dir property is set to the root data folder of the installation of PostgreSQL on the database server.

  4. Ensure that the users that are specified for your databases in the configuration\environment\credentials.properties file are valid for your remote instance of PostgreSQL on the database server.