Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
63603aec
Commit
63603aec
authored
Oct 28, 2015
by
arbabnazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OPS-1065 Enhance sandbox deployment pipeline to support deploying arbitrary courses
parent
b531c2e3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
31 deletions
+23
-31
playbooks/roles/edxapp/tasks/main.yml
+5
-0
playbooks/roles/testcourses/tasks/deploy.yml
+3
-31
util/jenkins/ansible-provision.sh
+15
-0
No files found.
playbooks/roles/edxapp/tasks/main.yml
View file @
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
...
...
playbooks/roles/testcourses/tasks/deploy.yml
View file @
63603aec
---
-
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
util/jenkins/ansible-provision.sh
View file @
63603aec
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment