Commit 788a8e72 by Max Rothman

Fixes

parent e559060c
......@@ -87,10 +87,10 @@ ANALYTICS_API_GUNICORN_EXTRA_CONF: ""
analytics_api_environment:
DJANGO_SETTINGS_MODULE: "analyticsdataserver.settings.production"
ANALYTICS_API_CFG: "{{ COMMON_CFG_DIR }}/{{ analytics_api_service_name }}.yaml"
ANALYTICS_API_CFG: "{{ COMMON_CFG_DIR }}/{{ analytics_api_service_name }}.yml"
analytics_api_service_name: "analytics_api"
analytics_api_user: "analytics-api"
analytics_api_user: "{{ analytics_api_service_name }}"
analytics_api_home: "{{ COMMON_APP_DIR }}/{{ analytics_api_service_name }}"
analytics_api_code_dir: "{{ analytics_api_home }}/{{ analytics_api_service_name }}"
analytics_api_conf_dir: "{{ analytics_api_home }}"
......
......@@ -22,7 +22,7 @@
dependencies:
- role: edx_service
edx_service_name: "{{ analytics_api_service_name }}"
edx_service_config: "{{ ANALYTICS-API_SERVICE_CONFIG }}"
edx_service_config: "{{ ANALYTICS_API_SERVICE_CONFIG }}"
edx_service_repos: "{{ ANALYTICS_API_REPOS }}"
edx_service_user: "{{ analytics_api_user }}"
edx_service_home: "{{ analytics_api_home }}"
......
......@@ -68,7 +68,7 @@
- name: run collectstatic
shell: >
chdir={{ analytics_api_code_dir }}
{{ analytics_api_home }}/venvs/{{ analytics_api_service_name }}/bin/python/python manage.py collectstatic --noinput
{{ analytics_api_home }}/venvs/{{ analytics_api_service_name }}/bin/python manage.py collectstatic --noinput
sudo_user: "{{ analytics_api_user }}"
environment: "{{ analytics_api_environment }}"
......@@ -80,7 +80,7 @@
environment: "{{ analytics_api_environment }}"
with_dict: ANALYTICS_API_USERS
- name: write out the supervisior wrapper
- name: write out the supervisor wrapper
template: >
src=edx/app/analytics_api/analytics_api.sh.j2
dest={{ analytics_api_home }}/{{ analytics_api_service_name }}.sh
......@@ -125,5 +125,11 @@
with_items:
- manage.py
- name: remove read-only ssh key for the content repo
file: path={{ analytics_api_git_identity_file }} state=absent
\ No newline at end of file
- name: restart analytics_api
supervisorctl_local: >
state=restarted
supervisorctl_path={{ supervisor_ctl }}
config={{ supervisor_cfg }}
name="edxapp:{{ item }}"
when: not disable_edx_services
sudo_user: "{{ supervisor_service_user }}"
......@@ -2,8 +2,8 @@
# {{ ansible_managed }}
{% if COMMON_ENABLE_NEWRELIC_APP %}
{% set analytics_api_venv_bin = analytics_api_home + "/venvs/" + analytics_api_service_name + "/bin/" %}
{% if COMMON_ENABLE_NEWRELIC_APP %}
{% set executable = analytics_api_venv_bin + '/newrelic-admin run-program ' + analytics_api_venv_bin + '/gunicorn' %}
{% else %}
{% set executable = analytics_api_venv_bin + '/gunicorn' %}
......
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