82 Commits

Author SHA1 Message Date
Oleksii Kliukin
1c61280d70 Fix path to scripts subdirectory in configuration files. 2015-09-08 16:10:42 +02:00
Alexander Kukushkin
df06860bde Merge pull request #23 from pgexperts/93compat
93compat
2015-09-04 08:14:13 +02:00
Josh Berkus
f2338e074c Added documentation, sample config for optional replication slots. 2015-09-03 18:16:44 -07:00
Oleksii Kliukin
3e4d2df33b put a real restore/replication command inside the test postgres.yaml files 2015-09-02 12:04:39 +02:00
Oleksii Kliukin
29434e24ea Allow relative paths to external scripts. 2015-08-24 16:53:57 +02:00
Oleksii Kliukin
7f2dcc0a95 Move replica creation code into a separte file. So far, only the class that makes replicas with pg_basebackup is called. 2015-08-03 11:44:11 +02:00
Oleksii Kliukin
5171964758 Merge branch 'master' into feature/callbacks 2015-07-27 16:19:03 +02:00
Oleksii Kliukin
859da0db0a Make unit tets run again. 2015-07-27 10:10:29 +02:00
Alexander Kukushkin
dcad7a3229 Add exhibitor support
List of ZooKeeper nodes could be periodically updated from Exhibitor
Since we know that each Exhibitor accompanies one ZooKeeper node, list
of Exhibitor nodes also maintained. Exhibitor assumes that all ZooKeeper
nodes are using the same client port, 2181. The same assumption is valid
for Exhibitor, it should always listen on the same port on all nodes.

Original list of Exhibitor nodes is cached and used as a fallback when
it failed ito query information with using maintained list.
2015-07-10 10:46:33 +02:00
Alexander Kukushkin
54400c6dec Merge branch 'multidcs' of github.com:CyberDem0n/governor into feature/multidcs
Conflicts:
	governor.py
	tests/test_governor.py
	tests/test_postgresql.py
2015-07-08 08:47:26 +02:00
Alexander Kukushkin
43b12af3a7 Implement possibility to work against ZooKeeper
This implementation is using the same interface (AbstractDCS) as Etcd
class. It means that there should be no problem to implement another
plugin to work agains Consul for example.
2015-07-07 12:45:14 +02:00
Alexander Kukushkin
19b0d4701b Merge branch 'etcd-cluster-support' of github.com:CyberDem0n/governor into etcd-cluster-support
Conflicts:
	requirements-py2.txt
	tests/test_governor.py
2015-06-09 11:34:14 +02:00
Alexander Kukushkin
c79fba7656 Support work with etcd as a cluster
In case if one member of a cluster is not available it will retry with
another one and fetch the new cluster configuration. Default timeout for
all requests to etcd is 5 seconds.
Initial cluster configuration can be resolved through:
1) /v2/members call on one of the cluster members on a client port
2) when it is possible to resolve hostname into multiple ip's  it will
iterate through list and try to perform action from 1)
3) If there is discovery_srv defined in etcd section of config file it
will resolve peer addresses of all cluster members and will fetch
cluster configuration with using peer protocol by doing /members call on
a peer port
2015-06-09 09:51:53 +02:00
Alexander Kukushkin
5cceac7621 Merge branch 'master' of github.com:CyberDem0n/governor into features/refactoring
Conflicts:
	tests/test_postgresql.py
2015-06-02 12:38:45 +02:00
Alexander Kukushkin
d9fbbf3ae9 Make pg_hba section more compact 2015-06-02 12:37:26 +02:00
Alexander Kukushkin
88631e14fa Merge branch 'master' of github.com:CyberDem0n/governor into features/refactoring
Conflicts:
	helpers/postgresql.py
	tests/test_postgresql.py
2015-06-02 10:28:28 +02:00
Alexander Kukushkin
1bcc2b5fa6 Extend postgres?.yml with pg_hba section to give possibility to customize pg_hba.conf 2015-06-01 16:05:35 +02:00
Alexander Kukushkin
9971d214fe Merge branch 'restapi' of github.com:CyberDem0n/governor into features/refactoring
Conflicts:
	governor.py
2015-05-27 14:54:08 +02:00
Alexander Kukushkin
bdc4374ae3 connect address for rest api could be different from listen address 2015-05-27 14:51:41 +02:00
Alexander Kukushkin
bbf1110518 Merge branch 'restapi' of github.com:CyberDem0n/governor into features/refactoring
Conflicts:
	governor.py
	helpers/postgresql.py
	postgres0.yml
	postgres1.yml
	tests/test_postgresql.py
2015-05-26 09:56:35 +02:00
Alexander Kukushkin
cca5bdef8f Configure listen address for restapi via a yaml file 2015-05-26 09:07:39 +02:00
Oleksii Kliukin
1c1a15908c use governor yaml parameters and not environment variables to configure backups with WAL-E. 2015-05-20 11:47:20 +02:00
Alexander Kukushkin
5ab99c6589 Get rid from all AWS references here.
connect_address give possibility to specify listen address and connect
address separetely, so there is no need to determine your external
address by doing requests to amazon api.
2015-05-15 12:39:05 +02:00
Alexander Kukushkin
75ff91d017 rename connection_address to connect_address 2015-05-15 12:13:05 +02:00
Alexander Kukushkin
08865512f8 Differentiate between connection address and listen address
For example you can listen on 0.0.0.0 but provide service on some
didicated ip. This should cover all possible use-cases when you are
running behind firewall, load balancer or inside for example docker.
2015-05-15 12:06:04 +02:00
Alexander Kukushkin
2fd81a5135 Merge branch 'master' of github.com:CyberDem0n/governor into features/refactoring 2015-05-15 11:39:25 +02:00
Christopher Winslett
557bad37cd ensure a stale Postgres does not become leader 2015-05-12 18:11:12 -07:00
Feike Steenbergen
2b56379b85 Change default port for the health check to 8008. 2015-05-12 15:48:30 +02:00
Feike Steenbergen
362b6b4fa2 Made healtcheck port configurable, fixed standalone status page. 2015-05-12 14:48:40 +02:00
Oleksii Kliukin
10dbf990f1 Allow md5 connections from outside and create connection roles.
Create a superuser role with a given name and password (or change
the postgres role if the name is not given). Also, create an admin
role with the name and the password provided. The admin role has
CREATEDB and CREATEROLE permisssions, effectively making it the
most powerful role after the superuser.
2015-04-30 10:58:07 +02:00
Oleksii Kliukin
8184efbf45 Add an option to use AWS instance address in a PostgreSQL connection string.
When PostgreSQL is running inside the docker container, it should provide
the address of the host it's running on and not the address from inside
of the container to the outside world.
2015-04-29 12:54:29 +02:00
Christopher Winslett
3749883328 first commit 2015-03-15 23:16:48 -07:00