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