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
OpenEdx
configuration
Commits
0c4c312e
Commit
0c4c312e
authored
Nov 10, 2015
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove xml course specific logic.
parent
f5134954
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
131 deletions
+0
-131
playbooks/roles/edxapp/tasks/deploy.yml
+0
-42
playbooks/roles/edxapp/tasks/xml.yml
+0
-89
No files found.
playbooks/roles/edxapp/tasks/deploy.yml
View file @
0c4c312e
...
...
@@ -300,44 +300,6 @@
when
:
openid_workaround is defined
sudo_user
:
"
{{
edxapp_user
}}"
# The next few tasks install xml courses.
# Install the xml courses from an s3 bucket
-
name
:
get s3 one time url
s3
:
>
bucket="{{ EDXAPP_XML_S3_BUCKET }}"
object="{{ EDXAPP_XML_S3_KEY }}"
mode="geturl"
expiration=30
when
:
not EDXAPP_XML_FROM_GIT and EDXAPP_XML_S3_BUCKET and EDXAPP_XML_S3_KEY
register
:
s3_one_time_url
-
name
:
download from one time url
get_url
:
url="{{ s3_one_time_url.url }}"
dest="{{ edxapp_data_dir }}/{{ EDXAPP_XML_S3_KEY|basename }}"
mode=0600
when
:
not EDXAPP_XML_FROM_GIT and EDXAPP_XML_S3_BUCKET and EDXAPP_XML_S3_KEY
register
:
download_xml_s3
-
name
:
unzip the data to the data dir
shell
:
>
tar xzf {{ edxapp_data_dir }}/{{ EDXAPP_XML_S3_KEY|basename }}
chdir="{{ edxapp_data_dir }}"
when
:
download_xml_s3.changed
# This currently has to be done because
# the course coffescript is compiled on the fly
# by the application after startup.
# See VPC-117 and VPC-122
-
name
:
make the course data web user writable
file
:
path="{{ edxapp_course_data_dir }}"
state=directory
recurse=yes
owner="{{ common_web_user }}"
group="{{ edxapp_user }}"
# creates the supervisor jobs for the
# service variants configured, runs
# gather_assets and db migrations
...
...
@@ -346,10 +308,6 @@
-
service_variant_config
-
deploy
-
include
:
xml.yml
tags
:
deploy
when
:
EDXAPP_XML_FROM_GIT
# call supervisorctl update. this reloads
# the supervisorctl config and restarts
# the services if any of the configurations
...
...
playbooks/roles/edxapp/tasks/xml.yml
deleted
100644 → 0
View file @
f5134954
-
name
:
remove all course data before checkout
file
:
path="{{ edxapp_course_data_dir }}/{{ item.repo_name }}"
state=absent
with_items
:
EDXAPP_XML_COURSES
-
name
:
make the course data updatable by the edxapp user
file
:
path="{{ edxapp_course_data_dir }}"
state=directory
recurse=yes
owner="{{ edxapp_user }}"
group="{{ edxapp_user }}"
-
name
:
clone the xml course repo
git
:
>
repo="{{ item.repo_url }}"
dest="{{ edxapp_course_data_dir }}/{{ item.repo_name }}"
version="{{ item.version }}"
accept_hostkey=True
sudo_user
:
"
{{
edxapp_user
}}"
environment
:
GIT_SSH
:
"
{{
edxapp_git_ssh
}}"
with_items
:
EDXAPP_XML_COURSES
-
name
:
update course.xml
template
:
>
src=course.xml.j2
dest="{{ edxapp_course_data_dir }}/{{ item.repo_name }}/course.xml"
sudo_user
:
"
{{
edxapp_user
}}"
with_items
:
EDXAPP_XML_COURSES
-
name
:
make symlinks for the static data
shell
:
>
executable=/bin/bash
if [[ -d {{ edxapp_course_data_dir }}/{{ item.repo_name }}/static ]]; then
ln -sf {{ edxapp_course_data_dir }}/{{ item.repo_name }}/static {{ edxapp_course_static_dir }}/{{ item.repo_name}}
ln -sf {{ edxapp_course_data_dir }}/{{ item.repo_name }}/static {{ edxapp_course_static_dir }}/{{ item.course}}
else
ln -sf {{ edxapp_course_data_dir }}/{{ item.repo_name }} {{ edxapp_course_static_dir }}/{{ item.repo_name}}
ln -sf {{ edxapp_course_data_dir }}/{{ item.repo_name }} {{ edxapp_course_static_dir }}/{{ item.course}}
fi
with_items
:
EDXAPP_XML_COURSES
when
:
item.disposition == "on disk" or item.disposition == "no static import"
-
name
:
make symlinks so code works
file
:
>
src="{{ edxapp_course_data_dir }}/{{ item.repo_name }}"
dest="{{ edxapp_course_data_dir }}/{{ item.course }}"
state=link
with_items
:
EDXAPP_XML_COURSES
when
:
item.disposition == "on disk" or item.disposition == "no static import"
-
name
:
import courses with nostatic flag
shell
:
>
{{ edxapp_venv_bin }}/python manage.py cms --settings=aws import --nostatic {{ edxapp_course_data_dir }} {{ item.repo_name }}
chdir="{{ edxapp_code_dir }}"
sudo_user
:
"
{{
edxapp_user
}}"
with_items
:
EDXAPP_XML_COURSES
when
:
item.disposition == "no static import"
-
name
:
import courses including static data
shell
:
>
{{ edxapp_venv_bin }}/python manage.py cms --settings=aws import {{ edxapp_course_data_dir }} {{ item.repo_name }}
chdir="{{ edxapp_code_dir }}"
sudo_user
:
"
{{
edxapp_user
}}"
with_items
:
EDXAPP_XML_COURSES
when
:
item.disposition == "import"
-
name
:
delete courses that were fully imported
file
:
path="{{ edxapp_course_data_dir }}/{{ item.repo_name }}" state=absent
with_items
:
EDXAPP_XML_COURSES
when
:
item.disposition == "import"
-
name
:
create an archive of course data and course static dirs
shell
:
tar czf /tmp/static_course_content.tar.gz -C {{ edxapp_data_dir }} --exclude ".git" {{ edxapp_course_data_dir|basename }} {{ edxapp_course_static_dir|basename }}
-
name
:
upload archive to s3
s3
:
>
bucket="{{ EDXAPP_XML_S3_BUCKET }}"
object="{{ EDXAPP_XML_S3_KEY }}"
mode=put
overwrite=True
src="/tmp/static_course_content.tar.gz"
when
:
EDXAPP_XML_S3_BUCKET and EDXAPP_XML_S3_KEY
-
name
:
remove archive from disk
file
:
path="/tmp/static_course_content.tar.gz" state=absent
when
:
EDXAPP_XML_S3_BUCKET and EDXAPP_XML_S3_KEY
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