pigsty
pigsty copied to clipboard
Pigsty CLI Tools
Provide yet another cli wrapper to seal ansible primitives. for example:
NAME
pigsty -- Pigsty Command-Line Interface v0.8
SYNOPSIS
meta setup meta nodes init|fetch|repo|cache|ansible
node setup database nodes init|tune|dcs|remove|ping|bash|ssh|admin
pgsql setup postgres clusters init|node|dcs|postgres|template|business|monitor|service|monly|remove
infra setup infrastructure init|ca|dns|prometheus|grafana|loki|haproxy|target
clean clean pgsql clusters all|service|monitor|postgres|dcs
config mange pigsty config file init|edit|info|dump|path
serve run pigsty API server init|start|stop|restart|reload|status
demo setup local demo init|up|new|clean|start|dns
log watch system log query|postgres|patroni|pgbouncer|message
pg pg operational tasks user|db|svc|hba|log|psql|deploy|backup|restore|vacuum|repack
EXAMPLES
1. infra summary
pigsty infra
2. pgsql clusters summary
pigsty pgsql
3. pigsty nodes summary
pigsty node
4. create pgsql cluster 'pg-test'
pigsty pgsql init -l pg-test
5. add new instance 10.10.10.13 of cluster 'pg-test'
pigsty pgsql init -l 10.10.10.13
6. remove cluster 'pg-test'
pigsty clean -l pg-test
7. create user dbuser_vonng on cluster 'pg-test'
pigsty pg user dbuser_vonng -l pg-test
8. create database test2 on cluster 'pg-test'
pigsty pg db test -l pg-test
Usage:
pigsty [command]
Available Commands:
clean remove pgsql cluster/instance
help Help about any command
infra setup infrastructure
meta setup meta node
node setup database node
pgsql setup pgsql clusters
serve Launch pigsty API server
Flags:
-h, --help help for pigsty
-i, --inventory string inventory file (default "./pigsty.yml")
-l, --limit string limit execution hosts
-t, --tags strings limit execution tasks