[Swift-commit] r6733 - SwiftTutorials/ATPESC_2013-08-06/scripts

yadunandb at ci.uchicago.edu yadunandb at ci.uchicago.edu
Sun Aug 4 00:45:36 CDT 2013


Author: yadunandb
Date: 2013-08-04 00:45:35 -0500 (Sun, 04 Aug 2013)
New Revision: 6733

Added:
   SwiftTutorials/ATPESC_2013-08-06/scripts/README
Modified:
   SwiftTutorials/ATPESC_2013-08-06/scripts/start_coaster_workers.sh
Log:

Minor update. Added a README



Added: SwiftTutorials/ATPESC_2013-08-06/scripts/README
===================================================================
--- SwiftTutorials/ATPESC_2013-08-06/scripts/README	                        (rev 0)
+++ SwiftTutorials/ATPESC_2013-08-06/scripts/README	2013-08-04 05:45:35 UTC (rev 6733)
@@ -0,0 +1,15 @@
+README for start-coaster-workers.sh
+===================================
+
+start-coaster-workers.sh is a custom script to get coaster-service and workers
+started.
+
+To begin, you must have access to Tukey and Vesta systems in the ALCF. These
+systems require a cryptocard to authenticate an ssh session. Next, run:
+-----
+$ ./start-coaster-workers.sh
+-----
+When prompted for the password, enter the password for vesta.
+Once the script completes, a  sites.xml file would be generated that could be
+used by swift to connect to the active coaster-service and submit jobs to the
+worker on Vesta.

Modified: SwiftTutorials/ATPESC_2013-08-06/scripts/start_coaster_workers.sh
===================================================================
--- SwiftTutorials/ATPESC_2013-08-06/scripts/start_coaster_workers.sh	2013-08-03 22:59:23 UTC (rev 6732)
+++ SwiftTutorials/ATPESC_2013-08-06/scripts/start_coaster_workers.sh	2013-08-04 05:45:35 UTC (rev 6733)
@@ -10,29 +10,28 @@
 
 LPORT_F=local_port
 SPORT_F=service_port
+LOCALSYS=login1.tukey.pub.alcf.anl.gov
+REMOTESYS=vestalac1.pub.alcf.anl.gov
 
 # -local is not working properly
 # TODO: Check if this is a reproducible bug.
 # removing -local fixes the problem
 coaster-service -passive -nosec -localportfile $LPORT_F -portfile $SPORT_F > coaster-log 2>&1 &
-
-echo "Starting a reverse tunnel ...in 5 seconds"
-sleep 5
+echo "Waiting for coaster-service to start ...(3 seconds)"
+sleep 3
 LOCAL_PORT=$(cat $LPORT_F)
 SERV_PORT=$(cat $SPORT_F)
 
-#reverse tunnel
-ssh -f -n -N vestalac1.pub.alcf.anl.gov  \
-    -R $LOCAL_PORT:login1.tukey.pub.alcf.anl.gov:$LOCAL_PORT
+ 
+# Start a reverse tunnel on the remote system connecting the
+# the LOCAL_PORT on the LOCALSYS to that on the REMOTESYS.
+ssh -f -n -N $REMOTESYS -R $LOCAL_PORT:$LOCALSYS:$LOCAL_PORT
 
-WORKER_STRING="./worker.pl http://localhost:$LOCAL_PORT 1 ."
-echo "Worker string : $WORKER_STRING"
+#Start a worker on the remote system
+WORKER_STRING="./worker.pl http://localhost:$LOCAL_PORT 1 . &"
+ssh -f $REMOTESYS $WORKER_STRING
 
-echo "ssh -f vestalac1.pub.alcf.anl.gov ./worker.pl http://localhost:$LOCAL_PORT 1 . &"
-
-ssh -f vestalac1.pub.alcf.anl.gov \
-    "./worker.pl http://localhost:$LOCAL_PORT 1 . &"
-
+# Generate the sites.xml file
 cat <<EOF > tmp
 <config>
   <pool handle="persistent-coasters">
@@ -49,9 +48,13 @@
 </config>
 EOF
 
-cp sites.xml sites.xml.bak
+if [ -f "sites.xml" ];then
+    cp sites.xml sites.xml.bak
+fi;
 mv tmp sites.xml
 
+echo "Done!"
+
 exit 0;
 
 




More information about the Swift-commit mailing list