Development Tools

If you’re developing for Open edX, you’ll need most of these eventually.

Tools to Install on Mac OS X

Tool

Setup Instructions

Notes

Tool

Setup Instructions

Notes

Homebrew

https://brew.sh/

Homebrew is a 3rd party package manager for Mac that makes it easy to setup many developer friendly tools.

Pyenv

Installing pyenv (using Homebrew)

A tool that lets you manage multiple python versions. 

Python Versions

Install the latest stable versions of python 3.8 and 3.9. You can find out what’s available that starts with 3.8 via:

pyenv install 3.8

or by looking at https://www.python.org/downloads/

Then run pyenv install with the specific versions you want.

Set your 3.8 version as the default:

pyenv global 3.8.whichever-you-have

The language we use to develop our backends.

Note: You can also just download and install the version of python you need directly from the python.org website.

Virtualenvwrapper

Basic Installation Docs

You’ll want to source the wrapper script from the python environment you installed with pyenv. For example if you’re using `3.8.whichever` you would source the below path in your .bashrc or .zshrc

source ~/.pyenv/versions/3.8.whichever/bin/virtualenvwrapper.sh

Restart your terminal and you will see some creation activity from that script.

The main purpose of Python virtual environments is to create an isolated environment for Python projects.

Docker Desktop

https://docs.docker.com/docker-for-mac/install/

Alternately:

brew install --cask docker

Note: do NOT use `brew install docker`, as this will only give you the CLI.

After installing docker you will need to give it more space. Check the devstack readme for minimum sizing, currently 2 CPUs, 8G of memory, 96G of disk.

If you don’t know what docker is, check out their docs here first.  We use docker heavily across development, testing and production environments so having a good understanding of docker concepts will make your life a lot easier.

Node Version Manager

It is recommended that you install nvm (Node Version Manager) using the instructions provided in the repo’s README: https://github.com/nvm-sh/nvm#installing-and-updating

After running the commands from these instructions, restart your terminal and run:

nvm install v16

This should install Node version 16 and set this as your default Node version.

 

If the installations instructions in the README linked above don’t happen to work, you can try using the old instructions:

Run: brew install nvm

Place the following in your shell .bash_profile or .zshenv):

export NVM_DIR="$HOME/.nvm" [ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && . "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm [ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && . "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion`

Used to allow multiple versions of node since different front ends use different nodejs versions. Most commonly used as of 12/1/2020 is node 12.20 LTS (https://nodejs.org/en/about/releases/)

edX Devstack

The edX Devstack is a repository that contains commands for installing all of the other repositories and Docker images that make up the entirety of the edX platform.

It is recommended that you begin by creating a folder on your computer, which you can name something like “edx”. Inside of the folder, you will want to clone the Devstack Repo.

Once you have cloned the Devstack repo to your computer, follow the Getting Started instructions for installing the rest of the edX platform.

Once you have completed the instructions, there should be several folders, including “edx-platform” and several folders starting with “frontend-app-” that are on the same level of your “devstack” folder. You should also be able to run your containers for these repos as well and access the LMS (i.e. the main page) at http://localhost:18000/.

 

NOTE: There have been issues that have been known to occur on computers that use an Apple Silicon CPU (i.e. an M1 or M2 chip), which usually say something like “fedx-scripts not found”. If these errors occur, let someone on your team know, or message the #tech-devstack-edx channel in Slack.

Get to the point where you can run LMS and Studio locally and open them in your browser. As an edX developer, please use the LATEST version of the devstack (master of the repos you're developing).

Once you’re done, please take a minute to fill out this survey to help us track how long it takes to set up devstack.

[In Development] Tutor

Start here: https://openedx.atlassian.net/wiki/spaces/AC/pages/3344924689

This process is in development. We encourage new developers to try it out!

 

Tools to Install on Ubuntu

Tool

Setup Instructions

Notes

Tool

Setup Instructions

Notes

Deadsnakes PPA

sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update

A source for specific versions of python.

Python Versions

sudo apt install python3.8-dev

The language we use to develop our backends.

Virtualenvwrapper

Basic Installation Docs

The main purpose of Python virtual environments is to create an isolated environment for Python projects.

Docker

Install Docker via Repository

If you don’t know what docker is, check out their docs here first.  We use docker heavily across development, testing and production environments so having a good understanding of docker concepts will make your life a lot easier.

Node

https://nodejs.org/en/

Used to build Micro-Frontends and client side javascript code.

edX Devstack

Start with the Readme in the Devstack Repo

Get to the point where you can run LMS and Studio locally and open them in your browser. As an edX developer, please use the LATEST version of the devstack (master of the repos you're developing).