Skip to content
This repository
Newer
Older
100755 168 lines (138 sloc) 4.722 kb
e633c0d0 » timf
2010-04-30 Bug 7009 - All scripts should use shebang /bin/bash
1 #!/bin/bash
326cfc53 » labisso
2010-01-31 More installation scripts
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"
c1224059 » labisso
2010-02-02 Bugfixes for installation and nimbusctl scripts.
5 CONTAINER_UNTARREDNAME="ws-core-4.0.8"
6
7 # destination directory inside $NIMBUS_HOME
326cfc53 » labisso
2010-01-31 More installation scripts
8 CONTAINER_DIRNAME="services"
9
10 NIMBUS_SRC_REL="`dirname $0`/.."
11 NIMBUS_SRC=`cd $NIMBUS_SRC_REL; pwd`
12
d0f89f2f » priteau
2010-07-01 Fix usage of missing directory in the install script
13 TMPDIR="$NIMBUS_SRC/tmp"
c1224059 » labisso
2010-02-02 Bugfixes for installation and nimbusctl scripts.
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
54cddac2 » labisso
2010-04-29 /bin/sh compatiblity
23 if [ "X$1" = "X" ]; then
906cafe4 » labisso
2010-03-09 Fixes to setup and nimbusctl scripts.
24 echo ""
25 echo "Usage: $0 destination_dir"
26 echo " You must specify the destination directory.\n"
326cfc53 » labisso
2010-01-31 More installation scripts
27 exit 1
28 fi
29
f4963f9f » labisso
2010-03-23 Cleaned up install script output.
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
326cfc53 » labisso
2010-01-31 More installation scripts
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
4550b028 » BuzzTroll
2010-05-18 fixing and integrating installation scripts
75 echo "Installing cumulus..."
722a0f4f » BuzzTroll
2010-06-25 mo code, mo problems.
76 ${NIMBUS_SRC}/cumulus/cumulus-install.sh $NIMBUS_HOME/cumulus $NIMBUS_HOME/ve
4550b028 » BuzzTroll
2010-05-18 fixing and integrating installation scripts
77 if [ $? -ne 0 ]; then
78 echo "Failed to install cumulus"
79 exit 1
80 fi
ad4f6bed » BuzzTroll
2010-07-01 moving the cumulus log to var/
81 rm -rf $NIMBUS_HOME/cumulus/log
82 ln -s $NIMBUS_HOME/var $NIMBUS_HOME/cumulus/log
4550b028 » BuzzTroll
2010-05-18 fixing and integrating installation scripts
83
c1224059 » labisso
2010-02-02 Bugfixes for installation and nimbusctl scripts.
84 echo "Deploying skeleton directory structure.."
326cfc53 » labisso
2010-01-31 More installation scripts
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
c1224059 » labisso
2010-02-02 Bugfixes for installation and nimbusctl scripts.
91 echo "Deploying web application.."
326cfc53 » labisso
2010-01-31 More installation scripts
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
c1224059 » labisso
2010-02-02 Bugfixes for installation and nimbusctl scripts.
100
f4963f9f » labisso
2010-03-23 Cleaned up install script output.
101 echo "Installing service container.."
c1224059 » labisso
2010-02-02 Bugfixes for installation and nimbusctl scripts.
102
103 tar xzf $TMPDIR/$CONTAINER_TARNAME -C $TMPDIR
326cfc53 » labisso
2010-01-31 More installation scripts
104 if [ $? -ne 0 ]; then
f4963f9f » labisso
2010-03-23 Cleaned up install script output.
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."
326cfc53 » labisso
2010-01-31 More installation scripts
107 exit 1
108 fi
109
c1224059 » labisso
2010-02-02 Bugfixes for installation and nimbusctl scripts.
110 mv $TMPDIR/$CONTAINER_UNTARREDNAME $CONTAINER_DIR
326cfc53 » labisso
2010-01-31 More installation scripts
111 if [ $? -ne 0 ]; then
c1224059 » labisso
2010-02-02 Bugfixes for installation and nimbusctl scripts.
112 echo "Failed to move container directory to $CONTAINER_DIR"
326cfc53 » labisso
2010-01-31 More installation scripts
113 exit 1
114 fi
52d32a52 » labisso
2010-04-30 Set default INFO loglevel for Nimbus classes.
115
116 CONTAINER_LOG_PROPS="$CONTAINER_DIR/container-log4j.properties"
b479dea5 » timf
2010-05-20 comment to help admin adjust logging
117 echo "" >> $CONTAINER_LOG_PROPS
118 echo "# Change the following lines from \"INFO\" to \"DEBUG\" to enable Nimbus debugging" >> $CONTAINER_LOG_PROPS
e4c04853 » timf
2010-05-20 more comments to help admin adjust logging
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
52d32a52 » labisso
2010-04-30 Set default INFO loglevel for Nimbus classes.
121 echo "log4j.category.org.nimbustools=INFO" >> $CONTAINER_LOG_PROPS
122 echo "log4j.category.org.globus.workspace=INFO" >> $CONTAINER_LOG_PROPS
123
c1224059 » labisso
2010-02-02 Bugfixes for installation and nimbusctl scripts.
124 else
125 echo "Service container already exists at $CONTAINER_DIR"
326cfc53 » labisso
2010-01-31 More installation scripts
126 fi
127
f4963f9f » labisso
2010-03-23 Cleaned up install script output.
128 echo ""
129 echo "-----------------------------------------------------------------"
130 echo " Building and installing Nimbus services"
131 echo "-----------------------------------------------------------------"
c1224059 » labisso
2010-02-02 Bugfixes for installation and nimbusctl scripts.
132
133 GLOBUS_LOCATION=$CONTAINER_DIR
134 export GLOBUS_LOCATION
135
5b452b83 » labisso
2010-02-04 Installer bugfixes and enhancements
136 $NIMBUS_SRC/scripts/all-build-and-install.sh
326cfc53 » labisso
2010-01-31 More installation scripts
137 if [ $? -ne 0 ]; then
c1224059 » labisso
2010-02-02 Bugfixes for installation and nimbusctl scripts.
138 echo "Build and install FAILED!"
326cfc53 » labisso
2010-01-31 More installation scripts
139 exit 1
140 fi
f4963f9f » labisso
2010-03-23 Cleaned up install script output.
141
fb48fffe » labisso
2010-10-11 Added nimbus-admin script which calls into java.
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
f4963f9f » labisso
2010-03-23 Cleaned up install script output.
168 echo ""
Something went wrong with that request. Please try again.