canzea 0.1.15 → 0.1.16

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a552526493f8e84f887104ad6082ae2dd852b49
4
- data.tar.gz: aeebf2122dac092e026bb61b13af17d0edee4347
3
+ metadata.gz: f9f4b0e5f38e31804eb54c4c6976ea15735b4340
4
+ data.tar.gz: d40fac69e448604c06dd0b7f8b1d40591b11bbb4
5
5
  SHA512:
6
- metadata.gz: adf846b7ff9c0f8e91d7e725ede33755ed7511b5f622fc7d9bb8d186c1b76734866d5e3120bffe81cf1006ec42e49b4aede1ac073181ba4abe107143157eed79
7
- data.tar.gz: 1e3f732ab2e1905d39394e7f29dc8672edfdc50e99c29638a5d4fd3c840145eed7bde8c294a7118959abc9ab5b49e0e516e825517d111a62c1d8d2d096fa0f02
6
+ metadata.gz: 15fc0a9cdab09ee6597e4abb050198587762a5bef0697da408742fa91ec713308ab172b016949eea219b3f3b3f44bfa4fd96d0bbdc03c6ba7fd8920c8d4f81f8
7
+ data.tar.gz: cec393f21a75c25080aa5476e3bd822b68846f5f6b4b97c4c3184367893097afbd788270e0f6f711e2edc143a022c9dfc41338a8ee07d9e30e9044f5fc546405
@@ -1,6 +1,6 @@
1
1
  module Canzea
2
2
 
3
- if ENV.has_key?('CONSUL_URL') == false
4
- raise("CONSUL_URL environment variable is required to be set!")
5
- end
3
+ # if ENV.has_key?('CONSUL_URL') == false
4
+ # raise("CONSUL_URL environment variable is required to be set!")
5
+ # end
6
6
  end
@@ -1,3 +1,3 @@
1
1
  module Canzea
2
- VERSION = "0.1.15"
2
+ VERSION = "0.1.16"
3
3
  end
data/lib/canzea.rb CHANGED
@@ -77,6 +77,10 @@ module Canzea
77
77
  if (util == "gen-user")
78
78
  GenUser.new.do(args[0])
79
79
  end
80
+ if (util == "get-key-value")
81
+ r = Registry.new
82
+ puts r.getKeyValue (args[0])
83
+ end
80
84
  end
81
85
 
82
86
  if (opts[:reset])
@@ -7,6 +7,6 @@ class RemoteRun
7
7
  def do(serverBase, serverNumber, privateKey, role, solution)
8
8
  publicIp = File.read("#{Canzea::config[:pwd]}/vps-#{serverBase}-#{serverNumber}.json")
9
9
  remote = RemoteCall.new
10
- remote.run publicIp, privateKey, "canzea --lifecycle=install --role=#{role} --solution=#{solution}"
10
+ remote.exec publicIp, privateKey, "canzea --lifecycle=install --role=#{role} --solution=#{solution}"
11
11
  end
12
12
  end
@@ -28,11 +28,6 @@ class RemoteCall
28
28
  exec hostname, privateKey, cmd8
29
29
  end
30
30
 
31
- def run (hostname, privateKey, cmd)
32
- @cmd = "#{cmd}"
33
- exec hostname, privateKey, @cmd
34
- end
35
-
36
31
  def exec (hostname, privateKey, cmd)
37
32
 
38
33
  @username = "root"
@@ -40,7 +35,6 @@ class RemoteCall
40
35
  Net::SSH.start(hostname, @username, :paranoid => false, :keys => [privateKey]) do |ssh|
41
36
 
42
37
  chan = ssh.open_channel do |channel|
43
- channel[:data] = ""
44
38
  channel.request_pty
45
39
  channel.env("DIGITAL_OCEAN_API_KEY", ENV['DIGITAL_OCEAN_API_KEY'])
46
40
  channel.env("VAULT_TOKEN", ENV['VAULT_TOKEN'])
@@ -50,19 +44,18 @@ class RemoteCall
50
44
  abort "could not execute command" unless success
51
45
 
52
46
  channel.on_data do |ch, data|
53
- channel[:data] << data
47
+ puts data
54
48
  end
55
49
 
56
50
  channel.on_request("exit-status") do |ch, data|
57
51
  exit_code = data.read_long
58
52
  if (exit_code == 0)
59
53
  else
60
- abort(channel[:data])
54
+ abort()
61
55
  end
62
56
  end
63
57
 
64
58
  channel.on_close do |ch|
65
- puts channel[:data]
66
59
  end
67
60
  end
68
61
  end
@@ -65,7 +65,7 @@ class Worker
65
65
  begin
66
66
  workingDir = Canzea::config[:catalog_location]
67
67
 
68
- puts "-- Executing: #{l} at #{workingDir}"
68
+ puts "-- Executing [#{workingDir}] #{l}"
69
69
  Dir.chdir(workingDir){
70
70
  Open3.popen3(l) {|stdin, stdout, stderr, wait_thr|
71
71
  pid = wait_thr.pid # pid of the started process.
data/lib/trace-runner.rb CHANGED
@@ -37,7 +37,7 @@ class RunnerWorker
37
37
 
38
38
  workingDir = Canzea::config[:catalog_location]
39
39
 
40
- puts "-- Executing: #{l} at #{workingDir}"
40
+ puts "-- Executing [#{workingDir}] #{l}"
41
41
  Dir.chdir(workingDir){
42
42
 
43
43
  Open3.popen3(ENV, l) {|stdin, stdout, stderr, wait_thr|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canzea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Canzea Technologies