Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 141 lines (112 sloc) 3.989 kb
e633c0d @timf Bug 7009 - All scripts should use shebang /bin/bash
timf authored
1 #!/bin/bash
326cfc5 @labisso More installation scripts
labisso authored
2
3 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"
4 CONTAINER_TARNAME="ws-core-4.0.8-bin.tar.gz"
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
5 CONTAINER_UNTARREDNAME="ws-core-4.0.8"
6
7 # destination directory inside $NIMBUS_HOME
326cfc5 @labisso More installation scripts
labisso authored
8 CONTAINER_DIRNAME="services"
9
10 NIMBUS_SRC_REL="`dirname $0`/.."
11 NIMBUS_SRC=`cd $NIMBUS_SRC_REL; pwd`
12
d0f89f2 @priteau Fix usage of missing directory in the install script
priteau authored
13 TMPDIR="$NIMBUS_SRC/tmp"
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
14
15 if [ ! -d $TMPDIR ]; then
16 mkdir $TMPDIR
17 if [ $? -ne 0 ]; then
18 echo "Failed to create temp directory: $TMPDIR"
19 exit 1
20 fi
21 fi
22
54cddac @labisso /bin/sh compatiblity
labisso authored
23 if [ "X$1" = "X" ]; then
906cafe @labisso Fixes to setup and nimbusctl scripts.
labisso authored
24 echo ""
25 echo "Usage: $0 destination_dir"
26 echo " You must specify the destination directory.\n"
326cfc5 @labisso More installation scripts
labisso authored
27 exit 1
28 fi
29
f4963f9 @labisso Cleaned up install script output.
labisso authored
30 echo ""
31 echo "-----------------------------------------------------------------"
32 echo " Preparing Nimbus installation directory"
33 echo "-----------------------------------------------------------------"
34 echo ""
35 # first ensure we have a GT tarball. Most likely it has been bundled with
36 # the Nimbus installer.
37 if [ ! -f $TMPDIR/$CONTAINER_TARNAME ]; then
38 echo "Downloading service container.."
39 echo ""
40 wget -c -O $TMPDIR/$CONTAINER_TARNAME $CONTAINER_URL
41
42 if [ $? -ne 0 ]; then
43 echo ""
44 echo "Failed to download container tarball from: $CONTAINER_URL"
45 echo ""
46 echo "If you are unable to access the Internet, please retrieve this"
47 echo "file by other means and place it in $TMPDIR/."
48 echo "Then rerun this script."
49
50 rm -f $TMPDIR/$CONTAINER_TARNAME
51
52 exit 1
53 fi
54 fi
55
326cfc5 @labisso More installation scripts
labisso authored
56 NIMBUS_HOME=$1
57
58 if [ ! -d $NIMBUS_HOME ]; then
59 PARENT_DIR=`dirname $NIMBUS_HOME`
60
61 if [ -d $PARENT_DIR ]; then
62
63 mkdir $NIMBUS_HOME
64
65 if [ $? -ne 0 ]; then
66 echo "Failed to create destination directory!"
67 exit 1
68 fi
69 else
70 echo "Parent dir of destination does not exist: $PARENT_DIR"
71 exit 1
72 fi
73 fi
74
4550b02 fixing and integrating installation scripts
BuzzTroll authored
75 echo "Installing cumulus..."
722a0f4 mo code, mo problems.
BuzzTroll authored
76 ${NIMBUS_SRC}/cumulus/cumulus-install.sh $NIMBUS_HOME/cumulus $NIMBUS_HOME/ve
4550b02 fixing and integrating installation scripts
BuzzTroll authored
77 if [ $? -ne 0 ]; then
78 echo "Failed to install cumulus"
79 exit 1
80 fi
81
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
82 echo "Deploying skeleton directory structure.."
326cfc5 @labisso More installation scripts
labisso authored
83 cp -fr $NIMBUS_SRC/home/* $NIMBUS_HOME/
84 if [ $? -ne 0 ]; then
85 echo "Failed to copy Nimbus home directory"
86 exit 1
87 fi
88
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
89 echo "Deploying web application.."
326cfc5 @labisso More installation scripts
labisso authored
90 cp -r $NIMBUS_SRC/web $NIMBUS_HOME/
91 if [ $? -ne 0 ]; then
92 echo "Failed to copy Nimbus web directory"
93 exit 1
94 fi
95
96 CONTAINER_DIR="$NIMBUS_HOME/$CONTAINER_DIRNAME"
97 if [ ! -d $CONTAINER_DIR ]; then
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
98
f4963f9 @labisso Cleaned up install script output.
labisso authored
99 echo "Installing service container.."
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
100
101 tar xzf $TMPDIR/$CONTAINER_TARNAME -C $TMPDIR
326cfc5 @labisso More installation scripts
labisso authored
102 if [ $? -ne 0 ]; then
f4963f9 @labisso Cleaned up install script output.
labisso authored
103 echo "Failed to expand container tarball: $TMPDIR/$CONTAINER_TARNAME"
104 echo "If this file is corrupted, you may delete it and rerun this script to download a new one."
326cfc5 @labisso More installation scripts
labisso authored
105 exit 1
106 fi
107
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
108 mv $TMPDIR/$CONTAINER_UNTARREDNAME $CONTAINER_DIR
326cfc5 @labisso More installation scripts
labisso authored
109 if [ $? -ne 0 ]; then
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
110 echo "Failed to move container directory to $CONTAINER_DIR"
326cfc5 @labisso More installation scripts
labisso authored
111 exit 1
112 fi
52d32a5 @labisso Set default INFO loglevel for Nimbus classes.
labisso authored
113
114 CONTAINER_LOG_PROPS="$CONTAINER_DIR/container-log4j.properties"
b479dea @timf comment to help admin adjust logging
timf authored
115 echo "" >> $CONTAINER_LOG_PROPS
116 echo "# Change the following lines from \"INFO\" to \"DEBUG\" to enable Nimbus debugging" >> $CONTAINER_LOG_PROPS
e4c0485 @timf more comments to help admin adjust logging
timf authored
117 echo "# Also see: services/etc/nimbus/workspace-service/logging.conf" >> $CONTAINER_LOG_PROPS
118 echo "# Logging changes require a container restart." >> $CONTAINER_LOG_PROPS
52d32a5 @labisso Set default INFO loglevel for Nimbus classes.
labisso authored
119 echo "log4j.category.org.nimbustools=INFO" >> $CONTAINER_LOG_PROPS
120 echo "log4j.category.org.globus.workspace=INFO" >> $CONTAINER_LOG_PROPS
121
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
122 else
123 echo "Service container already exists at $CONTAINER_DIR"
326cfc5 @labisso More installation scripts
labisso authored
124 fi
125
f4963f9 @labisso Cleaned up install script output.
labisso authored
126 echo ""
127 echo "-----------------------------------------------------------------"
128 echo " Building and installing Nimbus services"
129 echo "-----------------------------------------------------------------"
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
130
131 GLOBUS_LOCATION=$CONTAINER_DIR
132 export GLOBUS_LOCATION
133
5b452b8 @labisso Installer bugfixes and enhancements
labisso authored
134 $NIMBUS_SRC/scripts/all-build-and-install.sh
326cfc5 @labisso More installation scripts
labisso authored
135 if [ $? -ne 0 ]; then
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
136 echo "Build and install FAILED!"
326cfc5 @labisso More installation scripts
labisso authored
137 exit 1
138 fi
f4963f9 @labisso Cleaned up install script output.
labisso authored
139
140 echo ""
Something went wrong with that request. Please try again.