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 169 lines (138 sloc) 4.722 kb
#!/bin/bash
CONTAINER_URL="http://www-unix.globus.org/ftppub/gt4/4.0/4.0.8/ws-core/bin/ws-core-4.0.8-bin.tar.gz"
CONTAINER_TARNAME="ws-core-4.0.8-bin.tar.gz"
CONTAINER_UNTARREDNAME="ws-core-4.0.8"
# destination directory inside $NIMBUS_HOME
CONTAINER_DIRNAME="services"
NIMBUS_SRC_REL="`dirname $0`/.."
NIMBUS_SRC=`cd $NIMBUS_SRC_REL; pwd`
TMPDIR="$NIMBUS_SRC/tmp"
if [ ! -d $TMPDIR ]; then
mkdir $TMPDIR
if [ $? -ne 0 ]; then
echo "Failed to create temp directory: $TMPDIR"
exit 1
fi
fi
if [ "X$1" = "X" ]; then
echo ""
echo "Usage: $0 destination_dir"
echo " You must specify the destination directory.\n"
exit 1
fi
echo ""
echo "-----------------------------------------------------------------"
echo " Preparing Nimbus installation directory"
echo "-----------------------------------------------------------------"
echo ""
# first ensure we have a GT tarball. Most likely it has been bundled with
# the Nimbus installer.
if [ ! -f $TMPDIR/$CONTAINER_TARNAME ]; then
echo "Downloading service container.."
echo ""
wget -c -O $TMPDIR/$CONTAINER_TARNAME $CONTAINER_URL
if [ $? -ne 0 ]; then
echo ""
echo "Failed to download container tarball from: $CONTAINER_URL"
echo ""
echo "If you are unable to access the Internet, please retrieve this"
echo "file by other means and place it in $TMPDIR/."
echo "Then rerun this script."
rm -f $TMPDIR/$CONTAINER_TARNAME
exit 1
fi
fi
NIMBUS_HOME=$1
if [ ! -d $NIMBUS_HOME ]; then
PARENT_DIR=`dirname $NIMBUS_HOME`
if [ -d $PARENT_DIR ]; then
mkdir $NIMBUS_HOME
if [ $? -ne 0 ]; then
echo "Failed to create destination directory!"
exit 1
fi
else
echo "Parent dir of destination does not exist: $PARENT_DIR"
exit 1
fi
fi
echo "Installing cumulus..."
${NIMBUS_SRC}/cumulus/cumulus-install.sh $NIMBUS_HOME/cumulus $NIMBUS_HOME/ve
if [ $? -ne 0 ]; then
echo "Failed to install cumulus"
exit 1
fi
rm -rf $NIMBUS_HOME/cumulus/log
ln -s $NIMBUS_HOME/var $NIMBUS_HOME/cumulus/log
echo "Deploying skeleton directory structure.."
cp -fr $NIMBUS_SRC/home/* $NIMBUS_HOME/
if [ $? -ne 0 ]; then
echo "Failed to copy Nimbus home directory"
exit 1
fi
echo "Deploying web application.."
cp -r $NIMBUS_SRC/web $NIMBUS_HOME/
if [ $? -ne 0 ]; then
echo "Failed to copy Nimbus web directory"
exit 1
fi
CONTAINER_DIR="$NIMBUS_HOME/$CONTAINER_DIRNAME"
if [ ! -d $CONTAINER_DIR ]; then
echo "Installing service container.."
tar xzf $TMPDIR/$CONTAINER_TARNAME -C $TMPDIR
if [ $? -ne 0 ]; then
echo "Failed to expand container tarball: $TMPDIR/$CONTAINER_TARNAME"
echo "If this file is corrupted, you may delete it and rerun this script to download a new one."
exit 1
fi
mv $TMPDIR/$CONTAINER_UNTARREDNAME $CONTAINER_DIR
if [ $? -ne 0 ]; then
echo "Failed to move container directory to $CONTAINER_DIR"
exit 1
fi
CONTAINER_LOG_PROPS="$CONTAINER_DIR/container-log4j.properties"
echo "" >> $CONTAINER_LOG_PROPS
echo "# Change the following lines from \"INFO\" to \"DEBUG\" to enable Nimbus debugging" >> $CONTAINER_LOG_PROPS
echo "# Also see: services/etc/nimbus/workspace-service/logging.conf" >> $CONTAINER_LOG_PROPS
echo "# Logging changes require a container restart." >> $CONTAINER_LOG_PROPS
echo "log4j.category.org.nimbustools=INFO" >> $CONTAINER_LOG_PROPS
echo "log4j.category.org.globus.workspace=INFO" >> $CONTAINER_LOG_PROPS
else
echo "Service container already exists at $CONTAINER_DIR"
fi
echo ""
echo "-----------------------------------------------------------------"
echo " Building and installing Nimbus services"
echo "-----------------------------------------------------------------"
GLOBUS_LOCATION=$CONTAINER_DIR
export GLOBUS_LOCATION
$NIMBUS_SRC/scripts/all-build-and-install.sh
if [ $? -ne 0 ]; then
echo "Build and install FAILED!"
exit 1
fi
# add in native libraries
LIBNATIVE="$CONTAINER_DIR/lib-native"
mkdir -p $LIBNATIVE
if [ $? -ne 0 ]; then
echo "Creation of $LIBNATIVE directory failed"
exit 1
fi
cp $NIMBUS_SRC/lib/native/* $LIBNATIVE/
if [ $? -ne 0 ]; then
echo "Deployment of native libs failed"
exit 1
fi
# create domain sockets privileged directory
PRIVILEGED="$NIMBUS_HOME/var/run/privileged"
mkdir -p $PRIVILEGED
if [ $? -ne 0 ]; then
echo "Creation of privileged domain sockets directory failed: $PRIVILEGED"
exit 1
fi
chmod 700 $PRIVILEGED
if [ $? -ne 0 ]; then
echo "chmod of privileged domain sockets directory failed: $PRIVILEGED"
exit 1
fi
echo ""
Jump to Line
Something went wrong with that request. Please try again.