Skip to content

Releases: vitabaks/postgresql_cluster

Release 1.4.0

03 Aug 10:10
64dcdae
Compare
Choose a tag to compare

New features

  • Added pgBackRest support (#40)
    Create/Clone Patroni clusters from your existing backups with pgBackRest
    With support of point-in-time recovery, PITR
    See more details https://github.com/vitabaks/postgresql_cluster#restore-and-cloning

  • Compatibility with Postgres Pro Standard (#38, #39)
    all supported versions. Tested on centos, debian, ubuntu.

  • New role: "resolv_conf". Adds entries of DNS server(s) into /etc/resolv.conf (4f3521b, cccbc53)
    variable nameservers (in vars/system.yml)

  • New role "etc_hosts". Adds entries into /etc/hosts file for postgresql_cluster nodes (427f4e9).
    variable: etc_hosts (in vars/system.yml)

  • Install Software Collections (SCL) repository for RHEL 7 (cc24028)
    variable install_scl_repo: true (in vars/RedHat.yml)

  • Support for switch from scheme TypeB to TypeA (#43 thanks @jidckii )
    variable vip_manager_disable (in playbook balancers.yml)

Enhancements

  • generate virtual_router_id based on the last octet of cluster_vip (802ff58).
  • vip-manager: release VIP when vip-manager service is stopped. Use ExecStopPost=/sbin/ip addr del (0a673a7 thanks @jidckii ).
  • vip-manager: new variables - vip_manager_ip, vip_manager_mask, vip_manager_iface (9fee9e7).
  • roles for etcd and balancers moved to separate playbooks. Added play-level condition (9d37642, 4657354)
  • new variable sysctl_set (11861a5)
    allows to disable the task of configuring kernel parameters.
  • clean yum cache before install packages for RHEL (6004598).
  • wait for the patroni is healthy on the replica servers after starting the patroni service (284dc07, ce13be2).
  • pgbouncer - generate userlist.txt from pg_shadow (596b25d).
  • added minimal_ansible_version check (89812fa).
    minimal_ansible_version: 2.7.0
  • ansible-role-firewall: updated to version 2.5.0 (0df73e2).
  • update etcd to version 3.3.23 (3c2a1ab).
  • requirements.txt - added python modules "pexpect" and "ruamel.yaml". Required for PITR (c5e6604).
  • PITR (custom bootstrap) - disable archive_command (e6edeaa).

Fixes

  • sysctl: fix Jinja2 warning (50e1d4b).
  • sysctl: make sure handlers are flushed immediately (8bc0db7).
  • ntp: fix flush_handlers warning (94e56d1)
  • pgbouncer: fix flush_handlers warning (0f4fbbe).
  • etcd: make sure handlers are flushed immediately (1fd74af).
  • patroni.yml.j2 - fixed yamllint warnings and errors (825d88b).
  • ansible-role-firewall: fix error during deployment when execute tasks:
    "Check if ufw package is installed (on Ubuntu)" (8cf7e30).
    "Check if firewalld package is installed (on RHEL)"(7120f8d).
  • run playbook "balancers.yml" after the "hostname" role is played (46010aa).
  • fix error with create extensions on PostgresPro (a20599c, 1daaea0).

Tests

  • Added CI "Molecule" on GitHub Actions for etcd_cluster and postgres_cluster (#37).
    tests of deploying a patroni cluster on distro: debian9/10, ubuntu1804/2004, centos7/8.
  • Daily scheduled cluster deploy tests with Molecule (7d3903c)
    for each supported Linux distro.
  • Added Molecule test for PostgresPro (scheduled - weekly)

EOL

Debian 8 removed from the list of supported versions (end of life on June 30, 2020) (804b938).

Release 1.3.0

01 May 12:58
a07c3ab
Compare
Choose a tag to compare

New features

  • Added WAL-G support (#32 thanks Anton Patsev @patsevanton )
    Now you can deploy PostgreSQL high availability clusters as well as create replicas from wal-g backups.
    If variable wal_g_install is true, wal-g will be installed and the necessary parameters will be specified in the walg.json conf file in postgresql_home_dir, and patroni.yml will be prepared for using wal-g.
    See the variables:
    patroni_cluster_bootstrap_method
    patroni_create_replica_methods
    postgresql_restore_command
    wal_g_install, wal_g_ver, wal_g_json

  • Added compatibility with Ubuntu 20.04 LTS (#35).

Enhancements

  • VIP: make the cluster ip address as optional (176a36a, 6d9b0fc).
    Now you can deploy your custom schemes without using a cluster IP address (VIP) if necessary.
  • postgresql: update to version 12 (by default) (a6a2ab0)
  • etcd: update to version 3.3.19 (by default) (1ec3fff).
  • etcd: added compatibility with etcd version 3.4.x (1b05ba5)
  • haproxy: update to version 1.8.25 for haproxy_installation_method: "src" (a28d08e).
  • pgbouncer: disable log_connections and log_disconnections (b5e29a3).
  • pgbouncer: auto-recovery of crashed pgbouncer.service with systemd (3444c3f).
  • pgbouncer: increase listen_backlog to 4096 (2545b54).
  • sysctl: add net backlog kernel parameters (567ebda).
  • Added "python-consul" module in requirements. For support the "Consul" DCS (6391cfb).
  • Code Refactoring (#33, #34)

Fixes

  • vip-manager: create a conf directory if it does not exist (7079672).
  • specify "-U postgres" for the "get postgresql database list" task (ad5e21d).
  • сheck if postgresql packages are installed for postgresql_exists: "true" (a226a20).
  • remove python2 package (no more required for pgbouncer) for RHEL/CentOS 8 (62282eb).
  • remove example ip address from cluster_vip (a36e4dd).
  • fixed yamllint and ansible-lint warnings/errors.

Tests

Release 1.2.0

29 Jan 11:29
Compare
Choose a tag to compare

This new release provides more scalability and several other enhancements.

New features

  • Deploy of cluster components on different servers (e7c0f91).
    By default, all cluster components will be deployed to PostgreSQL servers. But, you may need to distribute the cluster components (ex. etcd cluster nodes) to different servers.
    Now, you can deploy the etcd cluster and the haproxy balancers to other dedicated servers.
    See sample inventory file.

  • New playbook: add_pgnode.yml (9607bfb).
    After you successfully deployed your PostgreSQL HA cluster, you may need to scale it further.
    Use the add_pgnode.yml playbook for this.
    See more Scaling: add new postgresql node to existing cluster

  • New playbook: add_balancer.yml (5daf05b).
    See more Scaling: add new haproxy balancer node

  • Added compatibility with RedHat/OracleLinux/CentOS version 8.
    (366e190 , d0754c4 , b914074)

  • New variables:
    patroni: (8c61cf0 , 478ca25 , 91b2257 , 95ae1fa)
    synchronous_mode_strict
    patroni_ttl, patroni_loop_wait
    patroni_retry_timeout
    patroni_maximum_lag_on_failover
    patroni_master_start_timeout
    patroni_postgresql_use_pg_rewind
    patroni_remove_data_directory_on_rewind_failure
    patroni_remove_data_directory_on_diverged_timelines
    patroni_create_replica_methods
    pgbouncer: (bcc9d7a)
    pgbouncer_default_pool_size
    pgbouncer_default_pool_mode
    sudo: (0caf69c)
    sudo_users

Enhancements and fixes

  • PostgreSQL: checked compatibility with PostgreSQL 12.
    for Patroni version 1.6.0 and higher

  • etcd: the etcd package has been updated to v3.3.18 version. (463a1f5).

  • etcd: generate etcd_cluster_name (ETCD_INITIAL_CLUSTER_TOKEN) based on the "patroni_cluster_name" variable (d57b55f).

  • etcd: set high priority for etcd process (nice -20, ionice -c 1 -n 0) (2f41e80).

  • etcd: wait until the etcd cluster is healthy (d67313b).

  • Improved postgresql instance status check (for postgresql_exists='true') (744b3a7).

  • Waiting for CHECKPOINT to complete before stopping postgresql (for postgresql_exists='true') (8709ddd).

  • pgbouncer: automatically create database pools (via “*”) if they are not specified (cabdbe0) #18.

  • Set umask before installing pip packages (a7bd999).

  • Hide the password from the output of the "PostgreSQL users" task (c0d3316).

  • SSH Key-Based Authentication is disabled by default (2180962).
    variable: enable_ssh_key_based_authentication

  • Added PATRONICTL_CONFIG_FILE environment variable into /etc/environment (67a7551).

  • System variables moved to system.yml variable file (/vars/system.yml).

  • Added the ability to set kernel and firewall parameters individually for each host group (etcd_cluster, balancers, postgres_cluster) in the system.yml variable file.

  • Added new recommendations:
    "Placement of cluster members in different data centers"
    "How to prevent data loss in case of autofailover (synchronous_modes and pg_rewind)"

Release 1.1.0

31 Oct 11:36
Compare
Choose a tag to compare

New features and Improvements:

  • Installation method without a proxy server (offline installation).

    By default, it is assumed that you will use a proxy server (proxy_env variable) to automatically download the necessary packages and their dependencies from external repositories.
    Сurrently, you can also use your own repository for extra packages. You need to preload all the packages and change URLs.
    For your convenience, all URLs have been moved to the vars/Debian.yml or vars/RedHat.yml variable files.
    Variables: etcd_package_repo, vip_manager_package_repo, confd_package_repo and pip_package_repo, patroni_pip_requirements_repo, patroni_pip_package_repo.

  • Installation method without a repository (optional).

    If you don't have your own repository .... or you want to create something like a "offline installer package":
    You can download the necessary packages into postgresql_cluster/files/ directory. Packages from this directory will be used for installation.
    Variables: installation_method, <variable_name>_file and packages_from_file.

  • Support for installing patroni from rpm/deb packages (optional).

    By default, Patroni packages will be installed from the pip repository.
    Сurrently, you also have the option of choosing an patroni installation method using the rpm or deb package.
    Variables: patroni_installation_method and 'patroni_rpm_package_repo (for Redhat) or patroni_deb_package_repo (for Debian).

  • Install rpm/deb HAProxy 1.8 packages by default, instead of building from source.

    Сurrently, HAProxy will be is installed from rpm/deb packages by default. The ability to install from source codes is saved.
    Debian 8/9/10 - the haproxy version 1.8 (LTS) will be installed from the haproxy.debian.net repository.
    Ubuntu <=18.04 - the haproxy version 1.8 (LTS) will be installed from the ppa:vbernat/haproxy-1.8 repository.
    RedHat/CentOS/OracleLinux 7 - the haproxy version 1.8 (LTS) will be installed from the "rh-haproxy18" package from the Software Collections (SCL) repository.
    Variables: haproxy_installation_method and haproxy_install_repo.

  • Support for build and install HAProxy version 2.0 from source.

    You can also install the latest LTS version of HAProxy if you need it.
    Variables: haproxy_major, haproxy_version, lua_src_repo, haproxy_src_repo, haproxy_compile_requirements.

  • Configure SELinux for haproxy and keepalived services (if it is enabled).

    If the system has SElinux enabled in enforcing mode, the problem may have difficulty running scripts, accessing configuration files, etc.
    Сurrently, we set the haproxy_t and keepalived_t domains as permissive.

Release 1.0.0

08 Oct 07:39
Compare
Choose a tag to compare

Initial release to streamline generating downstream releases.