chef-metal-fogsphere 0.1.0.alpha.4 → 0.1.0.alpha.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: bded9aeef55e520b6ba1327ca33e5eb587e6a7e3
4
- data.tar.gz: fa4cb785cbea11310642c04dced35248a907a27e
3
+ metadata.gz: 1e683437490c117a42fb58d691f92f1582002be6
4
+ data.tar.gz: 4b335f60a06db7037743a58429328ee6e011e200
5
5
  SHA512:
6
- metadata.gz: c7090eb59674a2d1d143ad954d5768db3b560a59a5c5fff298d13f5608a8f37b89139561a3f612a574e5ed267239c5e28fc8d08d1677c8ad38849923301c22be
7
- data.tar.gz: e27dd63106852b395ca304b5e43b0eba66f2de0cbcb83d71eed7592cc27f2d47af725f3ec713503059a85dc0ed5046f23580f442bd6d05d6a9648ef5efd38cac
6
+ metadata.gz: 4cc191222b12b651189d55de1762ca2aa852f330d8c47acf2ebe2f4afce10316416dfca2f23f6ceca8c4898c94290991d87d41def1d44bec0319c2930d3acd79
7
+ data.tar.gz: 5a2b7d86bc4b7d410e891ad1a7303a7416f0cf07f102f9d5be4ca51c11960e7948cf650e74187d8cf2b54afcb27910e7a5ab0cccea6d0bd2d339e43d1ab3d089
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "chef-metal-fogsphere"
7
- gem.version = '0.1.0.alpha.4'
7
+ gem.version = '0.1.0.alpha.5'
8
8
  gem.license = 'Apache 2.0'
9
9
  gem.authors = ["Matt Wrock"]
10
10
  gem.email = ["matt@centurylinkcloud.com"]
@@ -16,5 +16,5 @@ Gem::Specification.new do |gem|
16
16
  gem.require_paths = ["lib"]
17
17
 
18
18
  gem.add_dependency 'rbvmomi', '~> 1.5.1'
19
- gem.add_dependency 'chef-metal', '0.11.beta.2'
19
+ gem.add_dependency 'clc-fork-chef-metal', '0.11.beta.5'
20
20
  end
data/lib/clc_driver.rb CHANGED
@@ -3,6 +3,7 @@ require 'chef_metal/machine/windows_machine'
3
3
  require 'chef_metal/machine/unix_machine'
4
4
  require 'chef_metal/convergence_strategy/install_msi'
5
5
  require 'chef_metal/convergence_strategy/install_cached'
6
+ require 'chef_metal/convergence_strategy/no_converge'
6
7
  require 'chef_metal/transport/ssh'
7
8
  require 'fog'
8
9
  require 'fog/core'
@@ -21,7 +22,7 @@ module ChefMetalVsphere
21
22
  } unless defined? DEFAULT_OPTIONS
22
23
 
23
24
  def self.from_url(driver_url, config)
24
- id = driver_url.split(':')[2]
25
+ id = driver_url.split(':')[1]
25
26
  config, id = compute_options_for(id, config)
26
27
  VsphereDriver.new("vsphere:#{id}", config)
27
28
  end
@@ -59,14 +60,11 @@ module ChefMetalVsphere
59
60
  # - :start_timeout - the time to wait for the instance to start (defaults to 600)
60
61
  def initialize(driver_url, config)
61
62
  super(driver_url, config)
62
- end
63
-
64
- def compute_options
65
- driver_options[:compute_options] || {}
63
+ @compute_options = config[:driver_options][:compute_options]
66
64
  end
67
65
 
68
66
  def provider
69
- compute_options[:provider]
67
+ @compute_options[:provider]
70
68
  end
71
69
 
72
70
  # Inflate a provisioner from node_json information; we don't want to force the
@@ -123,7 +121,7 @@ module ChefMetalVsphere
123
121
  def allocate_machine(action_handler, machine_spec, machine_options)
124
122
  if machine_spec.location
125
123
  if machine_spec.location['driver_url'] != driver_url
126
- raise "Switching a machine's driver from #{machine_spec.location['driver_url']} to #{driver_url} for is not currently supported! Use machine :destroy and then re-create the machine on the new driver."
124
+ raise "Switching a machine's driver from #{machine_spec.location['driver_url']} to #{driver_url} is not currently supported! Use machine :destroy and then re-create the machine on the new driver."
127
125
  end
128
126
 
129
127
  server = server_for(machine_spec)
@@ -178,11 +176,14 @@ module ChefMetalVsphere
178
176
  is_static = false
179
177
  bootstrap_options = bootstrap_options_for(machine_spec, machine_options)
180
178
  if has_static_ip(bootstrap_options)
181
- Chef::Log.info "waiting for customizations to complete"
182
- sleep(30)
183
- Chef::Log.info "rebooting..."
184
- server.reboot
185
179
  is_static = true
180
+ transport = transport_for(machine_spec, machine_options, server)
181
+ if !transport.available?
182
+ Chef::Log.info "waiting for customizations to complete"
183
+ sleep(30)
184
+ Chef::Log.info "rebooting..."
185
+ server.reboot
186
+ end
186
187
  end
187
188
 
188
189
  begin
@@ -274,7 +275,7 @@ module ChefMetalVsphere
274
275
  end
275
276
 
276
277
  def compute
277
- @compute ||= Fog::Compute.new(compute_options)
278
+ @compute ||= Fog::Compute.new(@compute_options)
278
279
  end
279
280
 
280
281
  # Not meant to be part of public interface
@@ -347,10 +348,10 @@ module ChefMetalVsphere
347
348
  end
348
349
 
349
350
  def create_ssh_transport(machine_spec, machine_options, server)
350
- username = compute_options[:ssh_username] || 'root'
351
+ username = @compute_options[:ssh_username] || 'root'
351
352
  bootstrap_options = bootstrap_options_for(machine_spec, machine_options)
352
353
  remote_host = has_static_ip(bootstrap_options) ? bootstrap_options[:customization_spec]['ipsettings']['ip'] : server.ipaddress
353
- ChefMetal::Transport::SSH.new(remote_host, username, {:password => compute_options[:ssh_password], :paranoid => false}, {}, config)
354
+ ChefMetal::Transport::SSH.new(remote_host, username, {:password => @compute_options[:ssh_password], :paranoid => false}, {}, config)
354
355
  end
355
356
 
356
357
  def wait_for_transport(action_handler, machine_spec, machine_options, server)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-metal-fogsphere
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.alpha.4
4
+ version: 0.1.0.alpha.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Wrock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-27 00:00:00.000000000 Z
11
+ date: 2014-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbvmomi
@@ -25,19 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.5.1
27
27
  - !ruby/object:Gem::Dependency
28
- name: chef-metal
28
+ name: clc-fork-chef-metal
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.11.beta.2
33
+ version: 0.11.beta.5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.11.beta.2
40
+ version: 0.11.beta.5
41
41
  description: A fork of Chef-Metal-fog for vsphere
42
42
  email:
43
43
  - matt@centurylinkcloud.com