Skip to content

Instantly share code, notes, and snippets.

@tunggnu
Created April 26, 2018 02:27
Show Gist options
  • Save tunggnu/df9b33254403aba5c471741ac6947c1a to your computer and use it in GitHub Desktop.
Save tunggnu/df9b33254403aba5c471741ac6947c1a to your computer and use it in GitHub Desktop.
How to setup an openEdx environment development

Almost all of the server-side code in the Open edX project is in Python, with Django as the web application framework.

Open edX Architecture

Software Prerequisites

Knowledge Prerequisites

  • Basic terminal usage.
  • Vagrant commands
  • Many different technologies and skills:
    • The basics of how Python web applications are built, installed, and deployed.
    • How to manage a Linux system, including supervisor.
    • We use Ansible to automate the installation process.

Installing Open edX Devstack

We will use Ubuntu 16.04 as a host OS and openEdx ginkgo.2 release. We also need 20GB free space for the original VirtualBox image and the extraced VirtualBox image.

  1. Create a devstack directory and navigate to it in the command prompt.
mkdir devstack
cd devstack
  1. Set the OPENEDX_RELEASE environment variable to the Git tag name of the release of the Open edX platform that we are installing.
export OPENEDX_RELEASE="open-release/ginkgo.2"
  1. Download the install script.
curl -OL https://raw.github.com/edx/configuration/$OPENEDX_RELEASE/util/install/install_stack.sh
  1. Run the install script to create and start the devstack virtual machine.
bash install_stack.sh devstack
  1. Install the NFS server (not client)
sudo apt install nfs-kernel-server

Connecting to the Devstack Virtual Machine

  1. To connect to the devstack virtual machine, use the following SSH command from the devstack directory.
vagrant ssh
  1. To connect as the edxapp user, run the following command.
sudo su edxapp

One-time setup: get the edx source code and create a new branch to develop.

git clone https://github.com/edx/edx-platform.git .
git checkout tags/open-release/ginkgo.2 -b develop
  1. Starting the LMS
paver devstack lms

To ONLY start the server without updating other files:

paver devstack --fast lms

After that we can access the LSM by http://localhost:8000 and log in with these accounts:

[email protected] / edx
[email protected] / edx
[email protected] / edx
[email protected] / edx
  1. Starting Studio
paver devstack studio

To ONLY start the server without updating other files:

paver devstack --fast studio

After that we can access the studio by http://localhost:8001 and log in with these accounts:

[email protected] / edx
[email protected] / edx
[email protected] / edx
[email protected] / edx

Note

If you are running both LMS and Studio without the --fast switch, you will notice that while starting the either server, the LMS server will continuously redeploy itself. As a workaround for this issue, either run LMS in --fast mode, or just wait for the file touching to complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment