The world of online learning is vast. There are a myriad of options available for the prospective client wishing to distribute training/education. Many of them paid, some of them free, all of them have their strengths and weaknesses.
As part of my work at Democracy Kit, where I am the tech lead, we’ve begun to dive head first into the crazy realm of MOOC’s. After discussing it we’ve decided, at least for now, to build out a prototype of what a Democracy Kit branded online course platform would look like.
The current website that we use is great for what we’ve needed for our first year in operation, but now we’re exploring options that give us a bit more flexibility.
And the platform we’ve chosen to do that is Open edX, a completely open source version of the MOOC software that runs edX. Open edX is built mostly in Django with a MongoDB and MySQL backend, utilizing Django templates and SASS for the frontend.
So a few weeks ago we tried our hand at using it, and before we had even written a single line of code we came at a roadblock.
The current documentation for setting up a local development environment is a bit confusing. They initially recommend setting up their local dev version of the software using Vagrant and Virtual Box. Both Hasan and I tried it on our computers (one Mac and one Linux machine), and we both ran into huge problems.
Error after error; all sorts of problems. And not a single line of code had been written yet. Just setting up a dev environment seemed like it was more difficult than we expected.
It turns out Open edX is currently making a transition from their old local development deployment and using Docker containers. After scratching our heads for a little bit, we found this repo outlining a much more sane way to getting started.
But even this documentation was confusing, which is why I’m writing this blog post to help teach anyone who wants to start developing with us or to random visitors to my little corner of the web that need help deploying their first Open edX app.
- Install docker-compose
- Make sure you have make and pip installed
- Install virtualenv
- Clone this repository using:
git clone https://github.com/democracykit/devstack.git
- Move into the project folder and create a virtualenv using:
- Then install requirements like so:
- The Docker Compose file mounts a host volume for each service’s executing code by conducting this command:
- Run the provision command to configure the superusers which may take a while (my installation took almost half an hour):
- Start the services (this may take up to 60 seconds to appear even after all the checks say done):
And voila! You should have a version of Open EdX devstack running on your local machine. All of the services are running at the following links:
Once you’re done with working for the day you can stop the services using:
Now you’ve installed a wackload of code and files, and set up your databases. Now to actually develop the frontend you have to navigate this tree of folders.
Just a tip, all of your frontend code that students will see is under the
edx-platform/lms folder. What we’re doing is we’ve setup a seperate repo that will contain all of our code in this folder. That we can then push and pull code from.
I hope this helps simplify your understanding of how to launch your own local environment for Open edX development. I know it seems super confusing and daunting at first, and I hope this helps out anyone who wants to help out on the project or wants to develop their own courses.
Thanks for reading!