vagrant.sh 1.25 KB
Newer Older
1
#!/bin/sh
e0d committed
2 3 4
##
## Installs the pre-requisites for running edX on a single Ubuntu 12.04
## instance.  This script is provided as a convenience and any of these
5 6 7
## steps could be executed manually.
##
## Note that this script requires that you have the ability to run
e0d committed
8 9
## commands as root via sudo.  Caveat Emptor!
##
e0d committed
10 11 12 13 14

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

##
20 21 22 23 24 25
## Update and Upgrade apt packages
##
sudo apt-get update -y
sudo apt-get upgrade -y

##
e0d committed
26 27
## Install system pre-requisites
##
28
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
e0d committed
29 30 31 32 33 34 35
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv

##
## Clone the configuration repository and run Ansible
##
cd /var/tmp
Han Su Kim committed
36
git clone -b release https://github.com/edx/configuration
e0d committed
37 38 39 40 41 42 43 44 45 46

##
## 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
##
47
cd /var/tmp/configuration/playbooks && sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost,"