chef-provisioning 1.1.1 → 1.2.0

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: c14634a9570d6cc3b5bab7825b0e93cb857da43c
4
- data.tar.gz: 0b5ea043440b057512b117ec4a3fbca92426c322
3
+ metadata.gz: 8779389e38c408619ab78eefda047f78e5c1826a
4
+ data.tar.gz: 61a5f41ab6289315509f7151b9d8e52369a23b8c
5
5
  SHA512:
6
- metadata.gz: 77fd9ffc61c385cd4bd21ecb4eaa22592244139844da0f2376d08671c5a8113fd4cd2285cbdea1f15eb422e598962933f8f5f07cf742550eb2847f644e9ffa78
7
- data.tar.gz: 294bf1b3e6634eaa5a78b4f4dfd05abcfe7339553e911026e8c03f8cecf342fd4941df7e98fad68cc4e817c4c876a2f2540e56a029ee5463dbad0a0fcf30ee32
6
+ metadata.gz: 5ae3ba3ae5ec38f25ee0aa596d886c42be3a9c47c0c09e9790f03156bccf08989132ff91dfac06f75787ee7b655a804701fb79a66d9c709212977c481e8aeb2a
7
+ data.tar.gz: 7ba2b3c08365bccce537dc692913e0e753d096b09293b9fd024b6b31fb58bcea891076b819b483ee5d6fd9ad89f547f7d6584eeb5311ae8d79134a42ccf332c2
@@ -1,5 +1,10 @@
1
1
  # Chef Provisioning Changelog
2
2
 
