Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 170 lines (139 sloc) 4.839 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"
44df5d2 John Bresnahan checkout from github
buzztroll authored
4 CONTAINER_URL="https://github.com/downloads/nimbusproject/nimbus/ws-core-4.0.8-bin.tar.gz"
326cfc5 David LaBissoniere More installation scripts
labisso authored
5 CONTAINER_TARNAME="ws-core-4.0.8-bin.tar.gz"
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
6 CONTAINER_UNTARREDNAME="ws-core-4.0.8"
7
8 # destination directory inside $NIMBUS_HOME
326cfc5 David LaBissoniere More installation scripts
labisso authored
9 CONTAINER_DIRNAME="services"
10
11 NIMBUS_SRC_REL="`dirname $0`/.."
12 NIMBUS_SRC=`cd $NIMBUS_SRC_REL; pwd`
13
d0f89f2 Pierre Riteau Fix usage of missing directory in the install script
priteau authored
14 TMPDIR="$NIMBUS_SRC/tmp"
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
15
16 if [ ! -d $TMPDIR ]; then
17 mkdir $TMPDIR
18 if [ $? -ne 0 ]; then
19 echo "Failed to create temp directory: $TMPDIR"
20 exit 1
21 fi
22 fi
23
54cddac David LaBissoniere /bin/sh compatiblity
labisso authored
24 if [ "X$1" = "X" ]; then
906cafe David LaBissoniere Fixes to setup and nimbusctl scripts.
labisso authored
25 echo ""
26 echo "Usage: $0 destination_dir"
27 echo " You must specify the destination directory.\n"
326cfc5 David LaBissoniere More installation scripts
labisso authored
28 exit 1
29 fi
30
f4963f9 David LaBissoniere Cleaned up install script output.
labisso authored
31 echo ""
32 echo "-----------------------------------------------------------------"
33 echo " Preparing Nimbus installation directory"
34 echo "-----------------------------------------------------------------"
35 echo ""
36 # first ensure we have a GT tarball. Most likely it has been bundled with
37 # the Nimbus installer.
38 if [ ! -f $TMPDIR/$CONTAINER_TARNAME ]; then
39 echo "Downloading service container.."
40 echo ""
44df5d2 John Bresnahan checkout from github
buzztroll authored
41 wget --no-check-certificate -c -O $TMPDIR/$CONTAINER_TARNAME $CONTAINER_URL
f4963f9 David LaBissoniere Cleaned up install script output.
labisso authored
42
43 if [ $? -ne 0 ]; then
44 echo ""
45 echo "Failed to download container tarball from: $CONTAINER_URL"
46 echo ""
47 echo "If you are unable to access the Internet, please retrieve this"
48 echo "file by other means and place it in $TMPDIR/."
49 echo "Then rerun this script."
50
51 rm -f $TMPDIR/$CONTAINER_TARNAME
52
53 exit 1
54 fi
55 fi
56
326cfc5 David LaBissoniere More installation scripts
labisso authored
57 NIMBUS_HOME=$1
58
59 if [ ! -d $NIMBUS_HOME ]; then
60 PARENT_DIR=`dirname $NIMBUS_HOME`
61
62 if [ -d $PARENT_DIR ]; then
63
64 mkdir $NIMBUS_HOME
65
66 if [ $? -ne 0 ]; then
67 echo "Failed to create destination directory!"
68 exit 1
69 fi
70 else
71 echo "Parent dir of destination does not exist: $PARENT_DIR"
72 exit 1
73 fi
74 fi
75
4550b02 fixing and integrating installation scripts
BuzzTroll authored
76 echo "Installing cumulus..."
722a0f4 mo code, mo problems.
BuzzTroll authored
77 ${NIMBUS_SRC}/cumulus/cumulus-install.sh $NIMBUS_HOME/cumulus $NIMBUS_HOME/ve
4550b02 fixing and integrating installation scripts
BuzzTroll authored
78 if [ $? -ne 0 ]; then
79 echo "Failed to install cumulus"
80 exit 1
81 fi
ad4f6be moving the cumulus log to var/
BuzzTroll authored
82 rm -rf $NIMBUS_HOME/cumulus/log
83 ln -s $NIMBUS_HOME/var $NIMBUS_HOME/cumulus/log
4550b02 fixing and integrating installation scripts
BuzzTroll authored
84
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
85 echo "Deploying skeleton directory structure.."
326cfc5 David LaBissoniere More installation scripts
labisso authored
86 cp -fr $NIMBUS_SRC/home/* $NIMBUS_HOME/
87 if [ $? -ne 0 ]; then
88 echo "Failed to copy Nimbus home directory"
89 exit 1
90 fi
91
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
92 echo "Deploying web application.."
326cfc5 David LaBissoniere More installation scripts
labisso authored
93 cp -r $NIMBUS_SRC/web $NIMBUS_HOME/
94 if [ $? -ne 0 ]; then
95 echo "Failed to copy Nimbus web directory"
96 exit 1
97 fi
98
99 CONTAINER_DIR="$NIMBUS_HOME/$CONTAINER_DIRNAME"
100 if [ ! -d $CONTAINER_DIR ]; then
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
101
f4963f9 David LaBissoniere Cleaned up install script output.
labisso authored
102 echo "Installing service container.."
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
103
104 tar xzf $TMPDIR/$CONTAINER_TARNAME -C $TMPDIR
326cfc5 David LaBissoniere More installation scripts
labisso authored
105 if [ $? -ne 0 ]; then
f4963f9 David LaBissoniere Cleaned up install script output.
labisso authored
106 echo "Failed to expand container tarball: $TMPDIR/$CONTAINER_TARNAME"
107 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
108 exit 1
109 fi
110
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
111 mv $TMPDIR/$CONTAINER_UNTARREDNAME $CONTAINER_DIR
326cfc5 David LaBissoniere More installation scripts
labisso authored
112 if [ $? -ne 0 ]; then
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
113 echo "Failed to move container directory to $CONTAINER_DIR"
326cfc5 David LaBissoniere More installation scripts
labisso authored
114 exit 1
115 fi
52d32a5 David LaBissoniere Set default INFO loglevel for Nimbus classes.
labisso authored
116
117 CONTAINER_LOG_PROPS="$CONTAINER_DIR/container-log4j.properties"
b479dea Tim Freeman comment to help admin adjust logging
timf authored
118 echo "" >> $CONTAINER_LOG_PROPS
119 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
120 echo "# Also see: services/etc/nimbus/workspace-service/logging.conf" >> $CONTAINER_LOG_PROPS
121 echo "# Logging changes require a container restart." >> $CONTAINER_LOG_PROPS
52d32a5 David LaBissoniere Set default INFO loglevel for Nimbus classes.
labisso authored
122 echo "log4j.category.org.nimbustools=INFO" >> $CONTAINER_LOG_PROPS
123 echo "log4j.category.org.globus.workspace=INFO" >> $CONTAINER_LOG_PROPS
124
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
125 else
126 echo "Service container already exists at $CONTAINER_DIR"
326cfc5 David LaBissoniere More installation scripts
labisso authored
127 fi
128
f4963f9 David LaBissoniere Cleaned up install script output.
labisso authored
129 echo ""
130 echo "-----------------------------------------------------------------"
131 echo " Building and installing Nimbus services"
132 echo "-----------------------------------------------------------------"
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
133
134 GLOBUS_LOCATION=$CONTAINER_DIR
135 export GLOBUS_LOCATION
136
62dcf64 Tim Freeman Moved these more esoteric scripts to their own subdirectory
timf authored
137 $NIMBUS_SRC/scripts/gt/all-build-and-install.sh
326cfc5 David LaBissoniere More installation scripts
labisso authored
138 if [ $? -ne 0 ]; then
c122405 David LaBissoniere Bugfixes for installation and nimbusctl scripts.
labisso authored
139 echo "Build and install FAILED!"
326cfc5 David LaBissoniere More installation scripts
labisso authored
140 exit 1
141 fi
f4963f9 David LaBissoniere Cleaned up install script output.
labisso authored
142
fb48fff David LaBissoniere Added nimbus-admin script which calls into java.
labisso authored
143 # add in native libraries
144 LIBNATIVE="$CONTAINER_DIR/lib-native"
145 mkdir -p $LIBNATIVE
146 if [ $? -ne 0 ]; then
147 echo "Creation of $LIBNATIVE directory failed"
148 exit 1
149 fi
150 cp $NIMBUS_SRC/lib/native/* $LIBNATIVE/
151 if [ $? -ne 0 ]; then
152 echo "Deployment of native libs failed"
153 exit 1
154 fi
155
156 # create domain sockets privileged directory
157 PRIVILEGED="$NIMBUS_HOME/var/run/privileged"
158 mkdir -p $PRIVILEGED
159 if [ $? -ne 0 ]; then
160 echo "Creation of privileged domain sockets directory failed: $PRIVILEGED"
161 exit 1
162 fi
163 chmod 700 $PRIVILEGED
164 if [ $? -ne 0 ]; then
165 echo "chmod of privileged domain sockets directory failed: $PRIVILEGED"
166 exit 1
167 fi
168
f4963f9 David LaBissoniere Cleaned up install script output.
labisso authored
169 echo ""
Something went wrong with that request. Please try again.