Sandbox
Pigsty provides a standard 4-node sandbox environment for learning, testing, and feature demonstration.
The sandbox uses fixed IP addresses and predefined identity identifiers, making it easy to reproduce various demo use cases.
Description
The default sandbox environment consists of 4 nodes, using the ha/full.yml configuration template.
| ID | IP Address | Node | PostgreSQL | INFRA | ETCD | MINIO |
|---|---|---|---|---|---|---|
| 1 | 10.10.10.10 |
meta |
pg-meta-1 |
infra-1 |
etcd-1 |
minio-1 |
| 2 | 10.10.10.11 |
node-1 |
pg-test-1 |
|||
| 3 | 10.10.10.12 |
node-2 |
pg-test-2 |
|||
| 4 | 10.10.10.13 |
node-3 |
pg-test-3 |
The sandbox configuration can be summarized as the following config:

PostgreSQL Clusters
The sandbox comes with a single-instance PostgreSQL cluster pg-meta on the meta node:
There’s also a 3-instance PostgreSQL HA cluster pg-test deployed on the other three nodes:
Two optional L2 VIPs are bound to the primary instances of pg-meta and pg-test clusters respectively.
Infrastructure
The meta node also hosts:
- ETCD cluster: Single-node
etcdcluster providing DCS service for PostgreSQL HA - Silo cluster: A single-node
miniocluster managed by the MINIO module, providing S3-compatible object storage
ha/full.yml also declares three Redis example topologies and enables Docker installation on the INFRA node. The standard deploy.yml does not deploy these two optional modules; run ./redis.yml and ./docker.yml separately when needed.
Creating Sandbox
Pigsty provides out-of-the-box templates. You can use Vagrant to create a local sandbox, or use Terraform to create a cloud sandbox.
Local Sandbox (Vagrant)
Local sandbox uses VirtualBox/libvirt to create local virtual machines, running free on your Mac / PC.
To run the full 4-node sandbox, your machine should have at least 4 CPU cores and 8GB memory.
The current Vagrant configuration uses the cloud-image/* boxes from Vagrant Cloud. See Vagrant: Supported Images for available images, source-pinned versions, and architecture details. Boxes without a version pinned in source are resolved by Vagrant to their currently available version.
Cloud Sandbox (Terraform)
Cloud sandbox uses public cloud API to create virtual machines. Easy to create and destroy, pay-as-you-go, ideal for quick testing.
Use the spec/aliyun-full.tf template to create a 4-node sandbox on Alibaba Cloud:
For more details, please refer to Terraform documentation.
Other Specs
Besides the standard 4-node sandbox, Pigsty also provides other environment specs:
Run the following Makefile shortcuts from ~/pigsty/vagrant:
Single Node Devbox (meta)
The simplest 1-node environment for quick start, development, and testing:
Two Node Environment (dual)
2-node environment for testing primary-replica replication:
Three Node Environment (trio)
3-node environment for testing basic high availability:
Production Simulation (simu)
20-node large simulation environment for full production environment testing:
This environment includes:
- 3 infrastructure nodes (
meta1,meta2,meta3) - 2 HAProxy proxy nodes
- 4 MINIO (Silo) nodes
- 5 ETCD nodes
- 6 PostgreSQL nodes (2 clusters, 3 nodes each)