From 55b47daa6a1e3b6f8dd763a9f75af7fb0d252971 Mon Sep 17 00:00:00 2001 From: Santiago Del Castillo Date: Thu, 18 Aug 2016 18:23:05 -0300 Subject: [PATCH] Declare upstart and supervisor services and reload upstart --- deployer/settings.py | 3 +++ deployer/tasks/service.py | 3 +++ setup.py | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/deployer/settings.py b/deployer/settings.py index 63c60ce..188810e 100644 --- a/deployer/settings.py +++ b/deployer/settings.py @@ -17,3 +17,6 @@ env.app_name = environ.get('APP_NAME') env.app_dir = '/var/local/apps/{}'.format(environ.get('APP_NAME')) env.repo_url = environ.get('APP_REPO_URL') + +env.supervisor_services = environ.get('SUPERVISOR_SERVICES', '').split(',') +env.upstart_services = environ.get('UPSTART_SERVICES', '').split(',') diff --git a/deployer/tasks/service.py b/deployer/tasks/service.py index 16d77bb..2adc722 100644 --- a/deployer/tasks/service.py +++ b/deployer/tasks/service.py @@ -1,3 +1,4 @@ +from fabric.api import sudo from fabtools import service def stop(component): @@ -15,3 +16,5 @@ def restart(component): def reload(component): service.reload(component) +def upstart_reload(): + sudo('initctl reload-configuration') diff --git a/setup.py b/setup.py index f1f4528..e209f48 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ setup( name="deployer", - version="0.1.2", + version="1.0.1", description="Streema deployer library", long_description=readme, author="Streema Devs",