Commit 7556fbb3 by Feanil Patel

Only restart apps.

parent ffa8eaeb
...@@ -5,30 +5,6 @@ ...@@ -5,30 +5,6 @@
# TODO: the supervisor ansible module does not support # TODO: the supervisor ansible module does not support
# stopping and starting services by group. # stopping and starting services by group.
- name: edxapp | stop the edxapp services (supervisor)
supervisorctl: >
name="edxapp:{{ item }}"
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=stopped
when: celery_worker is not defined
with_items: service_variants_enabled
sudo_user: "{{ common_web_user }}"
tags:
- deploy
- name: edxapp | stop the celery worker services (supervisor)
supervisorctl: >
name="edxapp_worker:{{ item.service_variant }}_{{ item.queue }}_{{ item.concurrency }}"
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=stopped
when: celery_worker is defined
with_items: edxapp_workers
sudo_user: "{{ common_web_user }}"
tags:
- deploy
# Do A Checkout # Do A Checkout
- name: edxapp | checkout edx-platform repo into {{edxapp_code_dir}} - name: edxapp | checkout edx-platform repo into {{edxapp_code_dir}}
git: dest={{edxapp_code_dir}} repo={{edx_platform_repo}} version={{edx_platform_commit}} git: dest={{edxapp_code_dir}} repo={{edx_platform_repo}} version={{edx_platform_commit}}
...@@ -202,24 +178,24 @@ ...@@ -202,24 +178,24 @@
# gather_assets and db migrations # gather_assets and db migrations
- include: service_variant_config.yml - include: service_variant_config.yml
- name: edxapp | start the edxapp services (supervisor) - name: edxapp | restart the edxapp services (supervisor)
supervisorctl: > supervisorctl: >
name="edxapp:{{ item }}" name="edxapp:{{ item }}"
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=restarted
when: celery_worker is not defined when: celery_worker is not defined
with_items: service_variants_enabled with_items: service_variants_enabled
sudo_user: "{{ common_web_user }}" sudo_user: "{{ common_web_user }}"
tags: tags:
- deploy - deploy
- name: edxapp | start the celery worker services (supervisor) - name: edxapp | restart the celery worker services (supervisor)
supervisorctl: > supervisorctl: >
name="edxapp_worker:{{ item.service_variant }}_{{ item.queue }}_{{ item.concurrency }}" name="edxapp_worker:{{ item.service_variant }}_{{ item.queue }}_{{ item.concurrency }}"
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=restarted
when: celery_worker is defined when: celery_worker is defined
with_items: edxapp_workers with_items: edxapp_workers
sudo_user: "{{ common_web_user }}" sudo_user: "{{ common_web_user }}"
......
--- ---
- name: forum | stop the forum service
supervisorctl: >
name=forum
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=stopped
tags:
- deploy
- name: forum | create the supervisor wrapper - name: forum | create the supervisor wrapper
template: > template: >
src={{ forum_supervisor_wrapper|basename }}.j2 src={{ forum_supervisor_wrapper|basename }}.j2
......
# Stop xqueue service.
- name: xqueue | stop xqueue service
supervisorctl: >
name=xqueue
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=stopped
tags:
- deploy
- name: xqueue | stop xqueue consumer service - name: xqueue | stop xqueue consumer service
supervisorctl: > supervisorctl: >
name=xqueue_consumer name=xqueue_consumer
...@@ -84,20 +74,20 @@ ...@@ -84,20 +74,20 @@
tags: tags:
- deploy - deploy
- name: xqueue | start xqueue - name: xqueue | restart xqueue
supervisorctl: > supervisorctl: >
name=xqueue name=xqueue
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=restarted
tags: tags:
- deploy - deploy
- name: xqueue | start xqueue consumer - name: xqueue | restart xqueue consumer
supervisorctl: > supervisorctl: >
name=xqueue_consumer name=xqueue_consumer
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=restarted
tags: tags:
- deploy - deploy
- name: xserver | stop xserver
supervisorctl: >
name=xserver
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=stopped
tags:
- deploy
- name: xserver | checkout code - name: xserver | checkout code
git: dest={{xserver_code_dir}} repo={{xserver_source_repo}} version={{xserver_version}} git: dest={{xserver_code_dir}} repo={{xserver_source_repo}} version={{xserver_version}}
sudo_user: "{{ xserver_user }}" sudo_user: "{{ xserver_user }}"
...@@ -20,15 +11,6 @@ ...@@ -20,15 +11,6 @@
tags: tags:
- deploy - deploy
- name: xserver | ensuring xserver is activated in supervisor
supervisorctl: >
name="xserver"
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
state=present
tags:
- deploy
- name: xserver | install requirements - name: xserver | install requirements
pip: requirements="{{xserver_requirements_file}}" virtualenv="{{ xserver_venv_dir }}" state=present pip: requirements="{{xserver_requirements_file}}" virtualenv="{{ xserver_venv_dir }}" state=present
sudo_user: "{{ xserver_user }}" sudo_user: "{{ xserver_user }}"
...@@ -74,11 +56,11 @@ ...@@ -74,11 +56,11 @@
tags: tags:
- deploy - deploy
- name: xserver | start xserver - name: xserver | restart xserver
supervisorctl: > supervisorctl: >
name=xserver name=xserver
supervisorctl_path={{ supervisor_ctl }} supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }} config={{ supervisor_cfg }}
state=started state=restarted
tags: tags:
- deploy - deploy
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment