Commit 9adac2da by Arbab Nazar

Merge pull request #2422 from edx/arbab/ops-1065

OPS-1065 Enhance sandbox deployment pipeline to support deploying arb…
parents 4d3a8ff5 63603aec
......@@ -27,6 +27,11 @@
path={{ edxapp_data_dir }} state=directory mode=0775
owner="{{ edxapp_user }}" group="{{ common_web_group }}"
# directory to import the courses from github
- name: create directory to import the courses from github
file: >
path={{ EDXAPP_GIT_REPO_DIR }} state=directory mode=0775
owner="{{ edxapp_user }}" group="{{ common_web_group }}"
# This is a symlink that has to exist because
# we currently can't override the DATA_DIR var
# in edx-platform. TODO: This can be removed once
......
---
- name: create temporary directories
file: >
path=/var/tmp/{{ item.path|basename }}
state=directory
with_items: TESTCOURSES_EXPORTS
sudo_user: "{{ common_web_user }}"
- name: Get the test courses
s3: >
bucket={{ item.bucket }} object={{ item.path }} dest=/var/tmp/{{ item.path|basename }}/{{ item.path|basename }} mode=get
with_items: TESTCOURSES_EXPORTS
sudo_user: "{{ common_web_user }}"
- name: Untar the test courses
command: >
tar zxf {{ item.path|basename }}
chdir=/var/tmp/{{ item.path|basename }}
with_items: TESTCOURSES_EXPORTS
sudo_user: "{{ common_web_user }}"
- name: import the test courses
- name: import the test courses from github
shell: >
{{ demo_edxapp_venv_bin }}/python ./manage.py cms --settings=aws import {{ demo_edxapp_course_data_dir }} /var/tmp/{{ item.path|basename }}/{{ item.xml_path }}
chdir={{ demo_edxapp_code_dir }}
{{ demo_edxapp_venv_bin }}/python /edx/bin/manage.edxapp lms git_add_course --settings=aws "{{ item.github_url }}"
sudo_user: "{{ common_web_user }}"
when: item.install == True
with_items: TESTCOURSES_EXPORTS
- shell: >
chdir={{ demo_edxapp_code_dir }}
echo "from student.models import CourseEnrollment; from django.contrib.auth.models import User; from opaque_keys.edx.keys import CourseKey; course = CourseKey.from_string('{{ item[0].course_id }}'); user = User.objects.get(email='{{ item[1].email }}'); CourseEnrollment.enroll(user, course, mode='{{ item[1].mode }}');" | {{ demo_edxapp_venv_bin }}/python ./manage.py lms shell --settings=aws
sudo_user: "{{ common_web_user }}"
with_nested:
- TESTCOURSES_EXPORTS
- demo_test_users
......@@ -119,6 +119,18 @@ if [[ -z $enable_datadog ]]; then
enable_datadog="false"
fi
if [[ -z $performance_course ]]; then
performance_course="false"
fi
if [[ -z $demo_test_course ]]; then
demo_test_course="false"
fi
if [[ -z $edx_demo_course ]]; then
edx_demo_course="false"
fi
if [[ -z $enable_client_profiling ]]; then
enable_client_profiling="false"
fi
......@@ -207,6 +219,9 @@ USER_CMD_PROMPT: '[$name_tag] '
COMMON_ENABLE_NEWRELIC_APP: $enable_newrelic
COMMON_ENABLE_DATADOG: $enable_datadog
FORUM_NEW_RELIC_ENABLE: $enable_newrelic
ENABLE_PERFORMANCE_COURSE: $performance_course
ENABLE_DEMO_TEST_COURSE: $demo_test_course
ENABLE_EDX_DEMO_COURSE: $edx_demo_course
EDXAPP_NEWRELIC_LMS_APPNAME: sandbox-${dns_name}-edxapp-lms
EDXAPP_NEWRELIC_CMS_APPNAME: sandbox-${dns_name}-edxapp-cms
EDXAPP_NEWRELIC_WORKERS_APPNAME: sandbox-${dns_name}-edxapp-workers
......
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