Rolling updates to application and worker servers
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -3,4 +3,3 @@
|
|||||||
|
|
||||||
repository: https://github.com/jcwimer/wrestlingApp.git
|
repository: https://github.com/jcwimer/wrestlingApp.git
|
||||||
|
|
||||||
firstdbhostname: {{ groups[['dbservers'][0]] }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user