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
## 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
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
## Did we specify an openedx release?
if [ -n "$OPENEDX_RELEASE" ]; then
EXTRA_VARS="-e edx_platform_version=$OPENEDX_RELEASE \
-e certs_version=$OPENEDX_RELEASE \
-e forum_version=$OPENEDX_RELEASE \
-e xqueue_version=$OPENEDX_RELEASE \
-e configuration_version=$OPENEDX_RELEASE \
-e demo_version=$OPENEDX_RELEASE \
-e NOTIFIER_VERSION=$OPENEDX_RELEASE \
-e INSIGHTS_VERSION=$OPENEDX_RELEASE \
-e ANALYTICS_API_VERSION=$OPENEDX_RELEASE \
$EXTRA_VARS"
CONFIG_VER=$OPENEDX_RELEASE
else
CONFIG_VER="master"
fi
##
## Overridable version variables in the playbooks. Each can be overridden
## individually, or with $OPENEDX_RELEASE.
##
VERSION_VARS=(
edx_platform_version
certs_version
forum_version
xqueue_version
configuration_version
demo_version
NOTIFIER_VERSION
INSIGHTS_VERSION
ANALYTICS_API_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
CONFIGURATION_VERSION=${CONFIGURATION_VERSION-${OPENEDX_RELEASE-master}}
##
## Clone the configuration repository and run Ansible
......@@ -65,7 +77,7 @@ fi
cd /var/tmp
git clone https://github.com/edx/configuration
cd configuration
git checkout $CONFIG_VER
git checkout $CONFIGURATION_VERSION
##
## 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