Commit c8534589 by Xavier Antoviaque

sandbox-ora: Add SERVICE_VARIANT to ORA to customize filenames

This is necessary to be able to get several services using the
`/opt/wwc/env.json` & `/opt/wwc/auth.json` files. The configuration
files would get overwitten when this is used by several different
services cohabiting on a single instance
parent ad9dd62d
......@@ -85,7 +85,7 @@
- deploy
- name: ora | syncdb and migrate
shell: sudo -u {{ ora_user }} {{ora_venv_dir}}/bin/django-admin.py syncdb --migrate --noinput --settings=edx_ora.aws --pythonpath={{ora_code_dir}}
shell: sudo -u {{ ora_user }} SERVICE_VARIANT=ora {{ora_venv_dir}}/bin/django-admin.py syncdb --migrate --noinput --settings=edx_ora.aws --pythonpath={{ora_code_dir}}
when: migrate_db is defined and migrate_db|lower == "yes"
notify:
- ora | restart edx-ora
......@@ -96,7 +96,7 @@
- deploy
- name: ora | create users
shell: sudo -u {{ ora_user }} {{ora_venv_dir}}/bin/django-admin.py update_users --settings=edx_ora.aws --pythonpath={{ora_code_dir}}
shell: sudo -u {{ ora_user }} SERVICE_VARIANT=ora {{ora_venv_dir}}/bin/django-admin.py update_users --settings=edx_ora.aws --pythonpath={{ora_code_dir}}
notify:
- ora | restart edx-ora
- ora | restart edx-ora-celery
......
......@@ -15,12 +15,12 @@
- ora
- name: ora | create ora application config
template: src=ora.env.json.j2 dest={{ora_code_dir}}/../env.json mode=0640 owner={{ ora_user }} group=adm
template: src=ora.env.json.j2 dest={{ora_code_dir}}/../ora.env.json mode=0640 owner={{ ora_user }} group=adm
tags:
- ora
- name: ora | create ora auth file
template: src=ora.auth.json.j2 dest={{ora_code_dir}}/../auth.json mode=0640 owner={{ ora_user }} group=adm
template: src=ora.auth.json.j2 dest={{ora_code_dir}}/../ora.auth.json mode=0640 owner={{ ora_user }} group=adm
tags:
- ora
......
......@@ -10,6 +10,7 @@ respawn
respawn limit 3 30
env DJANGO_SETTINGS_MODULE=edx_ora.aws
env SERVICE_VARIANT=ora
chdir {{ ora_code_dir }}
setuid {{ ora_user }}
......
......@@ -14,6 +14,7 @@ env WORKERS={{ ora_gunicorn_workers }}
env PORT={{ ora_gunicorn_port }}
env LANG=en_US.UTF-8
env DJANGO_SETTINGS_MODULE=edx_ora.aws
env SERVICE_VARIANT=ora
pre-start script
end script
......
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