Open edX is the open source platform that powers edX courses. It is freely available to the community. Institutions can host their own instances of Open edX and offer their own classes. Educators can extend the platform to build learning tools that precisely meet their needs. And developers can contribute new features to the Open edX platform. There are already many online course sites developed using Open edX.
Open edX consisting of several web applications, mostly written with Django Python. There are also mobile app for Android and iOS and analytics platform powered by Hadoop. It is quite complete and we can deploy it to have a complete online course experience. The architecture is explained here.
Open edX has several components :
- LMS (App visible to students)
- CMS (Studio. App visible to course creator)
- cs_comment_service (Discussions)
- MySQL (Database for user data and others)
- Mongo (Database for course)
- Mobile Apps (Android and iOS)
- Analytics (Insight in edx.org)
- Search with Elasticsearch
- Background workers for various purposes (queued and distributed using Celery and RabbitMQ)
To start with Open edX, we need to install it first. There are several options for Open edX platform installation:
- The Open edX Developer Stack, known as Devstack, is a Vagrant instance designed for local development.
- Open edX Fullstack, known as Fullstack, has several deployment options:
- Vagrant instance designed for deploying all edX services on a single server.
- Open edX Fullstack on Ubuntu 12.04 64 bit
All installation methods mentioned above are meant for development purposes and not live production websites, since all of the components (apps and databases) are installed on single servers.
Since my laptop is not suitable for work with VirtualBox, I opted to install Open edX on Ubuntu server on cloud. For the cloud provider, I choose Digital Ocean. Digital Ocean provide SSD backed cloud server and its quite cheap. And this is my Open edX installation notes on Ubuntu 12.04 at Digital Ocean. Note that this is based on my experience as of today (2015-07-05).
Installation notes on Digital Ocean
Create a server
First, create Digital Ocean account if you don’t have one. You need to add your credit card so you can create your first droplet (server).
I choose droplet with 4 CPUs and 8 GB RAM ($80/mo). I think 2 CPUs and 4 GB RAM ($40/mo) could work but maybe installation will take a bit longer. Open edX has lots of components. Choose Image Ubuntu 12.04.5 x64.
I recommend to Add SSH keys for your Ubuntu server. It is considered more secure than password based access, and you don’t have to type password each time you access it. You can follow this tutorial to create SSH key for your server.
This is my droplet summary
- Hostname : OpenEDX
- Size : $80/mo
- Region : Singapore 1
- Image : 12.04.5 x64
- Settings : none
- SSH Keys : DigitalOcean
When you’re ready create your droplet. It will take about one minute.
Add swap space
Before we continue with Open edX installation. Lets create a swap space to add total amount of virtual memory allocated for our single server.
Again, folks and Digital Ocean has created a tutorial for creating swap space on Ubuntu server. Follow those steps with one exception, I want to create a 8 GB swap space and I use this command:
The tutorial page use 1024 bytes blocksize and it takes too long to create 8 GB swap. Plus, I am having hard time calculate the correct count (I experienced error that all the disk content is used as swap. Which is not what you want)
Install Open edX
After the server ready, now we can install Open edX. The install script is already available on Open edX repository on Github. We need to update the server first.
1 2 3 4
I install htop so I can monitor what happens during installation. It takes a while and sometimes I wonder what is going on. Is it hang or doing something (compiling, downloading, etc)
Then run this command
It will run ansible commands to install all required dependencies and services for running Open edX on single server.
While we wait, lets read some Open edX documentation
Then I experiences series of errors:
1 2 3 4 5 6 7 8 9 10
The install script is missing one package:
libxmlsec1-dev. Let’s install it
Redo the process by calling
1 2 3 4 5 6
The install script is again missing one package:
Redo the process
And continue reading.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
This is error during database migration. I just redo the whole process.
You might wonder is it safe to redo the install process over and over again. It is safe because Ansible is designed to be idempotent which means that you can apply and re-apply it an infinite number of times without changing the result. I just assume the Open edX authors utilize idempotency in their Ansible playbooks.
1 2 3 4 5
It means we cannot proceed to download ElasticSearch installer because our system installed certificates do not recognize SSL used in download.elasticsearch.org. One way to fix this, as suggested by the error message, add
validate_certs=no somewhere when we install ElasticSearch. Open playbook for ElasticSearch:
At line 37, right after
force=no, and press space to insert new line.
validate_certs=no in a new line.
Then redo install using following script:
Note that I redo Ansible process by executing local script instead of fetching again from github because we don’t want to lose our changes.
After a while, finally there are no more errors on the installation process, and I have my Open edX running.
To make our life easier, I have forked edx configuration repo and you can execute it on Ubuntu 12.04 machine with
I am still learning Open edX and if you find any errors or have question or suggestion, please let me know.
Next, we will continue on exploring how settings work on our Open edX instance.