Last active
January 8, 2016 18:33
-
-
Save usernamenumber/78e60a4fc4ef3895bd1d to your computer and use it in GitHub Desktop.
Playbook for edx on CAP (work in progress!)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Deploy edxapp for Intel CAP | |
hosts: all | |
sudo: True | |
gather_facts: True | |
vars: | |
serial_count: 1 | |
CLUSTER_NAME: 'edxapp' | |
#EDXAPP_LMS_NGINX_PORT: 80 # Port 18000 by default | |
COMMON_SSH_PASSWORD_AUTH: 'yes' | |
COMMON_ENABLE_DATADOG: 'false' | |
COMMON_ENABLE_SPLUNKFORWARDER: 'false' | |
COMMON_ENABLE_MINOS: 'false' | |
EDXAPP_PYTHON_SANDBOX: 'false' # avoid AppArmor dependency | |
serial: "{{ serial_count }}" | |
roles: | |
- role: mongo | |
- role: nginx | |
nginx_sites: | |
- lms | |
- cms | |
nginx_default_sites: | |
- lms | |
nginx_extra_sites: "{{ NGINX_EDXAPP_EXTRA_SITES }}" | |
nginx_extra_configs: "{{ NGINX_EDXAPP_EXTRA_CONFIGS }}" | |
nginx_redirects: "{{ NGINX_EDXAPP_CUSTOM_REDIRECTS }}" | |
- edxlocal | |
- edxapp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
## TODO: adapt this to the pre_task section of cap.yml | |
## | |
function fail() { | |
echo "" | |
echo "FAILURE. Quitting." | |
echo "" | |
exit 1 | |
} | |
sudo mkdir -p /var/tmp | |
sudo chmod ugo+rwxt /tmp /var/tmp | |
sudo apt-get update || fail | |
sudo apt-get remove mysql-server | |
sudo apt-get install -y mysql-server-5.5 || fail | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 16126D3A3E5C1192 || fail | |
sudo apt-get install -y python-software-properties software-properties-common || fail | |
sudo apt-add-repository ppa:ansible/ansible || fail | |
sudo apt-get update || fail | |
sudo apt-get install -y ansible build-essential software-properties-common python-software-properties curl git git-core libxml2-dev libxslt1-dev libfreetype6-dev python-pip python-apt python-dev libxmlsec1-dev swig mysql-5.5 libmysqlclient-dev autoconf gcc g++ ansible || fail | |
sudo apt-get install --reinstall libc6-dev -y || fail | |
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python | |
sudo mkdir -p /preloaded/edx/ && sudo ln -sf /preloaded/edx / || fail | |
git clone https://github.com/edx/configuration/ /var/tmp/configuration || fail | |
cd /var/tmp/configuration/ || fail | |
sudo pip install -r requirements.txt || fail | |
sudo pip install --upgrade ansible | |
cd playbooks || fail | |
wget https://gist.githubusercontent.com/usernamenumber/78e60a4fc4ef3895bd1d/raw/0ff0533d6ffdcdb47a13476adbb28ad55572599e/cap.yml || fail | |
sudo ansible-playbook -i localhost, -c local cap.yml || fail |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment