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
  • Sub-component types
  • Backup
  • Post-deploy custom Ansible roles
  1. Manage Components
  2. Component types
  3. PostgreSQL

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.

DISCLAIMER You are responsible of your custom Ansible roles and their behavior.

If your PostgreSQL instances no longer work correctly and as expected by YaK following the execution of your own Ansible roles, dbi services cannot be held responsible and the resulting issues cannot be covered by YaK support.

PreviousPostgreSQLNextPre-requisites

Last updated 2 months ago