Commit Graph
54 Commits
Author SHA1 Message Date
Feike Steenbergen 990276c214 Install patronictl as a script 2015-11-13 13:02:40 +01:00
Feike Steenbergen dcb5113f9d Refactoring from patronicli to patronictl 2015-11-13 12:55:38 +01:00
Feike Steenbergen 92b23a2018 Merge branch 'feature/api' of github.com:zalando/patroni into feature/patroni_cli_or_ctl_tbd 2015-11-09 16:33:17 +01:00
Feike Steenbergen da23dd12f3 Do not wait for leader key to change after failover.
Previously, the leader key was watched for changes after a failover. This resulted in a delay
of up to 10 seconds to report a healthy failover back to the client.

With this patch, we are not relying on the role of a member registered in the dcs anymore.
2015-11-06 15:02:13 +01:00
Feike Steenbergen 3938359828 Command Line: Add reinit and restart commands. 2015-10-27 12:13:26 +01:00
Feike Steenbergen 7784f7db3d Bumped version to 0.6 2015-10-27 09:20:24 +01:00
Feike Steenbergen 98a0d8381b Add prettytable to requirements 2015-10-26 15:07:08 +01:00
Feike Steenbergen a2cb3f1889 Include Click as requirement for patroncli 2015-10-26 15:04:23 +01:00
Feike Steenbergen e2aff13d3e 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
2015-10-26 14:57:59 +01:00
Feike Steenbergen 5ae6f3a56c Change Docker registry 2015-10-22 09:30:12 +02:00
Feike Steenbergen eaf63db886 Use a different namespace in the Docker container.
Also bugfix: Patroni should advertise Docker ip as connect address
2015-10-22 09:28:00 +02:00
Feike Steenbergen 857caa1397 Revert casting to string 2015-10-22 09:24:31 +02:00
Feike Steenbergen e0e4789b8a Explicitly cast scope to string.
Fixes issue #74
2015-10-21 15:49:20 +02:00
Feike Steenbergen 98b59354a9 Exclude more files from git. 2015-10-14 14:37:05 +02:00
Feike Steenbergen dd8472f639 Tag on github is prefixed with v. 2015-09-08 13:17:36 +02:00
Feike Steenbergen 4d334061b0 Bumped version to 0.2 2015-09-08 13:10:19 +02:00
Feike Steenbergen 763e4db949 Bumped version to 0.20 2015-09-08 13:09:58 +02:00
Feike Steenbergen 28f5839ac2 Make git add part of the release.sh again. 2015-09-07 14:00:05 +02:00
Feike Steenbergen cdccebd2d1 Point to api for listing of Docker images for Patroni (Issue #14) 2015-09-07 13:53:48 +02:00
Feike Steenbergen 348e8e8086 Reverted pip installation in Dockerfile
As the Dockerfile is there mainly to support developers, we want to build the Dockerfile using the current working
directory instead of a previously released version.
2015-09-07 13:47:05 +02:00
Feike Steenbergen 147d7c8566 Fix heading of the README 2015-09-03 10:45:06 +02:00
Feike Steenbergen 8984d99116 Make helpers into a module, so it can be imported. 2015-09-03 10:38:21 +02:00
Feike Steenbergen 04d6f7b418 Make scripts into a module, so it can be imported. 2015-09-03 10:34:37 +02:00
Feike Steenbergen b1afd5ddc4 Refactoring to enable package building and succesfull installation of the Patroni package.
Build the first packages of patroni and added them to pypi.python.org
Update Dockerfile to use pip to install patroni.
2015-09-03 09:52:01 +02:00
Feike Steenbergen e96265e4d1 Make Patroni suitable for packaging.
- Restructured the repository: Moved patroni into its own directory.
- Changed readme into reStructuredText
2015-09-01 17:05:05 +02:00
Feike Steenbergen 61e01b1435 Update documentation and Dockerfile to point to a SNAPSHOT version. Include python-etcd in Dockerfile 2015-09-01 11:35:32 +02:00
Feike Steenbergen b0707c8ddd Merge branch 'master' of github.com:zalando/patroni into feature/external_backup
Conflicts:
	requirements-py2.txt
2015-08-11 11:27:53 +02:00
Feike Steenbergen cdb0e43ed7 Dockerfile: Enable (undocumented) cheat mode to troubleshoot 2015-08-05 16:53:05 +02:00
Feike Steenbergen c30d8dbd1a Development: Update Dockerfile and create possibility to run local cluster
To help in developing features, the Dockerfile and its entrypoint have been extended.
The README.md explains stuff in detail, in short:

- you can now run a Patroni cluster with a single command
2015-08-05 14:12:45 +02:00
Feike Steenbergen 7c4efb33e7 Updated Dockerfile
Due to the renaming of Governor to Patroni some old references needed to be updated.
Also some python packages need to be added.

Added entrypoint.sh as a script, to ensure Patroni will have PID = 1 when the container is run.
2015-08-05 09:56:32 +02:00
Feike Steenbergen 526346a9c1 Dockerfile: Reduce size and dependency, update etcd.
The Dockerfile now only builds upon the publicly available Ubuntu docker image, thereby reducing the size of the image.
etcd release 2.0.12 was released today as well, updated that dependency.
2015-06-17 14:08:51 +02:00
Feike Steenbergen e734ac6b1d Add pythondns to the Dockerfile. 2015-06-09 12:25:30 +02:00
Feike Steenbergen 92d2fda4a4 Dockerfile: Bump etcd version, include boto as a dependency 2015-06-05 10:23:49 +02:00
Feike Steenbergen ea416d98d7 Api: Bugfix for current_xlog_location in slaves. 2015-05-26 15:40:32 +02:00
Feike Steenbergen 1322413863 Added some small TODO items. 2015-05-26 09:49:40 +02:00
Feike Steenbergen f3e1c74d9b Unittests: Remove some more unneccesary code. 2015-05-21 14:59:54 +02:00
Feike Steenbergen ebfa29b89b Remove "testing" code from the helpers 2015-05-21 14:58:24 +02:00
Feike Steenbergen 7f458a84bb Remove unnessecary functions from unittest, fix one bug (return tuples) in cursor. 2015-05-21 14:53:25 +02:00
Feike Steenbergen 836a681157 Fixed the tests, by testing also found an squashed a bug in the StatusPage on python 3. 2015-05-21 14:40:07 +02:00
Feike Steenbergen 7afba469b4 Add Tests for testing the statuspage, extend the PostgreSQL test to return a wider result. 2015-05-21 13:56:08 +02:00
Feike Steenbergen c05453cc98 Merge branch 'master' of github.com:zalando/governor 2015-05-21 12:17:56 +02:00
Feike Steenbergen d958ed4fbc Add badges to Governor showing test coverage and build status. 2015-05-21 09:31:35 +02:00
Feike Steenbergen 24c29aee04 Add hostssl entry to pg_hba 2015-05-19 13:03:14 +02:00
Feike Steenbergen f6fc60800a Close connection when querying other members of cluster. 2015-05-18 16:54:36 +02:00
Feike Steenbergen b8ce6794de Initialize cluster with encoding=UTF8 by default. 2015-05-18 13:35:43 +02:00
Feike Steenbergen 0b669e0d20 Cleanup
Removed aws reference from Dockerfile, remove unnecessary steps.
Connect using libpq parameters, therefore providing nice application name for Governor.
2015-05-15 13:52:20 +02:00
Feike Steenbergen 2b56379b85 Change default port for the health check to 8008. 2015-05-12 15:48:30 +02:00
Feike Steenbergen c4168bfeb5 Bugfix: Headers sent before http status for the pg_status page. 2015-05-12 14:56:02 +02:00
Feike Steenbergen 362b6b4fa2 Made healtcheck port configurable, fixed standalone status page. 2015-05-12 14:48:40 +02:00
Feike Steenbergen ed30684d85 Merge branch 'features/refactoring' of github.com:zalando/governor into feature/status_page
Conflicts:
	helpers/postgresql.py
2015-05-12 14:39:51 +02:00
Feike Steenbergen a56b346295 Hardened the health checks and implemented a real status page.
For the postgresql helper, hardened the code to get "the" cursor of the postgresql instance.
For the statuspage, a small status json is returned.
To find out what status a PostgreSQL cluster is in we use the cursor (instead of the provided query() function), as the query function does some retrying etc. For the healthcheck we want to simple provide an answer to a simple query, if we have to reconnect, we are not *that* healthy anyway.

Dropped catching exceptions in the do_GET block, as the HTTPServer will do that nicely for us anyway.
2015-05-12 11:58:47 +02:00
Feike Steenbergen e7adb69503 Start the http request handler for load balancing as a thread in Governor.
When not running standalone, some better referencing to the Postgresql instance was needed.
2015-05-11 13:11:09 +02:00
Feike Steenbergen 91b71f8579 Created tatuspage, a health check for a PostgreSQL cluster served using http.
The StatusPage uses a BaseHTTPServer to server 3 simple http endpoints:

- pg_master, returns 200 if PostgreSQL is running as master
- pg_slave,  returns 200 if PostgreSQL is running as slave
- pg_status, returns some information about the cluster

It does this by relying on the PostgreSQL connection of the Governor.
2015-05-11 11:46:01 +02:00
Feike Steenbergen 0b053e3b33 Created a Dockerfile to be able to run Governor using a local etcd.
Usefull for developing and testing the Governor locally.
2015-05-07 13:17:28 +02:00