Commit 2bcf7d55 by John Jarvis

Merge pull request #428 from edx/jarv/single-instance-updates

Jarv/single instance updates
parents f8235155 2fcdddfb
--- ---
dependencies: dependencies:
- role: supervisor - role: supervisor
supervisor_app_dir: $devpi_supervisor_app_dir supervisor_app_dir: "{{ devpi_supervisor_app_dir }}"
supervisor_data_dir: $devpi_supervisor_data_dir supervisor_data_dir: "{{ devpi_supervisor_data_dir }}"
supervisor_log_dir: $devpi_supervisor_log_dir supervisor_log_dir: "{{ devpi_supervisor_log_dir }}"
supervisor_venv_dir: $devpi_supervisor_venv_dir supervisor_venv_dir: "{{ devpi_supervisor_venv_dir }}"
supervisor_service_user: $devpi_supervisor_user supervisor_service_user: "{{ devpi_supervisor_user }}"
supervisor_service: "supervisor.devpi" supervisor_service: "supervisor.devpi"
supervisor_http_bind_port: '9002'
...@@ -5,3 +5,5 @@ priority=999 ...@@ -5,3 +5,5 @@ priority=999
stdout_logfile={{ devpi_supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ devpi_supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ devpi_supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ devpi_supervisor_log_dir }}/%(program_name)-stderr.log
autostart=True autostart=True
killasgroup=true
stopasgroup=true
...@@ -10,3 +10,5 @@ directory={{ discern_code_dir }} ...@@ -10,3 +10,5 @@ directory={{ discern_code_dir }}
environment=LANG={{ DISCERN_LANG }},DJANGO_SETTINGS_MODULE={{ discern_settings }},SERVICE_VARIANT=discern environment=LANG={{ DISCERN_LANG }},DJANGO_SETTINGS_MODULE={{ discern_settings }},SERVICE_VARIANT=discern
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true
stopasgroup=true
...@@ -10,3 +10,5 @@ environment=DJANGO_SETTINGS_MODULE=discern.aws,SERVICE_VARIANT=discern ...@@ -10,3 +10,5 @@ environment=DJANGO_SETTINGS_MODULE=discern.aws,SERVICE_VARIANT=discern
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true
stopasgroup=true
...@@ -10,3 +10,5 @@ directory={{ edxapp_code_dir }} ...@@ -10,3 +10,5 @@ directory={{ edxapp_code_dir }}
environment=PORT={{edxapp_cms_gunicorn_port}},ADDRESS={{edxapp_cms_gunicorn_host}},LANG={{ EDXAPP_LANG }},DJANGO_SETTINGS_MODULE={{ edxapp_cms_env }},SERVICE_VARIANT="cms" environment=PORT={{edxapp_cms_gunicorn_port}},ADDRESS={{edxapp_cms_gunicorn_host}},LANG={{ EDXAPP_LANG }},DJANGO_SETTINGS_MODULE={{ edxapp_cms_env }},SERVICE_VARIANT="cms"
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true
stopasgroup=true
...@@ -10,3 +10,5 @@ directory={{ edxapp_code_dir }} ...@@ -10,3 +10,5 @@ directory={{ edxapp_code_dir }}
environment=PORT={{edxapp_lms_gunicorn_port}},ADDRESS={{edxapp_lms_gunicorn_host}},LANG={{ EDXAPP_LANG }},DJANGO_SETTINGS_MODULE={{ edxapp_lms_env }},SERVICE_VARIANT="lms" environment=PORT={{edxapp_lms_gunicorn_port}},ADDRESS={{edxapp_lms_gunicorn_host}},LANG={{ EDXAPP_LANG }},DJANGO_SETTINGS_MODULE={{ edxapp_lms_env }},SERVICE_VARIANT="lms"
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true
stopasgroup=true
...@@ -8,6 +8,8 @@ stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log ...@@ -8,6 +8,8 @@ stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
command={{ edxapp_venv_bin}}/python {{ edxapp_code_dir }}/manage.py {{ w.service_variant }} --settings=aws celery worker --loglevel=info --queues=edx.{{ w.service_variant }}.core.{{ w.queue }} --hostname=edx.{{ w.service_variant }}.core.{{ w.queue }}.`hostname` --concurrency={{ w.concurrency }} command={{ edxapp_venv_bin}}/python {{ edxapp_code_dir }}/manage.py {{ w.service_variant }} --settings=aws celery worker --loglevel=info --queues=edx.{{ w.service_variant }}.core.{{ w.queue }} --hostname=edx.{{ w.service_variant }}.core.{{ w.queue }}.`hostname` --concurrency={{ w.concurrency }}
killasgroup=true
stopasgroup=true
{% endfor %} {% endfor %}
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
command={{ forum_supervisor_wrapper }} command={{ forum_supervisor_wrapper }}
priority=999 priority=999
user={{ common_web_user }} user={{ common_web_user }}
startsecs=10
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true killasgroup=true
......
...@@ -9,4 +9,6 @@ environment=PID=/var/run/gunicorn/edx-ora.pid,WORKERS={{ ora_gunicorn_workers }} ...@@ -9,4 +9,6 @@ environment=PID=/var/run/gunicorn/edx-ora.pid,WORKERS={{ ora_gunicorn_workers }}
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true
stopasgroup=true
...@@ -9,4 +9,6 @@ environment=DJANGO_SETTINGS_MODULE=edx_ora.aws,SERVICE_VARIANT=ora ...@@ -9,4 +9,6 @@ environment=DJANGO_SETTINGS_MODULE=edx_ora.aws,SERVICE_VARIANT=ora
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true
stopasgroup=true
...@@ -11,6 +11,12 @@ ...@@ -11,6 +11,12 @@
# Defaults for role supervisor # Defaults for role supervisor
# #
--- ---
SUPERVISOR_HTTP_BIND_IP: '127.0.0.1'
# do not override the bind_port since
# all supervisors will then try to listen
# on the same one
supervisor_http_bind_port: '9001'
supervisor_app_dir: "{{ COMMON_APP_DIR }}/supervisor" supervisor_app_dir: "{{ COMMON_APP_DIR }}/supervisor"
supervisor_cfg_dir: "{{ supervisor_app_dir }}/conf.d" supervisor_cfg_dir: "{{ supervisor_app_dir }}/conf.d"
supervisor_data_dir: "{{ COMMON_DATA_DIR }}/supervisor" supervisor_data_dir: "{{ COMMON_DATA_DIR }}/supervisor"
......
...@@ -24,6 +24,9 @@ serverurl=unix://{{ supervisor_data_dir }}/supervisor.sock ; use a unix:// URL ...@@ -24,6 +24,9 @@ serverurl=unix://{{ supervisor_data_dir }}/supervisor.sock ; use a unix:// URL
; interpreted as relative to this file. Included files *cannot* ; interpreted as relative to this file. Included files *cannot*
; include files themselves. ; include files themselves.
[inet_http_server]
port = {{ SUPERVISOR_HTTP_BIND_IP }}:{{ supervisor_http_bind_port }}
[include] [include]
files = {{ supervisor_cfg_dir }}/*.conf files = {{ supervisor_cfg_dir }}/*.conf
...@@ -13,4 +13,5 @@ environment=PID=/var/tmp/xqueue.pid,PORT={{ xqueue_gunicorn_port }},ADDRESS={{ x ...@@ -13,4 +13,5 @@ environment=PID=/var/tmp/xqueue.pid,PORT={{ xqueue_gunicorn_port }},ADDRESS={{ x
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true
stopasgroup=true
...@@ -9,4 +9,5 @@ environment=LANG={{ XQUEUE_LANG }},WORKERS_PER_QUEUE={{xqueue_env_config.XQUEUE_ ...@@ -9,4 +9,5 @@ environment=LANG={{ XQUEUE_LANG }},WORKERS_PER_QUEUE={{xqueue_env_config.XQUEUE_
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true
stopasgroup=true
...@@ -9,4 +9,5 @@ environment=PID=/var/tmp/xserver.pid,NEW_RELIC_CONFIG_FILE={{ xserver_app_dir }} ...@@ -9,4 +9,5 @@ environment=PID=/var/tmp/xserver.pid,NEW_RELIC_CONFIG_FILE={{ xserver_app_dir }}
stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log stdout_logfile={{ supervisor_log_dir }}/%(program_name)-stdout.log
stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log stderr_logfile={{ supervisor_log_dir }}/%(program_name)-stderr.log
killasgroup=true
stopasgroup=true
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