Skip to content

Instantly share code, notes, and snippets.

@AsadDevAI
Last active September 23, 2022 21:47
Show Gist options
  • Save AsadDevAI/c1a33d83f0e7f10e0b003156b2c28b3d to your computer and use it in GitHub Desktop.
Save AsadDevAI/c1a33d83f0e7f10e0b003156b2c28b3d to your computer and use it in GitHub Desktop.
To run the Open edX devstack on your local machine please follow the instructions.

Open Edx Local Environment Configuration

Our devstack is run on the hawthorn release of Open edX. It is divided into a number of Docker containers and they are managed using custom scripts and commands (courtesy of the edX team).

Prerequisites

This project requires Docker 17.06+ CE. We recommend Docker Stable, but Docker Edge should work as well.

For downloading Docker 17.06+ CE you must follow this link

Add User to Docker Group and restart system

sudo usermod -a -G docker $(whoami)


To run the Open edX devstack on your local machine please follow the instructions.

Creating a proper environment

Run the following commands to create the project directory in your $HOME directory.

$ mkdir arbisoft
$ cd arbisoft

Create the project virtualenv and activate it

$ virtualenv -p python2 venv
$ source venv/bin/activate

Create a dedicated folder for the project. It is recommended to place the project in the following folder such that it does not conflict with any other projects that you might currently have.

$ mkdir edx
$ cd edx

Now clone the git repo for edx devstack

$ git clone https://github.com/edx/devstack.git

Navigate into the devstack folder and run the following commands

$ cd devstack

For hawthron.master branch

$ git checkout open-release/hawthorn.master
$ export OPENEDX_RELEASE=hawthorn.master

For ironwood.master branch

$ git checkout open-release/ironwood.master
$ export OPENEDX_RELEASE=open-release/ironwood.master
 
$ make requirements
$ make dev.clone

Once all the repositories are cloned, navigate to edx-platform repo and set its remote to edx-platform

$ cd ../edx-platform
$ git remote set-url origin [email protected]:edx/edx-platform.git
$ git fetch
$ git reset --hard origin/master

Run the following commands and verify their output. It should match the one listed.

$ git remote -v
origin	https://github.com/edx/edx-platform.git (fetch)
origin	https://github.com/edx/edx-platform.git (push)

$ git checkout open-release/hawthorn.master
$ git status
On branch open-release/hawthorn.master
Your branch is up to date with 'open-release/hawthorn.master'.

nothing to commit, working tree clean

After we have properly configured the repositories. We shall pull the corresponding docker images and provision them.

Downloading Docker Images

$ cd ../devstack
$ make pull
$ make dev.provision

Note: Most of these commands will consume significant time and will download a lot of stuff before running.

Once all are complete, run the following command to start Open edX

$ make dev.up

And run the following to stop it.

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