Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 143 lines (114 sloc) 4.069 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
ad4f6be moving the cumulus log to var/
BuzzTroll authored
81 rm -rf $NIMBUS_HOME/cumulus/log
82 ln -s $NIMBUS_HOME/var $NIMBUS_HOME/cumulus/log
4550b02 fixing and integrating installation scripts
BuzzTroll authored
83
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
84 echo "Deploying skeleton directory structure.."
326cfc5 @labisso More installation scripts
labisso authored
85 cp -fr $NIMBUS_SRC/home/* $NIMBUS_HOME/
86 if [ $? -ne 0 ]; then
87 echo "Failed to copy Nimbus home directory"
88 exit 1
89 fi
90
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
91 echo "Deploying web application.."
326cfc5 @labisso More installation scripts
labisso authored
92 cp -r $NIMBUS_SRC/web $NIMBUS_HOME/
93 if [ $? -ne 0 ]; then
94 echo "Failed to copy Nimbus web directory"
95 exit 1
96 fi
97
98 CONTAINER_DIR="$NIMBUS_HOME/$CONTAINER_DIRNAME"
99 if [ ! -d $CONTAINER_DIR ]; then
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
100
f4963f9 @labisso Cleaned up install script output.
labisso authored
101 echo "Installing service container.."
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
102
103 tar xzf $TMPDIR/$CONTAINER_TARNAME -C $TMPDIR
326cfc5 @labisso More installation scripts
labisso authored
104 if [ $? -ne 0 ]; then
f4963f9 @labisso Cleaned up install script output.
labisso authored
105 echo "Failed to expand container tarball: $TMPDIR/$CONTAINER_TARNAME"
106 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
107 exit 1
108 fi
109
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
110 mv $TMPDIR/$CONTAINER_UNTARREDNAME $CONTAINER_DIR
326cfc5 @labisso More installation scripts
labisso authored
111 if [ $? -ne 0 ]; then
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
112 echo "Failed to move container directory to $CONTAINER_DIR"
326cfc5 @labisso More installation scripts
labisso authored
113 exit 1
114 fi
52d32a5 @labisso Set default INFO loglevel for Nimbus classes.
labisso authored
115
116 CONTAINER_LOG_PROPS="$CONTAINER_DIR/container-log4j.properties"
b479dea @timf comment to help admin adjust logging
timf authored
117 echo "" >> $CONTAINER_LOG_PROPS
118 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
119 echo "# Also see: services/etc/nimbus/workspace-service/logging.conf" >> $CONTAINER_LOG_PROPS
120 echo "# Logging changes require a container restart." >> $CONTAINER_LOG_PROPS
52d32a5 @labisso Set default INFO loglevel for Nimbus classes.
labisso authored
121 echo "log4j.category.org.nimbustools=INFO" >> $CONTAINER_LOG_PROPS
122 echo "log4j.category.org.globus.workspace=INFO" >> $CONTAINER_LOG_PROPS
123
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
124 else
125 echo "Service container already exists at $CONTAINER_DIR"
326cfc5 @labisso More installation scripts
labisso authored
126 fi
127
f4963f9 @labisso Cleaned up install script output.
labisso authored
128 echo ""
129 echo "-----------------------------------------------------------------"
130 echo " Building and installing Nimbus services"
131 echo "-----------------------------------------------------------------"
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
132
133 GLOBUS_LOCATION=$CONTAINER_DIR
134 export GLOBUS_LOCATION
135
5b452b8 @labisso Installer bugfixes and enhancements
labisso authored
136 $NIMBUS_SRC/scripts/all-build-and-install.sh
326cfc5 @labisso More installation scripts
labisso authored
137 if [ $? -ne 0 ]; then
c122405 @labisso Bugfixes for installation and nimbusctl scripts.
labisso authored
138 echo "Build and install FAILED!"
326cfc5 @labisso More installation scripts
labisso authored
139 exit 1
140 fi
f4963f9 @labisso Cleaned up install script output.
labisso authored
141
142 echo ""
Something went wrong with that request. Please try again.