-
Notifications
You must be signed in to change notification settings - Fork 9
edX Ubuntu 12.04 64 bit Installation
This page describes how to install the edX Production Stack on a single Ubuntu 12.04 64-bit server from scratch. For other Production Stack installation instructions, see here.
The following server requirements will be fine for supporting hundreds of registered students on a single server.
Note: This will runs mysql, memcache, mongo, and all of the edX services (lms, studio, forums, ora/discern) on a single server. In production configurations we recommend that these services run on different servers and that a load balancer is added for redundancy. Setting up production configurations is beyond the scope of this wiki page.
- Ubuntu 12.04 amd64 (oraclejdk required)
- Minimum 2GB of memory, 4GB recommended for production servers (with only 2GB some swap space is required, at least during installation)
- At least one 2.00GHz CPU or EC2 compute unit
- Minimum 25GB of free disk, 50GB recommended for production servers
For hosting in Amazon we recommend an m3.medium server, see https://aws.amazon.com/ec2/pricing
Community Ubuntu AMIs have 8GB on the root directory, make sure to expand it before installing.
WARNING: These instructions will potentially destroy the server they are run on, you should only do them on a freshly installed virtual machine. By default ssh will only allow key based authentication. Please setup key based SSH logins or modify the configuration repo to allow for password based SSH logins before running ansible.
-
If you are running your services behind a proxy, please see here
-
Launch an Ubuntu 12.04 64-bit server and login to it as a user that has full sudo privileges. If you use EC2, use at least m1.large type with EBS and allocate ~50 GB to the root user.
-
Update your Ubuntu package sources
sudo apt-get update -y
sudo apt-get upgrade -y
sudo reboot
-
One step installation
Please read the contents of the script before running this to ensure you are aware of everything it will do; it is quite extensive. The script requires that the running user can run commands as root via sudo.
wget https://raw.github.com/edx/configuration/master/util/install/vagrant.sh -O - | bash ```
-
Manual installation (does what the script does)
Perform the steps below
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 ```
On the new server, clone the configuration repo:
```
cd /var/tmp git clone -b release https://github.com/edx/configuration ```
To 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," ```
Note: If you are running on an older version of the configuration repo, use the variable 'edx_platform_commit' instead.
- Note: If you get npm Error: failed to fetch from registry: coffee-script, put
registry = "https://registry.npmjs.org/"
to /usr/share/npm/npmrc and retry the installation.
- If ansible stops at some point, look at log files. See locations of log files in the FAQ page.
After installation connect your web browser to the following ports:
- LMS - 80
- Studio - 18010
You may want to override the default ports for Studio and lms-preview if you are setting up subdomains to connect to your sandbox. By default nginx will forward studio.* to the studio gunicorn process.
Example where preview.example.com, example.com and studio.example.com all point to the same server and you want to deploy the master branch of the edx-platform repo.
cd /var/tmp/configuration/playbooks/edx-east
sudo ansible-playbook -c local --limit "localhost:127.0.0.1" ../edx_sandbox.yml \
-i "localhost," -e 'EDXAPP_PREVIEW_LMS_BASE=preview.example.com EDXAPP_LMS_BASE=example.com EDXAPP_LMS_PREVIEW_NGINX_PORT=80 EDXAPP_CMS_NGINX_PORT=80 EDXAPP_LMS_NGINX_PORT=80 edx_platform_version=master '
See edX-Managing-the-Production-Stack for how to manage and update the server once it is running