Pigsty

Pigsty v1.5.1 Documentation

Battery-Included Open-Source PostgreSQL Distribution

Latest Version: v1.5.1 | Github Repo | Demo

Documentation: EN Docs | 中文文档 | Github Pages

What is Pigsty?

Pigsty is battery-included open-source database distribution, with the latest PostgreSQL kernel, TimescaleDB, PostGIS, Citus & 100+ extensions, along with an entire Infra: Grafana, Prometheus, Loki, Ansible, Docker to support your databases & applications. It also includes common tools for data analysis.

Pigsty is a monitoring & management SRE Solution. Which includes an unparalleled monitoring system with ultimate observability, and high-available PostgreSQL with self-healing architecture. You can deploy various clusters & instances: primary, replica, standby, offline, delayed, cascade, and even Citus, Redis, and Greenplum clusters.

Pigsty is a handy toolbox for developers. It treats Database as Code, Infra as Data. You just describe what database you want, and pigsty will create it for you. You can download, install, deploy, scale, backup, migration with one command. It can be deployed everywhere: a 10k+ core prod env or local 1C/2G VM, cloud, or on-premises.

Pigsty is a secure & thrifty alternative to Cloud RDS/PaaS. It can empower a single DEV/DBA to manage hundreds of databases clusters, with all data under your own control. It can save 50% - 80% cost compared to cloud RDS using ECS or on-premise deployment. And the software itself is completely open-source & free!

Check FEATURES for more detail.

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 Installation & 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.1/pkg.tgz -o /tmp/pkg.tgz
curl -SL https://github.com/Vonng/pigsty/releases/download/v1.5.1/pigsty.tgz | gzip -d | tar -xC ~
Mange More Nodes

You can add more nodes to Pigsty with nodes.yml after installing the meta node with infra.yml.

./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

Pigsty (/ˈpɪɡˌstaɪ/) is the abbreviation of “PostgreSQL In Graphic STYle.”

Author: Vonng (rh@vonng.com)

License: Apache 2.0 License

Beian: 浙ICP备15016890-2号


Last modified 2022-06-20: add timescaledb (3c335f4)