Chapter 3. Quick Start
This section explains how to install PPEM on a server according to the all-in-one deployment scheme. Following the provided instructions, you will test the installation process and get a minimal working version of PPEM suitable for demonstration purposes.
When executing commands provided in this section, consider the following:
Debian Linux operating system commands are specified. For other operating system versions, use their corresponding commands.
Standard variables are specified in commands, for example,
ppemfor the repository database. If required, you can specify other variables.
The installation process includes the following steps:
Ensure that prerequisites are met.
PPEM will be installed. You can update the browser page with the web application and start working.
Prerequisites
Prepare the server where PPEM will be installed according to hardware and software requirements.
Install the Postgres Pro DBMS instance on the server.
For more information about installation, refer to the official Postgres Pro documentation.
Start a new session under the superuser:
$ sudo -s
Configuring the Manager
Install the repository:
# wget -O pgpro-repo-add.sh https://repo.postgrespro.ru/ppem/ppem/keys/pgpro-repo-add.sh # sh pgpro-repo-add.sh
Install the manager:
# apt install ppem ppem-gui
The
ppem-manager.ymlmanager configuration file will be downloaded to your local device.The path to the configuration file is
/etc/ppem-manager.yml.Create the DBMS user on behalf of whom the manager will connect to the repository database:
# sudo -u postgres createuser --pwprompt ppem
When executing this command, specify the DBMS user password.
Create the repository database:
# sudo -u postgres createdb -O ppem ppem
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.confconfiguration file.For more information, refer to the official Postgres Pro documentation on the
pg_hba.confconfiguration file.In the
/etc/ppem-manager.ymlmanager configuration file:Specify the name of the host to connect to using the
repo.hostparameter:repo: host: "localhost"
Specify the repository database name using the
repo.nameparameter:repo: name: "ppem"
Specify the DBMS username and password using
repo.userandrepo.passwordparameters: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.urlparameter: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.
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.
Configuring an Agent
Install the agent:
# apt install ppem-agent
The
ppem-agent.ymlagent configuration file will be downloaded to your local device.Create the DBMS user on behalf of whom the agent will connect to the repository database:
# sudo -u postgres createuser -s --pwprompt ppem_agent
When executing this command, specify the DBMS user password.
Ensure that the DBMS user can connect to the repository database:
# psql -h localhost -U ppem_agent -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.confconfiguration file.For more information, refer to the official Postgres Pro documentation on the
pg_hba.confconfiguration file.Get an API key for configuring the agent:
Copy the API key from the displayed agent installation instruction and save this key.
In the
ppem-agent.ymlagent configuration file, specify agent parameters:agent: name: "
agent_name" manager: url: "URL_for_connecting_to_manager" api_key: "API_key_for_connecting_to_manager" instance: connection_defaults: user: "DBMS_username" password: "DBMS_user_password" http: server: address: "network_address_for_incoming_connections" port: "port_for_incoming_connections"Where:
agent.name: The unique agent name.agent.manager.url: The URL for connecting the agent to the manager in theformat.scheme://manager_network_address/path_to_API_versionagent.manager.api_key: The previously obtained API key for connecting the agent to the manager.agent.instance.connection_defaults.userandagent.instance.connection_defaults.password: The DBMS username and password.http.server.addressandhttp.server.port: The network address and port number for incoming network connections.To enable listening of all network addresses and ports, do not specify any values for these parameters.
Start the agent service and add it to the server startup:
# systemctl start ppem-agent # systemctl enable ppem-agent