Skip to content

Instantly share code, notes, and snippets.

@ngi644
Last active February 2, 2017 03:24
Show Gist options
  • Save ngi644/ed37a1da6658c72b3313578f88df8dc5 to your computer and use it in GitHub Desktop.
Save ngi644/ed37a1da6658c72b3313578f88df8dc5 to your computer and use it in GitHub Desktop.
sudo rm -r /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/patial
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y build-essential software-properties-common python-software-properties curl git-core libxml2-dev libxslt1-dev libfreetype6-dev python-pip python-apt python-dev libxmlsec1-dev swig libmysqlclient-dev
sudo apt-get install -y python-dev --upgrade
sudo pip install --upgrade pip
sudo pip install setuptools --upgrade
sudo -H pip install --upgrade virtualenv
cd /var/tmp
git clone https://github.com/ngi644/configuration
cd configuration/
git checkout ngi644/custom_eucalyptus.3
sudo pip install -r requirements.txt
sudo git config --global url."https://".insteadOf git://
export OPENEDX_RELEASE=open-release/eucalyptus.3
VERSION_VARS=(
edx_platform_version
certs_version
forum_version
xqueue_version
configuration_version
demo_version
NOTIFIER_VERSION
INSIGHTS_VERSION
ANALYTICS_API_VERSION
PROGRAMS_VERSION
)
EXTRA_VARS=""
for var in ${VERSION_VARS[@]}; do
# Each variable can be overridden by a similarly-named environment variable,
# or OPENEDX_RELEASE, if provided.
ENV_VAR=$(echo $var | tr '[:lower:]' '[:upper:]')
eval override=\${$ENV_VAR-\$OPENEDX_RELEASE}
if [ -n "$override" ]; then
EXTRA_VARS="-e $var=$override $EXTRA_VARS"
fi
done
cd /var/tmp/configuration/playbooks && sudo ansible-playbook -c local ./edx_sandbox_full.yml -i "localhost," $EXTRA_VARS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment