Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 169 lines (138 sloc) 4.722 kb
e633c0d Tim Freeman Bug 7009 - All scripts should use shebang /bin/bash
timf authored
1 #!/bin/bash
326cfc5 David LaBissoniere 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 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
5 CONTAINER_UNTARREDNAME="ws-core-4.0.8"
6
7 # destination directory inside $NIMBUS_HOME
326cfc5 David LaBissoniere 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 Pierre Riteau Fix usage of missing directory in the install script
priteau authored
13 TMPDIR="$NIMBUS_SRC/tmp"
c122405 David LaBissoniere 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 David LaBissoniere /bin/sh compatiblity
labisso authored
23 if [ "X$1" = "X" ]; then
906cafe David LaBissoniere 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 David LaBissoniere More installation scripts
labisso authored
27 exit 1
28 fi
29
f4963f9 David LaBissoniere 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 David LaBissoniere 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 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
84 echo "Deploying skeleton directory structure.."
326cfc5 David LaBissoniere 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 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
91 echo "Deploying web application.."
326cfc5 David LaBissoniere 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 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
100
f4963f9 David LaBissoniere Cleaned up install script output.
labisso authored
101 echo "Installing service container.."
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
102
103 tar xzf $TMPDIR/$CONTAINER_TARNAME -C $TMPDIR
326cfc5 David LaBissoniere More installation scripts
labisso authored
104 if [ $? -ne 0 ]; then
f4963f9 David LaBissoniere 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 David LaBissoniere More installation scripts
labisso authored
107 exit 1
108 fi
109
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
110 mv $TMPDIR/$CONTAINER_UNTARREDNAME $CONTAINER_DIR
326cfc5 David LaBissoniere More installation scripts
labisso authored
111 if [ $? -ne 0 ]; then
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
112 echo "Failed to move container directory to $CONTAINER_DIR"
326cfc5 David LaBissoniere More installation scripts
labisso authored
113 exit 1
114 fi
52d32a5 David LaBissoniere Set default INFO loglevel for Nimbus classes.
labisso authored
115
116 CONTAINER_LOG_PROPS="$CONTAINER_DIR/container-log4j.properties"
b479dea Tim Freeman 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 Tim Freeman 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 David LaBissoniere 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 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
124 else
125 echo "Service container already exists at $CONTAINER_DIR"
326cfc5 David LaBissoniere More installation scripts
labisso authored
126 fi
127
f4963f9 David LaBissoniere Cleaned up install script output.
labisso authored
128 echo ""
129 echo "-----------------------------------------------------------------"
130 echo " Building and installing Nimbus services"
131 echo "-----------------------------------------------------------------"
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
132
133 GLOBUS_LOCATION=$CONTAINER_DIR
134 export GLOBUS_LOCATION
135
5b452b8 David LaBissoniere Installer bugfixes and enhancements
labisso authored
136 $NIMBUS_SRC/scripts/all-build-and-install.sh
326cfc5 David LaBissoniere More installation scripts
labisso authored
137 if [ $? -ne 0 ]; then
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
138 echo "Build and install FAILED!"
326cfc5 David LaBissoniere More installation scripts
labisso authored
139 exit 1
140 fi
f4963f9 David LaBissoniere Cleaned up install script output.
labisso authored
141
fb48fff David LaBissoniere Added nimbus-admin script which calls into java.
labisso authored
142 # add in native libraries
143 LIBNATIVE="$CONTAINER_DIR/lib-native"
144 mkdir -p $LIBNATIVE
145 if [ $? -ne 0 ]; then
146 echo "Creation of $LIBNATIVE directory failed"
147 exit 1
148 fi
149 cp $NIMBUS_SRC/lib/native/* $LIBNATIVE/
150 if [ $? -ne 0 ]; then
151 echo "Deployment of native libs failed"
152 exit 1
153 fi
154
155 # create domain sockets privileged directory
156 PRIVILEGED="$NIMBUS_HOME/var/run/privileged"
157 mkdir -p $PRIVILEGED
158 if [ $? -ne 0 ]; then
159 echo "Creation of privileged domain sockets directory failed: $PRIVILEGED"
160 exit 1
161 fi
162 chmod 700 $PRIVILEGED
163 if [ $? -ne 0 ]; then
164 echo "chmod of privileged domain sockets directory failed: $PRIVILEGED"
165 exit 1
166 fi
167
f4963f9 David LaBissoniere Cleaned up install script output.
labisso authored
168 echo ""
Something went wrong with that request. Please try again.