[Swift-commit] r4220 - usertools/persistent-coasters
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Wed Mar 23 13:52:27 CDT 2011
Author: wozniak
Date: 2011-03-23 13:52:27 -0500 (Wed, 23 Mar 2011)
New Revision: 4220
Modified:
usertools/persistent-coasters/settings.sh
usertools/persistent-coasters/setup.sh
usertools/persistent-coasters/start-service.zsh
usertools/persistent-coasters/workers-cobalt.zsh
Log:
Extra notes from discussion
Modified: usertools/persistent-coasters/settings.sh
===================================================================
--- usertools/persistent-coasters/settings.sh 2011-03-23 17:57:17 UTC (rev 4219)
+++ usertools/persistent-coasters/settings.sh 2011-03-23 18:52:27 UTC (rev 4220)
@@ -1,13 +1,15 @@
# Keep all interesting settings in one place
+# User should modify this to fit environment
-# Where to place/launch worker.pl on the remote machine
+# Where to place/launch worker.pl on the remote machine for sites.xml
export WORKER_WORK=/home/${USER}/work
# How to launch workers- local or ssh
-export WORKER_MODE=ssh
+export WORKER_MODE=local
+# ssh
-# Worker logging setting passed to worker.pl
+# Worker logging setting passed to worker.pl for sites.xml
export WORKER_LOGGING=INFO
# Worker host names for ssh
Modified: usertools/persistent-coasters/setup.sh
===================================================================
--- usertools/persistent-coasters/setup.sh 2011-03-23 17:57:17 UTC (rev 4219)
+++ usertools/persistent-coasters/setup.sh 2011-03-23 18:52:27 UTC (rev 4220)
@@ -1,7 +1,6 @@
-# Obtain settings from settings.sh,
-# generate sites file
-# Should extend to generate tc as well
+# Generates sites file
+# TODO: extend to generate tc as well
source ${TOOLS}/coasters-setup.sh
Modified: usertools/persistent-coasters/start-service.zsh
===================================================================
--- usertools/persistent-coasters/start-service.zsh 2011-03-23 17:57:17 UTC (rev 4219)
+++ usertools/persistent-coasters/start-service.zsh 2011-03-23 18:52:27 UTC (rev 4220)
@@ -1,21 +1,23 @@
#!/bin/zsh
+# User should have already sourced settings.sh
+
# If you get "Could not get coasters service" the
# service may already be running on SERVICE_PORT
# Process management is incomplete here, check for
# processes with ps
+# Setup paths, get helper functions
PC=$( cd $( dirname $0 ) ; /bin/pwd )
TOOLS=${PC} # In the future this might be ${SWIFT_HOME}/tools
source ${TOOLS}/helpers.zsh
[[ $? != 0 ]] && print "Could not load helpers.zsh!" && exit 1
-
[[ ${SWIFT} == "" ]] && SWIFT=$( which swift )
SWIFT_BIN=$( dirname ${SWIFT} )
-COASTER_RESOURCES=${SWIFT_BIN}/../../../../provider-coaster/resources
-WORKER=${COASTER_RESOURCES}/worker.pl
+WORKER=${SWIFT_BIN}/worker.pl
+# This is an arbitrary port number
export SERVICE_PORT=10985
LOGDIR=logs
@@ -24,12 +26,16 @@
SWIFT_OUT=${LOGDIR}/swift.out
+# Get the function start-workers() from somewhere
if [[ ${WORKER_MODE} == "local" ]]
then
source workers-local.zsh
elif [[ ${WORKER_MODE} == "ssh" ]]
then
source workers-ssh.zsh
+elif [[ ${WORKER_MODE} == "cobalt" ]]
+then
+ source workers-cobalt.zsh
else
print "Unknown WORKER_MODE: ${WORKER_MODE}"
false
Modified: usertools/persistent-coasters/workers-cobalt.zsh
===================================================================
--- usertools/persistent-coasters/workers-cobalt.zsh 2011-03-23 17:57:17 UTC (rev 4219)
+++ usertools/persistent-coasters/workers-cobalt.zsh 2011-03-23 18:52:27 UTC (rev 4220)
@@ -1,6 +1,7 @@
# Source this to get start_workers() for cobalt
-# This is not complete
+# This is not complete and will not work because you cannot
+# pass argument on the cqsub command line
start_workers()
{
@@ -9,6 +10,9 @@
local -Z 5 R=${RANDOM}
ID="${TIMESTAMP}.${R}"
+ # TODO: 1) make worker.sh script that calls worker.pl with args
+ # 2) cqsub that worker.sh
+
cqsub -q ${QUEUE} \
-k zeptoos \
-t ${MAXTIME} \ # minutes
More information about the Swift-commit
mailing list