21.1. Installation in the Minimal Environment #
21.1.1. Meeting Prerequisites #
Ensure that the following prerequisites are met:
Table 21.1. Prerequisites
Prerequisite | Host for manager | Host for agent |
|---|---|---|
Platform | Any platform that is compatible with the x86_64 (AMD64) architecture. It can be either a physical server, a virtual machine, or a container that can be accessed in privileged mode. | |
Host resources | 2 CPU cores, 4 GB RAM, 40 GB SSD (or higher) | 2 CPU cores, 2 GB RAM, 20 GB SSD (or higher) |
Operating system | Any of:
| |
Software |
|
|
(Optional) Additional software must be installed to enable more PPEM features, such as logging, monitoring, and metrics collection. | ||
Internet access | The host must have Internet access to reach the Postgres Pro package repositories. | |
Privileged user |
| |
For more information about hardware and software requirements, refer to Chapter 4.
21.1.2. Installing the Additional Software #
Note
This is an optional step.
Skip it if you do not need the PPEM features listed below.
PPEM requires the additional software to be installed on the hosts with DBMS and agents for the following PPEM features to operate:
Logging, monitoring, and metrics collection:
This software is automatically detected by the agent installed on the host, and the related features are enabled automatically.
21.1.3. Adding the Package Repository #
On both the manager and agent hosts, add the Postgres Pro package repository:
Get the access key for the repository:
Open your personal account in the technical support portal.
Go to Administration → License Set → Repositories.
Locate and copy the access key.
Access keys are available only to license set administrators.
Download the
pgpro-repo-add.shBash script:wget --user 'access_key' --password='
access_key_value' https://repo.postgrespro.com/ppem/ppem/keys/pgpro-repo-add.shThis script adds the Postgres Pro repository so that the package manager of the host operating system can use it.
Pass the following credentials to wget:
--user:access_key--password: the access key from the technical support portal
(Optional) Examine the content of the script, if necessary.
Make the script file executable and run it:
chmod +x pgpro-repo-add.sh && ./pgpro-repo-add.sh
The script will install the Postgres Pro GPG keys, add the repository, and configure the package manager.
When prompted, enter the same access credentials as above:
access_keyas the user nameThe access key from the technical support portal as the password
Important
If no credentials are provided or they are invalid, the script offers to add the repository without credentials.
If you proceed without credentials, you must manually provide the credentials later in order to access the repository.
21.1.4. Installing the Manager #
On the manager host:
Add the Postgres Pro package repository, if not added yet.
Install the
ppemandppem-guibinary packages using the package manager of the operating system.Create the PPEM repository database:
On behalf of the DBMS superuser (e.g.,
postgres), create theppemuser who will own the repository database. Use the--pwpromptoption only if you want to set a password for this user:sudo -u postgres createuser --pwprompt ppem
If you used
--pwprompt, enter a password for theppemuser when prompted.On behalf of the DBMS superuser (e.g.,
postgres), create the repository database with theppemuser as its owner:sudo -u postgres createdb -O ppem ppem
Verify that the database owner can connect to the
ppemrepository database:sudo -u ppem psql
The psql prompt must be displayed, indicating the successful connection.
If the DBMS is installed with non-default settings, you may need to adjust the authentication parameters.
For more information, refer to the Connections and Authentication and Client Authentication sections of the official Postgres Pro documentation.
Specify the access credentials for the repository database in the manager configuration file:
repo: url: "postgres:///ppem?user=ppem&password=
ppem_user_password"Where
ppem_user_passwordis the password set at step 3a.Usually the configuration is located in the
/etc/ppem-manager.ymlfile.If you cannot locate the configuration file, try to locate or recreate it using the package manager.
Enable and start the manager service:
systemctl enable --now ppem
Verify that the services are running correctly:
systemctl status ppem
Note
If another initialization system is used, adjust the relevant commands as needed.
21.1.5. Accessing the PPEM Web Application #
The agent requires an API key to interact with the manager.
Access the PPEM web application to obtain the key:
In a web browser, go to the following URL:
http://
PPEM_manager_host_address:8080/On the authorization page, enter the default
adminusername andadminpassword, then click Log in.In the navigation panel, go to Summary.
The agent installation instruction will be displayed on the page. Copy the key from the instruction.
If the agent installation instruction was accidentally closed:
In the navigation panel, go to Infrastructure → Agents.
In the Authentication key column next to any agent, click
to copy the key.
21.1.6. Installing the Agent #
For a DBMS to be managed by PPEM, the agent must be installed on the DBMS host.
For the sake of simplicity, it is assumed in the quick start guide that the agent will operate on behalf of the postgres DBMS superuser, without the need to explicitly grant privileges to a dedicated agent user.
Warning
Use this approach only for evaluating and testing purposes.
In production environments, create a separate agent user and grant a minimal set of privileges to it.
To install the agent on the DBMS host:
Add the Postgres Pro package repository, if not already added.
Install the
ppem-agentbinary package using the package manager of the operating system.In the
/etc/ppem-agent.ymlagent configuration file, specify values for the following parameters:agent.manager.api_key: The previously obtained API key for connecting the agent to the manager.agent.manager.url: The URL for connecting the agent to the manager.Example:
http://ppem.example.com:8080/v1.agent.instance.connection_defaults: The credentials of the superuser (typicallypostgres) of the DBMS that PPEM will manage.The
passwordparameter is optional. Use it only if you want to set a password for the DBMS connection.
If necessary, use the sample agent configuration file as a reference.
Enable and start the agent service:
systemctl enable --now ppem-agent
Ensure that the service is up and running:
systemctl status ppem-agent
Note
If another init system is in use, correct the related commands as necessary.
21.1.7. Verifying the Installation #
After completing the steps described in the previous sections, verify the installation:
Log in to the PPEM web application as described in Section 21.1.5.
In the navigation panel, go to Infrastructure → Instances.
Verify that your Postgres Pro instance appears in the list of managed database instances.
You have successfully installed PPEM in a minimal environment. The database instance can now be managed through the web application.