test-kitchen 1.23.3 → 1.23.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. checksums.yaml +4 -4
  2. data/lib/kitchen/version.rb +1 -1
  3. data/support/chef-client-zero.rb +1 -1
  4. metadata +5 -324
  5. data/.gitattributes +0 -3
  6. data/.github/ISSUE_TEMPLATE.md +0 -56
  7. data/.github/lock.yml +0 -1
  8. data/.gitignore +0 -38
  9. data/.gitmodules +0 -0
  10. data/.kitchen.appveyor.yml +0 -25
  11. data/.kitchen.dokken.yml +0 -31
  12. data/.kitchen.proxy.yml +0 -27
  13. data/.rubocop.yml +0 -5
  14. data/.travis.yml +0 -57
  15. data/.yardopts +0 -3
  16. data/Berksfile +0 -3
  17. data/CHANGELOG.md +0 -1510
  18. data/CONTRIBUTING.md +0 -14
  19. data/ECOSYSTEM.md +0 -93
  20. data/Gemfile +0 -40
  21. data/Gemfile.proxy_tests +0 -4
  22. data/Guardfile +0 -42
  23. data/MAINTAINERS.md +0 -29
  24. data/README.md +0 -138
  25. data/RELEASE_NOTES.md +0 -167
  26. data/Rakefile +0 -77
  27. data/appveyor.yml +0 -47
  28. data/docs/CONTRIBUTING.md +0 -8
  29. data/docs/LICENSE +0 -22
  30. data/docs/README.md +0 -78
  31. data/docs/archetypes/default.md +0 -6
  32. data/docs/config.toml +0 -36
  33. data/docs/content/docs/_index.md +0 -5
  34. data/docs/content/docs/drivers/_index.md +0 -27
  35. data/docs/content/docs/drivers/azurerm.md +0 -44
  36. data/docs/content/docs/drivers/vagrant.md +0 -39
  37. data/docs/content/docs/getting-started/00-introduction.md +0 -14
  38. data/docs/content/docs/getting-started/01-installing.md +0 -64
  39. data/docs/content/docs/getting-started/02-getting-help.md +0 -59
  40. data/docs/content/docs/getting-started/03-creating-cookbook.md +0 -46
  41. data/docs/content/docs/getting-started/04-kitchen-yml.md +0 -56
  42. data/docs/content/docs/getting-started/05-instances.md +0 -79
  43. data/docs/content/docs/getting-started/06-writing-recipe.md +0 -21
  44. data/docs/content/docs/getting-started/07-running-converge.md +0 -134
  45. data/docs/content/docs/getting-started/08-manually-verifying.md +0 -55
  46. data/docs/content/docs/getting-started/09-writing-test.md +0 -49
  47. data/docs/content/docs/getting-started/10-running-verify.md +0 -120
  48. data/docs/content/docs/getting-started/11-running-test.md +0 -168
  49. data/docs/content/docs/getting-started/12-adding-platform.md +0 -206
  50. data/docs/content/docs/getting-started/13-adding-feature.md +0 -30
  51. data/docs/content/docs/getting-started/14-adding-suite.md +0 -60
  52. data/docs/content/docs/getting-started/15-adding-test.md +0 -66
  53. data/docs/content/docs/getting-started/16-adding-recipe.md +0 -53
  54. data/docs/content/docs/getting-started/17-excluding-platforms.md +0 -101
  55. data/docs/content/docs/getting-started/18-next-steps.md +0 -23
  56. data/docs/content/docs/getting-started/_index.md +0 -5
  57. data/docs/content/docs/provisioners/_index.md +0 -36
  58. data/docs/content/docs/provisioners/chef.md +0 -69
  59. data/docs/content/docs/provisioners/shell.md +0 -31
  60. data/docs/content/docs/reference/_index.md +0 -5
  61. data/docs/content/docs/reference/configuration.md +0 -53
  62. data/docs/content/docs/reference/examples.md +0 -97
  63. data/docs/content/docs/reference/faq.md +0 -58
  64. data/docs/content/docs/reference/fixtures.md +0 -32
  65. data/docs/content/docs/reference/glossary.md +0 -34
  66. data/docs/content/docs/reference/lifecycle-hooks.md +0 -68
  67. data/docs/content/docs/reference/reboots.md +0 -24
  68. data/docs/content/docs/verifiers/_index.md +0 -14
  69. data/docs/content/docs/verifiers/inspec.md +0 -44
  70. data/docs/content/docs/verifiers/serverspec.md +0 -20
  71. data/docs/static/images/chef-logo.png +0 -0
  72. data/docs/static/images/chef-logo.svg +0 -1
  73. data/docs/static/images/github-banner.png +0 -0
  74. data/docs/static/images/github-banner.svg +0 -71
  75. data/docs/static/images/kitchen-logo.png +0 -0
  76. data/docs/static/images/logo-block.svg +0 -222
  77. data/docs/static/images/logo.png +0 -0
  78. data/docs/static/images/logos-group.png +0 -0
  79. data/docs/static/images/terminal-1.png +0 -0
  80. data/docs/static/images/terminal-1.svg +0 -589
  81. data/docs/static/images/terminal-2.png +0 -0
  82. data/docs/static/images/terminal-2.svg +0 -235
  83. data/docs/static/images/terminal-3.png +0 -0
  84. data/docs/static/images/terminal-3.svg +0 -439
  85. data/docs/static/index.html +0 -59
  86. data/docs/static/javascripts/all.js +0 -348
  87. data/docs/static/javascripts/vendor/foundation.min.js +0 -4
  88. data/docs/static/javascripts/vendor/jquery.min.js +0 -5
  89. data/docs/static/javascripts/vendor/what-input.js +0 -336
  90. data/docs/static/stylesheets/site.css +0 -4667
  91. data/docs/themes/kitchen/layouts/_default/baseof.html +0 -53
  92. data/docs/themes/kitchen/layouts/_default/list.html +0 -4
  93. data/docs/themes/kitchen/layouts/_default/redirect.html +0 -10
  94. data/docs/themes/kitchen/layouts/_default/single.html +0 -6
  95. data/docs/themes/kitchen/layouts/partials/core/head.html +0 -6
  96. data/docs/themes/kitchen/layouts/partials/kitchen/footer.html +0 -18
  97. data/docs/themes/kitchen/layouts/partials/kitchen/head.html +0 -4
  98. data/docs/themes/kitchen/layouts/partials/kitchen/header.html +0 -26
  99. data/docs/themes/kitchen/layouts/partials/search-docs.html +0 -3
  100. data/docs/themes/kitchen/layouts/partials/sidebar.html +0 -33
  101. data/docs/themes/kitchen/layouts/shortcodes/button.html +0 -1
  102. data/docs/themes/kitchen/layouts/shortcodes/codeblock.html +0 -8
  103. data/docs/themes/kitchen/layouts/shortcodes/cta.html +0 -5
  104. data/docs/themes/kitchen/layouts/shortcodes/danger.html +0 -1
  105. data/docs/themes/kitchen/layouts/shortcodes/example_fqdn.html +0 -1
  106. data/docs/themes/kitchen/layouts/shortcodes/info.html +0 -1
  107. data/docs/themes/kitchen/layouts/shortcodes/ol-styled.html +0 -3
  108. data/docs/themes/kitchen/layouts/shortcodes/success.html +0 -1
  109. data/docs/themes/kitchen/layouts/shortcodes/tip.html +0 -1
  110. data/docs/themes/kitchen/layouts/shortcodes/warning.html +0 -1
  111. data/docs/themes/kitchen/static/css/kitchen.css +0 -10
  112. data/docs/themes/kitchen/static/css/kitchen.css.map +0 -7
  113. data/docs/themes/kitchen/static/fonts/Muli-Bold.ttf +0 -0
  114. data/docs/themes/kitchen/static/fonts/Muli-Regular.ttf +0 -0
  115. data/docs/themes/kitchen/static/fonts/Muli-SemiBold.ttf +0 -0
  116. data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.eot +0 -0
  117. data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.svg +0 -1104
  118. data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.ttf +0 -0
  119. data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.woff +0 -0
  120. data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.woff2 +0 -0
  121. data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.eot +0 -0
  122. data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.svg +0 -372
  123. data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.ttf +0 -0
  124. data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.woff +0 -0
  125. data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.woff2 +0 -0
  126. data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.eot +0 -0
  127. data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.svg +0 -1896
  128. data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.ttf +0 -0
  129. data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.woff +0 -0
  130. data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.woff2 +0 -0
  131. data/docs/themes/kitchen/static/images/chef-logo-light.svg +0 -36
  132. data/docs/themes/kitchen/static/images/chef-logo-white.svg +0 -38
  133. data/docs/themes/kitchen/static/images/chef-logo.svg +0 -37
  134. data/docs/themes/kitchen/static/images/favicon.ico +0 -0
  135. data/docs/themes/kitchen/static/js/scripts-all.js +0 -7
  136. data/docs/themes/kitchen/static/js/source/chef-hugo.js +0 -116
  137. data/docs/themes/kitchen/static/js/source/omnitruck.js +0 -82
  138. data/docs/themes/kitchen/static/js/source/segment.js +0 -52
  139. data/docs/themes/kitchen/static/sass/_buttons.scss +0 -161
  140. data/docs/themes/kitchen/static/sass/_core.scss +0 -24
  141. data/docs/themes/kitchen/static/sass/_forms.scss +0 -14
  142. data/docs/themes/kitchen/static/sass/_mixins.scss +0 -133
  143. data/docs/themes/kitchen/static/sass/_typography.scss +0 -34
  144. data/docs/themes/kitchen/static/sass/_variables.scss +0 -82
  145. data/docs/themes/kitchen/static/sass/kitchen.scss +0 -7
  146. data/docs/themes/kitchen/static/sass/kitchen/_footer.scss +0 -50
  147. data/docs/themes/kitchen/static/sass/kitchen/_header.scss +0 -187
  148. data/docs/themes/kitchen/static/sass/kitchen/_homepage.scss +0 -27
  149. data/docs/themes/kitchen/static/sass/kitchen/_utility-bar.scss +0 -173
  150. data/docs/themes/kitchen/static/sass/partials/_alerts.scss +0 -32
  151. data/docs/themes/kitchen/static/sass/partials/_bg.scss +0 -19
  152. data/docs/themes/kitchen/static/sass/partials/_blurbs.scss +0 -25
  153. data/docs/themes/kitchen/static/sass/partials/_callout.scss +0 -15
  154. data/docs/themes/kitchen/static/sass/partials/_cards.scss +0 -54
  155. data/docs/themes/kitchen/static/sass/partials/_dropdown.scss +0 -77
  156. data/docs/themes/kitchen/static/sass/partials/_grid.scss +0 -87
  157. data/docs/themes/kitchen/static/sass/partials/_padding.scss +0 -73
  158. data/docs/themes/kitchen/static/sass/partials/_sidebar.scss +0 -71
  159. data/docs/themes/kitchen/static/sass/partials/_tabs.scss +0 -125
  160. data/docs/themes/kitchen/static/sass/typography/_chroma.scss +0 -366
  161. data/docs/themes/kitchen/static/sass/typography/_code.scss +0 -72
  162. data/docs/themes/kitchen/static/sass/typography/_headers.scss +0 -90
  163. data/docs/themes/kitchen/static/sass/typography/_links.scss +0 -127
  164. data/docs/themes/kitchen/static/sass/typography/_lists.scss +0 -155
  165. data/docs/themes/kitchen/static/sass/typography/_prose.scss +0 -29
  166. data/docs/themes/kitchen/static/sass/typography/_text.scss +0 -221
  167. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_animated.scss +0 -20
  168. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_bordered-pulled.scss +0 -20
  169. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_core.scss +0 -16
  170. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_fixed-width.scss +0 -6
  171. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_icons.scss +0 -992
  172. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_larger.scss +0 -23
  173. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_list.scss +0 -18
  174. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_mixins.scss +0 -57
  175. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_rotated-flipped.scss +0 -23
  176. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_screen-reader.scss +0 -5
  177. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_stacked.scss +0 -31
  178. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_variables.scss +0 -1005
  179. data/docs/themes/kitchen/static/sass/vendor/fontawesome/fa-brands.scss +0 -21
  180. data/docs/themes/kitchen/static/sass/vendor/fontawesome/fa-regular.scss +0 -22
  181. data/docs/themes/kitchen/static/sass/vendor/fontawesome/fa-solid.scss +0 -23
  182. data/docs/themes/kitchen/static/sass/vendor/fontawesome/fontawesome.scss +0 -16
  183. data/docs/themes/kitchen/theme.toml +0 -8
  184. data/features/kitchen_action_commands.feature +0 -164
  185. data/features/kitchen_command.feature +0 -16
  186. data/features/kitchen_console_command.feature +0 -35
  187. data/features/kitchen_defaults.feature +0 -38
  188. data/features/kitchen_diagnose_command.feature +0 -96
  189. data/features/kitchen_help_command.feature +0 -16
  190. data/features/kitchen_init_command.feature +0 -254
  191. data/features/kitchen_list_command.feature +0 -140
  192. data/features/kitchen_login_command.feature +0 -62
  193. data/features/kitchen_sink_command.feature +0 -30
  194. data/features/kitchen_test_command.feature +0 -88
  195. data/features/step_definitions/gem_steps.rb +0 -24
  196. data/features/step_definitions/git_steps.rb +0 -5
  197. data/features/step_definitions/output_steps.rb +0 -5
  198. data/features/support/env.rb +0 -74
  199. data/spec/kitchen/base64_stream_spec.rb +0 -74
  200. data/spec/kitchen/cli_spec.rb +0 -54
  201. data/spec/kitchen/collection_spec.rb +0 -76
  202. data/spec/kitchen/color_spec.rb +0 -51
  203. data/spec/kitchen/config_spec.rb +0 -434
  204. data/spec/kitchen/configurable_spec.rb +0 -1113
  205. data/spec/kitchen/data_munger_spec.rb +0 -2800
  206. data/spec/kitchen/diagnostic_spec.rb +0 -128
  207. data/spec/kitchen/driver/base_spec.rb +0 -132
  208. data/spec/kitchen/driver/dummy_spec.rb +0 -193
  209. data/spec/kitchen/driver/exec_spec.rb +0 -75
  210. data/spec/kitchen/driver/proxy_spec.rb +0 -127
  211. data/spec/kitchen/driver/ssh_base_spec.rb +0 -1136
  212. data/spec/kitchen/driver_spec.rb +0 -106
  213. data/spec/kitchen/errors_spec.rb +0 -317
  214. data/spec/kitchen/instance_spec.rb +0 -1372
  215. data/spec/kitchen/lazy_hash_spec.rb +0 -113
  216. data/spec/kitchen/lifecycle_hooks_spec.rb +0 -171
  217. data/spec/kitchen/loader/yaml_spec.rb +0 -787
  218. data/spec/kitchen/logger_spec.rb +0 -425
  219. data/spec/kitchen/logging_spec.rb +0 -56
  220. data/spec/kitchen/login_command_spec.rb +0 -67
  221. data/spec/kitchen/metadata_chopper_spec.rb +0 -79
  222. data/spec/kitchen/platform_spec.rb +0 -88
  223. data/spec/kitchen/provisioner/base_spec.rb +0 -393
  224. data/spec/kitchen/provisioner/chef/policyfile_spec.rb +0 -140
  225. data/spec/kitchen/provisioner/chef_apply_spec.rb +0 -131
  226. data/spec/kitchen/provisioner/chef_base_spec.rb +0 -1565
  227. data/spec/kitchen/provisioner/chef_solo_spec.rb +0 -602
  228. data/spec/kitchen/provisioner/chef_zero_spec.rb +0 -1013
  229. data/spec/kitchen/provisioner/dummy_spec.rb +0 -96
  230. data/spec/kitchen/provisioner/shell_spec.rb +0 -623
  231. data/spec/kitchen/provisioner_spec.rb +0 -101
  232. data/spec/kitchen/shell_out_spec.rb +0 -146
  233. data/spec/kitchen/ssh_spec.rb +0 -584
  234. data/spec/kitchen/state_file_spec.rb +0 -122
  235. data/spec/kitchen/suite_spec.rb +0 -61
  236. data/spec/kitchen/transport/base_spec.rb +0 -140
  237. data/spec/kitchen/transport/exec_spec.rb +0 -79
  238. data/spec/kitchen/transport/ssh_spec.rb +0 -1317
  239. data/spec/kitchen/transport/winrm_spec.rb +0 -1320
  240. data/spec/kitchen/transport_spec.rb +0 -106
  241. data/spec/kitchen/util_spec.rb +0 -250
  242. data/spec/kitchen/verifier/base_spec.rb +0 -346
  243. data/spec/kitchen/verifier/busser_spec.rb +0 -580
  244. data/spec/kitchen/verifier/dummy_spec.rb +0 -96
  245. data/spec/kitchen/verifier/shell_spec.rb +0 -157
  246. data/spec/kitchen/verifier_spec.rb +0 -114
  247. data/spec/kitchen_spec.rb +0 -112
  248. data/spec/spec_helper.rb +0 -110
  249. data/spec/support/powershell_max_size_spec.rb +0 -39
  250. data/test-kitchen.gemspec +0 -49
  251. data/test/cookbooks/test_cookbook/metadata.rb +0 -6
  252. data/test/cookbooks/test_cookbook/recipes/default.rb +0 -1
  253. data/test/integration/default/default_spec.rb +0 -3
  254. data/testing_windows.md +0 -38
