mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Current UI to change cluster configuration is somewhat unfriendly, involving a curl command, knowing the REST API endpoint, knowing the specific syntax to call it with and writing a JSON document. I added two commands in this branch to make this a bit easier, `show-config` and `edit-config` (names are merely placeholders, any opinions on better ones?). * `patronictl show-config clustername` fetches the config from DCS, formats it as YAML and outputs it. * `patronictl edit-config clustername` fetches the config, formats it as YAML, invokes $EDITOR on it, then shows user the diff and after confirmation applies the changed config to DCS, guarding for concurrent modifications. * `patronictl edit-config clustername --set synchronous_mode=true --set postgresql.use_slots=true` will set the specific key-value pairs. There are also some UI capabilities I'm less sure of, but included them here as I already implemented them. * If output is a tty then the diffs are colored. I'm not sure if this feature is cool enough to pull the weight of adding a dependency on cdiff. Or maybe someone knows of another more task focused diff coloring library? * `patronictl edit-config clustername --pg work_mem=100MB` - Shorthand for `--set postgresql.parameters.work_mem=100MB` * `patronictl edit-config clustername --apply changes.yaml` - apply changes from a yaml file. * `patronictl edit-config clustername --replace new-config.yaml` - replace config with new version.
16 lines
179 B
Plaintext
16 lines
179 B
Plaintext
urllib3>=1.9
|
|
boto
|
|
psycopg2>=2.6.1
|
|
PyYAML
|
|
requests
|
|
six >= 1.7
|
|
kazoo==2.2.1
|
|
python-etcd==0.4.3
|
|
python-consul==0.7.0
|
|
click>=4.1
|
|
prettytable>=0.7
|
|
tzlocal
|
|
python-dateutil
|
|
enum34
|
|
cdiff
|