[Swift-commit] r5429 - in branches/release-0.93: bin docs/siteguide
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Fri Dec 16 15:21:14 CST 2011
Author: davidk
Date: 2011-12-16 15:21:14 -0600 (Fri, 16 Dec 2011)
New Revision: 5429
Modified:
branches/release-0.93/bin/start-coaster-service
branches/release-0.93/bin/stop-coaster-service
branches/release-0.93/docs/siteguide/siteguide.txt
Log:
Make futuregrid easier to use by only having to edit one file
Modified: branches/release-0.93/bin/start-coaster-service
===================================================================
--- branches/release-0.93/bin/start-coaster-service 2011-12-16 19:51:37 UTC (rev 5428)
+++ branches/release-0.93/bin/start-coaster-service 2011-12-16 21:21:14 UTC (rev 5429)
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/bin/bash
# crash: Report a problem and exit
crash()
@@ -11,36 +11,64 @@
# Start futuregrid workers
start-workers-futuregrid()
{
+ # Setup environment
PORT=$1
EXECUTION_URL=http://localhost:$PORT
+ export EC2_ACCESS_KEY=$FUTUREGRID_IAAS_ACCESS_KEY
+ export EC2_SECRET_KEY=$FUTUREGRID_IAAS_SECRET_KEY
+ export FUTUREGRID_SIERRA_NODES=$FUTUREGRID_NODES
- if [ ! -d "$SWIFTVMBOOT_DIR" ] || [ ! -x "$SWIFTVMBOOT_DIR/bin/bootit.sh" ]; then
+ # Check that SWIFTVMBOOT_DIR looks ok
+ if [ ! -d "$SWIFTVMBOOT_DIR" ] || [ ! -x "$SWIFTVMBOOT_DIR/futuregrid/bin/bootit.sh" ]; then
crash "SWIFTVMBOOT_DIR incorrectly defined in coaster-service.conf"
fi
+ # Install ve
+ if [ ! -d "$SWIFTVMBOOT_DIR/futuregrid/ve" ]; then
+ echo Setting up environment
+ python $SWIFTVMBOOT_DIR/futuregrid/bin/virtualenv.py $SWIFTVMBOOT_DIR/futuregrid/ve
+ if [ $? -ne 0 ]; then
+ echo "Failed to created the needed python virtual environment"
+ exit 1
+ fi
+ fi
+
+ # Install cloudinitd
+ source $SWIFTVMBOOT_DIR/futuregrid/ve/bin/activate
+ easy_install cloudinitd
+ if [ $? -ne 0 ]; then
+ echo "Failed to install cloudinitd"
+ exit 1
+ fi
+
+ # Register key
+ echo "Registering the key names in all the clouds"
+ python $SWIFTVMBOOT_DIR/futuregrid/bin/register_key.py $SWIFTVMBOOT_DIR/futuregrid/hosts.txt
+ if [ $? -ne 0 ]; then
+ echo "Failed to register the key names"
+ exit 1
+ fi
+
+ # Start virtual machines
echo Starting virtual machines.. please wait
- $SWIFTVMBOOT_DIR/bin/bootit.sh | tee -a bootit.log
- SWIFTVMBOOT_OUTPUT=$SWIFTVMBOOT_DIR/output.json
-
+ $SWIFTVMBOOT_DIR/futuregrid/bin/bootit.sh | tee -a bootit.log
+ SWIFTVMBOOT_OUTPUT=$SWIFTVMBOOT_DIR/futuregrid/output.json
if [ ! -f "$SWIFTVMBOOT_OUTPUT" ]; then
crash "Error: Swift VM output file $SWIFTVMBOOT_OUTPUT does not exist!"
fi
SWIFTVM_INSTANCE=`grep "Starting up run" bootit.log |awk '{print $4}'`
- echo $SWIFTVM_INSTANCE >> $HOME/.swift/.swiftvm_instance
-
+ echo $SWIFTVM_INSTANCE >> $HOME/.swift/.swiftvm_instances
WORKER_HOSTS=`grep hostname $SWIFTVMBOOT_OUTPUT |awk '{print $2}'|sed 's/\"//g;s/,//g;s/null//g'`
# Start worker script
for MACHINE in $WORKER_HOSTS
do
- # Enable ssh tunneling if needed
if [ "$SSH_TUNNELING" == "yes" ]; then
ssh -R *:$PORT:localhost:$PORT $WORKER_USERNAME@$MACHINE sleep 999 &
echo $! >> $PID_FILE
fi
-
- # Copy and start worker script
+
scp $SWIFT_BIN/$WORKER $WORKER_USERNAME@$MACHINE:$WORKER_LOCATION > /dev/null 2>&1
echo "Starting worker on $MACHINE"
ssh $WORKER_USERNAME@$MACHINE "$WORKER_LOCATION/$WORKER $EXECUTION_URL $MACHINE $LOG_DIR" &
Modified: branches/release-0.93/bin/stop-coaster-service
===================================================================
--- branches/release-0.93/bin/stop-coaster-service 2011-12-16 19:51:37 UTC (rev 5428)
+++ branches/release-0.93/bin/stop-coaster-service 2011-12-16 21:21:14 UTC (rev 5429)
@@ -34,7 +34,7 @@
if [ "$WORKER_MODE" == "futuregrid" ] && [ -f "$SWIFTVM_INSTANCES" ]; then
for INSTANCE in `cat $SWIFTVM_INSTANCES`
do
- $SWIFTVMBOOT_DIR/ve/bin/cloudinitd terminate $INSTANCE
+ $SWIFTVMBOOT_DIR/futuregrid/ve/bin/cloudinitd terminate $INSTANCE
done
rm $SWIFTVM_INSTANCES > /dev/null 2>&1
fi
Modified: branches/release-0.93/docs/siteguide/siteguide.txt
===================================================================
--- branches/release-0.93/docs/siteguide/siteguide.txt 2011-12-16 19:51:37 UTC (rev 5428)
+++ branches/release-0.93/docs/siteguide/siteguide.txt 2011-12-16 21:21:14 UTC (rev 5429)
@@ -16,4 +16,6 @@
include::futuregrid[]
+include::mcs[]
+
include::intrepid[]
More information about the Swift-commit
mailing list