canzea 0.1.165 → 0.1.166

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c5e32c43be3099d483d88ac5003c1adc94be5f7
4
- data.tar.gz: 2aceb581be2923ad0eccdf674bfca9ae9d5468fa
3
+ metadata.gz: b9d3ac0cc571245b20ce0cc255de7a3a5f100e15
4
+ data.tar.gz: fec26f1eb6912fdfa9b46cf5a4779879988d48e8
5
5
  SHA512:
6
- metadata.gz: 5837d65c6920beea131f58fe7af8df6e7260750fa6ac2c4af48a96cd1e13d37930b215b85f6216d99dbc4037bead55aa98c9c0dc7eeae598cc8fd30467ec471a
7
- data.tar.gz: 34bddf1f717f191b074597e6c088a6c938a9ef2450291bd450be7d190e12777f9a3a8c221bca85b0b21c8a7696b37d0ba77491a69602d5c41a54728293973953
6
+ metadata.gz: 1648f06108685edea2773bcbae876d93b428cb53418ac19291a3d0dcfd92efb8762fb5718be871b77d83e2f5afbf656b033f3d1f27b6bc46885d4e4a2d86aed6
7
+ data.tar.gz: 4707df9acf4578dbea06d1416deb5ac33ec338dfa51b10f51ef398b49bbe9a6c5d1fa6898f7b4030b76985b59748246fd572d98f9c6b223958d61b1c426c79f9
@@ -1,3 +1,3 @@
1
1
  module Canzea
2
- VERSION = "0.1.165"
2
+ VERSION = "0.1.166"
3
3
  end
data/lib/canzea.rb CHANGED
@@ -246,6 +246,16 @@ module Canzea
246
246
 
247
247
  if lifecycle == 'install'
248
248
  puts "-- Running install step #{opts[:role]} #{opts[:solution]}"
249
+
250
+ # If there are args, then parse them and put them in environment variables
251
+ args = JSON.parse(opts.fetch(:args, {}))
252
+ args.keys.each { | k |
253
+ if args[k].instance_of? String
254
+ puts "-- SETTING #{k.upcase} = #{args[k].to_str}"
255
+ ENV[k.upcase] = args[k].to_str
256
+ end
257
+ }
258
+
249
259
  ps = PlanStep.new
250
260
  ps.runPhaseInstall opts[:role], opts[:solution], test, Integer(opts.fetch(:task, 1))
251
261
 
@@ -261,6 +271,16 @@ module Canzea
261
271
 
262
272
  if lifecycle == 'configure'
263
273
  puts "-- Running configure step #{opts[:role]} #{opts[:solution]}"
274
+
275
+ # If there are args, then parse them and put them in environment variables
276
+ args = JSON.parse(opts.fetch(:args, {}))
277
+ args.keys.each { | k |
278
+ if args[k].instance_of? String
279
+ puts "-- SETTING #{k.upcase} = #{args[k].to_str}"
280
+ ENV[k.upcase] = args[k].to_str
281
+ end
282
+ }
283
+
264
284
  ps = PlanStep.new
265
285
  ps.runPhaseConfigure opts[:role], opts[:solution], test, Integer(opts.fetch(:task, 1))
266
286
  end
@@ -287,7 +307,7 @@ module Canzea
287
307
  if opts[:remote]
288
308
  publicIp = File.read("#{Canzea::config[:pwd]}/vps-#{opts[:serverBase]}-#{opts[:serverNumber]}.json")
289
309
  publicIp.strip!
290
- RemoteRun.new.do publicIp, opts[:privateKey], opts[:role], opts[:solution]
310
+ RemoteRun.new.doInstall publicIp, opts[:privateKey], opts[:role], opts[:solution], opts.fetch(:args, '{}')
291
311
  end
292
312
 
293
313
  if opts[:remote_configure]
@@ -15,6 +15,11 @@ class RemoteRun
15
15
  remote.exec publicIp, privateKey, "canzea --lifecycle=install --role=#{role} --task=#{task} --solution=#{solution}", ref
16
16
  end
17
17
 
18
+ def doInstall(publicIp, privateKey, role, solution, args, ref="")
19
+ remote = RemoteCall.new
20
+ remote.exec publicIp, privateKey, "canzea --lifecycle=install --role=#{role} --solution=#{solution} --args='#{args}'", ref
21
+ end
22
+
18
23
  def do(publicIp, privateKey, role, solution, ref="")
19
24
  remote = RemoteCall.new
20
25
  remote.exec publicIp, privateKey, "canzea --lifecycle=install --role=#{role} --solution=#{solution}", ref
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.165
4
+ version: 0.1.166
5
5
  platform: ruby
6
6
  authors:
7
7
  - Canzea Technologies