[Swift-commit] r4534 - in trunk: bin etc
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Fri May 27 12:33:03 CDT 2011
Author: davidk
Date: 2011-05-27 12:33:03 -0500 (Fri, 27 May 2011)
New Revision: 4534
Modified:
trunk/bin/gensites
trunk/bin/start-coaster-service
trunk/etc/coaster-service.conf
Log:
Updated start-coaster-service to start workers locally and with cobalt
Modified: trunk/bin/gensites
===================================================================
--- trunk/bin/gensites 2011-05-27 17:26:44 UTC (rev 4533)
+++ trunk/bin/gensites 2011-05-27 17:33:03 UTC (rev 4534)
@@ -144,7 +144,7 @@
fi
# Parse values into variables for later sed processing
-WORK=`pwd`"/work"
+#WORK=`pwd`"/work"
while read line
do
case "$line" in
@@ -204,7 +204,7 @@
echo "s/_N_MAX_/${N_MAX}/"
echo "s/_SLOTS_/${SLOTS}/"
echo "s/_MAXTIME_/${MAXTIME}/"
- echo "s/_EXECUTION_URL_/${EXECUTION_URL}/"
+ echo "s at _EXECUTION_URL_@${EXECUTION_URL}@"
echo "s at _SERVICE_COASTERS_@${SERVICE_COASTERS:-NO_URL_GIVEN}@"
echo "s at _SERVICE_PORT_@${SERVICE_PORT:-NO_PORT_GIVEN}@"
} > $SEDFILE
Modified: trunk/bin/start-coaster-service
===================================================================
--- trunk/bin/start-coaster-service 2011-05-27 17:26:44 UTC (rev 4533)
+++ trunk/bin/start-coaster-service 2011-05-27 17:33:03 UTC (rev 4534)
@@ -29,13 +29,37 @@
# Start local workers
start-workers-local()
{
- echo foo
+ PORT=$1
+ EXECUTION_URL=http://$IPADDR:$PORT
+ if [ -z "$PORT" ]; then
+ crash "start-workers-local: Port number not specified, giving up"
+ fi
+ echo Starting worker on local machine
+ $WORKER $EXECUTION_URL LOCAL $LOG_DIR &
+ echo $! >> $PID_FILE
+ return 0
}
# Start cobalt workers
start-workers-cobalt()
{
- echo foo
+ PORT=$1
+ EXECUTION_URL=http://$IPADDR:$PORT
+ local TIMESTAMP=$(date "+%Y.%m%d.%H%M%S")
+ local -Z 5 R=${RANDOM}
+ ID="${TIMESTAMP}.${R}"
+ echo cqsub -q ${QUEUE} \
+ -k zeptoos \
+ -t ${MAXTIME} \ # minutes
+ -n ${NODES} \
+ --cwd ${LOGDIR} \
+ -E ${LOGDIR}/cobalt.${$}.stderr \
+ -o ${LOGDIR}/cobalt.${$}.stdout \
+ -e "WORKER_LOGGING_LEVEL=DEBUG:ZOID_ENABLE_NAT=true" \
+ $WORKER $EXECUTION_URL $ID $LOG_DIR
+
+ echo $! >> $PID_FILE
+ return 0
}
PID_FILE=".coaster-service-pids"
@@ -153,7 +177,6 @@
esac
# Generate sites.xml
-export EXECUTION_URL="http:\/\/$IPADDR:$SERVICE_PORT"
+export EXECUTION_URL="http://$IPADDR:$SERVICE_PORT"
echo Generating sites.xml..
gensites persistent-coasters -p $CONFIG_FILE > $RUN_DIR/sites.xml
-
Modified: trunk/etc/coaster-service.conf
===================================================================
--- trunk/etc/coaster-service.conf 2011-05-27 17:26:44 UTC (rev 4533)
+++ trunk/etc/coaster-service.conf 2011-05-27 17:33:03 UTC (rev 4534)
@@ -27,7 +27,7 @@
export IPADDR=
# Below are various settings to give information about how to create sites.xml
-export work=$HOME/work
-export queue=prod-devel
-export maxtime=20
-export nodes=64
+export WORK=$HOME/work
+export QUEUE=prod-devel
+export MAXTIME=20
+export NODE=64
More information about the Swift-commit
mailing list