Skip to content
Snippets Groups Projects
Verified Commit 3ef6f6c8 authored by Jérôme Charaoui's avatar Jérôme Charaoui :telescope:
Browse files

howto/postgresql: puppetization (team#41401)

this keeps the previous manual instructions for future reference, mainly
in case surprises with the new expanded puppet profile

manual bits should probably be removed eventually once puppetization is
proven reliable, to cut down on the level of clutter in here
parent fce0bcef
No related branches found
No related tags found
No related merge requests found
......@@ -1436,13 +1436,18 @@ recovery](#indirect-backup-recovery), above.
## Installation
PostgreSQL servers are installed by hand on TPO servers, from Debian
packages. For example, in Debian bullseye:
The `profile::postgresql` Puppet class should be used to deploy and manage
PostgreSQL databases on nodes. It takes care of installation, configuration and
setting up the required role and permissions for backups.
### Manual installation
To install PostgreSQL manually on a server, first install the package:
apt install postgresql-13
To ensure backups are properly performed, the server must also have
the `profile::postgres` class. The storage backup server also needs
the `postgres::backup_source` class. The storage backup server also needs
`REPLICATION` access to make full backups. To set this up, follow the
steps below:
......@@ -1506,8 +1511,12 @@ correctly:
### Prometheus PostgreSQL exporter deployment
Prometheus metrics collection is not enabled by default. To enable it,
include the following line in `/etc/postgresql/11/main/pg_hba.conf`:
Prometheus metrics collection is configured automatically when the Puppet class
`profile::postgresql` is deployed on the node.
#### Manual deployment
First, include the following line in `pg_hba.conf`:
local all prometheus peer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment