How pgsty/pigsty works
Project Type and Purpose
• Pigsty is an infrastructure-as-code and cluster orchestration system for PostgreSQL.
• It is designed for deploying self-healing PostgreSQL clusters (with HA components like Patroni, PgBouncer, PgBackrest, HAProxy) plus other modules such as observability (Prometheus/Grafana), object storage (MinIO), additional app modules (e.g., Gitea, Supabase, FerretDB, Mattermost, etc.) and even tools for Docker automation.
• The README clearly describes modularity with a “core” set of modules (PGSQL, INFRA, NODE, ETCD) and many extended modules.
File Structure
• The top-level directories and files (such as .gitignore, LICENSE, Makefile, README, ansible.cfg, and various playbooks like install.yml) show that the project is built on automation (using Ansible, Terraform, and Vagrant) and container orchestration (with many docker-compose.yml files found in subdirectories).
• There is extensive use of “roles”, “conf”, “templates”, and even infrastructure definitions (terraform, vagrant) implying heavy reliance on declarative configuration and reproducible deployment across nodes.
README for Further Insights
• The README outlines the primary modules: PGSQL, INFRA, NODE, ETCD, and describes how they are composed to deliver HA PostgreSQL clusters.