chef-provisioning 1.4.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -2
- data/Gemfile +15 -0
- data/README.md +1 -0
- data/chef-provisioning.gemspec +35 -0
- data/lib/chef/provider/machine.rb +9 -5
- data/lib/chef/provisioning/convergence_strategy/install_sh.rb +0 -2
- data/lib/chef/provisioning/convergence_strategy/precreate_chef_objects.rb +5 -0
- data/lib/chef/provisioning/transport/ssh.rb +3 -3
- data/lib/chef/provisioning/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9af2567c4ea25e723b6ba5f11a10fb37aadc6d9
|
4
|
+
data.tar.gz: 171c144d04965d8bbadd1e8bdfb0740d56b987f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19cd99cd3d7be8c998b42c62edb70c7124830bd608193fec6dcb5695e15e2ccfa5dfd2bc3125c4f683eb3c6ce6a273b4ad8661f384a683f4a3ad2395310742af
|
7
|
+
data.tar.gz: a9ffd30e83bd04d7c78b6b17ae0b6ec47b819dd685647ebc242b0e9507e7649d68b3df5b19a7f25287afc0105f9df6d61cd3cccf8e09ae66fe64caf059ef76be
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,28 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [1.
|
4
|
-
[Full Changelog](https://github.com/chef/chef-provisioning/compare/v1.4.
|
3
|
+
## [1.5.0](https://github.com/chef/chef-provisioning/tree/1.5.0) (2015-10-23)
|
4
|
+
[Full Changelog](https://github.com/chef/chef-provisioning/compare/v1.4.1...1.5.0)
|
5
|
+
|
6
|
+
**Fixed bugs:**
|
7
|
+
|
8
|
+
- :converge action should not re-install chef-client if the desired version is already installed [\#428](https://github.com/chef/chef-provisioning/issues/428)
|
9
|
+
- SSH available timeout needs to be configurable [\#362](https://github.com/chef/chef-provisioning/issues/362)
|
10
|
+
- Making available? timeout use provided ssh\_options, fixes \#362 [\#466](https://github.com/chef/chef-provisioning/pull/466) ([tyler-ball](https://github.com/tyler-ball))
|
11
|
+
- Pinning to mixlib-install 0.7.0 until 1.0 is out [\#464](https://github.com/chef/chef-provisioning/pull/464) ([tyler-ball](https://github.com/tyler-ball))
|
12
|
+
- Added bootstrap\_no\_proxy support [\#458](https://github.com/chef/chef-provisioning/pull/458) ([jsmartt](https://github.com/jsmartt))
|
13
|
+
|
14
|
+
**Closed issues:**
|
15
|
+
|
16
|
+
- The action "stop" on a Machine resource does not appear to work [\#463](https://github.com/chef/chef-provisioning/issues/463)
|
17
|
+
- machine chef-client run output not logging to provisioner chef-client output [\#274](https://github.com/chef/chef-provisioning/issues/274)
|
18
|
+
|
19
|
+
**Merged pull requests:**
|
20
|
+
|
21
|
+
- Add gemspec files to allow bundler to run from the gem [\#461](https://github.com/chef/chef-provisioning/pull/461) ([ksubrama](https://github.com/ksubrama))
|
22
|
+
- Pin mixlib-install more strictly. [\#459](https://github.com/chef/chef-provisioning/pull/459) ([sersut](https://github.com/sersut))
|
23
|
+
|
24
|
+
## [v1.4.1](https://github.com/chef/chef-provisioning/tree/v1.4.1) (2015-09-30)
|
25
|
+
[Full Changelog](https://github.com/chef/chef-provisioning/compare/v1.4.0...v1.4.1)
|
5
26
|
|
6
27
|
**Fixed bugs:**
|
7
28
|
|
data/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
gemspec
|
3
|
+
|
4
|
+
#gem 'mixlib-install', path: '../mixlib-install'
|
5
|
+
#gem 'net-ssh', :path => '../net-ssh'
|
6
|
+
#gem 'chef', :path => '../chef'
|
7
|
+
#gem 'ohai', :path => '../ohai'
|
8
|
+
#gem 'cheffish', :path => '../cheffish' # :git => 'https://github.com/jkeiser/cheffish.git'
|
9
|
+
#gem 'chef-provisioning-vagrant', :path => '../chef-provisioning-vagrant'
|
10
|
+
#gem 'chef-provisioning-fog', :path => '../chef-provisioning-fog'
|
11
|
+
#gem 'chef-provisioning-aws', :path => '../chef-provisioning-aws'
|
12
|
+
#gem 'chef-zero', :path => '../chef-zero'
|
13
|
+
group :development do
|
14
|
+
# gem "berkshelf", github: "berkshelf/berkshelf"
|
15
|
+
end
|
data/README.md
CHANGED
@@ -172,6 +172,7 @@ with_machine_options({
|
|
172
172
|
chef_config: "log_level :debug\\n", # String containing additional text to inject into client.rb
|
173
173
|
chef_server: "http://my.chef.server/", # TODO could conflict with https://github.com/chef/chef-provisioning#pointing-boxes-at-chef-servers
|
174
174
|
bootstrap_proxy: "http://localhost:1234",
|
175
|
+
bootstrap_no_proxy: "localhost, *.example.com, my.chef.server",
|
175
176
|
ssl_verify_mode: :verify_peer,
|
176
177
|
client_rb_path: "/etc/chef/client.rb", # <- DEFAULT, overwrite if necessary
|
177
178
|
client_pem_path: "/etc/chef/client.pem", # <- DEFAULT, overwrite if necessary
|
@@ -0,0 +1,35 @@
|
|
1
|
+
$:.unshift(File.dirname(__FILE__) + '/lib')
|
2
|
+
require 'chef/provisioning/version'
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = 'chef-provisioning'
|
6
|
+
s.version = Chef::Provisioning::VERSION
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.extra_rdoc_files = ['README.md', 'CHANGELOG.md', 'LICENSE' ]
|
9
|
+
s.summary = 'A library for creating machines and infrastructures idempotently in Chef.'
|
10
|
+
s.description = s.summary
|
11
|
+
s.author = 'John Keiser'
|
12
|
+
s.email = 'jkeiser@chef.io'
|
13
|
+
s.homepage = 'http://github.com/chef/chef-provisioning/README.md'
|
14
|
+
|
15
|
+
s.add_dependency 'net-ssh', '~> 2.0'
|
16
|
+
s.add_dependency 'net-scp', '~> 1.0'
|
17
|
+
s.add_dependency 'net-ssh-gateway', '~> 1.2.0'
|
18
|
+
s.add_dependency 'inifile', '~> 2.0'
|
19
|
+
s.add_dependency 'cheffish', '~> 1.3', '>= 1.3.1' # 1.3.1 allows 'let' vars in unquoted recipes.
|
20
|
+
s.add_dependency 'winrm', '~> 1.3'
|
21
|
+
s.add_dependency "mixlib-install", "~> 0.7.0"
|
22
|
+
|
23
|
+
s.add_development_dependency 'chef', '~> 12.1', "!= 12.4.0" # 12.4.0 is incompatible.
|
24
|
+
s.add_development_dependency 'rspec'
|
25
|
+
s.add_development_dependency 'rake'
|
26
|
+
s.add_development_dependency 'pry'
|
27
|
+
s.add_development_dependency 'simplecov'
|
28
|
+
|
29
|
+
s.bindir = "bin"
|
30
|
+
s.executables = %w( )
|
31
|
+
|
32
|
+
s.require_path = 'lib'
|
33
|
+
s.files = %w(Gemfile Rakefile LICENSE README.md CHANGELOG.md) + Dir.glob("*.gemspec") +
|
34
|
+
Dir.glob("{distro,lib,tasks,spec}/**/*", File::FNM_DOTMATCH).reject {|f| File.directory?(f) }
|
35
|
+
end
|
@@ -77,11 +77,15 @@ class Machine < Chef::Provider::LWRPBase
|
|
77
77
|
end
|
78
78
|
|
79
79
|
action :converge_only do
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
80
|
+
if new_resource.converge == false
|
81
|
+
Chef::Log.debug("Not converging #{machine_spec.name} because 'converge false' is set.")
|
82
|
+
else
|
83
|
+
machine = run_context.chef_provisioning.connect_to_machine(machine_spec, current_machine_options)
|
84
|
+
begin
|
85
|
+
machine.converge(action_handler)
|
86
|
+
ensure
|
87
|
+
machine.disconnect
|
88
|
+
end
|
85
89
|
end
|
86
90
|
end
|
87
91
|
|
@@ -14,7 +14,6 @@ module Provisioning
|
|
14
14
|
:client_pem_path => '/etc/chef/client.pem'
|
15
15
|
})
|
16
16
|
super(convergence_options, config)
|
17
|
-
@install_sh_url = convergence_options[:install_sh_url] || 'https://www.chef.io/chef/install.sh'
|
18
17
|
@install_sh_path = convergence_options[:install_sh_path] || '/tmp/chef-install.sh'
|
19
18
|
@chef_version = convergence_options[:chef_version]
|
20
19
|
@prerelease = convergence_options[:prerelease]
|
@@ -25,7 +24,6 @@ module Provisioning
|
|
25
24
|
|
26
25
|
attr_reader :chef_version
|
27
26
|
attr_reader :prerelease
|
28
|
-
attr_reader :install_sh_url
|
29
27
|
attr_reader :install_sh_path
|
30
28
|
attr_reader :install_sh_arguments
|
31
29
|
attr_reader :bootstrap_env
|
@@ -239,6 +239,11 @@ module Provisioning
|
|
239
239
|
https_proxy #{convergence_options[:bootstrap_proxy].inspect}
|
240
240
|
EOM
|
241
241
|
end
|
242
|
+
if convergence_options[:bootstrap_no_proxy]
|
243
|
+
content << <<-EOM
|
244
|
+
no_proxy #{convergence_options[:bootstrap_no_proxy].inspect}
|
245
|
+
EOM
|
246
|
+
end
|
242
247
|
content.gsub!(/^\s+/, "")
|
243
248
|
content << convergence_options[:chef_config] if convergence_options[:chef_config]
|
244
249
|
content
|
@@ -174,8 +174,8 @@ module Provisioning
|
|
174
174
|
end
|
175
175
|
|
176
176
|
def available?
|
177
|
-
|
178
|
-
execute('pwd', :timeout =>
|
177
|
+
timeout = ssh_options[:timeout] || 10
|
178
|
+
execute('pwd', :timeout => timeout)
|
179
179
|
true
|
180
180
|
rescue Timeout::Error, Errno::EHOSTUNREACH, Errno::ENETUNREACH, Errno::EHOSTDOWN, Errno::ETIMEDOUT, Errno::ECONNREFUSED, Errno::ECONNRESET, Net::SSH::Disconnect
|
181
181
|
Chef::Log.debug("#{username}@#{host} unavailable: network connection failed or broke: #{$!.inspect}")
|
@@ -191,10 +191,10 @@ module Provisioning
|
|
191
191
|
|
192
192
|
def session
|
193
193
|
@session ||= begin
|
194
|
+
# Small initial connection timeout (10s) to help us fail faster when server is just dead
|
194
195
|
ssh_start_opts = { timeout:10 }.merge(ssh_options)
|
195
196
|
Chef::Log.debug("Opening SSH connection to #{username}@#{host} with options #{ssh_start_opts.dup.tap {
|
196
197
|
|ssh| ssh.delete(:key_data) }.inspect}")
|
197
|
-
# Small initial connection timeout (10s) to help us fail faster when server is just dead
|
198
198
|
begin
|
199
199
|
if gateway? then gateway.ssh(host, username, ssh_start_opts)
|
200
200
|
else Net::SSH.start(host, username, ssh_start_opts)
|
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.
|
4
|
+
version: 1.5.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-
|
11
|
+
date: 2015-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -106,14 +106,14 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
109
|
+
version: 0.7.0
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
116
|
+
version: 0.7.0
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: chef
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,9 +200,11 @@ extra_rdoc_files:
|
|
200
200
|
- LICENSE
|
201
201
|
files:
|
202
202
|
- CHANGELOG.md
|
203
|
+
- Gemfile
|
203
204
|
- LICENSE
|
204
205
|
- README.md
|
205
206
|
- Rakefile
|
207
|
+
- chef-provisioning.gemspec
|
206
208
|
- lib/chef/provider/load_balancer.rb
|
207
209
|
- lib/chef/provider/machine.rb
|
208
210
|
- lib/chef/provider/machine_batch.rb
|