@@ -1,59 +0,0 @@
1
- ---
2
- title: "Getting Help"
3
- slug: getting-help
4
- menu:
5
- docs:
6
- parent: getting_started
7
- weight: 20
8
- ---
9
-
10
- Use the `kitchen help` for a quick reminder of what the `kitchen` command provides:
11
-
12
- ~~~
13
- $ kitchen help
14
- Commands:
15
- kitchen console # Kitchen Console!
16
- kitchen converge [INSTANCE|REGEXP|all] # Change instance state to converge. Use a provisioner to configure one or more instances
17
- kitchen create [INSTANCE|REGEXP|all] # Change instance state to create. Start one or more instances
18
- kitchen destroy [INSTANCE|REGEXP|all] # Change instance state to destroy. Delete all information for one or more instances
19
- kitchen diagnose [INSTANCE|REGEXP|all] # Show computed diagnostic configuration
20
- kitchen doctor INSTANCE|REGEXP # Check for common system problems
21
- kitchen exec INSTANCE|REGEXP -c REMOTE_COMMAND # Execute command on one or more instance
22
- kitchen help [COMMAND] # Describe available commands or one specific command
23
- kitchen init # Adds some configuration to your cookbook so Kitchen can rock
24
- kitchen list [INSTANCE|REGEXP|all] # Lists one or more instances
25
- kitchen login INSTANCE|REGEXP # Log in to one instance
26
- kitchen package INSTANCE|REGEXP # package an instance
27
- kitchen setup [INSTANCE|REGEXP|all] # Change instance state to setup. Prepare to run automated tests. Install busser and related gems on on...
28
- kitchen test [INSTANCE|REGEXP|all] # Test (destroy, create, converge, setup, verify and destroy) one or more instances
29
- kitchen verify [INSTANCE|REGEXP|all] # Change instance state to verify. Run automated tests on one or more instances
30
- kitchen version # Print Kitchen's version information
31
- ~~~
32
-
33
- For more detailed help on a given subcommand, add it to end of the `help` subcommand. Let's take a look at the useful `kitchen diagnose` subcommand. This particular command is helpful when trying to visualize the layers of kitchen configuration and troubleshoot.
34
-
35
- ~~~
36
- $ kitchen help diagnose
37
- Usage:
38
- kitchen diagnose [INSTANCE|REGEXP|all]
39
-
40
- Options:
41
- [--loader], [--no-loader] # Include data loader diagnostics
42
- [--plugins], [--no-plugins] # Include plugin diagnostics
43
- [--instances], [--no-instances] # Include instances diagnostics
44
- # Default: true
45
- [--all], [--no-all] # Include all diagnostics
46
- -l, [--log-level=LOG_LEVEL] # Set the log level (debug, info, warn, error, fatal)
47
- [--log-overwrite], [--no-log-overwrite] # Set to false to prevent log overwriting each time Kitchen runs
48
- [--color], [--no-color] # Toggle color output for STDOUT logger
49
- -t, [--test-base-path=TEST_BASE_PATH] # Set the base path of the tests
50
-
51
- Show computed diagnostic configuration
52
- ~~~
53
-
54
- Remember, you can also ask for assistance in the [Chef Community Slack](http://community-slack.chef.io/) `#test-kitchen` channel where community members can help answer questions.
55
-
56
- <div class="sidebar--footer">
57
- <a class="button primary-cta" href="/docs/getting-started/creating-cookbook">Next - Creating a Cookbook</a>
58
- <a class="sidebar--footer--back" href="/docs/getting-started/installing">Back to previous step</a>
59
- </div>
@@ -1,46 +0,0 @@
1
- ---
2
- title: "Creating a Cookbook"
3
- slug: creating-cookbook
4
- menu:
5
- docs:
6
- parent: getting_started
7
- weight: 30
8
- ---
9
-
10
- In order to keep our example as simple as possible let's create a Chef cookbook to automate the installation and management of the [Git](http://git-scm.com/) distributed version control tool. It's true that there is already a very capable [Git cookbook](https://supermarket.chef.io/cookbooks/git) available on the [Chef Supermarket](https://supermarket.chef.io/cookbooks) but this simple example will us to show all the features of test-kitchen in a workflow.
11
-
12
- First of all, let's generate a cookbook skeleton.
13
-
14
- ~~~
15
- $ chef generate cookbook git_cookbook
16
- Generating cookbook git_cookbook
17
- - Ensuring correct cookbook file content
18
- - Committing cookbook files to git
19
- - Ensuring delivery configuration
20
- - Ensuring correct delivery build cookbook content
21
- - Adding delivery configuration to feature branch
22
- - Adding build cookbook to feature branch
23
- - Merging delivery content feature branch to master
24
-
25
- Your cookbook is ready. Type `cd git_cookbook` to enter it.
26
-
27
- There are several commands you can run to get started locally developing and testing your cookbook.
28
- Type `delivery local --help` to see a full list.
29
-
30
- Why not start by writing a test? Tests for the default recipe are stored at:
31
-
32
- test/integration/default/default_test.rb
33
-
34
- If you'd prefer to dive right in, the default recipe can be found at:
35
-
36
- recipes/default.rb
37
- ~~~
38
-
39
- > **Congratulations. You've authored a Chef cookbook.**
40
-
41
- Make sure you've changed into the new cookbook directory via `cd git_cookbook`. Next we'll talk about what just happened and how kitchen configuration works.
42
-
43
- <div class="sidebar--footer">
44
- <a class="button primary-cta" href="/docs/getting-started/kitchen-yml">Next - The kitchen.yml</a>
45
- <a class="sidebar--footer--back" href="/docs/getting-started/getting-help">Back to previous step</a>
46
- </div>
@@ -1,56 +0,0 @@
1
- ---
2
- title: "kitchen.yml"
3
- slug: kitchen-yml
4
- menu:
5
- docs:
6
- parent: getting_started
7
- weight: 40
8
- ---
9
-
10
- <div class="callout">
11
- <h3 class="callout--title">Note</h3>
12
- As of test-kitchen 1.21.0, we now prefer <code>kitchen.yml</code> over <code>.kitchen.yml</code>. This preference applies to <code>kitchen.local.yml</code> as well. This is backward compatible so the dot versions continue to work.
13
- </div>
14
-
15
- Let's turn our attention to the `.kitchen.yml` file for a minute. While ChefDK may have created the initial file automatically, it's expected that you will read and edit this file. After all, you know what you want to test... right?
16
-
17
- For the moment let's say we only care about running our Chef cookbook on Ubuntu 16.04 with the latest Chef version. In that case, we can edit the `.kitchen.yml` file so that we pin the version of Chef and trim the list of `platforms` to only one entry like so:
18
-
19
- ~~~
20
- ---
21
- driver:
22
- name: vagrant
23
-
24
- provisioner:
25
- name: chef_zero
26
-
27
- verifier:
28
- name: inspec
29
-
30
- platforms:
31
- - name: ubuntu-16.04
32
-
33
- suites:
34
- - name: default
35
- run_list:
36
- - recipe[git_cookbook::default]
37
- verifier:
38
- inspec_tests:
39
- - test/integration/default
40
- attributes:
41
- ~~~
42
-
43
- To see the results of our work, let's run the `kitchen list` subcommand:
44
-
45
- ~~~
46
- $ kitchen list
47
- Instance Driver Provisioner Verifier Transport Last Action Last Error
48
- default-ubuntu-1604 Vagrant ChefZero Inspec Ssh <Not Created> <None>
49
- ~~~
50
-
51
- Let's talk about what an **instance** is and how kitchen interacts with these.
52
-
53
- <div class="sidebar--footer">
54
- <a class="button primary-cta" href="/docs/getting-started/instances">Next - Instances</a>
55
- <a class="sidebar--footer--back" href="/docs/getting-started/creating-cookbook">Back to previous step</a>
56
- </div>
@@ -1,79 +0,0 @@
1
- ---
2
- title: "Instances"
3
- slug: instances
4
- menu:
5
- docs:
6
- parent: getting_started
7
- weight: 50
8
- ---
9
-
10
- What is this `default-ubuntu-1604` thing and what is an **Instance**?
11
-
12
- A Kitchen **Instance** is a combination of a **Suite** and a **Platform** as laid out in your `.kitchen.yml` file. Kitchen has auto-named our only instance by combining the **Suite** name (`"default"`) and the **Platform** name (`"ubuntu-16.04"`) into a form that is safe for DNS and hostname records, namely `"default-ubuntu-1604"`.
13
-
14
- Let's spin this **Instance** up to see what happens. We're going to be painfully explicit and ask kitchen to _only_ create the `default-ubuntu-1604` instance:
15
-
16
- ~~~
17
- $ kitchen create default-ubuntu-1604
18
- -----> Starting Kitchen (v1.23.2)
19
- -----> Creating <default-ubuntu-1604>...
20
- Bringing machine 'default' up with 'virtualbox' provider...
21
- ==> default: Box 'bento/ubuntu-16.04' could not be found. Attempting to find and install...
22
- default: Box Provider: virtualbox
23
- default: Box Version: >= 0
24
- ==> default: Loading metadata for box 'bento/ubuntu-16.04'
25
- default: URL: https://vagrantcloud.com/bento/ubuntu-16.04
26
- ==> default: Adding box 'bento/ubuntu-16.04' (v201808.24.0) for provider: virtualbox
27
- default: Downloading: https://vagrantcloud.com/bento/boxes/ubuntu-16.04/versions/201808.24.0/providers/virtualbox.box
28
- ==> default: Successfully added box 'bento/ubuntu-16.04' (v201808.24.0) for 'virtualbox'!
29
- ==> default: Importing base box 'bento/ubuntu-16.04'...
30
- ==> default: Matching MAC address for NAT networking...
31
- ==> default: Checking if box 'bento/ubuntu-16.04' is up to date...
32
- ==> default: Setting the name of the VM: default-ubuntu-1604_default_1537456236914_97965
33
- ==> default: Clearing any previously set network interfaces...
34
- ==> default: Preparing network interfaces based on configuration...
35
- default: Adapter 1: nat
36
- ==> default: Forwarding ports...
37
- default: 22 (guest) => 2222 (host) (adapter 1)
38
- ==> default: Booting VM...
39
- ==> default: Waiting for machine to boot. This may take a few minutes...
40
- default: SSH address: 127.0.0.1:2222
41
- default: SSH username: vagrant
42
- default: SSH auth method: private key
43
- default:
44
- default: Vagrant insecure key detected. Vagrant will automatically replace
45
- default: this with a newly generated keypair for better security.
46
- default:
47
- default: Inserting generated public key within guest...
48
- default: Removing insecure key from the guest if it's present...
49
- default: Key inserted! Disconnecting and reconnecting using new SSH key...
50
- ==> default: Machine booted and ready!
51
- ==> default: Checking for guest additions in VM...
52
- ==> default: Setting hostname...
53
- ==> default: Mounting shared folders...
54
- default: /tmp/omnibus/cache => /Users/cheeseplus/.kitchen/cache
55
- ==> default: Machine not provisioned because `--no-provision` is specified.
56
- [SSH] Established
57
- Vagrant instance <default-ubuntu-1604> created.
58
- Finished creating <default-ubuntu-1604> (1m16.59s).
59
- -----> Kitchen is finished. (1m17.05s)
60
- ~~~
61
-
62
- Kitchen calls this the **Create Action** and several subcommands that we'll learn about later map directly to other **actions**. If you are a Vagrant user then the line containing `vagrant up --no-provision` will look familiar. This may take several minutes depending on
63
- your internet connection as kitchen will automatically fetch the `bento/ubuntu-16.04`
64
- Vagrant box if it does not already exist.
65
-
66
- Let's check the status of our instance now:
67
-
68
- ~~~
69
- $ kitchen list
70
- Instance Driver Provisioner Verifier Transport Last Action Last Error
71
- default-ubuntu-1604 Vagrant ChefZero Inspec Ssh Created <None>
72
- ~~~
73
-
74
- Ok, we have an instance created and ready for some Chef code. Onward!
75
-
76
- <div class="sidebar--footer">
77
- <a class="button primary-cta" href="/docs/getting-started/writing-recipe">Next - Writing a Recipe</a>
78
- <a class="sidebar--footer--back" href="/docs/getting-started/kitchen-yml">Back to previous step</a>
79
- </div>
@@ -1,21 +0,0 @@
1
- ---
2
- title: "Writing a Recipe"
3
- slug: writing-recipe
4
- menu:
5
- docs:
6
- parent: getting_started
7
- weight: 60
8
- ---
9
-
10
- Here we go, time to automate our Git installation! Open `recipes/default.rb` in your editor of choice and add the following:
11
-
12
- ~~~
13
- package "git"
14
- ~~~
15
-
16
- Hrm. That was a bit too easy. Let's put our code to the test right away!
17
-
18
- <div class="sidebar--footer">
19
- <a class="button primary-cta" href="/docs/getting-started/running-converge">Next - Running Kitchen Converge</a>
20
- <a class="sidebar--footer--back" href="/docs/getting-started/instances">Back to previous step</a>
21
- </div>
@@ -1,134 +0,0 @@
1
- ---
2
- title: "kitchen converge"
3
- slug: running-converge
4
- menu:
5
- docs:
6
- parent: getting_started
7
- weight: 70
8
- ---
9
-
10
- Now that we have a recipe, let's use `kitchen converge` to see if it works:
11
-
12
- ~~~
13
- -----> Starting Kitchen (v1.23.2)
14
- -----> Creating <default-ubuntu-1604>...
15
- Bringing machine 'default' up with 'virtualbox' provider...
16
- ==> default: Importing base box 'bento/ubuntu-16.04'...
17
- ==> default: Matching MAC address for NAT networking...
18
- ==> default: Checking if box 'bento/ubuntu-16.04' is up to date...
19
- ==> default: Setting the name of the VM: default-ubuntu-1604_default_1537636613635_14010
20
- ==> default: Clearing any previously set network interfaces...
21
- ==> default: Preparing network interfaces based on configuration...
22
- default: Adapter 1: nat
23
- ==> default: Forwarding ports...
24
- default: 22 (guest) => 2222 (host) (adapter 1)
25
- ==> default: Booting VM...
26
- ==> default: Waiting for machine to boot. This may take a few minutes...
27
- default: SSH address: 127.0.0.1:2222
28
- default: SSH username: vagrant
29
- default: SSH auth method: private key
30
- default:
31
- default: Vagrant insecure key detected. Vagrant will automatically replace
32
- default: this with a newly generated keypair for better security.
33
- default:
34
- default: Inserting generated public key within guest...
35
- default: Removing insecure key from the guest if it's present...
36
- default: Key inserted! Disconnecting and reconnecting using new SSH key...
37
- ==> default: Machine booted and ready!
38
- ==> default: Checking for guest additions in VM...
39
- ==> default: Setting hostname...
40
- ==> default: Mounting shared folders...
41
- default: /tmp/omnibus/cache => /Users/cheeseplus/.kitchen/cache
42
- ==> default: Machine not provisioned because `--no-provision` is specified.
43
- [SSH] Established
44
- Vagrant instance <default-ubuntu-1604> created.
45
- Finished creating <default-ubuntu-1604> (0m37.44s).
46
- -----> Converging <default-ubuntu-1604>...
47
- Preparing files for transfer
48
- Preparing dna.json
49
- Resolving cookbook dependencies with Berkshelf 7.0.6...
50
- Removing non-cookbook files before transfer
51
- Preparing validation.pem
52
- Preparing client.rb
53
- -----> Installing Chef Omnibus (install only if missing)
54
- Downloading https://omnitruck.chef.io/install.sh to file /tmp/install.sh
55
- Trying wget...
56
- Download complete.
57
- ubuntu 16.04 x86_64
58
- Getting information for chef stable for ubuntu...
59
- downloading https://omnitruck.chef.io/stable/chef/metadata?v=&p=ubuntu&pv=16.04&m=x86_64
60
- to file /tmp/install.sh.1548/metadata.txt
61
- trying wget...
62
- sha1 174eb82ebe2eddc9c370487de6c124907f6d2f3a
63
- sha256 70ce695d2bf9fb01279a726148c0600544f1cd431642fa98d6696ef4c1dfc3c9
64
- url https://packages.chef.io/files/stable/chef/14.5.27/ubuntu/16.04/chef_14.5.27-1_amd64.deb
65
- version 14.5.27
66
- downloaded metadata file looks valid...
67
- downloading https://packages.chef.io/files/stable/chef/14.5.27/ubuntu/16.04/chef_14.5.27-1_amd64.deb
68
- to file /tmp/omnibus/cache/chef_14.5.27-1_amd64.deb
69
- trying wget...
70
- Comparing checksum with sha256sum...
71
-
72
- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
73
-
74
- You are installing an omnibus package without a version pin. If you are installing
75
- on production servers via an automated process this is DANGEROUS and you will
76
- be upgraded without warning on new releases, even to new major releases.
77
- Letting the version float is only appropriate in desktop, test, development or
78
- CI/CD environments.
79
-
80
- WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
81
-
82
- Installing chef
83
- installing with dpkg...
84
- Selecting previously unselected package chef.
85
- (Reading database ... 38378 files and directories currently installed.)
86
- Preparing to unpack .../cache/chef_14.5.27-1_amd64.deb ...
87
- Unpacking chef (14.5.27-1) ...
88
- Setting up chef (14.5.27-1) ...
89
- Thank you for installing Chef!
90
- Transferring files to <default-ubuntu-1604>
91
- Starting Chef Client, version 14.5.27
92
- Creating a new client identity for default-ubuntu-1604 using the validator key.
93
- resolving cookbooks for run list: ["git_cookbook::default"]
94
- Synchronizing Cookbooks:
95
- - git_cookbook (0.1.0)
96
- Installing Cookbook Gems:
97
- Compiling Cookbooks...
98
- Converging 1 resources
99
- Recipe: git_cookbook::default
100
- * apt_package[git] action install (up to date)
101
-
102
- Running handlers:
103
- Running handlers complete
104
- Chef Client finished, 0/1 resources updated in 01 seconds
105
- Downloading files from <default-ubuntu-1604>
106
- Finished converging <default-ubuntu-1604> (0m22.49s).
107
- -----> Kitchen is finished. (1m2.47s)
108
- ~~~
109
-
110
- If you are a Chef user then part of the output above should look familiar to you. Here's what happened at a high level:
111
-
112
- * Chef was installed on the instance
113
- * The `git_cookbook` files and a minimal Chef configuration were built and uploaded to the instance
114
- * A Chef run was initiated using the run-list and node attributes specified in the `.kitchen.yml` file
115
-
116
- Looking closely at the run, there are two important things we want to note: git was already installed as part of the base image so Chef reports `(up to date)` as it didn't have to do anything.
117
-
118
- <div class="callout">
119
- <h3 class="callout--title">Pro Tip</h3>
120
- This highlights a property of configuration management systems, like Chef, called <b>idempotence</b> - in this context, Chef saw that we requested to install git but as it was already installed there was nothing to do. This concept is very useful when thinking about configuration management generally as unlike a bash script, Chef isn't a series of commands but a set of declarations about the desired state.
121
- </div>
122
-
123
- A **converge** will leave the machine running and kitchen automatically uploads changes each converge so that one can iterate rapidly on configuration code. A lot of time and effort has gone into ensuring that the exit code of kitchen is always appropriate. Here is the Kitchen Command Guarantee:
124
-
125
- * I will always exit with code **0** if my operation was successful.
126
- * I will always exit with a non-zero code if **any** part of my operation was not successful.
127
- * Any behavior to the contrary **is a bug**.
128
-
129
- This exit code behavior is a fundamental prerequisite for any tool working in a Continuous Integration (CI) environment.
130
-
131
- <div class="sidebar--footer">
132
- <a class="button primary-cta" href="/docs/getting-started/manually-verifying">Next - Manually Verifying</a>
133
- <a class="sidebar--footer--back" href="/docs/getting-started/writing-recipe">Back to previous step</a>
134
- </div>
@@ -1,55 +0,0 @@
1
- ---
2
- title: "Manually Verifying"
3
- slug: manually-verifying
4
- menu:
5
- docs:
6
- parent: getting_started
7
- weight: 80
8
- ---
9
-
10
- If you're a skeptical person then you might be asking:
11
-
12
- > "How can we be sure that Git was actually installed?"
13
-
14
- Let's verify this right now.
15
-
16
- Kitchen has a **login** subcommand for just these kinds of situations:
17
-
18
- ~~~
19
- Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-116-generic x86_64)
20
-
21
- * Documentation: https://help.ubuntu.com
22
- * Management: https://landscape.canonical.com
23
- * Support: https://ubuntu.com/advantage
24
-
25
- 0 packages can be updated.
26
- 0 updates are security updates.
27
-
28
-
29
- Last login: Sat Sep 22 17:17:36 2018 from 10.0.2.2
30
- vagrant@default-ubuntu-1604:~$
31
- ~~~
32
-
33
- As you can see by the prompt above we are now in the `default-ubuntu-1604` instance. We'll denote the prompt in an instance with `$ ` for clarity. Now to check if Git is installed:
34
-
35
- ~~~
36
- $ which git
37
- /usr/bin/git
38
- $ git --version
39
- git version 2.7.4
40
- ~~~
41
-
42
- Rockin. Now we can exit out back to our workstation:
43
-
44
- ~~~
45
- $ exit
46
- logout
47
- Connection to 127.0.0.1 closed.
48
- ~~~
49
-
50
- Feel free to use the **login** subcommand any time you have the urge to poke around, uninstall packages, turn off services, grep logs, etc. Go to town, this is a sandbox and isn't production after all.
51
-
52
- <div class="sidebar--footer">
53
- <a class="button primary-cta" href="/docs/getting-started/writing-test">Next - Writing a Test</a>
54
- <a class="sidebar--footer--back" href="/docs/getting-started/running-converge">Back to previous step</a>
55
- </div>