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 their safeguards to true for initialized production clusters.
Native MySQL uses mysql_safeguard: true by default. After you disable it, you must still set mysql_rm_confirm to exactly match the target instance or cluster.
If the safeguard is true, the corresponding *-rm.yml playbook aborts immediately. To override it, use the command line:
Limiting Execution Scope
Use -l to limit execution targets:
For a large deployment, validate 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 cleanup parameters default tofalse:vmetrics_clean,vlogs_clean,vtraces_clean,grafana_clean, andnginx_clean.- 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 include 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. It preserves data directories, backups, configuration, certificates, packages, and InnoDB Cluster metadata.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)