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 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']