3
+ ## 1.2.0 (5/27/2015)
4
+
5
+ - Updating for newly introduced Socketless mode. If the local chef-zero url is `chefzero://...` then we replace it with `http://...` on the target VM ([#337][])
6
+ - Bumped winrm dependency to 1.3.0 ([#332][])
7
+
3
8
  ## 1.1.1 (4/19/2015)
4
9
 
5
10
  - Fixed undefined method on nil class error inside setup-convergence ([@tyler-ball][])
@@ -94,6 +99,7 @@
94
99
  ## 0.14 (8/18/2014)
95
100
 
96
101
  - FEATURE: Add the machine_image resource ([@jkeiser][], [@johnewart][]):
102
+
97
103
  ```ruby
98
104
  machine_image 'base' do
99
105
  machine_options :bootstrap_options => { :image_id => 'ami-1234798123431', :ssh_username => 'root' }
@@ -293,6 +299,8 @@
293
299
  [#316]: https://github.com/chef/chef-provisioning/issues/316
294
300
  [#317]: https://github.com/chef/chef-provisioning/issues/317
295
301
  [#321]: https://github.com/chef/chef-provisioning/issues/321
302
+ [#332]: https://github.com/chef/chef-provisioning/issues/332
303
+ [#337]: https://github.com/chef/chef-provisioning/issues/337
296
304
  [@MrMMorris]: https://github.com/MrMMorris
297
305
  [@causton1]: https://github.com/causton1
298
306
  [@chef]: https://github.com/chef
data/README.md CHANGED
@@ -262,6 +262,12 @@ Kitchen
262
262
 
263
263
  Chef Provisioning also works with Test Kitchen, allowing you to test entire clusters, not just machines! The repository for the kitchen-metal gem is https://github.com/doubt72/kitchen-metal.
264
264
 
265
+
266
+ Fixing conflict with chef-zero 3.2.1 and ~> 4.0
267
+ -----------------------------------------------
268
+
269
+ If you run into the error `Unable to activate cheffish-1.0.0, because chef-zero-3.2.1 conflicts with chef-zero (~> 4.0)` you'll need to update the version of the chef gem included in the ChefDK. Follow the instructions @ [https://github.com/fnichol/chefdk-update-app](https://github.com/fnichol/chefdk-update-app) and update chef to ~>12.2.1
270
+
265
271
  Bugs and The Plan
266
272
  -----------------
267
273
 
@@ -61,16 +61,8 @@ class MachineImage < Chef::Provider::LWRPBase
61
61
 
62
62
  # 2. Create the image
63
63
  machine_options = new_machine_options
64
- begin
65
- new_driver.allocate_image(action_handler, image_spec, new_image_options,
66
- machine_provider.machine_spec, machine_options)
67
- rescue ArgumentError
68
- # Backcompat kludge - remove in later version.
69
- Chef::Log.warn("Driver #{new_driver.driver_url} does not accept machine_options. This will be deprecated before Provisioning 1.0.")
70
- machine_provider.machine_spec.instance_eval { @machine_options = machine_options }
71
- new_driver.allocate_image(action_handler, image_spec, new_image_options,
72
- machine_provider.machine_spec)
73
- end
64
+ new_driver.allocate_image(action_handler, image_spec, new_image_options,
65
+ machine_provider.machine_spec, machine_options)
74
66
  image_spec.driver_url ||= new_driver.driver_url
75
67
  image_spec.from_image ||= new_resource.from_image if new_resource.from_image
76
68
  image_spec.run_list ||= machine_provider.machine_spec.node['run_list']
@@ -1,6 +1,7 @@
1
1
  require 'chef/provisioning/convergence_strategy'
2
2
  require 'pathname'
3
3
  require 'cheffish'
4
+ require 'chef_zero/socketless_server_map'
4
5
 
5
6
  class Chef
6
7
  module Provisioning
@@ -187,6 +188,25 @@ module Provisioning
187
188
  end
188
189
 
189
190
  def client_rb_content(chef_server_url, node_name)
191
+ # Chef stores a 'port registry' of chef zero URLs. If we set the remote host's
192
+ # chef_server_url to a `chefzero` url it will fail because it does not know
193
+ # about the workstation's chef zero server
194
+ uri = URI.parse(chef_server_url)
195
+ if uri.scheme == 'chefzero' && uri.host == 'localhost'
196
+ if !Chef::Config[:listen]
197
+ raise "The remote host is configured to access the local chefzero host, but " +
198
+ "the local chefzero host is not configured to listen. Provide --listen or " +
199
+ "set `listen true` in the chef config."
200
+ end
201
+ # Once chef and chef-dk are using chef-zero which supports this, we can
202
+ # remove the else block and the if check
203
+ if ChefZero::SocketlessServerMap.respond_to?(:server_on_port)
204
+ chef_server_url = ChefZero::SocketlessServerMap.server_on_port(uri.port).url
205
+ else
206
+ chef_server_url = chef_server_url.gsub(/^chefzero/, 'http')
207
+ end
208
+ end
209
+
190
210
  ssl_verify_mode = convergence_options[:ssl_verify_mode]
191
211
  ssl_verify_mode ||= if chef_server_url.downcase.start_with?("https")
192
212
  :verify_peer
@@ -44,6 +44,9 @@ module Provisioning
44
44
 
45
45
  # Get remote checksum of file
46
46
  result = transport.execute("md5sum -b #{path}", :read_only => true)
47
+ unless result.exitstatus == 0
48
+ result = transport.execute("md5 -r #{path}", :read_only => true)
49
+ end
47
50
  result.error!
48
51
  remote_sum = result.stdout.split(' ')[0]
49
52
 
@@ -86,14 +86,14 @@ $file.Close
86
86
  # If you can't pwd within 10 seconds, you can't pwd
87
87
  execute('pwd', :timeout => 10)
88
88
  true
89
- rescue Timeout::Error, Errno::EHOSTUNREACH, Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::ECONNRESET, ::WinRM::WinRMHTTPTransportError, ::WinRM::WinRMWebServiceError, ::WinRM::WinRMWSManFault
90
- Chef::Log.debug("unavailable: network connection failed or broke: #{$!.inspect}")
91
- disconnect
92
- false
93
89
  rescue ::WinRM::WinRMAuthorizationError
94
90
  Chef::Log.debug("unavailable: winrm authentication error: #{$!.inspect} ")
95
91
  disconnect
96
92
  false
93
+ rescue Timeout::Error, Errno::EHOSTUNREACH, Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::ECONNRESET, ::WinRM::WinRMError
94
+ Chef::Log.debug("unavailable: network connection failed or broke: #{$!.inspect}")
95
+ disconnect
96
+ false
97
97
  end
98
98
 
99
99
  def make_url_available_to_remote(local_url)
@@ -1,5 +1,5 @@
1
1
  class Chef
2
2
  module Provisioning
3
- VERSION = '1.1.1'
3
+ VERSION = '1.2.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-provisioning
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Keiser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.2.0
103
+ version: '1.3'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.2.0
110
+ version: '1.3'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  version: '0'
224
224
  requirements: []
225
225
  rubyforge_project:
226
- rubygems_version: 2.4.2
226
+ rubygems_version: 2.4.7
227
227
  signing_key:
228
228
  specification_version: 4
229
229
  summary: A library for creating machines and infrastructures idempotently in Chef.