Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 110 lines (87 sloc) 2.999 kb
#!/bin/bash
FORCE_FRESH_INSTALL="yes"
NIMBUS_ALLOW_ROOT_INSTALL="no"
NIMBUS_SRC_REL="`dirname $0`/.."
NIMBUS_SRC=`cd $NIMBUS_SRC_REL; pwd`
if [ "X$1" = "X" ]; then
echo ""
echo "Usage: $0 destination_dir"
echo " You must specify the destination directory."
echo ""
exit 1
fi
if [ "X$NIMBUS_ALLOW_ROOT_INSTALL" != "Xyes" ] && [ $EUID -eq 0 ]; then
echo ""
echo "It is not recommended to install or run Nimbus as root."
echo "If you insist, set the NIMBUS_ALLOW_ROOT_INSTALL environment variable to \"yes\""
echo ""
exit 1
fi
NIMBUS_HOME=$1
if [ -d $NIMBUS_HOME ] && [ "$(ls -A $NIMBUS_HOME)" ]; then
if [ $FORCE_FRESH_INSTALL = "yes" ]; then
echo ""
echo "The destination directory '$NIMBUS_HOME' exists and is not empty."
echo "It is not recommended to reinstall Nimbus into an existing install."
echo ""
echo "If you are making changes to the services, you can build and install those directly:"
echo " export GLOBUS_LOCATION=$NIMBUS_HOME/services"
echo " scripts/all-build-and-install.sh"
echo ""
echo "If you know what you are doing and want to reinstall, edit this script:"
echo " $0"
echo "and change FORCE_FRESH_INSTALL to \"no\""
echo ""
exit 1
fi
fi
if [ ! -d $NIMBUS_HOME ]; then
mkdir $NIMBUS_HOME
fi
PYTHON_EXE=`which python`
# returns 0 if Python 2.5+
$PYTHON_EXE -c "import sys; sys.exit(sys.version_info < (2,5))"
if [ $? -ne 0 ]; then
echo "ERROR: Your system must have Python version 2.5 or later."
exit 1
fi
echo "====================================="
echo "Making the python virtual env"
echo "====================================="
pyve_path=$NIMBUS_HOME/ve
echo $NIMBUS_SRC
$PYTHON_EXE $NIMBUS_SRC/cumulus/virtualenv.py -p $PYTHON_EXE $pyve_path
if [ $? -ne 0 ]; then
echo "ERROR: python virtualenv installation failed."
exit 1
fi
PYVE=$pyve/bin/python
$NIMBUS_SRC/bin/create-nimbus-home $NIMBUS_HOME 2>&1 | tee $NIMBUS_HOME/install.log
if [ $? -ne 0 ]; then
echo ""
echo "Nimbus home directory creation failed!"
exit 1
fi
CUMULUS_ENV="$NIMBUS_HOME/cumulus/env.sh"
if [ ! -f $CUMULUS_ENV ]; then
echo "Expected file to be created: $CUMULUS_ENV"
exit 1
fi
echo "-----------------------------------------------------------------"
echo " Configuring installed services"
echo "-----------------------------------------------------------------"
echo ""
CONFIG_SCRIPT="$NIMBUS_HOME/bin/nimbus-configure"
if [ ! -f $CONFIG_SCRIPT ]; then
echo "Configuration script could not be found: $CONFIG_SCRIPT"
exit 1
fi
$CONFIG_SCRIPT
if [ $? -ne 0 ]; then
echo "Nimbus configuration script failed! You may try running it manually:"
echo " $CONFIG_SCRIPT"
echo "You can also run the script with debugging output:"
echo " $CONFIG_SCRIPT --debug"
exit 1
fi
$NIMBUS_SRC/bin/install-real.sh "${@}" 2>&1 | tee -a $NIMBUS_HOME/install.log
Jump to Line
Something went wrong with that request. Please try again.