kitchen-puppet 1.0.35 → 1.0.36

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,258 +1,258 @@
1
-
2
- # Puppet Apply Provisioner Options
3
-
4
- key | default value | Notes
5
- ----|---------------|--------
6
- puppet_version | "latest"| desired version, affects apt installs.
7
- facter_version | "latest"| desired version, affects apt installs.
8
- platform | platform_name kitchen.yml parameter | OS platform of server
9
- hiera_version | "latest"| desired version, affects apt installs.
10
- install_hiera | false | Installs `hiera-puppet` package. Not needed for puppet > 3.x.x
11
- hiera_package | 'hiera-puppet' | Only used if `install_hiera` is set
12
- require_puppet_repo | true | Set if using a puppet install from yum or apt repo
13
- puppet_apt_repo | "http://apt.puppetlabs.com/puppetlabs-release-precise.deb"| apt repo Ubuntu12
14
- _for Ubuntu15 change to_ | "http://apt.puppetlabs.com/puppetlabs-release-jessie.deb" |
15
- puppet_yum_repo | "https://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm"| yum repo RH/Centos6
16
- _for RH/Centos7 change to_ | "https://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm" |
17
- require_puppet_collections | false | Set if using puppet collections install (Puppet v4)
18
- puppet_yum_collections_repo | "http://yum.puppetlabs.com/puppetlabs-release-pc1-el-6.noarch.rpm" | yum collections repo RH/Centos6
19
- _for RH/Centos7 change to_ | "https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm" |
20
- puppet_apt_collections_repo | "http://apt.puppetlabs.com/puppetlabs-release-pc1-wheezy.deb" | apt collections repo
21
- _for Ubuntu15 change to_ | "http://apt.puppetlabs.com/puppetlabs-release-pc1-jessie.deb" |
22
- puppet_coll_remote_path | "/opt/puppetlabs" | Server Installation location of a puppet collections install.
23
- puppet_detailed_exitcodes | nil | Provide transaction information via exit codes.
24
- manifests_path | | puppet repo manifests directory
25
- manifest | 'site.pp' | manifest for puppet apply to run
26
- modules_path | | puppet repo manifests directory
27
- files_path | | directory to place at /tmp/kitchen/files
28
- fileserver_config_path | | file to place fileserver.conf
29
- hiera_config_path | | path to hiera.yaml
30
- hiera_data_path | | puppet repo hiera data directory
31
- hiera_data_remote_path | "/var/lib/hiera" | Hiera data directory on server
32
- puppet_debug| false| Enable full debugging logging on puppet run
33
- puppet_verbose| false| Extra information logging on puppet run
34
- puppet_noop| false| puppet runs in a no-op or dry-run mode
35
- puppet_git_init | nil | initialize puppet from GIT repository, e.g. "git@github.com:example/puppet-repo.git"
36
- puppet_git_pr | nil | checkout specific Pull Request from repository specified in puppet_git_init, e.g. "324"
37
- update_package_repos| true| update OS repository metadata
38
- custom_facts| Hash.new | Hash to set the puppet facts before running puppet apply
39
- install_custom_facts| false | Install custom facts to yaml file at "/tmp/kitchen/facter/kitchen.rb"
40
- facter_file | nil | yaml file of custom facter_files to be provided to the puppet-apply command
41
- chef_bootstrap_url |"https://www.getchef.com/chef/install.sh"| the chef (needed for busser to run tests) NOTE: kitchen 1.4 only requires ruby to run busser so this is not required.
42
- puppetfile_path | | Path to Puppetfile
43
- puppet_apply_command | nil | Overwrite the puppet apply command. Needs "sudo -E puppet apply" as a prefix.
44
- require_chef_for_busser | true | Install chef as currently needed by busser to run tests
45
- resolve_with_librarian_puppet | true | Use librarian_puppet to resolve modules if a Puppetfile is found
46
- librarian_puppet_ssl_file | nil | ssl certificate file for librarian-puppet
47
- puppet_config_path | | path of custom puppet.conf file
48
- puppet_environment | nil | puppet environment for running puppet apply (Must set if using Puppet v4)
49
- remove_puppet_repo | false | remove copy of puppet repository and puppet configuration on server after running puppet
50
- hiera_eyaml | false | use hiera-eyaml to encrypt hiera data
51
- hiera_eyaml_key_remote_path | "/etc/puppet/secure/keys" | directory of hiera-eyaml keys on server
52
- hiera_eyaml_key_path | "hiera_keys" | directory of hiera-eyaml keys on workstation
53
- hiera_deep_merge | false | install the deep_merge gem to support hiera deep merge mode
54
- http_proxy | nil | use http proxy when installing puppet, packages and running puppet
55
- https_proxy | nil | use https proxy when installing puppet, packages and running puppet
56
- puppet_logdest | nil | _Array_ of log destinations. Include 'console' if wanted
57
- custom_options | | custom options to add to puppet apply command.
58
- custom_install_command | nil | Custom shell command to be used at install stage. Can be multiline. See examples below.
59
-
60
-
61
- ## Puppet Apply Configuring Provisioner Options
62
-
63
- The provisioner can be configured globally or per suite, global settings act as defaults for all suites, you can then customise per suite, for example:
64
-
65
- ```yaml
66
- ---
67
- driver:
68
- name: vagrant
69
-
70
- provisioner:
71
- name: puppet_apply
72
- manifests_path: /repository/puppet_repo/manifests
73
- modules_path: /repository/puppet_repo/modules-mycompany
74
- hiera_data_path: /repository/puppet_repo/hieradata
75
-
76
- platforms:
77
- - name: nocm_ubuntu-12.04
78
- driver_plugin: vagrant
79
- driver_config:
80
- box: nocm_ubuntu-12.04
81
- box_url: http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box
82
-
83
- suites:
84
- - name: default
85
- ```
86
-
87
- **NOTE:** With Test-Kitchen 1.4 you not longer need chef install to run the tests. You just need ruby installed version 1.9 or higher and also add to the .kitchen.yml file
88
-
89
- ```yaml
90
- verifier:
91
- ruby_bindir: '/usr/bin'
92
- ```
93
- where /usr/bin is the location of the ruby command.
94
-
95
- in this example, vagrant will download a box for ubuntu 1204 with no configuration management installed, then install the
96
- latest puppet and puppet apply against a puppet repo from the /repository/puppet_repo directory using the defailt manifest site.pp
97
-
98
- To override a setting at the suite-level, specify the setting name under the suite:
99
-
100
- ```yaml
101
- suites:
102
- - name: default
103
- provisioner:
104
- manifest: foobar.pp
105
- ```
106
-
107
- #### custom_install_command example usage
108
-
109
- * One liner
110
- ```yaml
111
- custom_install_command: yum install -y git
112
- ```
113
- * Multiple lines, a.k.a embed shell script
114
- ```yaml
115
- custom_install_command: |
116
- command1
117
- command2
118
- ```
119
- * Multiple lines join without new line
120
- ```yaml
121
- custom_install_command: >
122
- command1 &&
123
- command2
124
- ```
125
-
126
- ### Per-suite Structure
127
-
128
- It can be beneficial to keep different Puppet layouts for different suites. Rather than having to specify the manifest, modules, etc for each suite, you can create the following directory structure and they will automatically be found:
129
-
130
- $kitchen_root/puppet/$suite_name/manifests
131
- $kitchen_root/puppet/$suite_name/modules
132
- $kitchen_root/puppet/$suite_name/hiera
133
- $kitchen_root/puppet/$suite_name/hiera.yaml
134
- $kitchen_root/puppet/$suite_name/Puppetfile
135
-
136
- ### Puppet Version
137
- When specifying a puppet version, you must use this format: "3.6.2-1puppetlabs1". I have
138
- no idea why Puppet versioned their repository with a trailing
139
- "-1puppetlabs1", but there it is.
140
-
141
-
142
- # Puppet Agent Provisioner Options
143
-
144
- key | default value | Notes
145
- ----|---------------|--------
146
- puppet_version | "latest"| desired version, affects apt installs.
147
- facter_version | "latest"| desired version, affects apt installs.
148
- platform | platform_name kitchen.yml parameter | OS platform of server
149
- require_puppet_repo | true | Set if using a puppet install from yum or apt repo
150
- puppet_apt_repo | "http://apt.puppetlabs.com/puppetlabs-release-precise.deb"| apt repo
151
- puppet_yum_repo | "https://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm"| yum repo
152
- require_puppet_omnibus | false | Set if using omnibus puppet install
153
- puppet_omnibus_url | | omnibus puppet install location.
154
- puppet_omnibus_remote_path | "/opt/puppet" | Server Installation location of an omnibus puppet install.
155
- puppet_detailed_exitcodes | nil | Provide transaction information via exit codes.
156
- puppet_logdest | nil | Where to send messages. Choose between syslog, the console, and a log file.
157
- puppet_masterport | nil | The port on which to contact the puppet master.
158
- puppet_test | false | Enable the most common options used for testing.
159
- puppet_onetime | true | Run the configuration once.
160
- puppet_no_daemonize | true | Do not send the process into the background.
161
- puppet_server | nil | will default to 'puppet'. Useful for interactively running when used with the --no-daemonize option.
162
- puppet_waitforcert | '0' | Time to wait for certificate if agent does not yet have certificates
163
- puppet_certname | nil | Set the certname (unique ID) of the client
164
- puppet_digest | nil | Change the certificate fingerprinting digest algorithm. The default is SHA256
165
- puppet_debug| false| Enable full debugging logging on puppet run
166
- puppet_verbose| false| Extra information logging on puppet run
167
- puppet_noop| false| puppet runs in a no-op or dry-run mode
168
- update_package_repos| true| update OS repository metadata
169
- custom_facts| Hash.new | Hash to set the puppet facts before running puppet apply
170
- facterlib | nil | Path for dynamic fact generation, e.g. /etc/puppet/facter . See https://docs.puppetlabs.com/facter/2.2/custom_facts.html
171
- chef_bootstrap_url |"https://www.getchef.com/chef/install.sh"| the chef (needed for busser to run tests)
172
- puppet_agent_command | nil | Overwrite the puppet agent command. Needs "sudo -E puppet agent" as a prefix.
173
- require_chef_for_busser | true | Install chef as currently needed by busser to run tests. NOTE: kitchen 1.4 only requires ruby to run busser so this is not required.
174
- puppet_config_path | | path of custom puppet.conf file
175
- http_proxy | nil | use http proxy when installing puppet and packages
176
-
177
-
178
- NOTE: Puppet Collections Support not in puppet agent yet
179
-
180
- ## Puppet Agent Configuring Provisioner Options
181
-
182
- The provisioner can be configured globally or per suite, global settings act as defaults for all suites, you can then customise per suite, for example:
183
-
184
- ```yaml
185
- ---
186
- driver:
187
- name: vagrant
188
-
189
- provisioner:
190
- name: puppet_agent
191
- puppet_debug: true
192
- puppet_verbose: true
193
- puppet_server: puppetmaster-nocm-ubuntu-1204
194
-
195
- platforms:
196
- - name: nocm_ubuntu-12.04
197
- driver_plugin: vagrant
198
- driver_config:
199
- box: nocm_ubuntu-12.04
200
- box_url: http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box
201
-
202
- suites:
203
- - name: default
204
- ```
205
-
206
- **NOTE:** With Test-Kitchen 1.4 you not longer need chef install to run the tests. You just need ruby installed version 1.9 or higher and also add to the .kitchen.yml file
207
-
208
- ```yaml
209
- verifier:
210
- ruby_bindir: '/usr/bin'
211
- ```
212
- where /usr/bin is the location of the ruby command.
213
-
214
- In this example, vagrant will download a box for ubuntu 1204 with no configuration management installed, then install the latest puppet and run puppet agent against a puppet master at puppetmaster-nocm-ubuntu-1204
215
-
216
- NOTE: It is important that the server can resolve the hostname ip address of the puppetmaster, in this case puppetmaster-nocm-ubuntu-1204
217
- and the puppetmaster must be able to resolve the hostname ip address address of the hostname of the node running puppet agent.
218
- This can be done by settings in the /etc/hosts files before running puppet.
219
-
220
- NOTE: For testing it is possible to set the puppetmaster to autosign the certificate of a node by created a file /etc/puppet/autosign.conf that contains an *.
221
-
222
-
223
- To override a setting at the suite-level, specify the setting name under the suite:
224
-
225
- ```yaml
226
- suites:
227
- - name: default
228
- provisioner:
229
- manifest: foobar.pp
230
- ```
231
-
232
- ## Custom ServerSpec or Beaker Invocation
233
-
234
- Instead of using the busser use a custom serverspec invocation using [shell verifier](https://github.com/higanworks/kitchen-verifier-shell) to call it.
235
- With such setup there is no dependency on busser and any other chef library.
236
-
237
- Also you can specify you tests in a different directory structure or even call [beaker](https://github.com/puppetlabs/beaker) instead of server spec and have tests in beaker structure
238
-
239
- Using a structure like
240
- ```yaml
241
- verifier:
242
- name: shell
243
- remote_exec: true
244
- command: |
245
- sudo -s <<SERVERSPEC
246
- cd /opt/gdc/serverspec-core
247
- export SERVERSPEC_ENV=$EC2DATA_ENVIRONMENT
248
- export SERVERSPEC_BACKEND=exec
249
- serverspec junit=true tag=~skip_in_kitchen check:role:$EC2DATA_TYPE
250
- SERVERSPEC
251
- ```
252
-
253
- where `serverspec` is a wrapper around `rake` invocation.
254
- Use a `Rakefile` similar to one in https://github.com/vincentbernat/serverspec-example.
255
-
256
- With such approach we can achieve flexibility of running same test suite both in test kitchen and actual, even production, instances.
257
-
258
- Beware: kitchen-shell-verifier is not yet merged into test-kitchen upstream so using separate gem is unavoidable so far
1
+
2
+ # Puppet Apply Provisioner Options
3
+
4
+ key | default value | Notes
5
+ ----|---------------|--------
6
+ puppet_version | "latest"| desired version, affects apt installs.
7
+ facter_version | "latest"| desired version, affects apt installs.
8
+ platform | platform_name kitchen.yml parameter | OS platform of server
9
+ hiera_version | "latest"| desired version, affects apt installs.
10
+ install_hiera | false | Installs `hiera-puppet` package. Not needed for puppet > 3.x.x
11
+ hiera_package | 'hiera-puppet' | Only used if `install_hiera` is set
12
+ require_puppet_repo | true | Set if using a puppet install from yum or apt repo
13
+ puppet_apt_repo | "http://apt.puppetlabs.com/puppetlabs-release-precise.deb"| apt repo Ubuntu12
14
+ _for Ubuntu15 change to_ | "http://apt.puppetlabs.com/puppetlabs-release-jessie.deb" |
15
+ puppet_yum_repo | "https://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm"| yum repo RH/Centos6
16
+ _for RH/Centos7 change to_ | "https://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm" |
17
+ require_puppet_collections | false | Set if using puppet collections install (Puppet v4)
18
+ puppet_yum_collections_repo | "http://yum.puppetlabs.com/puppetlabs-release-pc1-el-6.noarch.rpm" | yum collections repo RH/Centos6
19
+ _for RH/Centos7 change to_ | "https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm" |
20
+ puppet_apt_collections_repo | "http://apt.puppetlabs.com/puppetlabs-release-pc1-wheezy.deb" | apt collections repo
21
+ _for Ubuntu15 change to_ | "http://apt.puppetlabs.com/puppetlabs-release-pc1-jessie.deb" |
22
+ puppet_coll_remote_path | "/opt/puppetlabs" | Server Installation location of a puppet collections install.
23
+ puppet_detailed_exitcodes | nil | Provide transaction information via exit codes.
24
+ manifests_path | | puppet repo manifests directory
25
+ manifest | 'site.pp' | manifest for puppet apply to run
26
+ modules_path | | puppet repo manifests directory
27
+ files_path | | directory to place at /tmp/kitchen/files
28
+ fileserver_config_path | | file to place fileserver.conf
29
+ hiera_config_path | | path to hiera.yaml
30
+ hiera_data_path | | puppet repo hiera data directory
31
+ hiera_data_remote_path | "/var/lib/hiera" | Hiera data directory on server
32
+ puppet_debug| false| Enable full debugging logging on puppet run
33
+ puppet_verbose| false| Extra information logging on puppet run
34
+ puppet_noop| false| puppet runs in a no-op or dry-run mode
35
+ puppet_git_init | nil | initialize puppet from GIT repository, e.g. "git@github.com:example/puppet-repo.git"
36
+ puppet_git_pr | nil | checkout specific Pull Request from repository specified in puppet_git_init, e.g. "324"
37
+ update_package_repos| true| update OS repository metadata
38
+ custom_facts| Hash.new | Hash to set the puppet facts before running puppet apply
39
+ install_custom_facts| false | Install custom facts to yaml file at "/tmp/kitchen/facter/kitchen.rb"
40
+ facter_file | nil | yaml file of custom facter_files to be provided to the puppet-apply command
41
+ chef_bootstrap_url |"https://www.getchef.com/chef/install.sh"| the chef (needed for busser to run tests) NOTE: kitchen 1.4 only requires ruby to run busser so this is not required.
42
+ puppetfile_path | | Path to Puppetfile
43
+ puppet_apply_command | nil | Overwrite the puppet apply command. Needs "sudo -E puppet apply" as a prefix.
44
+ require_chef_for_busser | true | Install chef as currently needed by busser to run tests
45
+ resolve_with_librarian_puppet | true | Use librarian_puppet to resolve modules if a Puppetfile is found
46
+ librarian_puppet_ssl_file | nil | ssl certificate file for librarian-puppet
47
+ puppet_config_path | | path of custom puppet.conf file
48
+ puppet_environment | nil | puppet environment for running puppet apply (Must set if using Puppet v4)
49
+ remove_puppet_repo | false | remove copy of puppet repository and puppet configuration on server after running puppet
50
+ hiera_eyaml | false | use hiera-eyaml to encrypt hiera data
51
+ hiera_eyaml_key_remote_path | "/etc/puppet/secure/keys" | directory of hiera-eyaml keys on server
52
+ hiera_eyaml_key_path | "hiera_keys" | directory of hiera-eyaml keys on workstation
53
+ hiera_deep_merge | false | install the deep_merge gem to support hiera deep merge mode
54
+ http_proxy | nil | use http proxy when installing puppet, packages and running puppet
55
+ https_proxy | nil | use https proxy when installing puppet, packages and running puppet
56
+ puppet_logdest | nil | _Array_ of log destinations. Include 'console' if wanted
57
+ custom_options | | custom options to add to puppet apply command.
58
+ custom_install_command | nil | Custom shell command to be used at install stage. Can be multiline. See examples below.
59
+
60
+
61
+ ## Puppet Apply Configuring Provisioner Options
62
+
63
+ The provisioner can be configured globally or per suite, global settings act as defaults for all suites, you can then customise per suite, for example:
64
+
65
+ ```yaml
66
+ ---
67
+ driver:
68
+ name: vagrant
69
+
70
+ provisioner:
71
+ name: puppet_apply
72
+ manifests_path: /repository/puppet_repo/manifests
73
+ modules_path: /repository/puppet_repo/modules-mycompany
74
+ hiera_data_path: /repository/puppet_repo/hieradata
75
+
76
+ platforms:
77
+ - name: nocm_ubuntu-12.04
78
+ driver_plugin: vagrant
79
+ driver_config:
80
+ box: nocm_ubuntu-12.04
81
+ box_url: http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box
82
+
83
+ suites:
84
+ - name: default
85
+ ```
86
+
87
+ **NOTE:** With Test-Kitchen 1.4 you not longer need chef install to run the tests. You just need ruby installed version 1.9 or higher and also add to the .kitchen.yml file
88
+
89
+ ```yaml
90
+ verifier:
91
+ ruby_bindir: '/usr/bin'
92
+ ```
93
+ where /usr/bin is the location of the ruby command.
94
+
95
+ in this example, vagrant will download a box for ubuntu 1204 with no configuration management installed, then install the
96
+ latest puppet and puppet apply against a puppet repo from the /repository/puppet_repo directory using the defailt manifest site.pp
97
+
98
+ To override a setting at the suite-level, specify the setting name under the suite:
99
+
100
+ ```yaml
101
+ suites:
102
+ - name: default
103
+ provisioner:
104
+ manifest: foobar.pp
105
+ ```
106
+
107
+ #### custom_install_command example usage
108
+
109
+ * One liner
110
+ ```yaml
111
+ custom_install_command: yum install -y git
112
+ ```
113
+ * Multiple lines, a.k.a embed shell script
114
+ ```yaml
115
+ custom_install_command: |
116
+ command1
117
+ command2
118
+ ```
119
+ * Multiple lines join without new line
120
+ ```yaml
121
+ custom_install_command: >
122
+ command1 &&
123
+ command2
124
+ ```
125
+
126
+ ### Per-suite Structure
127
+
128
+ It can be beneficial to keep different Puppet layouts for different suites. Rather than having to specify the manifest, modules, etc for each suite, you can create the following directory structure and they will automatically be found:
129
+
130
+ $kitchen_root/puppet/$suite_name/manifests
131
+ $kitchen_root/puppet/$suite_name/modules
132
+ $kitchen_root/puppet/$suite_name/hiera
133
+ $kitchen_root/puppet/$suite_name/hiera.yaml
134
+ $kitchen_root/puppet/$suite_name/Puppetfile
135
+
136
+ ### Puppet Version
137
+ When specifying a puppet version, you must use this format: "3.6.2-1puppetlabs1". I have
138
+ no idea why Puppet versioned their repository with a trailing
139
+ "-1puppetlabs1", but there it is.
140
+
141
+
142
+ # Puppet Agent Provisioner Options
143
+
144
+ key | default value | Notes
145
+ ----|---------------|--------
146
+ puppet_version | "latest"| desired version, affects apt installs.
147
+ facter_version | "latest"| desired version, affects apt installs.
148
+ platform | platform_name kitchen.yml parameter | OS platform of server
149
+ require_puppet_repo | true | Set if using a puppet install from yum or apt repo
150
+ puppet_apt_repo | "http://apt.puppetlabs.com/puppetlabs-release-precise.deb"| apt repo
151
+ puppet_yum_repo | "https://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm"| yum repo
152
+ require_puppet_omnibus | false | Set if using omnibus puppet install
153
+ puppet_omnibus_url | | omnibus puppet install location.
154
+ puppet_omnibus_remote_path | "/opt/puppet" | Server Installation location of an omnibus puppet install.
155
+ puppet_detailed_exitcodes | nil | Provide transaction information via exit codes.
156
+ puppet_logdest | nil | Where to send messages. Choose between syslog, the console, and a log file.
157
+ puppet_masterport | nil | The port on which to contact the puppet master.
158
+ puppet_test | false | Enable the most common options used for testing.
159
+ puppet_onetime | true | Run the configuration once.
160
+ puppet_no_daemonize | true | Do not send the process into the background.
161
+ puppet_server | nil | will default to 'puppet'. Useful for interactively running when used with the --no-daemonize option.
162
+ puppet_waitforcert | '0' | Time to wait for certificate if agent does not yet have certificates
163
+ puppet_certname | nil | Set the certname (unique ID) of the client
164
+ puppet_digest | nil | Change the certificate fingerprinting digest algorithm. The default is SHA256
165
+ puppet_debug| false| Enable full debugging logging on puppet run
166
+ puppet_verbose| false| Extra information logging on puppet run
167
+ puppet_noop| false| puppet runs in a no-op or dry-run mode
168
+ update_package_repos| true| update OS repository metadata
169
+ custom_facts| Hash.new | Hash to set the puppet facts before running puppet apply
170
+ facterlib | nil | Path for dynamic fact generation, e.g. /etc/puppet/facter . See https://docs.puppetlabs.com/facter/2.2/custom_facts.html
171
+ chef_bootstrap_url |"https://www.getchef.com/chef/install.sh"| the chef (needed for busser to run tests)
172
+ puppet_agent_command | nil | Overwrite the puppet agent command. Needs "sudo -E puppet agent" as a prefix.
173
+ require_chef_for_busser | true | Install chef as currently needed by busser to run tests. NOTE: kitchen 1.4 only requires ruby to run busser so this is not required.
174
+ puppet_config_path | | path of custom puppet.conf file
175
+ http_proxy | nil | use http proxy when installing puppet and packages
176
+
177
+
178
+ NOTE: Puppet Collections Support not in puppet agent yet
179
+
180
+ ## Puppet Agent Configuring Provisioner Options
181
+
182
+ The provisioner can be configured globally or per suite, global settings act as defaults for all suites, you can then customise per suite, for example:
183
+
184
+ ```yaml
185
+ ---
186
+ driver:
187
+ name: vagrant
188
+
189
+ provisioner:
190
+ name: puppet_agent
191
+ puppet_debug: true
192
+ puppet_verbose: true
193
+ puppet_server: puppetmaster-nocm-ubuntu-1204
194
+
195
+ platforms:
196
+ - name: nocm_ubuntu-12.04
197
+ driver_plugin: vagrant
198
+ driver_config:
199
+ box: nocm_ubuntu-12.04
200
+ box_url: http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box
201
+
202
+ suites:
203
+ - name: default
204
+ ```
205
+
206
+ **NOTE:** With Test-Kitchen 1.4 you not longer need chef install to run the tests. You just need ruby installed version 1.9 or higher and also add to the .kitchen.yml file
207
+
208
+ ```yaml
209
+ verifier:
210
+ ruby_bindir: '/usr/bin'
211
+ ```
212
+ where /usr/bin is the location of the ruby command.
213
+
214
+ In this example, vagrant will download a box for ubuntu 1204 with no configuration management installed, then install the latest puppet and run puppet agent against a puppet master at puppetmaster-nocm-ubuntu-1204
215
+
216
+ NOTE: It is important that the server can resolve the hostname ip address of the puppetmaster, in this case puppetmaster-nocm-ubuntu-1204
217
+ and the puppetmaster must be able to resolve the hostname ip address address of the hostname of the node running puppet agent.
218
+ This can be done by settings in the /etc/hosts files before running puppet.
219
+
220
+ NOTE: For testing it is possible to set the puppetmaster to autosign the certificate of a node by created a file /etc/puppet/autosign.conf that contains an *.
221
+
222
+
223
+ To override a setting at the suite-level, specify the setting name under the suite:
224
+
225
+ ```yaml
226
+ suites:
227
+ - name: default
228
+ provisioner:
229
+ manifest: foobar.pp
230
+ ```
231
+
232
+ ## Custom ServerSpec or Beaker Invocation
233
+
234
+ Instead of using the busser use a custom serverspec invocation using [shell verifier](https://github.com/higanworks/kitchen-verifier-shell) to call it.
235
+ With such setup there is no dependency on busser and any other chef library.
236
+
237
+ Also you can specify you tests in a different directory structure or even call [beaker](https://github.com/puppetlabs/beaker) instead of server spec and have tests in beaker structure
238
+
239
+ Using a structure like
240
+ ```yaml
241
+ verifier:
242
+ name: shell
243
+ remote_exec: true
244
+ command: |
245
+ sudo -s <<SERVERSPEC
246
+ cd /opt/gdc/serverspec-core
247
+ export SERVERSPEC_ENV=$EC2DATA_ENVIRONMENT
248
+ export SERVERSPEC_BACKEND=exec
249
+ serverspec junit=true tag=~skip_in_kitchen check:role:$EC2DATA_TYPE
250
+ SERVERSPEC
251
+ ```
252
+
253
+ where `serverspec` is a wrapper around `rake` invocation.
254
+ Use a `Rakefile` similar to one in https://github.com/vincentbernat/serverspec-example.
255
+
256
+ With such approach we can achieve flexibility of running same test suite both in test kitchen and actual, even production, instances.
257
+
258
+ Beware: kitchen-shell-verifier is not yet merged into test-kitchen upstream so using separate gem is unavoidable so far