This page looks best with JavaScript enabled

I Tried Open edX and it's Awesome

 ·   ·  ☕ 7 min read

Introduction

Ed-tech industry in India was valued at US$750 million in 2020, and is projected to be $1.04 billion by 2021. (source)

I am documenting the process of edx installation on local system for evaluating. I’m not doing a comparision with any similar product here. Also, I’m writing this post from a develper’s perspective of course, because I’m a software developer. Don’t expect any business related expertise from here.

With this post, I’ll document my own learning. Mostly what technologies this project uses, and how the project is laid out and which tech is used by which component.

What is Open edX?

Open edX is a open source project which powers edx.org and thousands of other online education sites.

Talking about edx.org, edX is the online learning destination co-founded by Harvard and MIT. The Open edX platform provides the learner-centric, massively scalable learning technology behind it. Originally envisioned for MOOCs, Open edX platform has evolved into one of the leading learning solutions catering to Higher Ed, enterprise, and government organizations alike.

You can learn more about Open edX at their official website: https://openedx.org.

Open edX landing page
Open edX landing page

Enough of marketing now, now let’s get straight back to installation part.

Installation

There are two recommended ways to install openedx. Both of them are Docker oriented.

  • Tutor: A community-supported Docker-based environment suited for both production and development.
  • Devstack: A development environment based on Docker; useful if you want to modify Open edX code locally.

As I’m just trying out this project. I’ll use the Tutor version.

Apart from installation method, you can either choose to install a specific version, or the latest one from GitHub. I’ve decided to use Lilac Release, which is one of the recent release. You can find all the releases on Open edX Platform Releases page

Requirements

As per the official documentation, the system requirements are as follows:

  • Supported OS: 64-bit Unix based system. Avoid WSL.
  • Architecture: AMD64, but ARM64 may be supported in future.
  • Required runtime: Docker v18.06+ with Docker Compose v1.22.0
  • Recommended hardware: 8GB RAM, 4CPU, 25GB disk space

Note: I don’t know how does above hardware requirement goes with Kubernetes deployment. That will be a good candidate for my new post in this series.

pip installation

There are multiple ways to install Tutor. The first one listed on the documentation page shows the pip installation methed, that is the one we are going to use. Also, just for sake of awareness, I’m trying all of these on a Ubuntu 20.04 machine locally.

pip install tutor[full]

Note: I am doing it in a virtual environment so my system namespace is not polluted.

At this moment you may want to play around with the tutor command.

$ tutor --help
Usage: tutor [OPTIONS] COMMAND [ARGS]...

  Tutor is the Docker-based Open edX distribution designed for peace of mind.

Options:
  --version        Show the version and exit.
  -r, --root PATH  Root project directory (environment variable: TUTOR_ROOT)
                   [default: /home/santosh/.local/share/tutor]
  -h, --help       Show this message and exit.

Commands:
  config   Configure Open edX
  dev      Run Open edX locally with development settings
  help     Print this help
  images   Manage docker images
  k8s      Run Open edX on Kubernetes
  license  Manage your Tutor licenses
  local    Run Open edX locally with docker-compose
  plugins  Manage Tutor plugins
  shell    Interactive shell
  webui    Web user interface
  xqueue   Interact with the Xqueue server

Configuration

In this section, we’ll do basic configuration to run our local instance of Open edX.

The next step I’m going to follow is:

tutor config save --interactive

This will ask some question.

Are you configuring a production platform? Type 'n' if you are just testing Tutor on your local computer [Y/n] n                                                                                                                             
As you are not running this platform in production, we automatically set the following configuration values:                               
    LMS_HOST = local.overhang.io                                                                                                           
    CMS_HOST = studio.local.overhang.io                                                                                                    
    ENABLE_HTTPS = False                                                                                                                   
Your platform name/title [My Open edX]                                                                                                     
Your public contact email address [[email protected]]                                                                              
The default language code for the platform [en]                                                                                            
Configuration saved to /home/santosh/.local/share/tutor/config.yml                                                                         
Environment generated in /home/santosh/.local/share/tutor/env

The default location for the configuration is at $HOME/.local/share/tutor. You can also jump there by doing cd "$(tutor config printroot)".

config.yml is the main file here.

You can see there are multiple sub-directories inside env/ directory. These files here are generated from the main config.yml, and as a consequence, every time the values from config.yml are modified, the environment must be regenerated with tutor config save.

As we are going to test the local installation, I’d highly recommend going through the env/local directory. This directory has the docker-compose.yml files which are used to run the project locally.

Running

We are doing doing local install, so I’d recommend running tutor local once.

$ tutor local
Usage: tutor local [OPTIONS] COMMAND [ARGS]...

  Run Open edX locally with docker-compose

Options:
  -h, --help  Show this message and exit.

Commands:
  bindmount         Copy the contents of a container directory to a...
  createuser        Create an Open edX user and interactively set their...
  dc                Direct interface to docker-compose.
  exec              Run a command in a running container
  importdemocourse  Import the demo course
  init              Initialise all applications
  logs              View output from containers
  quickstart        Configure and run Open edX from scratch
  reboot            Reboot an existing platform
  restart           Restart some components from a running platform.
  run               Run a command in a new container
  settheme          Assign a theme to the LMS and the CMS.
  start             Run all or a selection of services.
  stop              Stop a running platform
  upgrade           Perform release-specific upgrade tasks

Likewise, if you want to explore the k8s, or want to do development on edX, use the relevant tutor commands.

But for this post, I won’t go deep. Let’s start a local instance here:

tutor local start

The initial start may take some time as there are multiple images to be build. But at the end, you’d see something like this in your terminal:

All services initialised
The Open edX platform is now running in detached mode
Your Open edX platform is ready and can be accessed at the following urls:

    http://local.overhang.io
    http://studio.local.overhang.io

The first link is what a new student will see. The second link is something the course creator or site administrator will see.

Open edX studio landing page
Open edX studio landing page

What’s next?

You can do multiple things with this installation now. Some of them include:

  • Log in as administrator
  • Import demo course
  • Change the look and feel
  • Tweak if you have programming experience
  • Deploy to Kubernetes

You can head over to https://docs.tutor.overhang.io/whatnext.html if you are interested in any of those.

Tech stack

Let’s talk about the main part here as a developer. The technologies used in this project are as follows:

  • Python: There is heavy use of Python. Even tutor is written in Python.
  • Docker: Docker of course is used, and there is also support for Kubernetes.
  • Caddy & Nginx: Both are web servers and reverse proxies. Caddy is mostly used for load balancing and SSL termination.
  • MongoDB & MySQL & Redis & Elasticsearch: Yes, all of them are used.
  • devture/exim-relay: This is for handling mailing services.

Open edX is also composed of different frontend which in openedx’s language is called a mfe or micro frontends.

Key Takeaways

This project is good for someone like me who already has some experience in Python, MongoDB, Docker, Kubernetes, and Nginx. This can also be a good opportunity for me to learn more about Redis, Caddy and Elasticsearch.

This project is good for frontend developers too, as it uses React in it’s micro frontends.

I intend to experiment with this project to hone my skills. And I might make a follow up post on openedx getting deep into the development and deployment side.

PS: If you want to clean up the local setup environment, you can run docker rmi $(docker images -q). This will cleanup all the images which were build during the long wait.

Share on

Santosh Kumar
WRITTEN BY
Santosh Kumar
Santosh is a Software Developer currently working with NuNet as a Full Stack Developer.