mobilize-ssh 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/lib/mobilize-ssh/handlers/ssh.rb +3 -4
- data/lib/mobilize-ssh/version.rb +1 -1
- data/mobilize-ssh.gemspec +1 -1
- data/test/ssh_job_rows.yml +2 -2
- metadata +5 -5
data/README.md
CHANGED
@@ -81,7 +81,7 @@ The Ssh configuration consists of:
|
|
81
81
|
over to the nodes. They will be deleted afterwards, unless the job
|
82
82
|
fails in mid-copy. By default this is tmp/file/.
|
83
83
|
* nodes, identified by aliases, such as `test_node`. This alias is what you should
|
84
|
-
pass into the "
|
84
|
+
pass into the "node" param over in the ssh.run task.
|
85
85
|
|
86
86
|
Each node has a host, and optionally has a gateway. If you don't need a
|
87
87
|
gateway, remove that row from the configuration file.
|
@@ -128,7 +128,7 @@ Start
|
|
128
128
|
* ssh.run `<node_alias>,<command>,*<gsheet_full_paths>`, which reads
|
129
129
|
all gsheets, copies them to a temporary folder on the selected node, and
|
130
130
|
runs the command inside that folder.
|
131
|
-
* The test uses `ssh.run "test_node", "ruby code.rb",
|
131
|
+
* The test uses `ssh.run node:"test_node", cmd:"ruby code.rb",sources:["Runner_mobilize(test)/code.rb","Runner_mobilize(test)/code.sh"]`
|
132
132
|
|
133
133
|
<a name='section_Start_Run_Test'></a>
|
134
134
|
### Run Test
|
@@ -141,11 +141,10 @@ module Mobilize
|
|
141
141
|
def Ssh.run_by_task_path(task_path)
|
142
142
|
t = Task.where(:path=>task_path).first
|
143
143
|
params = t.params
|
144
|
-
node, command = [params[
|
145
|
-
file_hash = if params[
|
146
|
-
gsheet_paths = params[2..-1] if params[2]
|
144
|
+
node, command = [params['node'],params['cmd']]
|
145
|
+
file_hash = if params['sources']
|
147
146
|
gdrive_slot = Gdrive.slot_worker_by_path(task_path)
|
148
|
-
Ssh.get_file_hash(
|
147
|
+
Ssh.get_file_hash(params['sources'],gdrive_slot)
|
149
148
|
end
|
150
149
|
Ssh.run(node,command,file_hash)
|
151
150
|
end
|
data/lib/mobilize-ssh/version.rb
CHANGED
data/mobilize-ssh.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
|
-
gem.add_runtime_dependency "mobilize-base","
|
19
|
+
gem.add_runtime_dependency "mobilize-base","1.0.7"
|
20
20
|
gem.add_runtime_dependency "net-ssh"
|
21
21
|
gem.add_runtime_dependency "net-scp"
|
22
22
|
gem.add_runtime_dependency "net-ssh-gateway"
|
data/test/ssh_job_rows.yml
CHANGED
@@ -2,5 +2,5 @@
|
|
2
2
|
active: true
|
3
3
|
trigger: once
|
4
4
|
status: ""
|
5
|
-
task1: 'ssh.run "test_node", "ruby code.rb", "Runner_mobilize(test)/code.rb", "Runner_mobilize(test)/code.sh"'
|
6
|
-
task2: 'gsheet.write "task1", "Runner_mobilize(test)/test_ssh.out"'
|
5
|
+
task1: 'ssh.run node:"test_node", cmd:"ruby code.rb", sources:["Runner_mobilize(test)/code.rb", "Runner_mobilize(test)/code.sh"]'
|
6
|
+
task2: 'gsheet.write source:"task1", target:"Runner_mobilize(test)/test_ssh.out"'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mobilize-ssh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -16,17 +16,17 @@ dependencies:
|
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.0.
|
21
|
+
version: 1.0.7
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.0.
|
29
|
+
version: 1.0.7
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: net-ssh
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|