Skip to content

Commit

Permalink
[main][xs]: split docker update and deploy into separate commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
rufuspollock committed Jul 6, 2017
1 parent 262e2fb commit 2c56126
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def docker(self):
self.docker_create()
else:
self.docker_update()
self.docker_deploy()

def docker_create(self):
'''Create the docker stack'''
Expand All @@ -59,8 +60,12 @@ def docker_create(self):
def docker_update(self):
'''Update the docker stack and redeploy'''
cmd = 'docker-cloud stack update -f docker-cloud.yml %s' % self.stackname
cmd2 = 'docker-cloud stack redeploy %s' % self.stackname
self._run(cmd)

def docker_deploy(self):
'''(Re)Deploy stack.'''
print('Redeploying stack ...')
cmd2 = 'docker-cloud stack redeploy %s' % self.stackname
self._run(cmd2)

def docker_terminate(self):
Expand Down

0 comments on commit 2c56126

Please sign in to comment.