chef-metal-fog 0.1 → 0.2

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: 3ab481529a81ba71c5d9abb6432a399c4d6f1bb7
4
- data.tar.gz: 727b503c48bd6064d37f9c512347ec6d16aa0111
3
+ metadata.gz: 927b70a0bdd36d1e004c168d90d71c9e18bf6608
4
+ data.tar.gz: e8152c40c1ec3c0b866d6189dfc0df1da81fa30f
5
5
  SHA512:
6
- metadata.gz: a1b422d9526c41aee107ffc58e6ebaecb471f2c3b69d21210473e9ca603fc62a5b6ac0476a632feca41d3b2ef5c55fd9138b5ab7364354c6c858077e0e83addf
7
- data.tar.gz: 30195a484d57766d08ba97b31eff98437b7bc49cd016a50d4515cebdcce549c10fec2b7b199a7473c634fbb22bc1fafe0f006f9120b399df04a8e05486cb0bd8
6
+ metadata.gz: 0f389c377ec27b9cc391e635e045e8141ac9615d41e3a5beeba721e5dd3166b61f57576f4a6dca33f22ad5415ba7a89b0121d3bd5ab9d16995bf84966543592e
7
+ data.tar.gz: 7b807bdf75b5062c328c29ef3b41d216979a67456240e3a494c00a69920ce71c03a40baacba01d239b2420007647a90f211ea15aba3af59791d93b9874df965d
@@ -1,4 +1,4 @@
1
- require 'chef_metal/provisioner/fog_provisioner'
1
+ require 'chef_metal_fog/fog_provisioner'
2
2
 
3
3
  ChefMetal.add_registered_provisioner_class("fog",
4
- ChefMetal::Provisioner::FogProvisioner)
4
+ ChefMetalFog::FogProvisioner)
@@ -8,7 +8,9 @@ require 'chef_metal/convergence_strategy/install_msi'
8
8
  require 'chef_metal/convergence_strategy/install_cached'
9
9
  require 'chef_metal/transport/ssh'
10
10
  require 'fog'
11
+ require 'fog/core'
11
12
  require 'fog/compute'
13
+ require 'fog/aws'
12
14
 
13
15
  module ChefMetalFog
14
16
  # Provisions machines in vagrant.
@@ -152,19 +154,12 @@ module ChefMetalFog
152
154
  # Set up the modified node data
153
155
  provisioner_output = node['normal']['provisioner_output'] || {
154
156
  'provisioner_url' => provisioner_url,
155
- 'provisioner_version' => ChefMetal::VERSION,
157
+ 'provisioner_version' => ChefMetalFog::VERSION,
156
158
  'creator' => aws_login_info[1]
157
159
  }
158
160
 
159
161
  if provisioner_output['provisioner_url'] != provisioner_url
160
- if (provisioner_output['provisioner_version'].to_f <= 0.3) && provisioner_output['provisioner_url'].start_with?('fog:AWS:') && compute_options[:provider] == 'AWS'
161
- Chef::Log.warn "The upgrade from chef-metal 0.3 to 0.4 changed the provisioner URL format! Metal will assume you are in fact using the same AWS account, and modify the provisioner URL to match."
162
- provisioner_output['provisioner_url'] = provisioner_url
163
- provisioner_output['provisioner_version'] ||= ChefMetal::VERSION
164
- provisioner_output['creator'] ||= aws_login_info[1]
165
- else
166
- raise "Switching providers for a machine is not currently supported! Use machine :destroy and then re-create the machine on the new action_handler."
167
- end
162
+ raise "Switching a machine's provider from #{provisioner_output['provisioner_url']} to #{provisioner_url} for is not currently supported! Use machine :destroy and then re-create the machine on the new provisioner."
168
163
  end
169
164
 
170
165
  node['normal']['provisioner_output'] = provisioner_output
@@ -332,7 +327,6 @@ module ChefMetalFog
332
327
  @base_bootstrap_options_for[machine] = current_base_bootstrap_options
333
328
  end
334
329
 
335
-
336
330
  def compute
337
331
  @compute ||= Fog::Compute.new(compute_options)
338
332
  end
@@ -466,11 +460,17 @@ module ChefMetalFog
466
460
  def convergence_strategy_for(node)
467
461
  if node['normal']['provisioner_options'] && node['normal']['provisioner_options']['is_windows']
468
462
  @windows_convergence_strategy ||= begin
469
- ChefMetal::ConvergenceStrategy::InstallMsi.new
463
+ options = {}
464
+ provisioner_options = node['normal']['provisioner_options'] || {}
465
+ options[:chef_client_timeout] = provisioner_options['chef_client_timeout'] if provisioner_options.has_key?('chef_client_timeout')
466
+ ChefMetal::ConvergenceStrategy::InstallMsi.new(options)
470
467
  end
471
468
  else
472
469
  @unix_convergence_strategy ||= begin
473
- ChefMetal::ConvergenceStrategy::InstallCached.new
470
+ options = {}
471
+ provisioner_options = node['normal']['provisioner_options'] || {}
472
+ options[:chef_client_timeout] = provisioner_options['chef_client_timeout'] if provisioner_options.has_key?('chef_client_timeout')
473
+ ChefMetal::ConvergenceStrategy::InstallCached.new(options)
474
474
  end
475
475
  end
476
476
  end
@@ -1,3 +1,3 @@
1
1
  module ChefMetalFog
2
- VERSION = '0.1'
2
+ VERSION = '0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-metal-fog
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Keiser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-04 00:00:00.000000000 Z
11
+ date: 2014-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef