This commits prepares edx-platform's experimental Dockerfile for optional use in devstack. Presently, the image built by this Dockerfile isn't used anywhere. Notable changes: * Drop the openedx/edx-platform image name in favor of openedx/lms and openedx/cms. * Drop the newrelic stages and tags. * Create openedx/lms-dev and openedx/cms-dev image variants which use Django devserver, install dev requirements, and specify devstack Django settings. * Add config files at (lms,cms)/envs/devstack-experimental.yml, extracted from the existing edxapp docker image. * Adds three new scripts, each of which replaces an Ansible or Paver-supported function with a pure bash + Django management command implementation.
32 lines
991 B
Bash
Executable File
32 lines
991 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Usage:
|
|
# In a CMS-enabled container,
|
|
# from the directory /edx/app/edxapp/edx-platform, run:
|
|
# ./scripts/provision-demo-course.sh
|
|
#
|
|
# This file is an experimental re-implementation of demo course provisioning
|
|
# process defined in this Ansible role:
|
|
# https://github.com/edx/configuration/tree/master/playbooks/roles/demo
|
|
#
|
|
# It was written as part of the effort to move our dev tools off of Ansible and
|
|
# Paver, described here: https://github.com/edx/devstack/pull/866
|
|
# TODO: If the effort described above is abandoned, then this script should
|
|
# probably be deleted.
|
|
|
|
set -xeuo pipefail
|
|
|
|
DEMO_COURSE_KEY='course-v1:edX+DemoX+Demo_Course'
|
|
|
|
# Delete the demo course clone (if it exists) and then do a shallow re-clone of it.
|
|
mkdir -p /edx/app/demo
|
|
(
|
|
cd /edx/app/demo &&
|
|
rm -rf edx-demo-course &&
|
|
git clone https://github.com/edx/edx-demo-course.git --depth 1
|
|
)
|
|
|
|
# Import the course.
|
|
./manage.py cms import /edx/var/edxapp/data /edx/app/demo/edx-demo-course
|
|
|