[Swift-commit] r7349 - in SwiftApps/swiftrun-demo: . 05-service-ssh
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Fri Nov 29 19:59:41 CST 2013
Author: davidk
Date: 2013-11-29 19:59:41 -0600 (Fri, 29 Nov 2013)
New Revision: 7349
Added:
SwiftApps/swiftrun-demo/05-service-ssh/
SwiftApps/swiftrun-demo/05-service-ssh/README
SwiftApps/swiftrun-demo/05-service-ssh/catsn.swift
SwiftApps/swiftrun-demo/05-service-ssh/data.txt
SwiftApps/swiftrun-demo/05-service-ssh/swift.properties
Log:
Service config example, using ssh to start workers
Added: SwiftApps/swiftrun-demo/05-service-ssh/README
===================================================================
--- SwiftApps/swiftrun-demo/05-service-ssh/README (rev 0)
+++ SwiftApps/swiftrun-demo/05-service-ssh/README 2013-11-30 01:59:41 UTC (rev 7349)
@@ -0,0 +1,43 @@
+This example shows how to start workers via ssh on bag of workstations called mcs. Here is the service definition:
+
+-----
+service.mcs {
+ jobsPerNode=4
+ jobThrottle=10
+ work=/sandbox/$USER/swiftwork
+ workers=crush thwomp
+ mode=ssh
+}
+
+sitedir.keep=true
+use.provider.staging=true
+wrapperlog.always.transfer=true
+-----
+
+This definition shows a new property called "workers" that is a list of machine names to connect to. To run:
+
+$ swift-service -start mcs
+Starting Swift service..
+Starting worker on crush
+Starting worker on thwomp
+
+Name: mcs
+PID: 17056
+Status: Running
+Service URL: http://127.0.0.1:45695
+Local URL: http://140.221.8.82:51351
+Worker script: /homes/davidk/swift-trunk/cog/modules/swift/dist/swift-svn/bin/worker.pl
+Nodes: 2
+Cores: 8
+
+$ swift -site mcs catsn.swift
+Swift trunk swift-r7344 cog-r3845
+RunID: 20131129-1957-5y72c003
+Progress: Fri, 29 Nov 2013 19:57:34-0600
+Progress: Fri, 29 Nov 2013 19:57:35-0600 Stage in:8 Submitted:68 Finished successfully:24
+Progress: Fri, 29 Nov 2013 19:57:36-0600 Stage in:1 Submitted:35 Stage out:7 Finished successfully:57
+Progress: Fri, 29 Nov 2013 19:57:37-0600 Stage in:2 Stage out:1 Finished successfully:97
+Final status:Fri, 29 Nov 2013 19:57:37-0600 Finished successfully:100
+
+$ swift-service -stop
+Stopping service mcs
Added: SwiftApps/swiftrun-demo/05-service-ssh/catsn.swift
===================================================================
--- SwiftApps/swiftrun-demo/05-service-ssh/catsn.swift (rev 0)
+++ SwiftApps/swiftrun-demo/05-service-ssh/catsn.swift 2013-11-30 01:59:41 UTC (rev 7349)
@@ -0,0 +1,13 @@
+type file;
+
+app (file o) cat (file i)
+{
+ cat @i stdout=@o;
+}
+
+file out[]<simple_mapper; location="output", prefix="catsn.",suffix=".out">;
+
+foreach j in [1:toInt(arg("n","100"))] {
+ file data <"data.txt">;
+ out[j] = cat(data);
+}
Added: SwiftApps/swiftrun-demo/05-service-ssh/data.txt
===================================================================
--- SwiftApps/swiftrun-demo/05-service-ssh/data.txt (rev 0)
+++ SwiftApps/swiftrun-demo/05-service-ssh/data.txt 2013-11-30 01:59:41 UTC (rev 7349)
@@ -0,0 +1 @@
+fdjklfjldsfjlkds
Added: SwiftApps/swiftrun-demo/05-service-ssh/swift.properties
===================================================================
--- SwiftApps/swiftrun-demo/05-service-ssh/swift.properties (rev 0)
+++ SwiftApps/swiftrun-demo/05-service-ssh/swift.properties 2013-11-30 01:59:41 UTC (rev 7349)
@@ -0,0 +1,11 @@
+service.mcs {
+ jobsPerNode=4
+ jobThrottle=10
+ work=/sandbox/$USER/swiftwork
+ workers=crush thwomp
+ mode=ssh
+}
+
+sitedir.keep=true
+use.provider.staging=true
+wrapperlog.always.transfer=true
More information about the Swift-commit
mailing list