Build an online learning platform with Open edX on SoftLayer

16 July 2014
PDF (684 KB)
Share:
Lucas Sodre

Lucas Sodre

Software Engineer

Lucas Guerreiro

Lucas Guerreiro

Software Engineer

Zhong Yu (Leo) Wu

Zhong Yu (Leo) Wu

Advisory Software Developer

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.

  1. The first step is to have a SoftLayer account with the required permissions to do cloud instance provisioning.
  2. 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. Image shows adding a new server

    Click to see larger image

  3. 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 to see larger image

  4. 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 openedx.test-domain.com. Image shows order review

    Click to see larger image

  5. When you finalize your order, you should see a receipt screen like this: Image shows receipt screen

    Click to see larger image

  6. 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. Image shows next step

    Click to see larger image

    You should see a list of servers. Click the one just created, in our case openedx.test-domain.com. Click View.

    Image shows view screen

    Click to see larger image

  7. The Virtual Server Summary gives you everything you need to connect: the address, 208.43.89.19, the user, root, and the password, RPW6jbrP. Image shows summary
  8. 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.

  1. 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 208.43.89.19, 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.

    Image shows password request screen
  2. 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 installation.
    $ sudo apt-get update -y
    $ sudo apt-get upgrade -y
    $ sudo reboot

    Hint: The $ character represents a terminal output on our server. You do not need to include it when copying and pasting these commands.

  3. 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 services.
    1. First, we install the requirements and clone the edX repo:

      Click to see code listing

      $ 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
    2. 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 the variable COMMON_SSH_PASSWORD_AUTH to "yes" in the configuration/playbooks/roles/common/defaults/main.yml file.
    3. 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_AUTH variable 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
    4. 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.

      Click to see code listing

      $ 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,"
  4. If everything goes OK, you should see a screen like this:Image shows successful progress

    Click to see larger image

    If the installation fails, it is probably because the repo was recently updated. Run the following command to revert to a stable version of requests-oauthlib.

    Click to see code listing

    $ 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,"
  5. Once the server is deployed, you can access the LMS (student interface website) at the server's IP, in this case 208.43.89.19, and the Studio website at port 18010. In this case, the path will be 208.43.89.19:18010. For more information, see the edX configuration repo.

    Here is a screenshot of a browser accessing edX on our server:

    Image shows browser accessing edX

    Click to see larger image

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 libxml2-dev.

    Click to see code listing

    $ 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 virtualenv.
    $ sudo pip install --upgrade pip && sudo pip install --upgrade virtualenv
  • The following command clones the Open edX configuration repo in the /var/tmp folder.
    $ cd /var/tmp && git clone -b release https://github.com/edx/configuration
  • The following two commands perform separate functions:

    Click to see code listing

    $ 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 changepassword and dump_course_structure.

$ 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:

    Click to see code listing

    $ sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws create_user -e user@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:

    Click to see code listing

    $  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

  • 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.

SoftLayer

  • 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.

Conclusion

 

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.

Add a comment

Note: HTML elements are not supported within comments.


1000 characters left

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Cloud computing, Open source
ArticleID=977764
ArticleTitle=Build an online learning platform with Open edX on SoftLayer
publish-date=07162014