From c4cc0be4fefbf4d68ed0b2f519f518036e604674 Mon Sep 17 00:00:00 2001 From: Josh Berkus Date: Tue, 29 Sep 2015 17:35:45 -0700 Subject: [PATCH 1/2] Added Upstart job for running patroni under Ubuntu 14.04 or 12.04. --- extras/startup-scripts/README.md | 10 ++++++ extras/startup-scripts/patroni.upstart.conf | 36 +++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 extras/startup-scripts/README.md create mode 100644 extras/startup-scripts/patroni.upstart.conf diff --git a/extras/startup-scripts/README.md b/extras/startup-scripts/README.md new file mode 100644 index 00000000..244ee65e --- /dev/null +++ b/extras/startup-scripts/README.md @@ -0,0 +1,10 @@ +# startup scripts for Patroni + +This directory contains sample startup scripts for various OSes +and management tools for Patroni. + +Scripts supplied: + +### patroni.upstart.conf + +Upstart job for Ubuntu 12.04 or 14.04. Requires Upstart > 1.4. Intended for systems where Patroni has been installed on a base system, rather than in Docker. diff --git a/extras/startup-scripts/patroni.upstart.conf b/extras/startup-scripts/patroni.upstart.conf new file mode 100644 index 00000000..206e01f4 --- /dev/null +++ b/extras/startup-scripts/patroni.upstart.conf @@ -0,0 +1,36 @@ +# patroni - patroni daemon +# +# controls startup/shutdown of postgres +# you should disable any postgres start jobs +# +# assumes that patroni has been installed into the +# pythonpath by using setup.py install + +description "patroni start daemon" + +start on net-device-up +stop on runlevel [06] + +respawn +respawn limit 5 10 + +# set location of patroni +env PATRONI=/usr/local/bin/patroni +# virtualenv example +# env PATRONI=/var/lib/postgresql/patronienv/bin/patroni + +# set location of config file +env PATRONICONF=/etc/patroni/patroni.yml + +# set log dir for patroni logs +# postgres user must have write permission +env POSTGRESLOGDIR=/var/log/postgresql + +setuid postgres +setgid postgres + +script + exec start-stop-daemon --start \ + --exec $PATRONI -- $PATRONICONF \ + >> $POSTGRESLOGDIR/patroni.log 2>&1 +end script From 182a90973d5c62aa9f524c6f6e324082c8b272bf Mon Sep 17 00:00:00 2001 From: Oleksii Kliukin Date: Wed, 30 Sep 2015 16:46:53 +0200 Subject: [PATCH 2/2] Make sure tests work with the new pytest. --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 3def98b3..724f3b4a 100644 --- a/setup.py +++ b/setup.py @@ -89,7 +89,6 @@ class PyTest(TestCommand): params = {'args': self.test_args} if self.cov: params['args'] += self.cov - params['plugins'] = ['cov'] if self.junitxml: params['args'] += self.junitxml params['args'] += ['--doctest-modules', MAIN_PACKAGE, '-s', '-vv']