Rolling updates to application and worker servers

This commit is contained in:
2016-01-19 08:58:44 -05:00
parent c0e6cd1fdc
commit b1dec1efeb
2 changed files with 14 additions and 11 deletions

View File

@@ -1,19 +1,23 @@
-- ---
# This playbook deploys the whole application stack for wrestlingdev # This playbook deploys the whole application stack for wrestlingdev
# #
- name: deploy code to webservers - hosts: webservers
hosts: webservers
remote_user: root remote_user: root
serial: 1
tasks: tasks:
- name: Restart docker container - name: Refresh code
command: cd /root/wrestlingApp/ && git pull origin master && bash rails-prod.sh wrestlingdev-app command: chdir=/root/wrestlingApp git pull origin master
- name: Restart and rebuild docker container
command: chdir=/root/wrestlingApp bash rails-prod.sh wrestlingdev-app
- name: deploy code to workers - hosts: workers
hosts: workers
remote_user: root remote_user: root
serial: 1
tasks: tasks:
- name: Restart docker container - name: Refresh code
command: cd /root/wrestlingApp/ && git pull origin master && bash rails-worker-prod.sh wrestlingdev-app command: chdir=/root/wrestlingApp git pull origin master
- name: Restart and rebuild docker container
command: chdir=/root/wrestlingApp bash rails-worker-prod.sh wrestlingdev-app

View File

@@ -3,4 +3,3 @@
repository: https://github.com/jcwimer/wrestlingApp.git repository: https://github.com/jcwimer/wrestlingApp.git
firstdbhostname: {{ groups[['dbservers'][0]] }}