Commit c8d40b0d by Carson Gee

Convert analytics-api gunicorn configuration to file

parent 2e647ece
......@@ -71,6 +71,7 @@ ANALYTICS_API_CONFIG:
ANALYTICS_API_GUNICORN_WORKERS: "2"
ANALYTICS_API_GUNICORN_EXTRA: ""
ANALYTICS_API_GUNICORN_EXTRA_CONF: ""
#
# vars are namespace with the module name.
#
......
......@@ -22,6 +22,13 @@
notify: "restart the analytics service"
sudo_user: "{{ analytics_api_user }}"
- name: "add gunicorn configuration file"
template: >
src=edx/app/analytics-api/analytics_api_gunicorn.py.j2
dest={{ analytics_api_app_dir }}/analytics_api_gunicorn.py
sudo_user: "{{ analytics_api_user }}"
notify: "restart the analytics service"
- name: write out app config file
template: >
src=edx/app/analytics-api/analytics-api.yaml.j2
......
......@@ -15,4 +15,4 @@ export NEW_RELIC_LICENSE_KEY="{{ NEWRELIC_LICENSE_KEY }}"
source {{ analytics_api_app_dir }}/analytics_api_env
{{ executable }} --pythonpath={{ analytics_api_code_dir }} -b {{ analytics_api_gunicorn_host }}:{{ analytics_api_gunicorn_port }} -w {{ ANALYTICS_API_GUNICORN_WORKERS }} --timeout={{ analytics_api_gunicorn_timeout }} {{ ANALYTICS_API_GUNICORN_EXTRA }} analyticsdataserver.wsgi:application
{{ executable }} -c {{ analytics_api_app_dir }}/analytics_api_gunicorn.py {{ ANALYTICS_API_GUNICORN_EXTRA }} analyticsdataserver.wsgi:application
"""
gunicorn configuration file: http://docs.gunicorn.org/en/develop/configure.html
{{ ansible_managed }}
"""
timeout = {{ analytics_api_gunicorn_timeout }}
bind = "{{ analytics_api_gunicorn_host }}:{{ analytics_api_gunicorn_port }}"
pythonpath = "{{ analytics_api_code_dir }}"
workers = {{ ANALYTICS_API_GUNICORN_WORKERS }}
{{ ANALYTICS_API_GUNICORN_EXTRA_CONF }}
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