Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Installer bugfixes and enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
labisso committed Feb 4, 2010
1 parent effe6ed commit 5b452b8
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 22 deletions.
4 changes: 1 addition & 3 deletions bin/create-nimbus-home.sh
Expand Up @@ -95,10 +95,8 @@ echo "Building and installing Nimbus to service container.."
GLOBUS_LOCATION=$CONTAINER_DIR
export GLOBUS_LOCATION

#$NIMBUS_SRC/scripts/all-build-and-install.sh
$NIMBUS_SRC/scripts/all-build-and-install.sh
if [ $? -ne 0 ]; then
echo "Build and install FAILED!"
exit 1
fi

echo "OK, successfully deployed to $NIMBUS_HOME!"
64 changes: 64 additions & 0 deletions bin/install.sh
@@ -0,0 +1,64 @@
#!/bin/sh

FORCE_FRESH_INSTALL="yes"

NIMBUS_SRC_REL="`dirname $0`/.."
NIMBUS_SRC=`cd $NIMBUS_SRC_REL; pwd`

if [ "X$1" == "X" ]; then
echo "\nUsage: $0 destination_dir"
echo "\tYou must specify the destination directory.\n"
exit 1
fi

NIMBUS_HOME=$1

if [ -d $NIMBUS_HOME ] && [ "$(ls -A $NIMBUS_HOME)" ]; then
if [ $FORCE_FRESH_INSTALL == "yes" ]; then
echo ""
echo "The destination directory '$NIMBUS_HOME' exists and is not empty."
echo "It is not recommended to reinstall Nimbus into an existing install."
echo ""
echo "If you are making changes to the services, you can build and install those directly:"
echo "\texport GLOBUS_LOCATION=$NIMBUS_HOME/services"
echo "\tscripts/all-build-and-install.sh"
echo ""
echo "If you know what you are doing and want to reinstall, edit this script:"
echo "\t$0"
echo "and change FORCE_FRESH_INSTALL to \"no\""
echo ""

exit 1
fi
fi

$NIMBUS_SRC/bin/create-nimbus-home.sh $NIMBUS_HOME

if [ $? -ne 0 ]; then
echo "Nimbus home creation failed!"
exit 1
fi

CONFIG_SCRIPT="$NIMBUS_HOME/bin/nimbus-configure"

if [ ! -f $CONFIG_SCRIPT ]; then
echo "Configuration script could not be found: $CONFIG_SCRIPT"
exit 1
fi

$CONFIG_SCRIPT

if [ $? -ne 0 ]; then
echo "Nimbus configuration script failed! You may try running it manually:"
echo "\t$CONFIG_SCRIPT"
exit 1
fi

echo ""
echo "Nimbus installation succeeded!"
echo "However, additional configuration may be necessary."
echo "Refer to the Administrator Guide for details.\n"
echo "You can now start/stop Nimbus services with the nimbusctl command. e.g:"
echo "\t$NIMBUS_HOME/bin/nimbusctl start\n"

exit 0
37 changes: 20 additions & 17 deletions home/bin/setup.sh → home/bin/nimbus-configure
@@ -1,7 +1,5 @@
#!/bin/bash

OWNER_IS_RUNNER_ASSUMPTION="yes"

PYTHON_EXE="/usr/bin/env python"

NIMBUS_HOME_REL="`dirname $0`/.."
Expand All @@ -27,20 +25,25 @@ export PYTHONPATH

# ------------------------------------------------------------------------------

if [ "X$OWNER_IS_RUNNER_ASSUMPTION" == "Xyes" ]; then
# The following script expands the tarballs in lib/
$NIMBUS_WEBDIR/sbin/install-deps.sh $DEBUG
if [ $? -ne 0 ]; then
echo ""
echo "Dependencies are not set up properly, exiting."
exit 3
fi

$PYTHON_EXE $NIMBUS_HOME/sbin/setup.py --basedir $NIMBUS_HOME $SETUP_ARGS
if [ $? -ne 0 ]; then
echo ""
echo "Nimbus is not set up properly, exiting."
exit 2
fi
# The following script expands the tarballs in lib/
$NIMBUS_WEBDIR/sbin/install-deps.sh $DEBUG
if [ $? -ne 0 ]; then
echo ""
echo "Dependencies are not set up properly, exiting."
exit 3
fi

$PYTHON_EXE $NIMBUS_HOME/sbin/setup.py --basedir $NIMBUS_HOME $SETUP_ARGS
if [ $? -ne 0 ]; then
echo ""
echo "Nimbus is not set up properly, exiting."
exit 2
fi

#TODO this functionality should be moved into setup.py
$NIMBUS_WEBDIR/sbin/new-conf.sh
if [ $? -ne 0 ]; then
echo ""
echo "Nimbus web is not set up properly, exiting."
exit 2
fi
5 changes: 3 additions & 2 deletions home/sbin/setup.py
Expand Up @@ -10,7 +10,7 @@
from StringIO import StringIO
import readline

from nimbusweb.setup import pathutil, javautil, checkssl, gtcontainer
from nimbusweb.setup import pathutil,javautil,checkssl,gtcontainer
from nimbusweb.setup.setuperrors import *

CONFIGSECTION = 'nimbussetup'
Expand Down Expand Up @@ -267,6 +267,7 @@ def perform_setup(self):
# some potentially interactive queries
hostname = self.hostname()

#TODO this may require interaction
checkssl.run(webdir, hostcert, hostkey, log, cadir=cadir,
hostname=hostname)

Expand All @@ -282,7 +283,7 @@ def perform_setup(self):

with open(webconfpath, 'wb') as webconffile:
webconf.write(webconffile)

if not os.path.exists(gridmap):
example_gridmap = self.resolve_path('var/gridmap.example')
import shutil
Expand Down

0 comments on commit 5b452b8

Please sign in to comment.