mgramin / pigsty

Pigsty - Battery-Included Open-Source Distribution for PostgreSQL

Home Page:https://pigsty.cc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pigsty

Battery-Included Open-Source PostgreSQL Distribution

Latest Version: v1.5.0 | Demo

Documentation: Docs | 中文文档 | Github Pages

Run make doc to serve EN Docs & ZH Docs on your localhost

What is Pigsty?

Check FEATURES for detail.

  • Postgres Distribution: PostgreSQL, PostGIS, TimescaleDB, Citus, Redis/GP, United in One!
  • SRE/PaaS Solution: Grafana, Prometheus, Loki, AlertManager, Docker, run whatever you want!
  • Developer Toolbox: : Describe & Create: Primary/Replica/Standby/Delayed/Offline/Cascade/Citus in minutes!
  • Open Source RDS: Safe & Cost-Saving Open-Source alternative to public cloud RDS!
  • High-Availability: Auto-Pilot Postgres with idempotent instances & services, self-healing from failures!
  • Ultimate Observability: Unparalleled monitoring system based on modern open-source best-practice!!
  • Easy to Use: Setup everything in minutes without Internet access, scale/backup/migration with one click!
  • Database as Code: Describe & Create: Primary/Replica/Standby/Delayed/Offline/Cascade/Citus in minutes!
  • Ubiquitous Deploy: Prod env or 1C1G VM sandbox, solve IaaS provisioning with vagrant / terraform!
  • Versatile Scenario: Databases management or host monitoring. Supporting SaaS or developing data apps.
  • Safety & Thrifty: 50% - 80% cost saving versus Cloud RDS. Proven in real-world, large-scale env.
Distribution

Distribution

Observability

Observability

High Availability

High Availability

Architecture

Architecture

Sandbox

Sandbox

Provisioning

Provisioning

User Interface

User Interface

Application

Application

TL; DR

Get a new Linux x86_64 CentOS 7.8 node. with nopass sudo & ssh access, then:

bash -c "$(curl -fsSL http://download.pigsty.cc/get)"  # get latest pigsty source
cd ~/pigsty && ./configure                             # pre-check and config templating 
./infra.yml                                            # install pigsty on current node

Now you have a battery-included Postgres on port 5432 and infra web services available on port 80.

Check Quick Start & Demo for details.

Download Packages Directly Pigsty source & software packages can be downloaded directly via `curl` in case of no Internet connection:
curl -SL https://github.com/Vonng/pigsty/releases/download/v1.5.0/pigsty.tgz | gzip -d | tar -xC ~
curl -SL https://github.com/Vonng/pigsty/releases/download/v1.5.0/pkg.tgz -o /tmp/pkg.tgz # optional
Mange More Nodes You can add more nodes to Pigsty with [`nodes.yml`](p-nodes.md#nodes) after installing the meta node with [`infra.yml`](p-infra.md#infra).
./nodes.yml  -l pg-test      # init 3 nodes of cluster pg-test
Define Postgres Cluster You can define a HA Postgres Cluster with streaming replication in a few lines of code:
pg-test:
  hosts:
    10.10.10.11: {pg_seq: 1, pg_role: primary} 
    10.10.10.12: {pg_seq: 2, pg_role: replica}
    10.10.10.13: {pg_seq: 3, pg_role: replica}
  vars: 
    pg_cluster: pg-test

You can create Postgres with different roles by declaring them: primary, replica, standby, delayed, offline, cascade, etc...

Deploy Databases Clusters You can deploy different types of databases & clusters with corresponding playbooks.
./pgsql.yml         -l pg-test      # init 1-primary & 2-replica pgsql cluster
./redis.yml         -l redis-test   # init redis cluster redis-test
./pigsty-matrixdb.yml -l mx-*         # init MatrixDB cluster mx-mdw,mx-sdw .....

About

Author: Vonng (rh@vonng.com)

License: Apache 2.0 License

Copyright 2018-2022 rh@vonng.com (Vonng)

Star History Chart

Beian: 浙ICP备15016890-2号

About

Pigsty - Battery-Included Open-Source Distribution for PostgreSQL

https://pigsty.cc

License:Apache License 2.0


Languages

Language:Shell 48.2%Language:Jinja 26.6%Language:Python 13.0%Language:Makefile 6.5%Language:PLpgSQL 4.9%Language:HCL 0.8%