Commit e18f7c9b by John Jarvis Committed by John Jarvis

adds new migration vars.

parent 2b807592
......@@ -134,6 +134,14 @@ EDXAPP_AUTOMATOR_AUTHORIZED_KEYS: []
EDXAPP_USE_GIT_IDENTITY: false
# Example: "{{ secure_dir }}/files/git-identity"
EDXAPP_LOCAL_GIT_IDENTITY: !!null
# Configuration for database migration
EDXAPP_MIGRATE_ENGINE: django.db.backends.mysql
EDXAPP_MIGRATE_NAME: "{{ EDXAPP_MYSQL_DB_NAME }}"
EDXAPP_MIGRATE_USER: "{{ EDXAPP_MYSQL_USER }}"
EDXAPP_MIGRATE_PASSWORD: "{{ EDXAPP_MYSQL_PASSWORD }}"
EDXAPP_MIGRATE_HOST: "{{ EDXAPP_MYSQL_HOST }}"
EDXAPP_MIGRATE_PORT: "{{ EDXAPP_MYSQL_PORT }}"
#-------- Everything below this line is internal to the role ------------
......@@ -158,8 +166,6 @@ edxapp_staticfile_dir: "{{ edxapp_data_dir }}/staticfiles"
edxapp_course_data_dir: "{{ edxapp_data_dir }}/data"
edxapp_upload_dir: "{{ edxapp_data_dir }}/uploads"
edxapp_theme_dir: "{{ edxapp_data_dir }}/themes"
edxapp_git_identity: "{{ edxapp_app_dir }}/{{ EDXAPP_LOCAL_GIT_IDENTITY|basename }}"
edxapp_git_ssh: "/tmp/edxapp_git_ssh.sh"
edxapp_pypi_local_mirror: "http://localhost:{{ devpi_port }}/root/pypi/+simple"
edxapp_workers:
- queue: low
......@@ -515,4 +521,4 @@ worker_django_settings_module: 'aws'
# commands listed here will be symlinked to ~/bin/ for
# the automator user.
edxapp_automated_rbash_links:
- /usr/bin/sudo
- /usr/bin/sudo
\ No newline at end of file
......@@ -45,15 +45,20 @@
sudo_user: "{{ supervisor_user }}"
- name: syncdb and migrate
shell: SERVICE_VARIANT=lms {{ edxapp_venv_bin}}/django-admin.py syncdb --migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }}
shell: >
chdir={{ edxapp_code_dir }}
{{ edxapp_venv_bin}}/python manage.py lms syncdb --migrate --noinput --settings=aws_migrate
when: migrate_db is defined and migrate_db|lower == "yes"
sudo_user: "{{ edxapp_user }}"
environment: "{{ edxapp_migrate_environment }}"
notify:
- "restart edxapp"
- "restart edxapp_workers"
- name: db migrate
shell: SERVICE_VARIANT=lms {{ edxapp_venv_bin }}/django-admin.py migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }}
shell:
chdir={{ edxapp_code_dir }}
{{ edxapp_venv_bin}}/python manage.py lms migrate --noinput --settings=aws_migrate
when: migrate_only is defined and migrate_only|lower == "yes"
notify:
- "restart edxapp"
......@@ -75,4 +80,3 @@
- "restart edxapp_workers"
environment: "{{ edxapp_environment }}"
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