Commit 053d8f25 by Ned Batchelder

Everything is overridable in sandbox.sh

parent a1de457f
#!/bin/sh #!/bin/bash
## ##
## Installs the pre-requisites for running edX on a single Ubuntu 12.04 ## 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 ## instance. This script is provided as a convenience and any of these
...@@ -42,22 +42,34 @@ sudo -H pip install --upgrade virtualenv==15.0.2 ...@@ -42,22 +42,34 @@ sudo -H pip install --upgrade virtualenv==15.0.2
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
## Did we specify an openedx release? ##
if [ -n "$OPENEDX_RELEASE" ]; then ## Overridable version variables in the playbooks. Each can be overridden
EXTRA_VARS="-e edx_platform_version=$OPENEDX_RELEASE \ ## individually, or with $OPENEDX_RELEASE.
-e certs_version=$OPENEDX_RELEASE \ ##
-e forum_version=$OPENEDX_RELEASE \ VERSION_VARS=(
-e xqueue_version=$OPENEDX_RELEASE \ edx_platform_version
-e configuration_version=$OPENEDX_RELEASE \ certs_version
-e demo_version=$OPENEDX_RELEASE \ forum_version
-e NOTIFIER_VERSION=$OPENEDX_RELEASE \ xqueue_version
-e INSIGHTS_VERSION=$OPENEDX_RELEASE \ configuration_version
-e ANALYTICS_API_VERSION=$OPENEDX_RELEASE \ demo_version
$EXTRA_VARS" NOTIFIER_VERSION
CONFIG_VER=$OPENEDX_RELEASE INSIGHTS_VERSION
else ANALYTICS_API_VERSION
CONFIG_VER="master" )
fi
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
CONFIGURATION_VERSION=${CONFIGURATION_VERSION-${OPENEDX_RELEASE-master}}
## ##
## Clone the configuration repository and run Ansible ## Clone the configuration repository and run Ansible
...@@ -65,7 +77,7 @@ fi ...@@ -65,7 +77,7 @@ fi
cd /var/tmp cd /var/tmp
git clone https://github.com/edx/configuration git clone https://github.com/edx/configuration
cd configuration cd configuration
git checkout $CONFIG_VER git checkout $CONFIGURATION_VERSION
## ##
## Install the ansible requirements ## Install the ansible requirements
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment