Description

Congratulations ! You are now the proud owner of the YaK PostgreSQL component type. Here is what it brings you:

Sub-component types

The YaK supports two kinds of deployment of your PostgreSQL component type:

Standalone

Use this sub-component type to perform a single instance deployment of PostgreSQL.

HA (for High Availability)

Use this sub-component type to perform a multi-instances deployment of PostgreSQL, using:

  • Patroni

  • etcd

  • Keepalived

  • Load Balancer service

    • HAProxy (for on-premises deployment)

    • AWS Elastic Load Balancer (for deployment on AWS)

    • Azure Load Balancer (for deployment on Azure)

    • (More cloud Load Balancer services to come)

Backup

The deployment of a PostgreSQL component with the YaK automatically configures two kinds of backups of the PostgreSQL instance:

Physical backup

Using pgBackRest (whole instance) and providing point-in-time recovery (PITR) capabilities.

Logical backup

Using pg_dump (all databases of the instance).

Following backup jobs are automatically configured into the crontab of the postgresql OS user:

postgres@srv-pg-01:/home/postgres/ [PG01] crontab -l
#Ansible: PG01 - dmk-pg-dump - Daily dump of all databases
0 19 * * * /u01/app/postgres/local/dmk/bin/dmk-pg-dump.sh -s PG01 -f -r 7 -t /u90/pgdata/dumps
#Ansible: PG01 - pgBackRest - Weekly full backup
0 22 * * 0 /u01/app/postgres/product/pgbackrest-2.53/bin/pgbackrest --stanza=PG01 --log-level-console=info backup --type=full --checksum-page=n
#Ansible: PG01 - pgBackRest - Daily differential backup
0 22 * * 1-6 /u01/app/postgres/product/pgbackrest-2.53/bin/pgbackrest --stanza=PG01 --log-level-console=info backup --type=diff --checksum-page=n

Pre-deployment customization of backup schedules will be available in a future release.

Post-deploy custom Ansible roles

Although YaK deploys PostgreSQL instances in a standardized way and using dbi services' best practices, you can still customize your deployments by requesting the YaK to automatically deploy your own Ansible roles once the PostgreSQL instances are installed.

Use cases for this functionality could be:

  • Automatic agent installation and configuration of your monitoring or backup tool

  • Automatic scripts execution

  • Automatic OS users creation

  • And so on... depending your needs and your imagination

To benefit of this feature, you simply need to copy your own Ansible roles into the directory /postgresql_instance/roles/custom_roles/ of the PostgreSQL component type archive (zip file).

A more convenient way of storing your roles outside of the component type archive will be proposed in a future release.

Last updated