Playbooks
This page summarizes Pigsty v4.x playbook entries and usage guidance by module. For detailed task tags, open each module’s playbook page.
Module Playbook Navigation
| Module | Count | Playbooks |
|---|---|---|
INFRA | 3 | deploy.yml infra.yml infra-rm.yml |
NODE | 2 | node.yml node-rm.yml |
ETCD | 2 | etcd.yml etcd-rm.yml |
PGSQL | 7 | pgsql.yml pgsql-rm.ymlpgsql-user.yml pgsql-db.ymlpgsql-monitor.yml pgsql-migration.yml pgsql-pitr.yml |
REDIS | 2 | redis.yml redis-rm.yml |
MINIO | 2 | minio.yml minio-rm.yml |
DOCKER | 1 | docker.yml |
JUICE | 1 | juice.yml |
VIBE | 1 | vibe.yml |
KAFKA | 2 | kafka.yml kafka-rm.yml |
MYSQL (pilot) | 2 | mysql.yml mysql-rm.yml |
Playbook Matrix
| Playbook | Module | Purpose |
|---|---|---|
deploy.yml | INFRA | One-pass deployment for the core chain (Infra/Node/Etcd/PGSQL, enabling MINIO by config) |
infra.yml | INFRA | Initialize infrastructure nodes |
infra-rm.yml | INFRA | Remove infrastructure components |
node.yml | NODE | Node onboarding and baseline convergence |
node-rm.yml | NODE | Node offboarding |
etcd.yml | ETCD | ETCD install/scale-out |
etcd-rm.yml | ETCD | ETCD remove/scale-in |
pgsql.yml | PGSQL | Initialize PostgreSQL cluster or add instance |
pgsql-rm.yml | PGSQL | Remove PostgreSQL cluster/instance |
pgsql-user.yml | PGSQL | Add business users |
pgsql-db.yml | PGSQL | Add business databases |
pgsql-monitor.yml | PGSQL | Register remote PostgreSQL for monitoring |
pgsql-migration.yml | PGSQL | Generate migration runbook and scripts |
pgsql-pitr.yml | PGSQL | Point-in-time recovery (PITR) |
redis.yml | REDIS | Deploy Redis |
redis-rm.yml | REDIS | Remove Redis |
minio.yml | MINIO | Deploy Silo |
minio-rm.yml | MINIO | Remove Silo, its configuration, and optional data |
docker.yml | DOCKER | Deploy Docker engine |
juice.yml | JUICE | Deploy/remove JuiceFS instances |
vibe.yml | VIBE | Deploy VIBE dev environment |
kafka.yml | KAFKA | Create or converge a complete dynamic KRaft cluster |
kafka-rm.yml | KAFKA | Remove a Kafka cluster, or safely retire a single member |
mysql.yml | MYSQL | Converge a native MySQL 8.4 single node or three-node InnoDB Cluster (pilot) |
mysql-rm.yml | MYSQL | Stop or retire a native MySQL instance or cluster while preserving local state (pilot) |
Auxiliary Playbooks
The following playbooks are cross-module helpers.
| Playbook | Description |
|---|---|
cache.yml | Build offline installation package cache |
cert.yml | Issue certificates using Pigsty CA |
app.yml | Install Docker Compose app templates |
slim.yml | Minimal component installation scenario |
Playbook Usage Notes
Protection Mechanism
Several modules provide deletion safeguards through *_safeguard parameters:
- PGSQL:
pg_safeguard - ETCD:
etcd_safeguard - MINIO:
minio_safeguard - REDIS:
redis_safeguard - KAFKA:
kafka_safeguard - MYSQL (pilot):
mysql_safeguardand an exact-matchmysql_rm_confirmjointly protect native MySQL retirement
The PGSQL, ETCD, MINIO, REDIS, and KAFKA role defaults are explicitly false; set them to true for initialized production clusters. Native MySQL is the exception: mysql_safeguard defaults to true, and even after disabling it you must provide a mysql_rm_confirm value that exactly matches the target instance or cluster.
When safeguard is true, corresponding *-rm.yml playbooks abort immediately. You can force override via CLI:
Limiting Execution Scope
Use -l to limit execution targets:
For large-scale rollout, validate on one cluster first, then deploy in batches.
Idempotency
Most playbooks are idempotent and safe to rerun, with caveats:
infra.ymldoes not clean data by default; all clean parameters (vmetrics_clean,vlogs_clean,vtraces_clean,grafana_clean,nginx_clean) default tofalse- To rebuild from a clean state, explicitly set relevant clean parameters to
true - Re-running
*-rm.ymldeletion playbooks requires extra caution
Task Tags
Use -t to run only selected task subsets:
Quick Command Reference
INFRA Module
NODE Module
ETCD Module
PGSQL Module
REDIS Module
MINIO Module
DOCKER Module
KAFKA Module
For ordinary convergence, -l must cover every declared member of the selected Kafka cluster; only kafka-rm.yml accepts a single member, for retirement.
MYSQL Pilot Module
mysql-rm.yml stops the service, writes a retirement marker, and deregisters monitoring, but does not delete data directories, backups, configuration, certificates, packages, or InnoDB Cluster metadata.