GEMINIAcceptanceTests/GEMINITest9.12.2012: GN-active_pkg_install-fedora.sh

File GN-active_pkg_install-fedora.sh, 3.3 KB (added by Jeanne Ohren, 12 years ago)

Matt's script from email

Line 
1#!/bin/bash
2# -----------------------------------------------------------------------------
3#
4# Copyright (c) 2010 University of Kentucky
5#
6# Permission is hereby granted, free of charge, to any person obtaining a copy
7# of this software and/or hardware specification (the "Work") to deal in the
8# Work without restriction, including without limitation the rights to use,
9# copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10# the Work, and to permit persons to whom the Work is furnished to do so,
11# subject to the following conditions:
12
13# The above copyright notice and this permission notice shall be included in
14# all copies or substantial portions of the Work.
15
16# THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21# OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS IN THE WORK.
22#
23# -----------------------------------------------------------------------------
24
25# Variable Definations
26source /usr/testbed/bin/measure-scripts/INSTALL_DEFS.sh
27
28TOUCH_BINARY="touch"
29$TOUCH_BINARY $INSTOOLS_LOG;
30chmod 776 $INSTOOLS_LOG;
31
32
33        TEMP_BASE=/tmp/GN-SETUP
34        SLICEURN=$1
35        USERURN=$2
36       
37        #$WGET_BINARY -q -P $TEMP_BASE $DOWNLOAD_PATH/$TARBALL_DIR/shadownet_public_key.tgz >>$INSTOOLS_LOG 2>&1;
38        #BINARY PATHS
39        TARBALL_DIR="tarballs"
40        PUBLIC_TGZ_DIR="public/tgz"
41        SCRIPTS_DIR="scripts"
42        PATCH_DIR="patches"
43        DB_DIR="db"
44        PATCH_BINARY="/usr/bin/patch"
45        CHKCONF_BINARY="/sbin/chkconfig"
46        SERVICE_BINARY="/sbin/service"
47        WGET_BINARY="wget"
48        MKDIR_BINARY="mkdir"
49        YUM_BINARY="yum"
50        RPM_BINARY="rpm"
51        TAR_BINARY="tar"
52        MAKE_BINARY="make"
53        CAT_BINARY="cat"
54        GEMINI_ACTIVE_PKG="gemini-active-gn-fedora-20120910test.tar.gz"
55        GEMINI_ACTIVE_URL="https://github.com/downloads/GENI-GEMINI/GEMINI/"$GEMINI_ACTIVE_PKG
56
57        # Temp Directories and Log file creations
58        $MKDIR_BINARY $TEMP_BASE
59
60
61        cd $TEMP_BASE
62        echo "Installing GN software" >>$INSTOOLS_LOG 2>&1;
63        $WGET_BINARY -q -P $TEMP_BASE $GEMINI_ACTIVE_URL >>$INSTOOLS_LOG 2>&1;
64        $TAR_BINARY -zxf $GEMINI_ACTIVE_PKG >>$INSTOOLS_LOG 2>&1;
65        echo "   Installing Shared-fed.sh"  >>$INSTOOLS_LOG 2>&1;
66        ./Shared-fed.sh >>$INSTOOLS_LOG 2>&1;
67        echo "   Installing LAMP certificate" >>$INSTOOLS_LOG 2>&1;
68        install -o root -g perfsonar -m 440 /var/emulab/boot/lampcert.pem /usr/local/etc/protogeni/ssl/
69        echo "   Running bootstrap" >>$INSTOOLS_LOG 2>&1;
70        /usr/local/etc/lamp/bootstrap.sh ${SLICEURN} ${USERURN} >>$INSTOOLS_LOG 2>&1;
71        echo "   Installing apache2-fed.sh"  >>$INSTOOLS_LOG 2>&1;
72        adduser nobody perfsonar
73        rm -rf /etc/apache2/sites-enabled/ssl
74        ./apache2-fed.sh >>$INSTOOLS_LOG 2>&1;
75        echo "   Installing perfSONAR_PS-ServiceWatcher-fed.sh"  >>$INSTOOLS_LOG 2>&1;
76        ./perfSONAR_PS-ServiceWatcher-fed.sh >>$INSTOOLS_LOG 2>&1;
77        echo "   Installing perfSONAR_PS-Toolkit-fed.sh"  >>$INSTOOLS_LOG 2>&1;
78        ./perfSONAR_PS-Toolkit-fed.sh >>$INSTOOLS_LOG 2>&1;
79        cd
80
81        # Cleanup Temp Directories and report status as ready
82        rm -rf $TEMP_BASE