pg_cluster
Role Name: pg_cluster
A database cluster using Postgres (11), Pgpool2 (4.0) and Debian (10).
The cluster has 3 nodes. Each node runs Pgpool2 and Postgres. Pgpool2 and Postgres have two roles each. For Postgres, those roles are: primary and standby. For Pgpool2, those roles are: active and stanby. Pgpool and Postgres roles are independent. However, the first node starts with both, active (pgpool2) and primary(postgres). It has a Floating IP. The rest of nodes have standby role (pgpool and postgres).
FLOATING IP
+-----------+ WATCHDOG
+--------| PGPOOL2 |--------+
| ------------- nic0 |
| | | |
| | POSTGRES | |
| | master | |
| +-----------+ |
| nic1| |
+-----------+ | +-----------+
| PGPOOL2 | | | PGPOOL2 |
|-----------| | -------------
| | | | |
| POSTGRES | | | POSTGRES |
| standby |-----------------| stanby |
+-----------+ REPLICATION +-----------+
Requirements
- Debian 10
- openssh-server
- netaddr
Role Variables
- See
defaults/main.yml
.
Dependencies
- Depends on other Ansible roles: false
Example Playbook
- hosts: all
roles:
- jobcespedes.pg_cluster
For verifying installation
- hosts: all
tasks:
- import_role:
name: jobcespedes.pg_cluster
tasks_from: verify
License
MIT
Author Information
Job Céspedes Ortiz: jobcespedes@gmail.com
About
A database cluster using Postgres (11), Pgpool2 (4.0) and Debian (10).
Install
ansible-galaxy install jobcespedes/pg_cluster
License
mit
Downloads
38
Owner