Patronictl: Create commandline tool that can manage clusters.

For managing Patroni clusters, the Patroni api can be used. For many tasks, a command line interface for
this api would be a useful addition. This commit adds patroncli (The name is still under debate).
The command line interface needs access to the DCS; this is required for any operation. For some tasks it is required
to have access to the Patroni api.

A small summary of the additions to get the cli/ctl started:

* Updated Docker image to use 'true' as the archive_command, to ensure disk not filling up during failover
  testing.
* The cli currently can list members, failover a master and remove a given cluster from DCS.
* The cli can be configured with a command, for repeated access to the same DCS
* Added some simple tests for the cli, code coverage is very low
This commit is contained in:
Feike Steenbergen
2015-10-26 14:57:59 +01:00
parent 2e5efc6cc9
commit e2aff13d3e
6 changed files with 383 additions and 4 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ postgresql:
parameters:
archive_mode: "on"
wal_level: hot_standby
archive_command: mkdir -p ../wal_archive && cp %p ../wal_archive/%f
archive_command: 'true'
max_wal_senders: 20
listen_addresses: 0.0.0.0
wal_keep_segments: 8