Unverified Commit 5629ea5a by Kevin Falcone Committed by GitHub

Merge pull request #4597 from edx/jibsheet/remove-supervisor-groups-edxapp

Stop having edxapp: for edxapp:lms edxapp:cms
parents b0b36daa 104a6eb9
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
environment: environment:
PATH: "{{ edxapp_deploy_path }}" PATH: "{{ edxapp_deploy_path }}"
become_user: "{{ edxapp_user }}" become_user: "{{ edxapp_user }}"
notify:
- "restart edxapp"
- "restart workers"
tags: tags:
- deploy - deploy
...@@ -39,15 +36,14 @@ ...@@ -39,15 +36,14 @@
environment: environment:
DB_MIGRATION_USER: "{{ edxapp_mysql_user }}" DB_MIGRATION_USER: "{{ edxapp_mysql_user }}"
DB_MIGRATION_PASS: "{{ edxapp_mysql_password }}" DB_MIGRATION_PASS: "{{ edxapp_mysql_password }}"
notify:
- "restart edxapp"
- "restart workers"
tags: tags:
- deploy - deploy
handlers: - name: restart lms
- name: restart edxapp shell: "{{ supervisorctl_path }} restart lms"
shell: "{{ supervisorctl_path }} restart edxapp:"
- name: restart studio
shell: "{{ supervisorctl_path }} restart cms"
- name: restart workers - name: restart workers
shell: "{{ supervisorctl_path }} restart edxapp_worker:" shell: "{{ supervisorctl_path }} restart edxapp_worker:"
...@@ -349,12 +349,15 @@ ...@@ -349,12 +349,15 @@
- name: ensure edxapp has started - name: ensure edxapp has started
supervisorctl: supervisorctl:
name: "edxapp:" name: "{{ item }}"
supervisorctl_path: "{{ supervisor_ctl }}" supervisorctl_path: "{{ supervisor_ctl }}"
config: "{{ supervisor_cfg }}" config: "{{ supervisor_cfg }}"
state: started state: started
become_user: "{{ supervisor_service_user }}" become_user: "{{ supervisor_service_user }}"
when: celery_worker is not defined and not disable_edx_services when: celery_worker is not defined and not disable_edx_services
with_items:
- 'lms'
- 'cms'
tags: tags:
- manage - manage
...@@ -404,12 +407,15 @@ ...@@ -404,12 +407,15 @@
- name: restart edxapp - name: restart edxapp
supervisorctl: supervisorctl:
name: "edxapp:" name: "{{ item }}"
supervisorctl_path: "{{ supervisor_ctl }}" supervisorctl_path: "{{ supervisor_ctl }}"
config: "{{ supervisor_cfg }}" config: "{{ supervisor_cfg }}"
state: restarted state: restarted
when: edxapp_installed is defined and celery_worker is not defined and not disable_edx_services when: edxapp_installed is defined and celery_worker is not defined and not disable_edx_services
become_user: "{{ supervisor_service_user }}" become_user: "{{ supervisor_service_user }}"
with_items:
- 'lms'
- 'cms'
tags: tags:
- manage - manage
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
- install - install
- install:configuration - install:configuration
# write the supervisor script for edxapp and celery workers # write the supervisor script for celery workers
- name: writing edxapp and celery supervisor scripts - name: writing celery supervisor scripts
template: template:
src: "edx/app/supervisor/conf.d.available/{{ item }}.j2" src: "edx/app/supervisor/conf.d.available/{{ item }}.j2"
dest: "{{ supervisor_available_dir }}/{{ item }}" dest: "{{ supervisor_available_dir }}/{{ item }}"
...@@ -40,12 +40,21 @@ ...@@ -40,12 +40,21 @@
mode: 0644 mode: 0644
become_user: "{{ supervisor_user }}" become_user: "{{ supervisor_user }}"
with_items: with_items:
- edxapp.conf
- workers.conf - workers.conf
tags: tags:
- install - install
- install:configuration - install:configuration
# clean out an old edxapp.conf file which we don't use now.
# this can be deleted after we build things from scratch.
- name: clean out old edxapp.conf
file:
path: "{{ supervisor_available_dir }}/edxapp.conf"
state: "absent"
tags:
- install
- install:configuration
- name: add gunicorn configuration files - name: add gunicorn configuration files
template: template:
src: "{{ item }}_gunicorn.py.j2" src: "{{ item }}_gunicorn.py.j2"
...@@ -71,18 +80,6 @@ ...@@ -71,18 +80,6 @@
- install - install
- install:configuration - install:configuration
- name: enable edxapp supervisor script
file:
src: "{{ supervisor_available_dir }}/edxapp.conf"
dest: "{{ supervisor_cfg_dir }}/edxapp.conf"
state: link
force: yes
become_user: "{{ supervisor_user }}"
when: celery_worker is not defined and not disable_edx_services
tags:
- install
- install:configuration
- name: enable celery worker supervisor script - name: enable celery worker supervisor script
file: file:
src: "{{ supervisor_available_dir }}/workers.conf" src: "{{ supervisor_available_dir }}/workers.conf"
......
[group:edxapp]
programs={{ ",".join(service_variants_enabled) }}
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