Commit 1c015a65 by John Jarvis

updating plays in edx-east and edx-west for supervisor role

parent d60d89ce
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
- "{{ secure_dir }}/vars/users.yml" - "{{ secure_dir }}/vars/users.yml"
roles: roles:
- common - common
- supervisor
- datadog - datadog
- role: nginx - role: nginx
nginx_sites: nginx_sites:
...@@ -34,6 +35,7 @@ ...@@ -34,6 +35,7 @@
- "{{ secure_dir }}/vars/users.yml" - "{{ secure_dir }}/vars/users.yml"
roles: roles:
- common - common
- supervisor
- datadog - datadog
- role: nginx - role: nginx
nginx_sites: nginx_sites:
......
...@@ -7,12 +7,13 @@ ...@@ -7,12 +7,13 @@
- "{{ secure_dir }}/vars/users.yml" - "{{ secure_dir }}/vars/users.yml"
roles: roles:
- common - common
- supervisor
- datadog - datadog
- role: nginx - role: nginx
nginx_sites: nginx_sites:
- lms - lms
- cms - cms
- lms-preview - lms-preview
- role: 'edxapp' - role: 'edxapp'
edxapp_lms_env: 'lms.envs.load_test' edxapp_lms_env: 'lms.envs.load_test'
edx_platform_commit: 'release' edx_platform_commit: 'release'
...@@ -25,12 +26,13 @@ ...@@ -25,12 +26,13 @@
- "{{ secure_dir }}/vars/users.yml" - "{{ secure_dir }}/vars/users.yml"
roles: roles:
- common - common
- supervisor
- datadog - datadog
- role: nginx - role: nginx
nginx_sites: nginx_sites:
- lms - lms
- cms - cms
- lms-preview - lms-preview
- role: 'edxapp' - role: 'edxapp'
edxapp_lms_env: 'lms.envs.load_test' edxapp_lms_env: 'lms.envs.load_test'
celery_worker: True celery_worker: True
...@@ -43,9 +45,10 @@ ...@@ -43,9 +45,10 @@
- "{{ secure_dir }}/vars/users.yml" - "{{ secure_dir }}/vars/users.yml"
roles: roles:
- common - common
- supervisor
- role: nginx - role: nginx
nginx_sites: nginx_sites:
- xserver - xserver
- xserver - xserver
- splunkforwarder - splunkforwarder
- hosts: tag_aws_cloudformation_stack-name_feanilsandbox:&tag_group_rabbitmq - hosts: tag_aws_cloudformation_stack-name_feanilsandbox:&tag_group_rabbitmq
...@@ -56,6 +59,7 @@ ...@@ -56,6 +59,7 @@
- "{{ secure_dir }}/vars/users.yml" - "{{ secure_dir }}/vars/users.yml"
roles: roles:
- common - common
- supervisor
- rabbitmq - rabbitmq
- splunkforwarder - splunkforwarder
- hosts: tag_aws_cloudformation_stack-name_feanilsandbox:&tag_group_xqueue - hosts: tag_aws_cloudformation_stack-name_feanilsandbox:&tag_group_xqueue
...@@ -65,6 +69,7 @@ ...@@ -65,6 +69,7 @@
- "{{ secure_dir }}/vars/users.yml" - "{{ secure_dir }}/vars/users.yml"
roles: roles:
- common - common
- supervisor
- role: nginx - role: nginx
nginx_sites: nginx_sites:
- xqueue - xqueue
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
gather_facts: False gather_facts: False
roles: roles:
- common - common
- supervisor
- role: nginx - role: nginx
nginx_sites: nginx_sites:
- devpi - devpi
...@@ -17,4 +18,4 @@ ...@@ -17,4 +18,4 @@
tags: ['r_devpi'] tags: ['r_devpi']
- role: gh_mirror - role: gh_mirror
tags: ['r_gh_mirror'] tags: ['r_gh_mirror']
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
gather_facts: True gather_facts: True
roles: roles:
- common - common
- supervisor
- role: virtualenv - role: virtualenv
virtualenv_user: "notifier" virtualenv_user: "notifier"
virtualenv_user_home: "/opt/wwc/notifier" virtualenv_user_home: "/opt/wwc/notifier"
...@@ -22,6 +23,7 @@ ...@@ -22,6 +23,7 @@
gather_facts: True gather_facts: True
roles: roles:
- common - common
- supervisor
- role: virtualenv - role: virtualenv
virtualenv_user: "notifier" virtualenv_user: "notifier"
virtualenv_user_home: "/opt/wwc/notifier" virtualenv_user_home: "/opt/wwc/notifier"
...@@ -37,6 +39,7 @@ ...@@ -37,6 +39,7 @@
gather_facts: True gather_facts: True
roles: roles:
- common - common
- supervisor
- role: virtualenv - role: virtualenv
virtualenv_user: "notifier" virtualenv_user: "notifier"
virtualenv_user_home: "/opt/wwc/notifier" virtualenv_user_home: "/opt/wwc/notifier"
...@@ -52,6 +55,7 @@ ...@@ -52,6 +55,7 @@
gather_facts: True gather_facts: True
roles: roles:
- common - common
- supervisor
- role: virtualenv - role: virtualenv
virtualenv_user: "notifier" virtualenv_user: "notifier"
virtualenv_user_home: "/opt/wwc/notifier" virtualenv_user_home: "/opt/wwc/notifier"
...@@ -68,6 +72,7 @@ ...@@ -68,6 +72,7 @@
vars: vars:
roles: roles:
- common - common
- supervisor
- role: virtualenv - role: virtualenv
virtualenv_user: "notifier" virtualenv_user: "notifier"
virtualenv_user_home: "/opt/wwc/notifier" virtualenv_user_home: "/opt/wwc/notifier"
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
mysql5_workaround: True mysql5_workaround: True
roles: roles:
- common - common
- supervisor
- role: nginx - role: nginx
nginx_sites: nginx_sites:
- lms - lms
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
- "{{ secure_dir }}/vars/mlapi_prod_users.yml" - "{{ secure_dir }}/vars/mlapi_prod_users.yml"
roles: roles:
- common - common
- supervisor
- discern - discern
sudo: True sudo: True
- hosts: - hosts:
...@@ -17,4 +18,4 @@ ...@@ -17,4 +18,4 @@
- "{{ secure_dir }}/vars/mlapi_prod_users.yml" - "{{ secure_dir }}/vars/mlapi_prod_users.yml"
roles: roles:
- common - common
sudo: True sudo: True
\ No newline at end of file
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
- "{{ secure_dir }}/vars/mlapi_sandbox_users.yml" - "{{ secure_dir }}/vars/mlapi_sandbox_users.yml"
roles: roles:
- common - common
- supervisor
- discern - discern
sudo: True sudo: True
- hosts: - hosts:
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
- "{{ secure_dir }}/vars/mlapi_stage_users.yml" - "{{ secure_dir }}/vars/mlapi_stage_users.yml"
roles: roles:
- common - common
- supervisor
- discern - discern
sudo: True sudo: True
- hosts: - hosts:
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
- "{{ secure_dir }}/vars/edxapp_prod_users.yml" - "{{ secure_dir }}/vars/edxapp_prod_users.yml"
roles: roles:
- common - common
- supervisor
- {'role': 'nginx', 'nginx_conf': true} - {'role': 'nginx', 'nginx_conf': true}
- {'role': 'edxapp', 'openid_workaround': true, 'template_subdir': 'carnegie'} - {'role': 'edxapp', 'openid_workaround': true, 'template_subdir': 'carnegie'}
# run this role last # run this role last
......
...@@ -15,4 +15,5 @@ ...@@ -15,4 +15,5 @@
- "{{ secure_dir }}/vars/edxapp_prod_users.yml" - "{{ secure_dir }}/vars/edxapp_prod_users.yml"
roles: roles:
- common - common
- supervisor
- { role: 'edxapp', celery_worker: True } - { role: 'edxapp', celery_worker: True }
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
- "{{ secure_dir }}/vars/edxapp_prod_users.yml" - "{{ secure_dir }}/vars/edxapp_prod_users.yml"
roles: roles:
- common - common
- supervisor
- role: nginx - role: nginx
nginx_conf: true nginx_conf: true
nginx_sites: nginx_sites:
......
...@@ -15,4 +15,5 @@ ...@@ -15,4 +15,5 @@
- "{{ secure_dir }}/vars/edxapp_prod_users.yml" - "{{ secure_dir }}/vars/edxapp_prod_users.yml"
roles: roles:
- common - common
- supervisor
- { role: 'edxapp', celery_worker: True } - { role: 'edxapp', celery_worker: True }
# ansible-playbook -v --user=ubuntu edxapp_rolling_example.yml -i ./ec2.py --private-key=/path/to/deployment.pem # ansible-playbook -v --user=ubuntu edxapp_rolling_example.yml -i ./ec2.py --private-key=/path/to/deployment.pem
- hosts: tag_Group_anothermulti - hosts: tag_Group_anothermulti
serial: 2 serial: 2
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
- "{{ secure_dir }}/vars/edxapp_stage_vars.yml" - "{{ secure_dir }}/vars/edxapp_stage_vars.yml"
- "{{ secure_dir }}/vars/users.yml" - "{{ secure_dir }}/vars/users.yml"
pre_tasks: pre_tasks:
- name: Gathering ec2 facts - name: Gathering ec2 facts
ec2_facts: ec2_facts:
- name: Removing instance from the ELB - name: Removing instance from the ELB
local_action: ec2_elb local_action: ec2_elb
args: args:
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
state: 'absent' state: 'absent'
roles: roles:
- common - common
- role: nginx - supervisor
- role: nginx
nginx_sites: nginx_sites:
- lms - lms
- cms - cms
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
- "{{ secure_dir }}/vars/shib_prod_vars.yml" - "{{ secure_dir }}/vars/shib_prod_vars.yml"
roles: roles:
- common - common
- supervisor
- role: nginx - role: nginx
nginx_sites: nginx_sites:
- lms - lms
......
...@@ -7,3 +7,4 @@ ...@@ -7,3 +7,4 @@
local_dir: '../../../configuration-secure/ansible/local' local_dir: '../../../configuration-secure/ansible/local'
roles: roles:
- common - common
- supervisor
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
- "{{ secure_dir }}/vars/edxapp_prod_users.yml" - "{{ secure_dir }}/vars/edxapp_prod_users.yml"
roles: roles:
- common - common
- supervisor
- role: nginx - role: nginx
nginx_sites: nginx_sites:
- ora - ora
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
- "{{ secure_dir }}/vars/shib_prod_vars.yml" - "{{ secure_dir }}/vars/shib_prod_vars.yml"
roles: roles:
- common - common
- supervisor
- { role: 'edxapp', celery_worker: True } - { role: 'edxapp', celery_worker: True }
# #
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
- "{{ secure_dir }}/vars/edxapp_prod_users.yml" - "{{ secure_dir }}/vars/edxapp_prod_users.yml"
roles: roles:
- common - common
- supervisor
- role: nginx - role: nginx
nginx_sites: nginx_sites:
- xqueue - xqueue
......
...@@ -12,4 +12,5 @@ ...@@ -12,4 +12,5 @@
- "{{ secure_dir }}/vars/edxapp_stage_users.yml" - "{{ secure_dir }}/vars/edxapp_stage_users.yml"
roles: roles:
- common - common
- supervisor
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
- "{{ secure_dir }}/vars/shib_stage_vars.yml" - "{{ secure_dir }}/vars/shib_stage_vars.yml"
roles: roles:
- common - common
- supervisor
- role: nginx - role: nginx
nginx_sites: nginx_sites:
- lms - lms
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#- "{{ secure_dir }}/vars/shib_stage_vars.yml" #- "{{ secure_dir }}/vars/shib_stage_vars.yml"
roles: roles:
- common - common
- supervisor
- role: nginx - role: nginx
nginx_sites: nginx_sites:
- lms - lms
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
- "{{ secure_dir }}/vars/edxapp_stage_vars.yml" - "{{ secure_dir }}/vars/edxapp_stage_vars.yml"
- "{{ secure_dir }}/vars/notifier_stage_vars.yml" - "{{ secure_dir }}/vars/notifier_stage_vars.yml"
roles: roles:
- supervisor
- role: virtualenv - role: virtualenv
virtualenv_user: "notifier" virtualenv_user: "notifier"
virtualenv_user_home: "/opt/wwc/notifier" virtualenv_user_home: "/opt/wwc/notifier"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
- "{{ secure_dir }}/vars/edxapp_stage_users.yml" - "{{ secure_dir }}/vars/edxapp_stage_users.yml"
roles: roles:
- common - common
- supervisor
- role: nginx - role: nginx
nginx_sites: nginx_sites:
- ora - ora
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
- "{{ secure_dir }}/vars/edxapp_stage_users.yml" - "{{ secure_dir }}/vars/edxapp_stage_users.yml"
roles: roles:
- common - common
- supervisor
- rabbitmq - rabbitmq
#- hosts: tag_aws_cloudformation_stack-name_feanilpractice:&tag_group_edxapp #- hosts: tag_aws_cloudformation_stack-name_feanilpractice:&tag_group_edxapp
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
- "{{ secure_dir }}/vars/edxapp_stage_users.yml" - "{{ secure_dir }}/vars/edxapp_stage_users.yml"
roles: roles:
- common - common
- supervisor
- { role: 'edxapp', celery_worker: True } - { role: 'edxapp', celery_worker: True }
# run the notifier on the first util machine only # run the notifier on the first util machine only
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
- "{{ secure_dir }}/vars/edxapp_stage_users.yml" - "{{ secure_dir }}/vars/edxapp_stage_users.yml"
roles: roles:
- common - common
- supervisor
- role: nginx - role: nginx
nginx_sites: nginx_sites:
- xqueue - xqueue
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,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.
# Ignoring errors for initial install use-case
- name: edxapp | stop the edxapp services (supervisor) - name: edxapp | stop the edxapp services (supervisor)
supervisorctl: > supervisorctl: >
...@@ -14,7 +13,6 @@ ...@@ -14,7 +13,6 @@
state=stopped state=stopped
when: celery_worker is not defined when: celery_worker is not defined
with_items: service_variants_enabled with_items: service_variants_enabled
ignore_errors: true
tags: tags:
- deploy - deploy
...@@ -26,7 +24,6 @@ ...@@ -26,7 +24,6 @@
state=stopped state=stopped
when: celery_worker is defined when: celery_worker is defined
with_items: edxapp_workers with_items: edxapp_workers
ignore_errors: true
tags: tags:
- deploy - deploy
......
...@@ -34,6 +34,13 @@ ...@@ -34,6 +34,13 @@
tags: tags:
- deploy - deploy
- name: forum | create the supervisor config
template: >
src=forum.conf.j2 dest={{ supervisor_cfg_dir }}/forum.conf
owner={{ common_web_user }} group={{ supervisor_user }}
mode=0644
register: forum_supervisor
- name: forum | restart the forum service - name: forum | restart the forum service
supervisorctl: > supervisorctl: >
name=forum name=forum
......
...@@ -48,14 +48,5 @@ ...@@ -48,14 +48,5 @@
register: forum_supervisor register: forum_supervisor
- include: deploy.yml - include: deploy.yml
# Reload supervisor right away when the configuration
# changes, this happens after deploy.yml tasks so
# that the application is installed
- name: forum | reload supervisor
shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} reload"
when: forum_supervisor.changed
- include: test.yml - include: test.yml
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
- xserver - xserver
- xqueue - xqueue
- edxlocal - edxlocal
- supervisor
- mongo - mongo
- edxapp - edxapp
- { role: 'rabbitmq', rabbitmq_ip: '127.0.0.1' } - { role: 'rabbitmq', rabbitmq_ip: '127.0.0.1' }
......
...@@ -15,5 +15,6 @@ ...@@ -15,5 +15,6 @@
- cms - cms
- lms-preview - lms-preview
- edxlocal - edxlocal
- supervisor
- mongo - mongo
- { role: 'edxapp', EDXAPP_LMS_NGINX_PORT: 18030, EDXAPP_LMS_XML_NGINX_PORT: 80 } - { role: 'edxapp', EDXAPP_LMS_NGINX_PORT: 18030, EDXAPP_LMS_XML_NGINX_PORT: 80 }
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
- cms - cms
- lms-preview - lms-preview
- edxlocal - edxlocal
- supervisor
- mongo - mongo
- edxapp - edxapp
- oraclejdk - oraclejdk
......
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