kitchen-puppet 1.44.2 → 1.45.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: cd58c9e24c4ed130d895099fb48c088aa5218700
4
- data.tar.gz: b579886df2009d4f4fe00c2c804d37825268c353
3
+ metadata.gz: bc9867719f776ed274af4071a93f2e596f874741
4
+ data.tar.gz: 46b3fec2a7f164ec354ff6787f47f66c4508b83d
5
5
  SHA512:
6
- metadata.gz: fe0ae57bd4aabe8c93f42c952b7e0f43a88a747f6e150154d1c0cc727254f70c58b6d867d87f7601a4df32bea284202c4aa352975261db6adefd95f51f0b4fb7
7
- data.tar.gz: f1462b3dfd3568b16eaa8ce952193bb107e900124e8319c9a0ba2803e855fecf0f639f32636cd3cfea2de8a88dcb1c7b3eb2237aeb34d4c17b6a119423a8c146
6
+ metadata.gz: 1263a1c2d9d8dd8d9ff5150efa040cf4db40080fd509e916473991c105ff82f9979fe15f278f002555f4d83dbf49e2ba064ed1f793df4b184e86fe662e0ec3e8
7
+ data.tar.gz: f68fa758a2873c03ecec436ddb13e321531f3d34da14c2879da990170148f67ea7ebb85ffab02694d5701fe6050dbde47016192a6d26d953ed732f6bbfd9c89f
data/README.md CHANGED
@@ -1,197 +1,197 @@
1
- # Kitchen Puppet
2
-
3
- [![Gem Version](https://badge.fury.io/rb/kitchen-puppet.svg)](http://badge.fury.io/rb/kitchen-puppet)
4
- [![Gem Downloads](http://ruby-gem-downloads-badge.herokuapp.com/kitchen-puppet?type=total&color=brightgreen)](https://rubygems.org/gems/kitchen-puppet)
5
- [![Build Status](https://travis-ci.org/neillturner/kitchen-puppet.png)](https://travis-ci.org/neillturner/kitchen-puppet)
6
-
7
- # kitchen-puppet
8
- A Test Kitchen Provisioner for Puppet
9
-
10
- The providers supports both puppet apply and puppet agent clients
11
-
12
- The PuppetApply provider works by passing the puppet repository based on attributes in .kitchen.yml & calling puppet apply.
13
-
14
- The PuppetAgent provider works by passing the puppetmaster and other attributes in .kitchen.yml & calling puppet agent.
15
-
16
-
17
- This provider has been tested against the Ubuntu 1204 and Centos 6.5 boxes running in vagrant/virtualbox as well as various docker .
18
-
19
- ## Windows Workstation Install
20
- You need to download the puppet msi and install it and run everything inside the puppet window.
21
-
22
- 1. Download and install puppet from the windows msi file from https://downloads.puppetlabs.com/windows
23
- * I recommend the using the 32 bit version as not all ruby gems works with the 64 bit version.
24
- * Don't do a 'gem install puppet' !!!.
25
-
26
- 2. Select "Start Command Prompt with Puppet" to go to a Command Window.
27
-
28
- 3. Install the Ruby DevKit:
29
- * Download and install devkit from http://rubyinstaller.org/downloads
30
- * (Use a 32 or 64 bit version that matches version of the ruby install)
31
- * In the devkit directory run “ruby dk.rb init”.
32
- * Edit the config.yml generated and add the the path of the ruby install for puppet
33
- * (it will be <install dir of puppet>/sys/ruby).
34
- * Run “ruby dk.rb install” to bind it to the puppet ruby installation.
35
-
36
- 4. From a Command prompt:
37
- * gem install librarian-puppet
38
- * gem install test-kitchen
39
- * gem install kitchen-puppet
40
-
41
- ## Mac-OSX Workstation Install
42
-
43
- 1. Download and install the mac packages from https://downloads.puppetlabs.com/mac/
44
- * The most recent Facter package (facter-<VERSION>.dmg)
45
- * The most recent Hiera package (hiera-<VERSION>.dmg)
46
- * The most recent Puppet package (puppet-<VERSION>.dmg)
47
- * See [How to Install Software from DMG Files on a Mac](http://www.ofzenandcomputing.com/how-to-install-dmg-files-mac/) for details.
48
-
49
- 2. From a Command prompt:
50
- * gem install librarian-puppet
51
- * gem install test-kitchen
52
- * gem install kitchen-puppet
53
-
54
- ## Requirements
55
- It is recommended to have a metadata.json file of your puppet module. It is used by kitchen-puppet to configure the module path.
56
- The puppet docs describe (https://docs.puppetlabs.com/puppet/latest/reference/modules_publishing.html#write-a-metadatajson-file) how to create one.
57
-
58
- You'll need a driver box without a chef installation so puppet can be installed. Puppet have one at http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box or http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box.
59
-
60
- For PuppetAgent a server with a puppet master is required that can resolve the hostname ip address of the server. The server must also be able to resolve the hostname ip address of the puppet master.
61
-
62
- You can also use the PuppetApply driver with a docker container, provided the necessary box requirements to install puppet are included inside the container. The easiest way to do this is to supply Kitchen-Docker with a custom dockerfile to install the needed dependencies for puppet installation.
63
-
64
- ## Windows Support
65
-
66
- There is windows/winrm support, currently not all functionality is supported.
67
- * `require_chef_for_busser: false` (it is possible to call rspec over winrm to run the tests)
68
- * `resolve_with_librarian_puppet: false` (librarian-puppet is not working on windows server)
69
-
70
- Sample Puppet Repositories
71
- * A sample hello world example puppet repository: https://github.com/neillturner/puppet_windows_repo
72
- * A more extensive sample installing virtualbox on windows: https://github.com/red-gate/puppet-virtualbox_windows
73
-
74
- ## Test-Kitchen Serverspec
75
-
76
- To run the verify step with the test-kitchen serverspec setup your puppet repository as follows:
77
-
78
- In the root directory for your puppet repository:
79
-
80
- Create a `.kitchen.yml`, much like one the described above:
81
-
82
- ```yaml
83
- ---
84
- driver:
85
- name: vagrant
86
-
87
- provisioner:
88
- name: puppet_apply
89
- manifests_path: /repository/puppet_repo/manifests
90
- modules_path: /repository/puppet_repo/modules-mycompany
91
- hiera_data_path: /repository/puppet_repo/hieradata
92
-
93
- platforms:
94
- - name: nocm_ubuntu-12.04
95
- driver_plugin: vagrant
96
- driver_config:
97
- box: nocm_ubuntu-12.04
98
- box_url: http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box
99
-
100
- suites:
101
- - name: default
102
- ```
103
-
104
- Then for serverspec:
105
-
106
- ```bash
107
- mkdir -p test/integration/default/serverspec/localhost
108
- echo "require 'serverspec'" >> test/integration/default/serverspec/spec_helper.rb
109
- echo "set :backend, :exec" >> test/integration/default/serverspec/spec_helper.rb
110
- ```
111
-
112
- Create your serverspec tests in `test/integration/default/serverspec/localhost/xxxxxx_spec.rb`:
113
-
114
- ```ruby
115
- require 'spec_helper'
116
-
117
- if os[:family] == 'ubuntu'
118
- describe '/etc/lsb-release' do
119
- it "exists" do
120
- expect(file('/etc/lsb-release')).to be_file
121
- end
122
- end
123
- end
124
-
125
- if os[:family] == 'redhat'
126
- describe '/etc/redhat-release' do
127
- it "exists" do
128
- expect(file('/etc/redhat-release')).to be_file
129
- end
130
- end
131
- end
132
- ```
133
-
134
- ## Test-Kitchen Beaker
135
-
136
- test-kitchen normally uses tests setup in `test/integration/....` directory. Beaker format puts the tests with the
137
- `spec/acceptance` directory in the puppet repository and the `spec_helper.rb` under the `spec` directory which is more logical.
138
-
139
- For examples see:
140
- * https://gitlab.com/joshbeard/puppet-module-test
141
- * https://github.com/puppetlabs/puppetlabs-mysql/tree/master/spec
142
-
143
- To implement this with test-kitchen setup the puppet repository with:
144
-
145
- * the spec files with the spec/acceptance directory.
146
-
147
- * the spec_helper in the spec folder.
148
-
149
- * install kitchen-verifier-serverspec on your workstation i.e. 'gem install kitchen-verifier-serverspec'
150
-
151
-
152
- See example [https://github.com/neillturner/puppet_repo](https://github.com/neillturner/puppet_repo)
153
-
154
- ```
155
- .
156
- +-- spec
157
- ¦   +-- acceptance
158
- ¦   ¦   +-- mariadb_spec.rb
159
- ¦   ¦ +-- nginx_spec.rb
160
- ¦   ¦
161
- +-- spec_helper.rb
162
-
163
- ```
164
-
165
- In the root directory for your puppet repository create a `.kitchen.yml` with
166
-
167
- * a verifier of 'serverspec'
168
- * a pattern parameter with the spec tests to run
169
-
170
- ```yaml
171
- verifier:
172
- name: serverspec
173
-
174
- suites:
175
- - name: base
176
- verifier:
177
- patterns:
178
- - modules/mycompany_base/spec/acceptance/base_spec.rb
179
- ```
180
-
181
- See [busser-beaker](https://github.com/neillturner/kitchen-verifier-serverspec)
182
-
183
-
184
- ## Provisioner Options
185
- Please see the Provisioner Options (https://github.com/neillturner/kitchen-puppet/blob/master/provisioner_options.md).
186
-
187
- ## Contributing
188
- To contribute to the repository, please follow the Fork / PR model:
189
-
190
- 1. Fork The Repository
191
- 2. Work on epic changes
192
- 3. Write tests for your changes, see [TESTING](TESTING.md)
193
- 4. Update Documentation
194
- 5. Commit
195
- 6. Push
196
- 7. Create PR
197
- 8. Profit(?)
1
+ # Kitchen Puppet
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/kitchen-puppet.svg)](http://badge.fury.io/rb/kitchen-puppet)
4
+ [![Gem Downloads](http://ruby-gem-downloads-badge.herokuapp.com/kitchen-puppet?type=total&color=brightgreen)](https://rubygems.org/gems/kitchen-puppet)
5
+ [![Build Status](https://travis-ci.org/neillturner/kitchen-puppet.png)](https://travis-ci.org/neillturner/kitchen-puppet)
6
+
7
+ # kitchen-puppet
8
+ A Test Kitchen Provisioner for Puppet
9
+
10
+ The providers supports both puppet apply and puppet agent clients
11
+
12
+ The PuppetApply provider works by passing the puppet repository based on attributes in .kitchen.yml & calling puppet apply.
13
+
14
+ The PuppetAgent provider works by passing the puppetmaster and other attributes in .kitchen.yml & calling puppet agent.
15
+
16
+
17
+ This provider has been tested against the Ubuntu 1204 and Centos 6.5 boxes running in vagrant/virtualbox as well as various docker .
18
+
19
+ ## Windows Workstation Install
20
+ You need to download the puppet msi and install it and run everything inside the puppet window.
21
+
22
+ 1. Download and install puppet from the windows msi file from https://downloads.puppetlabs.com/windows
23
+ * I recommend the using the 64 bit version now.
24
+ * Don't do a 'gem install puppet' !!!.
25
+
26
+ 2. Select "Start Command Prompt with Puppet" to go to a Command Window.
27
+
28
+ 3. Install the Ruby DevKit:
29
+ * Download and install devkit from http://rubyinstaller.org/downloads
30
+ * (Use the 32 or 64 bit version that matches version of the puppet install)
31
+ * In the devkit directory run “ruby dk.rb init”.
32
+ * Edit the config.yml generated and add the the path of the ruby install for puppet
33
+ * (it will be <install dir of puppet>/sys/ruby).
34
+ * Run “ruby dk.rb install” to bind it to the puppet ruby installation.
35
+
36
+ 4. From a Command prompt:
37
+ * gem install librarian-puppet
38
+ * gem install test-kitchen
39
+ * gem install kitchen-puppet
40
+
41
+ ## Mac-OSX Workstation Install
42
+
43
+ 1. Download and install the mac packages from https://downloads.puppetlabs.com/mac/
44
+ * The most recent Facter package (facter-<VERSION>.dmg)
45
+ * The most recent Hiera package (hiera-<VERSION>.dmg)
46
+ * The most recent Puppet package (puppet-<VERSION>.dmg)
47
+ * See [How to Install Software from DMG Files on a Mac](http://www.ofzenandcomputing.com/how-to-install-dmg-files-mac/) for details.
48
+
49
+ 2. From a Command prompt:
50
+ * gem install librarian-puppet
51
+ * gem install test-kitchen
52
+ * gem install kitchen-puppet
53
+
54
+ ## Requirements
55
+ It is recommended to have a metadata.json file of your puppet module. It is used by kitchen-puppet to configure the module path.
56
+ The puppet docs describe (https://docs.puppetlabs.com/puppet/latest/reference/modules_publishing.html#write-a-metadatajson-file) how to create one.
57
+
58
+ You'll need a driver box without a chef installation so puppet can be installed. Puppet have one at http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box or http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box.
59
+
60
+ For PuppetAgent a server with a puppet master is required that can resolve the hostname ip address of the server. The server must also be able to resolve the hostname ip address of the puppet master.
61
+
62
+ You can also use the PuppetApply driver with a docker container, provided the necessary box requirements to install puppet are included inside the container. The easiest way to do this is to supply Kitchen-Docker with a custom dockerfile to install the needed dependencies for puppet installation.
63
+
64
+ ## Windows Support
65
+
66
+ There is windows/winrm support, currently not all functionality is supported.
67
+ * `require_chef_for_busser: false` (it is possible to call rspec over winrm to run the tests)
68
+ * `resolve_with_librarian_puppet: false` (librarian-puppet is not working on windows server)
69
+
70
+ Sample Puppet Repositories
71
+ * A sample hello world example puppet repository: https://github.com/neillturner/puppet_windows_repo
72
+ * A more extensive sample installing virtualbox on windows: https://github.com/red-gate/puppet-virtualbox_windows
73
+
74
+ ## Test-Kitchen Serverspec
75
+
76
+ To run the verify step with the test-kitchen serverspec setup your puppet repository as follows:
77
+
78
+ In the root directory for your puppet repository:
79
+
80
+ Create a `.kitchen.yml`, much like one the described above:
81
+
82
+ ```yaml
83
+ ---
84
+ driver:
85
+ name: vagrant
86
+
87
+ provisioner:
88
+ name: puppet_apply
89
+ manifests_path: /repository/puppet_repo/manifests
90
+ modules_path: /repository/puppet_repo/modules-mycompany
91
+ hiera_data_path: /repository/puppet_repo/hieradata
92
+
93
+ platforms:
94
+ - name: nocm_ubuntu-12.04
95
+ driver_plugin: vagrant
96
+ driver_config:
97
+ box: nocm_ubuntu-12.04
98
+ box_url: http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box
99
+
100
+ suites:
101
+ - name: default
102
+ ```
103
+
104
+ Then for serverspec:
105
+
106
+ ```bash
107
+ mkdir -p test/integration/default/serverspec/localhost
108
+ echo "require 'serverspec'" >> test/integration/default/serverspec/spec_helper.rb
109
+ echo "set :backend, :exec" >> test/integration/default/serverspec/spec_helper.rb
110
+ ```
111
+
112
+ Create your serverspec tests in `test/integration/default/serverspec/localhost/xxxxxx_spec.rb`:
113
+
114
+ ```ruby
115
+ require 'spec_helper'
116
+
117
+ if os[:family] == 'ubuntu'
118
+ describe '/etc/lsb-release' do
119
+ it "exists" do
120
+ expect(file('/etc/lsb-release')).to be_file
121
+ end
122
+ end
123
+ end
124
+
125
+ if os[:family] == 'redhat'
126
+ describe '/etc/redhat-release' do
127
+ it "exists" do
128
+ expect(file('/etc/redhat-release')).to be_file
129
+ end
130
+ end
131
+ end
132
+ ```
133
+
134
+ ## Test-Kitchen Beaker
135
+
136
+ test-kitchen normally uses tests setup in `test/integration/....` directory. Beaker format puts the tests with the
137
+ `spec/acceptance` directory in the puppet repository and the `spec_helper.rb` under the `spec` directory which is more logical.
138
+
139
+ For examples see:
140
+ * https://gitlab.com/joshbeard/puppet-module-test
141
+ * https://github.com/puppetlabs/puppetlabs-mysql/tree/master/spec
142
+
143
+ To implement this with test-kitchen setup the puppet repository with:
144
+
145
+ * the spec files with the spec/acceptance directory.
146
+
147
+ * the spec_helper in the spec folder.
148
+
149
+ * install kitchen-verifier-serverspec on your workstation i.e. 'gem install kitchen-verifier-serverspec'
150
+
151
+
152
+ See example [https://github.com/neillturner/puppet_repo](https://github.com/neillturner/puppet_repo)
153
+
154
+ ```
155
+ .
156
+ +-- spec
157
+ ¦   +-- acceptance
158
+ ¦   ¦   +-- mariadb_spec.rb
159
+ ¦   ¦ +-- nginx_spec.rb
160
+ ¦   ¦
161
+ +-- spec_helper.rb
162
+
163
+ ```
164
+
165
+ In the root directory for your puppet repository create a `.kitchen.yml` with
166
+
167
+ * a verifier of 'serverspec'
168
+ * a pattern parameter with the spec tests to run
169
+
170
+ ```yaml
171
+ verifier:
172
+ name: serverspec
173
+
174
+ suites:
175
+ - name: base
176
+ verifier:
177
+ patterns:
178
+ - modules/mycompany_base/spec/acceptance/base_spec.rb
179
+ ```
180
+
181
+ See [busser-beaker](https://github.com/neillturner/kitchen-verifier-serverspec)
182
+
183
+
184
+ ## Provisioner Options
185
+ Please see the Provisioner Options (https://github.com/neillturner/kitchen-puppet/blob/master/provisioner_options.md).
186
+
187
+ ## Contributing
188
+ To contribute to the repository, please follow the Fork / PR model:
189
+
190
+ 1. Fork The Repository
191
+ 2. Work on epic changes
192
+ 3. Write tests for your changes, see [TESTING](TESTING.md)
193
+ 4. Update Documentation
194
+ 5. Commit
195
+ 6. Push
196
+ 7. Create PR
197
+ 8. Profit(?)
@@ -1,35 +1,35 @@
1
- # encoding: utf-8
2
-
3
- $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
4
- require 'kitchen-puppet/version'
5
-
6
- Gem::Specification.new do |s|
7
- s.name = 'kitchen-puppet'
8
- s.license = 'Apache-2.0'
9
- s.version = Kitchen::Puppet::VERSION
10
- s.authors = ['Neill Turner']
11
- s.email = ['neillwturner@gmail.com']
12
- s.homepage = 'https://github.com/neillturner/kitchen-puppet'
13
- s.summary = 'puppet provisioner for test-kitchen'
14
- candidates = Dir.glob('{lib}/**/*') + ['README.md', 'provisioner_options.md', 'kitchen-puppet.gemspec']
15
- s.files = candidates.sort
16
- s.platform = Gem::Platform::RUBY
17
- s.require_paths = ['lib']
18
- s.rubyforge_project = '[none]'
19
- s.add_dependency 'test-kitchen', '~> 1.4'
20
- if RUBY_VERSION >= '2.0'
21
- s.add_dependency 'net-ssh', '~> 3'
22
- else
23
- s.add_dependency 'net-ssh', '~> 2.9'
24
- end
25
- s.description = <<-EOF
26
- == DESCRIPTION:
27
-
28
- Puppet Provisioner for Test Kitchen
29
-
30
- == FEATURES:
31
-
32
- Supports puppet apply, puppet agent, hiera, hiera-eyaml, custom facts, librarian-puppet, puppet collections (v4)
33
-
34
- EOF
35
- end
1
+ # encoding: utf-8
2
+
3
+ $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
4
+ require 'kitchen-puppet/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = 'kitchen-puppet'
8
+ s.license = 'Apache-2.0'
9
+ s.version = Kitchen::Puppet::VERSION
10
+ s.authors = ['Neill Turner']
11
+ s.email = ['neillwturner@gmail.com']
12
+ s.homepage = 'https://github.com/neillturner/kitchen-puppet'
13
+ s.summary = 'puppet provisioner for test-kitchen'
14
+ candidates = Dir.glob('{lib}/**/*') + ['README.md', 'provisioner_options.md', 'kitchen-puppet.gemspec']
15
+ s.files = candidates.sort
16
+ s.platform = Gem::Platform::RUBY
17
+ s.require_paths = ['lib']
18
+ s.rubyforge_project = '[none]'
19
+ s.add_dependency 'test-kitchen', '~> 1.4'
20
+ if RUBY_VERSION >= '2.0'
21
+ s.add_dependency 'net-ssh', '~> 3'
22
+ else
23
+ s.add_dependency 'net-ssh', '~> 2.9'
24
+ end
25
+ s.description = <<-EOF
26
+ == DESCRIPTION:
27
+
28
+ Puppet Provisioner for Test Kitchen
29
+
30
+ == FEATURES:
31
+
32
+ Supports puppet apply, puppet agent, hiera, hiera-eyaml, custom facts, librarian-puppet, puppet collections (v4)
33
+
34
+ EOF
35
+ end