Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jobcespedes/pg_cluster
Ansible role for a database cluster using Postgres (11), Pgpool2 (4.0) and Debian (10).
https://github.com/jobcespedes/pg_cluster
ansible ansible-role cluster database molecule pgpool2 postgres
Last synced: 1 day ago
JSON representation
Ansible role for a database cluster using Postgres (11), Pgpool2 (4.0) and Debian (10).
- Host: GitHub
- URL: https://github.com/jobcespedes/pg_cluster
- Owner: jobcespedes
- License: mit
- Created: 2020-05-14T16:54:05.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-15T21:24:46.000Z (almost 4 years ago)
- Last Synced: 2024-11-11T09:02:55.974Z (2 months ago)
- Topics: ansible, ansible-role, cluster, database, molecule, pgpool2, postgres
- Language: HTML
- Homepage:
- Size: 54.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Role Name: pg_cluster
=========[![Build Status](https://travis-ci.org/jobcespedes/pg_cluster.svg?branch=master)](https://travis-ci.org/jobcespedes/pg_cluster) [![Buy me a coffee](https://img.shields.io/badge/$-BuyMeACoffee-blue.svg)](https://www.buymeacoffee.com/jobcespedes)
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).
```Plaintext
FLOATING IP
+-----------+ WATCHDOG
+--------| PGPOOL2 |--------+
| ------------- nic0 |
| | | |
| | POSTGRES | |
| | master | |
| +-----------+ |
| nic1| |
+-----------+ | +-----------+
| PGPOOL2 | | | PGPOOL2 |
|-----------| | -------------
| | | | |
| POSTGRES | | | POSTGRES |
| standby |-----------------| stanby |
+-----------+ REPLICATION +-----------+
```Requirements
------------- Debian 10
- openssh-server
- netaddrRole Variables
--------------- See [`defaults/main.yml`](defaults/main.yml).
Dependencies
------------- Depends on other Ansible roles: false
Example Playbook
----------------```yaml
- hosts: all
roles:
- jobcespedes.pg_cluster
```For verifying installation
```yaml
- hosts: all
tasks:
- import_role:
name: jobcespedes.pg_cluster
tasks_from: verify
```License
-------MIT
Author Information
------------------Job Céspedes Ortiz: [email protected]