Chapter 17. Configuring the Manager

  1. Add the PPEM package repository:

    # wget -O pgpro-repo-add.sh https://repo.postgrespro.ru/ppem/ppem/keys/pgpro-repo-add.sh
    # sh pgpro-repo-add.sh
    
  2. Install the manager:

    # apt install ppem ppem-gui
    

    The ppem-manager.yml manager configuration file will be downloaded to your local device.

    The path to the configuration file is /etc/ppem-manager.yml.

  3. Create the DBMS user on behalf of which the manager will connect to the repository database:

    # sudo -u postgres createuser --pwprompt ppem
    

    When executing this command, specify the DBMS user password.

  4. Create the repository database:

    # sudo -u postgres createdb -O ppem ppem
    
  5. Ensure that the DBMS user can connect to the database:

    # psql -h localhost -U ppem -d ppem
    

    In case of connection issues, ensure that the HBA rule allowing the DBMS user to connect to the database, as well as the authorization method, are specified in the pg_hba.conf configuration file.

    For more information, refer to the official Postgres Pro documentation on the pg_hba.conf configuration file.

  6. In the /etc/ppem-manager.yml manager configuration file:

    • Specify the name of the host to connect to using the repo.host parameter:

      repo:
        host: "localhost"
      
    • Specify the repository database name using the repo.name parameter:

      repo:
        name: "ppem"
      
    • Specify the DBMS user name and password using repo.user and repo.password parameters:

      repo:
        user: "ppem"
        password: "DBMS_user_password"
      

    Note

    It is possible to use a single URL instead of the above parameters for connecting the manager to the repository database. The URL must be specified using the repo.url parameter:

    repo:
      url: "postgres://ppem:DBMS_user_password@localhost/ppem"
    

    For more information about the URL format, refer to the official Postgres Pro documentation on connection strings.

  7. (Optional) To place database objects in a schema other than public used by default, in the /etc/ppem-manager.yml manager configuration file, specify the custom schema name using the repo.schema parameter:

    repo:
      schema: "myschema"
    

    The custom schema will be created automatically, or you can create it manually:

    # sudo -u postgres psql -d ppem -c "CREATE SCHEMA myschema AUTHORIZATION ppem;"
    

    Note that you can edit the repo.schema parameter only before starting the repository. If you decide to change the schema after that, you must recreate the repository database. This process does not automatically transfer existing database objects.

  8. Start the manager service and add it to the server startup:

    # systemctl start ppem
    # systemctl enable ppem
    

The web application will be installed on the server.