canzea 0.1.126 → 0.1.129
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/canzea/version.rb +1 -1
- data/lib/canzea.rb +10 -0
- data/lib/commands/remote-run.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f73444beba7832a0d993228ef92b18301ba70db
|
4
|
+
data.tar.gz: ff3c3b9af6c99810f4be99057d22292142c512aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aba32863a59b07dca93e0adabb346bd48d6de34f72d35fdf7ceea0f24fb070fa1544d84c1915831d939044f549e3aedbc2ca7ebac1445aa27a8d7d1c938e1cc4
|
7
|
+
data.tar.gz: 58cde59a257da98bc3827a1915b213da3345ad5e14be309baccfbfcab4722a5aff4627c10596e735fcae78e3d0ecd11b4e3d30bf27bb17f0bc442464c6a1a8e2
|
data/lib/canzea/version.rb
CHANGED
data/lib/canzea.rb
CHANGED
@@ -44,6 +44,7 @@ module Canzea
|
|
44
44
|
# flag nil, :run, 'Run a step'
|
45
45
|
# flag nil, :helper, 'Execute a helper'
|
46
46
|
flag nil, :remote, 'Remote execution'
|
47
|
+
flag nil, :remote_wire, 'Remote execution of a helper'
|
47
48
|
flag nil, :get, 'Get a file from the remote server'
|
48
49
|
flag nil, :put, 'Put a file onto the remote server'
|
49
50
|
flag nil, :encrypt, 'Encrypt'
|
@@ -162,6 +163,7 @@ module Canzea
|
|
162
163
|
|
163
164
|
if (opts[:get] || opts[:put])
|
164
165
|
publicIp = File.read("#{Canzea::config[:pwd]}/vps-#{opts[:serverBase]}-#{opts[:serverNumber]}.json")
|
166
|
+
publicIp.strip!
|
165
167
|
if (opts[:get])
|
166
168
|
remote = RemoteCall.new
|
167
169
|
remote.get publicIp, opts[:privateKey], args[0], args[1]
|
@@ -224,14 +226,22 @@ module Canzea
|
|
224
226
|
|
225
227
|
if opts[:init]
|
226
228
|
publicIp = File.read("#{Canzea::config[:pwd]}/vps-#{opts[:serverBase]}-#{opts[:serverNumber]}.json")
|
229
|
+
publicIp.strip!
|
227
230
|
RemoteInit.new.do publicIp, opts[:privateKey]
|
228
231
|
end
|
229
232
|
|
230
233
|
if opts[:remote]
|
231
234
|
publicIp = File.read("#{Canzea::config[:pwd]}/vps-#{opts[:serverBase]}-#{opts[:serverNumber]}.json")
|
235
|
+
publicIp.strip!
|
232
236
|
RemoteRun.new.do publicIp, opts[:privateKey], opts[:role], opts[:solution]
|
233
237
|
end
|
234
238
|
|
239
|
+
if opts[:remote_wire]
|
240
|
+
publicIp = File.read("#{Canzea::config[:pwd]}/vps-#{opts[:serverBase]}-#{opts[:serverNumber]}.json")
|
241
|
+
publicIp.strip!
|
242
|
+
RemoteRun.new.doWire publicIp, opts[:privateKey], opts[:solution], opts[:action], opts.fetch(:args, '{}')
|
243
|
+
end
|
244
|
+
|
235
245
|
if opts[:config_git_commit]
|
236
246
|
gitRoot = opts.fetch(:gitRoot, Canzea::config[:git_repo])
|
237
247
|
cg = ConfigGitCommit.new
|
data/lib/commands/remote-run.rb
CHANGED
@@ -1,9 +1,15 @@
|
|
1
|
+
require "json"
|
1
2
|
require "git"
|
2
3
|
require "fileutils"
|
3
4
|
require "pathname"
|
4
5
|
require "ssh-base-cmd-class"
|
5
6
|
|
6
7
|
class RemoteRun
|
8
|
+
def doWire(publicIp, privateKey, solution, action, args, ref="")
|
9
|
+
remote = RemoteCall.new
|
10
|
+
remote.exec publicIp, privateKey, "canzea --lifecycle=wire --raw --solution=#{solution} --action=#{action} --args='#{args}'", ref
|
11
|
+
end
|
12
|
+
|
7
13
|
def doTask(publicIp, privateKey, role, solution, task, ref="")
|
8
14
|
remote = RemoteCall.new
|
9
15
|
remote.exec publicIp, privateKey, "canzea --lifecycle=install --role=#{role} --task=#{task} --solution=#{solution}", ref
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: canzea
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.129
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Canzea Technologies
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|