Build an online learning platform with Open edX on SoftLayer
edX is a non-profit online initiative created by founding partners Harvard and MIT that now includes dozens of leading global institutions, the xConsortium. edX offers free, interactive online classes and Massive Open Online Courses (MOOCs) from the world’s best universities to students around the world.
Open edX is an open source initiative where developers and educational institutions around the globe work together to create an extensible online learning platform to bring quality education to "anyone, anywhere, anytime."
Open edX is not the only open source educational platform available. Moodle, for example, is a popular platform that has been widely deployed. However, Open edX provides a more engaging learning experience for students, as well as a robust analytics feature that can be used for educational research, decision support, and operational monitoring.
“Install and configure Open edX on SoftLayer quickly and easily so you can provide a scalable online learning platform for your course instructors and students. ”
Open edX was originally developed to be deployed within Amazon Web Services (AWS), but you can easily install and configure it on a SoftLayer server. SoftLayer is a different approach to IaaS, and provides additional services to help meet your online course platform needs. In this article, we show you how to install and configure Open edX quickly and easily on SoftLayer so you can provide a scalable online learning platform for your course instructors and students.
Step 1. Create and deploy a SoftLayer server
In this section, we discuss how to create and deploy a SoftLayer server for Open edX to use. We also present an easy SSH connection with the server using the PuTTY SSH client.
- The first step is to have a SoftLayer account with the required permissions to do cloud instance provisioning.
- Log in to manage.softlayer.com and click the SALES tab to add a new server as shown in the image below. We used the Add Virtual Server (Monthly) option. We recommend the Monthly or Hourly option for you as well, especially if this is your first time using an edX server.
- Choose your system configuration. These are the minimum requirements:
- Ubuntu Linux® 12.04 LTS 64 bits – Minimal Install
- 2GB of memory, 4GB recommended;
- One 2GHz CPU
- 25GB of free disk space
The figure below shows an example of a server configuration:
- Click Continue Your Order to proceed. On the next
page, review your order and set up a new host name and domain. For
this article, we use
- When you finalize your order, you should see a receipt screen like this:
- Check your email to confirm. Your server will be available within a
few minutes. When you are ready, click the VIRTUAL
tab and click Computing.
You should see a list of servers. Click the one just created, in our case
openedx.test-domain.com. Click View.
- The Virtual Server Summary gives you everything you
need to connect: the address,
126.96.36.199, the user,
root, and the password,
- Now it's time to make our first connection. For this, we need an SSH client. There are a lot of them on the Internet, but for this article, we are going to use PuTTY, one of the most well known. For more information, see PuTTY: A Free Telnet/SSH Client
Step 2. Install required software and Open edX
In this section, we access the server we created using PuTTY, install the required software, and then install Open edX.
- Now that we have our SSH client, it's time to connect it to our
server. In the Host Name (or IP address) field, we are going to use
the public IP of the server, in this case
188.8.131.52, and SSH port
22. When you click Open, a new screen appears asking for the user and password. In this case, the user is root and the password RPW6jbrP, which were previously provided by the SoftLayer website.
Hint: You can right-click your mouse to paste within the PuTTY shell.
- Once logged on, we first need to make sure that our server is up to
date by running the following commands. This causes the system to
reboot and lose the connection. Reconnect to proceed with the
$ sudo apt-get update -y $ sudo apt-get upgrade -y $ sudo reboot
$character represents a terminal output on our server. You do not need to include it when copying and pasting these commands.
- Now we can install the required software and Open edX on our server
with the following commands. These commands are explained in the next
section, Explanation of components and
- First, we install the requirements and clone the edX repo:
$ sudo apt-get install -y build-essential software-properties-common python-software-properties curl git-core libxml2-dev libxslt1-dev python-pip python-apt python-dev && sudo pip install --upgrade pip && sudo pip install --upgrade virtualenv && cd /var/tmp && git clone -b release https://github.com/edx/configuration
- If you want to continue accessing the server through SSH with
a password, it's a good idea to change the main.yml file.
Otherwise, you will not be able to connect again using the
password given on the SoftLayer web page. To do this, change
COMMON_SSH_PASSWORD_AUTHto "yes" in the configuration/playbooks/roles/common/defaults/main.yml file.
- There is another variable we're going to change. This
variable, when "True," sets a default password on the main
page. You can keep "True" if you want to; the default login
and password is "edx." To disable the password, change the
COMMON_ENABLE_BASIC_AUTHvariable to "False" in the same main.yml file shown above. To change these variables, you can use the nano editor:
$ nano configuration/playbooks/roles/common/defaults/main.yml
- The next command string performs the installation. This part
can be a little time consuming, so don't worry if a task takes
awhile to finish.
$ cd /var/tmp/configuration && sudo pip install -r requirements.txt && cd /var/tmp/configuration/playbooks && sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost,"
- First, we install the requirements and clone the edX repo:
- If everything goes OK, you should see a screen like this:
If the installation fails, it is probably because the repo was recently updated. Run the following command to revert to a stable version of
$ sudo -u edxapp /edx/app/edxapp/venvs/edxapp/bin/pip install requests-oauthlib==0.4.0 $ cd /var/tmp/configuration && sudo pip install -r requirements.txt && cd /var/tmp/configuration/playbooks && sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost,"
- Once the server is deployed, you can access the LMS (student interface
website) at the server's IP, in this case 184.108.40.206, and the Studio
website at port 18010. In this case, the path will be
220.127.116.11:18010. For more information, see the edX configuration repo.
Here is a screenshot of a browser accessing edX on our server:
Explanation of components and services
In this section, we clarify the commands used in Step 3 of the previous section and provide some understanding about the software requirements and how our server is installed.
- The following command installs the build-essential packages: git,
python pip, python-core, cURL, and other essential libraries such as
$ sudo apt-get install -y build-essential software-properties-common python-software-properties curl git-core libxml2-dev libxslt1-dev python-pip python-apt python-dev
- The following command upgrades the pip package management system, and
installs and upgrades an isolated Python environment called
$ sudo pip install --upgrade pip && sudo pip install --upgrade virtualenv
- The following command clones the Open edX configuration repo in the
$ cd /var/tmp && git clone -b release https://github.com/edx/configuration
- The following two commands perform separate functions:
$ sudo pip install -r requirements.txt $ cd /var/tmp/configuration/playbooks && sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost,"
The first command installs the requirements below through the pip packet manager:
- Ansible - 1.5.5
- PyYAML - 3.11
- Jinja2- 2.7.2
- MarkupSafe - 0.23
- Argparse - 1.2.1
- boto - 2.28.0
- ecdsa 0.11
- paramiko - 1.14.0
- pycrypto - 2.6.1
- wsgiref - 0.1.2
- docopt -0.6.1
- python-simple-hipchat - 0.2
The second command uses Ansible IT automation to deploy the server. Ansible is an automation tool, and it is here that all the hard work is done. This is where all the servers, such as mysql, mongoDB, and nginx are installed.
For more information on these commands and components, see edX configuration.
Getting started with Open edX
Once you have successfully installed Open edX, there are a number of commands that can be very useful when setting up a new instance or performing maintenance. To use these commands, open the edx-platform folder:
$ cd /edx/app/edxapp/edx-platform
Now you can create users, change password, generate certificates, and more using the command line instead of the website. This can be powerful when used with a script.
The following command lists all
manage.py commands. This list
contains commands such as
$ sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws help
The Open edX production stack page provides some examples of these commands:
- Create a new user:
$ sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws create_user -e email@example.com
- Set or change password:
$ sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws changepassword user
- Import a course from github using the demo course:
$ cd /var/tmp $ git clone https://github.com/edx/edx-demo-course.git $ cd /edx/app/edxapp/edx-platform $ sudo -u www-data /edx/bin/python.edxapp ./manage.py cms --settings=aws import /edx/var/edxapp/data /var/tmp/edx-demo-course
- See what services are running:
$ sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf status
For more information, see edX Managing the Production Stack.
- edX platform: The main repository covering both the LMS and the authoring tool, Studio.
- edX configuration: A simple but flexible way for anyone to set up an instance of the Open edX platform that is fully configured and ready to go.
- edX production: Information on how to manage and update the Open edX server once it is running.
- edX repos: Contains links to every Open edX repo, including those above.
- Management: Contains everything necessary to create, cancel, and manage servers and services.
- Control: View information about your servers and manage them through a modern web interface.
In this article, we've shown you how to install and configure Open edX on a SoftLayer server and provided some useful tips and techniques for setting up other instances or performing maintenance.
Open edX is always improving and releasing new versions. As the Open edX project evolves, you can easily stay current by participating in the open source community. Enjoy the benefits of this engaging online platform for course instructors and students.