YaK User Documentation
YaK Landing PageVisit dbi-services.comContact us
YaK Release 2.1
YaK Release 2.1
  • Welcome
  • Introduction
    • YaK Core
    • YaK Components
    • Terms and definitions
  • User interface
    • Dashboard
    • Infrastructures
    • Servers
    • Components
    • Jobs
    • Configuration
    • Administration
  • YaK Demo
  • Versioning & Compatibility matrix
  • Release Notes
    • YaK components types
      • PostgreSQL
      • Oracle
  • Installation
    • System requirements
    • Install YaK Core
      • Install YaK on your own K8S cluster
      • Install YaK on Rancher Desktop
      • Uninstall Yak
  • YaK step-by-step usage
  • Configuration
    • Secrets
    • Templates
    • Provider shapes
    • Provider images
    • Artifact providers
  • Manage infrastructures
    • Declare infrastructures
    • Attach Secrets
    • Detach Secrets
  • Manage Servers
    • Declare servers
      • Basics
      • Storage
      • Attach secrets
    • Edit server configuration
    • Deploy servers
    • Destroy servers
    • Delete servers
    • Start / Stop servers
  • Manage Components
    • Artifacts requirements
    • Component types
      • PostgreSQL
        • Description
        • Pre-requisites
        • Component references
          • PostgreSQL 2.0.0
            • Standalone deployment variables
            • HA deployment variables
      • Oracle
        • Description
        • Pre-requisites
        • Component references
          • Oracle 2.0.0
            • Standalone variables
  • Use cases
    • On-Premises
    • AWS
    • Azure
    • OCI
  • Appendix
    • Create SSH Keys with PuTTYgen
    • Roles
Powered by GitBook
On this page
  • Supported OS
  • Networking requirements
  • Artifacts
  • On-prem pre-requisites
  • Ansible user
  • File systems
  • Requirements for deployment without root privileges
  • Step 1 - Create user and group
  • Step 2 - Install packages
  • Step 3 - Temporarily disable SELinux - for HA deployment only
  1. Manage Components
  2. Component types
  3. PostgreSQL

Pre-requisites

PreviousDescriptionNextComponent references

Last updated 2 months ago

Supported OS

The PostgreSQL component type is supported on:

  • Red Hat Enterprise Linux 8/9

  • Debian 11/12

  • SUSE Linux Enterprise Server 15

    • Installation from source only. No pre-compiled binary available at the moment.

Other derivative Linux distributions (e.g Rocky Linux, Oracle Linux, openSUSE,...) are not officially supported.

Networking requirements

The following port must be open on your local/enterprise/cloud firewall:

  • PostgreSQL instance port (usually 5432/tcp - see )

requires more ports opening:

Port
Usage
Target

2379/tcp

etcd

All nodes

2380/tcp

etcd

All nodes

5000/tcp

HAProxy - to connect to the Master instance

Master and Replica nodes

5001/tcp

HAProxy - to connect to the Replica instance

Master and Replica nodes

7000/tcp

HAProxy - to connect to the monitoring Web page

Master and Replica nodes

8008/tcp

Patroni REST API

Master and Replica nodes

Artifacts

The paths and names of the files uploaded must match exactly the structure defined in the release notes of the component type.

On-prem pre-requisites

Deploying a PostgreSQL component on on-premises servers requires a few prerequisites.

Ansible user

Ansible needs a user that can use sudo without password. Here is an example of how to accomplish that:

echo 'ansible        ALL=(ALL)       NOPASSWD: ALL' > /etc/sudoers.d/ansible

File systems

As a best practice, the binaries, the PostgreSQL instance data directory and the archived WAL files should be on different file systems. The PostgreSQL component type is configured to use the following directories structure by default:

  • /u01 : to store binaries of PostgreSQL, pgBackRest and DMK

  • /u02 : to store the data directory of the PostgreSQL instance

  • /u90 : to store dumps, backups and archived WALs of the PostgreSQL instance

Therefore /u01, /u02 and /u90 should, at least, be mounted on different file systems and ideally on different physical disks, whenever possible.

Requirements for deployment without root privileges

Some steps of the deployment of PostgreSQL components require root privileges.

Following steps can be skipped if the installer has root privileges, as they will be taken care of automatically by the Ansible playbooks. In this case, simply check the "Deployment with root privilege" checkbox in the "Advanced" tab of the component declaration form and skip the rest of this chapter. However, when installing the component as a user not having root privileges, please uncheck the "Deployment with root privilege" checkbox in the advanced tab.

Nevertheless, make sure that the following steps have been performed by an administrator as root, beforehand.

Step 1 - Create user and group

A user and a group postgres:postgres must be created on the server.

Step 2 - Install packages

Some packages must be installed on the server before deploying the PostgreSQL component without root privileges.

You can find the list in the following directory of the PostgreSQL component type archive :

OS
Path in PostgreSQL component type archive

RHEL

roles/linux_pg_rdbms_os_prereqs/vars/packages_list_for_rhel.yml

RHEL-based (e.g. Rocky Linux, Alma Linux)

roles/linux_pg_rdbms_os_prereqs/vars/packages_list_for_rhel_based.yml

Debian and Debian-based (e.g. Ubuntu)

roles/linux_pg_rdbms_os_prereqs/vars/packages_list_for_debian_based.yml

SLES

roles/linux_pg_rdbms_os_prereqs/vars/packages_list_for_suse.yml

SLES based (e.g. openSUSE)

roles/linux_pg_rdbms_os_prereqs/vars/packages_list_for_suse_based.yml

Additional packages for HA deployment

The following packages must be installed on Master and Replica nodes :

  • haproxy

  • keepalived

Step 3 - Temporarily disable SELinux - for HA deployment only

On RHEL and RHEL based OS, SELinux must temporarily be set to Permissive mode before the HA deployment:

# /usr/sbin/setenforce 0

SELinux can re-enabled post-deployment:

# /usr/sbin/setenforce 1

The artifacts must be uploaded into your .

See for more details.

This user must be able to access remotely to the server with a SSH key defined in the section.

For each OS, there is a list of required packages for deployment from sources and for deployment from bin (see "install_type" in the ).

Artifacts requirements
secret
component references
component references
HA deployment
artifact provider