forj 1.0.4 → 1.0.5

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: 502bfc6edeb25b5ff031e55b707cb8c27800dcea
4
- data.tar.gz: a58602925d8e68d05907eb3834d959e46b080bf1
3
+ metadata.gz: bce94bcc25e62cfda68553083ab01c6f9dddd210
4
+ data.tar.gz: 6f98bdd389ac9e930225075145e2aeac9680b280
5
5
  SHA512:
6
- metadata.gz: f6112e2d51cf46da0c29b44be1221135c8cff7b6cb631725c4c3bbc8204242b61f107865673cfa7ca8f242ffb136ad8a0af9079df0548b404ac7b06be96c42f0
7
- data.tar.gz: 895f7bc30b598051e49612b21b54a3ded559dd06556a3475b131367ada6490c7da02604c53f9a20228fbcb078a85aae1b0f61734bdfb20a0bbe170ee7da0c0b1
6
+ metadata.gz: 10cf1c72bc894a6db47de88fbeead1f64a5d429f26fc8e6f69f382e5ffc4377d2d7c86976768a4dfb9262a04c5c7861a87c2078c43c4b2222fbf7af32e312406
7
+ data.tar.gz: 40272628a7797e2eccaa90daba1b57e81049db3f1381ce1bd7dc84395d6d460d06d23f0f4d1861fe98fbb40781c932137226840cb78f3dff90f46e79b89530fb
data/bin/forj CHANGED
@@ -27,7 +27,8 @@ LIB_PATH = File.expand_path(File.join(APP_PATH, 'lib'))
27
27
 
28
28
  require 'lorj'
29
29
  PrcLib.app_name = 'forj'
30
- PrcLib.app_defaults = File.join(APP_PATH, 'forj')
30
+ PrcLib.app_defaults = File.join(APP_PATH, PrcLib.app_name)
31
+ PrcLib.pdata_path = File.expand_path(File.join('~', '.cache', PrcLib.app_name))
31
32
 
32
33
  # Initialize forj paths
33
34
  require 'appinit.rb' # Load Application settings features
@@ -146,6 +147,8 @@ If you want to check/updated them, use `forj get [-a account]`
146
147
  ' ~/src/forj-oss/maestro build.sh and' \
147
148
  "\n " \
148
149
  'test-box will send your local maestro repo to your box, for boot.'
150
+ method_option :extra_metadata, :aliases => '-e', :desc => 'Custom' \
151
+ ' server metadata format key1=value1,key2=value2...,keyN=valueN'
149
152
 
150
153
  def boot(blueprint, on_or_name, old_accountname = nil, as = nil,
151
154
  old_name = nil)
data/forj.gemspec CHANGED
@@ -19,8 +19,8 @@ Gem::Specification.new do |s|
19
19
  s.name = 'forj'
20
20
  s.homepage = 'https://www.forj.io'
21
21
 
22
- s.version = '1.0.4'
23
- s.date = '2015-02-10'
22
+ s.version = '1.0.5'
23
+ s.date = '2015-02-11'
24
24
  s.summary = 'forj command line'
25
25
  s.description = 'forj cli - See https://www.forj.io for documentation/information'
26
26
 
data/lib/boot.rb CHANGED
@@ -122,7 +122,8 @@ module Forj
122
122
  :security_group => :security_group,
123
123
  :image_name => :image_name, :maestro_flavor => :flavor,
124
124
  :bp_flavor => :bp_flavor, :maestro_repo => :maestro_repo,
125
- :branch => :branch, :test_box => :test_box }
125
+ :branch => :branch, :test_box => :test_box,
126
+ :extra_metadata => :extra_metadata }
126
127
 
127
128
  load_options(options, options_map) do |key, value|
128
129
  case key
data/lib/forj/ForjCore.rb CHANGED
@@ -78,6 +78,8 @@ class Lorj::BaseDefinition
78
78
  obj_needs :data, :bootstrap
79
79
  # Add init additional git clone steps.
80
80
  obj_needs :data, :repos
81
+ # Add extra metadata
82
+ obj_needs :data, :extra_metadata
81
83
 
82
84
  # ******************* userdata object
83
85
  define_obj :userdata,
@@ -489,6 +489,14 @@ class ForjCoreProcess
489
489
  h_meta['repos'] = hParams[:repos] if hParams[:repos]
490
490
  # Add init bootstrap additionnal steps
491
491
  h_meta['bootstrap'] = hParams[:bootstrap] if hParams[:bootstrap]
492
+
493
+ if hParams[:extra_metadata]
494
+ hParams[:extra_metadata].split(/,/).each do |kv|
495
+ k, v = kv.split(/=/)
496
+ h_meta[k] = v
497
+ end
498
+ end
499
+
492
500
  h_meta
493
501
  end
494
502
 
@@ -644,6 +652,7 @@ class ForjCoreProcess
644
652
  def infra_is_original?(infra_dir, maestro_dir)
645
653
  dest_cloud_init = File.join(infra_dir, 'cloud-init')
646
654
  template = File.join(maestro_dir, 'templates', 'infra')
655
+ return false unless File.exist?(template)
647
656
  s_md5_list = File.join(infra_dir, '.maestro_original.yaml')
648
657
  b_result = true
649
658
  h_result = {}
@@ -1284,10 +1293,4 @@ class ForjCoreProcess
1284
1293
  PrcLib.debug("Running '%s'", command)
1285
1294
  system(command)
1286
1295
  end
1287
-
1288
- def ssh_user(image_name)
1289
- return 'fedora' if image_name =~ /fedora/i
1290
- return 'centos' if image_name =~ /centos/i
1291
- 'ubuntu'
1292
- end
1293
1296
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - forj team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-10 00:00:00.000000000 Z
11
+ date: 2015-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor