Tuesday, September 9, 2014

edx-platform - Install Open EdX on a freshly installed Ubuntu 14.04 server

Even though the official installation guide for Open EdX using the Configuration repository only supports Ubuntu 12.04 but you can actually using the same method to install an Open EdX instance on a freshly installed Ubuntu 14.04 server:

Do not run the one-step install script because it has a platform check to make sure it only run on a Ubuntu 12.04 server:

...

## Sanity check
##
if [[ ! "$(lsb_release -d | cut -f2)" =~ $'Ubuntu 12.04' ]]; then
echo "This script is only known to work on Ubuntu 12.04, exiting...";
exit;
fi
...

You should install the stack manually following these steps:

##
## Update and Upgrade apt packages
##
sudo apt-get update -y
sudo apt-get upgrade -y

##
## Install system pre-requisites
##
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

##
## Clone the configuration repository and run Ansible
##
cd /var/tmp
git clone -b release https://github.com/edx/configuration
##
## allow password based SSH authentication,
## edit the common role inside of
## configuration/playbooks/roles/common/defaults/main.yml and 
## set COMMON_SSH_PASSWORD_AUTH to "yes"
##

##
## Install the ansible requirements
##
cd /var/tmp/configuration
sudo pip install -r requirements.txt

##
## Run the edx_sandbox.yml playbook in the configuration/playbooks directory
##
cd /var/tmp/configuration/playbooks && sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost,"


It should work!