chef 13.11.3 → 13.12.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -3
  3. data/README.md +35 -40
  4. data/Rakefile +18 -22
  5. data/chef-universal-mingw32.gemspec +1 -1
  6. data/chef.gemspec +3 -3
  7. data/lib/chef/client.rb +1 -1
  8. data/lib/chef/mixin/params_validate.rb +3 -1
  9. data/lib/chef/provider/script.rb +2 -2
  10. data/lib/chef/version.rb +1 -1
  11. data/spec/functional/http/simple_spec.rb +12 -6
  12. data/spec/functional/resource/remote_file_spec.rb +19 -15
  13. data/spec/support/platform_helpers.rb +2 -1
  14. data/tasks/announce.rb +1 -1
  15. data/tasks/dependencies.rb +5 -39
  16. data/tasks/maintainers.rb +10 -10
  17. data/tasks/rspec.rb +2 -2
  18. data/tasks/templates/prerelease.md.erb +11 -2
  19. data/tasks/templates/release.md.erb +9 -1
  20. metadata +6 -248
  21. data/CONTRIBUTING.md +0 -151
  22. data/VERSION +0 -1
  23. data/acceptance/.gitignore +0 -3
  24. data/acceptance/.shared/kitchen_acceptance/.kitchen.digitalocean.yml +0 -33
  25. data/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml +0 -283
  26. data/acceptance/.shared/kitchen_acceptance/.kitchen.vagrant.yml +0 -59
  27. data/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb +0 -68
  28. data/acceptance/.shared/kitchen_acceptance/metadata.rb +0 -1
  29. data/acceptance/Gemfile +0 -19
  30. data/acceptance/Gemfile.lock +0 -266
  31. data/acceptance/README.md +0 -137
  32. data/acceptance/basics/.acceptance/acceptance-cookbook/.gitignore +0 -2
  33. data/acceptance/basics/.acceptance/acceptance-cookbook/metadata.rb +0 -3
  34. data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -1
  35. data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -1
  36. data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -1
  37. data/acceptance/basics/.kitchen.yml +0 -4
  38. data/acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb +0 -19
  39. data/acceptance/basics/test/integration/chef-current-install/serverspec/spec_helper.rb +0 -6
  40. data/acceptance/basics/test/integration/helpers/serverspec/Gemfile +0 -8
  41. data/acceptance/data-collector/.acceptance/acceptance-cookbook/.gitignore +0 -2
  42. data/acceptance/data-collector/.acceptance/acceptance-cookbook/metadata.rb +0 -3
  43. data/acceptance/data-collector/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -2
  44. data/acceptance/data-collector/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -2
  45. data/acceptance/data-collector/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -2
  46. data/acceptance/data-collector/.acceptance/data-collector-test/.gitignore +0 -16
  47. data/acceptance/data-collector/.acceptance/data-collector-test/Berksfile +0 -3
  48. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/api.rb +0 -101
  49. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/apigemfile +0 -3
  50. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-both-mode.rb +0 -4
  51. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-client-mode.rb +0 -4
  52. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-no-endpoint.rb +0 -2
  53. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-solo-mode.rb +0 -4
  54. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/config.ru +0 -2
  55. data/acceptance/data-collector/.acceptance/data-collector-test/metadata.rb +0 -7
  56. data/acceptance/data-collector/.acceptance/data-collector-test/recipes/default.rb +0 -44
  57. data/acceptance/data-collector/.kitchen.yml +0 -9
  58. data/acceptance/data-collector/Berksfile +0 -3
  59. data/acceptance/data-collector/test/integration/default/serverspec/default_spec.rb +0 -208
  60. data/acceptance/data-collector/test/integration/helpers/serverspec/Gemfile +0 -8
  61. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/.gitignore +0 -2
  62. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/metadata.rb +0 -1
  63. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -1
  64. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -1
  65. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -61
  66. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/.gitignore +0 -2
  67. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/cookbook_kitchen.rb +0 -43
  68. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/top_cookbooks.rb +0 -41
  69. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/metadata.rb +0 -3
  70. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -1
  71. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -1
  72. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -1
  73. data/acceptance/top-cookbooks/.gitignore +0 -1
  74. data/acceptance/top-cookbooks/.kitchen.chocolatey.yml +0 -6
  75. data/acceptance/top-cookbooks/.kitchen.iis.yml +0 -4
  76. data/acceptance/top-cookbooks/.kitchen.learn-the-basics-rhel.yml +0 -7
  77. data/acceptance/top-cookbooks/.kitchen.learn-the-basics-ubuntu.yml +0 -7
  78. data/acceptance/top-cookbooks/.kitchen.learn-the-basics-windows.yml +0 -7
  79. data/acceptance/top-cookbooks/.kitchen.powershell.yml +0 -4
  80. data/acceptance/top-cookbooks/.kitchen.sql_server.yml +0 -5
  81. data/acceptance/top-cookbooks/.kitchen.winbox.yml +0 -8
  82. data/acceptance/top-cookbooks/.kitchen.windows.yml +0 -38
  83. data/acceptance/trivial/.acceptance/acceptance-cookbook/.gitignore +0 -2
  84. data/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb +0 -2
  85. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -1
  86. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -1
  87. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -1
  88. data/acceptance/trivial/.kitchen.yml +0 -7
  89. data/acceptance/trivial/test/integration/chef-current-install/inspec/chef_client_spec.rb +0 -5
  90. data/acceptance/windows-service/.acceptance/acceptance-cookbook/.gitignore +0 -2
  91. data/acceptance/windows-service/.acceptance/acceptance-cookbook/metadata.rb +0 -2
  92. data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -1
  93. data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -1
  94. data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -1
  95. data/acceptance/windows-service/.kitchen.yml +0 -7
  96. data/acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb +0 -58
  97. data/distro/common/html/_sources/ctl_chef_client.txt +0 -36
  98. data/distro/common/html/_sources/ctl_chef_server.txt +0 -341
  99. data/distro/common/html/_sources/ctl_chef_shell.txt +0 -15
  100. data/distro/common/html/_sources/ctl_chef_solo.txt +0 -25
  101. data/distro/common/html/_sources/index.txt +0 -135
  102. data/distro/common/html/_sources/knife.txt +0 -74
  103. data/distro/common/html/_sources/knife_bootstrap.txt +0 -56
  104. data/distro/common/html/_sources/knife_client.txt +0 -151
  105. data/distro/common/html/_sources/knife_common_options.txt +0 -6
  106. data/distro/common/html/_sources/knife_configure.txt +0 -29
  107. data/distro/common/html/_sources/knife_cookbook.txt +0 -236
  108. data/distro/common/html/_sources/knife_cookbook_site.txt +0 -157
  109. data/distro/common/html/_sources/knife_data_bag.txt +0 -160
  110. data/distro/common/html/_sources/knife_delete.txt +0 -26
  111. data/distro/common/html/_sources/knife_deps.txt +0 -61
  112. data/distro/common/html/_sources/knife_diff.txt +0 -34
  113. data/distro/common/html/_sources/knife_download.txt +0 -44
  114. data/distro/common/html/_sources/knife_edit.txt +0 -26
  115. data/distro/common/html/_sources/knife_environment.txt +0 -158
  116. data/distro/common/html/_sources/knife_exec.txt +0 -47
  117. data/distro/common/html/_sources/knife_index_rebuild.txt +0 -21
  118. data/distro/common/html/_sources/knife_list.txt +0 -33
  119. data/distro/common/html/_sources/knife_node.txt +0 -250
  120. data/distro/common/html/_sources/knife_raw.txt +0 -35
  121. data/distro/common/html/_sources/knife_recipe_list.txt +0 -23
  122. data/distro/common/html/_sources/knife_role.txt +0 -157
  123. data/distro/common/html/_sources/knife_search.txt +0 -53
  124. data/distro/common/html/_sources/knife_serve.txt +0 -19
  125. data/distro/common/html/_sources/knife_show.txt +0 -27
  126. data/distro/common/html/_sources/knife_ssh.txt +0 -43
  127. data/distro/common/html/_sources/knife_ssl_check.txt +0 -41
  128. data/distro/common/html/_sources/knife_ssl_fetch.txt +0 -41
  129. data/distro/common/html/_sources/knife_status.txt +0 -37
  130. data/distro/common/html/_sources/knife_tag.txt +0 -69
  131. data/distro/common/html/_sources/knife_upload.txt +0 -49
  132. data/distro/common/html/_sources/knife_user.txt +0 -127
  133. data/distro/common/html/_sources/knife_using.txt +0 -43
  134. data/distro/common/html/_sources/knife_xargs.txt +0 -30
  135. data/distro/common/html/_static/ajax-loader.gif +0 -0
  136. data/distro/common/html/_static/basic.css +0 -537
  137. data/distro/common/html/_static/chef.ico +0 -0
  138. data/distro/common/html/_static/chef_html_logo.png +0 -0
  139. data/distro/common/html/_static/comment-bright.png +0 -0
  140. data/distro/common/html/_static/comment-close.png +0 -0
  141. data/distro/common/html/_static/comment.png +0 -0
  142. data/distro/common/html/_static/contents.png +0 -0
  143. data/distro/common/html/_static/doctools.js +0 -238
  144. data/distro/common/html/_static/down-pressed.png +0 -0
  145. data/distro/common/html/_static/down.png +0 -0
  146. data/distro/common/html/_static/file.png +0 -0
  147. data/distro/common/html/_static/guide.css +0 -505
  148. data/distro/common/html/_static/jquery.js +0 -2
  149. data/distro/common/html/_static/minus.png +0 -0
  150. data/distro/common/html/_static/navigation.png +0 -0
  151. data/distro/common/html/_static/plus.png +0 -0
  152. data/distro/common/html/_static/pygments.css +0 -62
  153. data/distro/common/html/_static/searchtools.js +0 -622
  154. data/distro/common/html/_static/underscore.js +0 -31
  155. data/distro/common/html/_static/up-pressed.png +0 -0
  156. data/distro/common/html/_static/up.png +0 -0
  157. data/distro/common/html/_static/websupport.js +0 -808
  158. data/distro/common/html/ctl_chef_client.html +0 -270
  159. data/distro/common/html/ctl_chef_server.html +0 -728
  160. data/distro/common/html/ctl_chef_shell.html +0 -163
  161. data/distro/common/html/ctl_chef_solo.html +0 -194
  162. data/distro/common/html/index.html +0 -202
  163. data/distro/common/html/knife.html +0 -170
  164. data/distro/common/html/knife_bootstrap.html +0 -285
  165. data/distro/common/html/knife_client.html +0 -285
  166. data/distro/common/html/knife_common_options.html +0 -96
  167. data/distro/common/html/knife_configure.html +0 -105
  168. data/distro/common/html/knife_cookbook.html +0 -487
  169. data/distro/common/html/knife_cookbook_site.html +0 -375
  170. data/distro/common/html/knife_data_bag.html +0 -374
  171. data/distro/common/html/knife_delete.html +0 -93
  172. data/distro/common/html/knife_deps.html +0 -143
  173. data/distro/common/html/knife_diff.html +0 -123
  174. data/distro/common/html/knife_download.html +0 -145
  175. data/distro/common/html/knife_edit.html +0 -89
  176. data/distro/common/html/knife_environment.html +0 -322
  177. data/distro/common/html/knife_exec.html +0 -220
  178. data/distro/common/html/knife_index_rebuild.html +0 -83
  179. data/distro/common/html/knife_list.html +0 -114
  180. data/distro/common/html/knife_node.html +0 -458
  181. data/distro/common/html/knife_raw.html +0 -110
  182. data/distro/common/html/knife_recipe_list.html +0 -91
  183. data/distro/common/html/knife_role.html +0 -295
  184. data/distro/common/html/knife_search.html +0 -203
  185. data/distro/common/html/knife_serve.html +0 -79
  186. data/distro/common/html/knife_show.html +0 -104
  187. data/distro/common/html/knife_ssh.html +0 -177
  188. data/distro/common/html/knife_ssl_check.html +0 -151
  189. data/distro/common/html/knife_ssl_fetch.html +0 -151
  190. data/distro/common/html/knife_status.html +0 -144
  191. data/distro/common/html/knife_tag.html +0 -138
  192. data/distro/common/html/knife_upload.html +0 -153
  193. data/distro/common/html/knife_user.html +0 -242
  194. data/distro/common/html/knife_using.html +0 -210
  195. data/distro/common/html/knife_xargs.html +0 -122
  196. data/distro/common/html/objects.inv +0 -0
  197. data/distro/common/html/search.html +0 -82
  198. data/distro/common/html/searchindex.js +0 -1
  199. data/distro/common/man/man1/README.md +0 -58
  200. data/distro/common/man/man1/chef-shell.1 +0 -194
  201. data/distro/common/man/man1/knife-bootstrap.1 +0 -215
  202. data/distro/common/man/man1/knife-client.1 +0 -443
  203. data/distro/common/man/man1/knife-configure.1 +0 -161
  204. data/distro/common/man/man1/knife-cookbook-site.1 +0 -552
  205. data/distro/common/man/man1/knife-cookbook.1 +0 -770
  206. data/distro/common/man/man1/knife-data-bag.1 +0 -617
  207. data/distro/common/man/man1/knife-delete.1 +0 -127
  208. data/distro/common/man/man1/knife-deps.1 +0 -246
  209. data/distro/common/man/man1/knife-diff.1 +0 -226
  210. data/distro/common/man/man1/knife-download.1 +0 -258
  211. data/distro/common/man/man1/knife-edit.1 +0 -121
  212. data/distro/common/man/man1/knife-environment.1 +0 -496
  213. data/distro/common/man/man1/knife-exec.1 +0 -362
  214. data/distro/common/man/man1/knife-index-rebuild.1 +0 -63
  215. data/distro/common/man/man1/knife-list.1 +0 -174
  216. data/distro/common/man/man1/knife-node.1 +0 -716
  217. data/distro/common/man/man1/knife-raw.1 +0 -172
  218. data/distro/common/man/man1/knife-recipe-list.1 +0 -85
  219. data/distro/common/man/man1/knife-role.1 +0 -426
  220. data/distro/common/man/man1/knife-search.1 +0 -359
  221. data/distro/common/man/man1/knife-serve.1 +0 -109
  222. data/distro/common/man/man1/knife-show.1 +0 -160
  223. data/distro/common/man/man1/knife-ssh.1 +0 -284
  224. data/distro/common/man/man1/knife-ssl-check.1 +0 -207
  225. data/distro/common/man/man1/knife-ssl-fetch.1 +0 -207
  226. data/distro/common/man/man1/knife-status.1 +0 -234
  227. data/distro/common/man/man1/knife-tag.1 +0 -189
  228. data/distro/common/man/man1/knife-upload.1 +0 -280
  229. data/distro/common/man/man1/knife-user.1 +0 -356
  230. data/distro/common/man/man1/knife-xargs.1 +0 -189
  231. data/distro/common/man/man1/knife.1 +0 -332
  232. data/distro/common/man/man8/chef-apply.8 +0 -86
  233. data/distro/common/man/man8/chef-client.8 +0 -398
  234. data/distro/common/man/man8/chef-solo.8 +0 -260
  235. data/distro/common/markdown/README +0 -3
  236. data/distro/common/markdown/man1/chef-shell.mkd +0 -195
  237. data/distro/common/markdown/man1/knife-bootstrap.mkd +0 -141
  238. data/distro/common/markdown/man1/knife-client.mkd +0 -103
  239. data/distro/common/markdown/man1/knife-configure.mkd +0 -71
  240. data/distro/common/markdown/man1/knife-cookbook-site.mkd +0 -123
  241. data/distro/common/markdown/man1/knife-cookbook.mkd +0 -263
  242. data/distro/common/markdown/man1/knife-data-bag.mkd +0 -121
  243. data/distro/common/markdown/man1/knife-environment.mkd +0 -151
  244. data/distro/common/markdown/man1/knife-exec.mkd +0 -42
  245. data/distro/common/markdown/man1/knife-index.mkd +0 -30
  246. data/distro/common/markdown/man1/knife-node.mkd +0 -130
  247. data/distro/common/markdown/man1/knife-role.mkd +0 -85
  248. data/distro/common/markdown/man1/knife-search.mkd +0 -180
  249. data/distro/common/markdown/man1/knife-ssh.mkd +0 -69
  250. data/distro/common/markdown/man1/knife-status.mkd +0 -36
  251. data/distro/common/markdown/man1/knife-tag.mkd +0 -39
  252. data/distro/common/markdown/man1/knife.mkd +0 -213
  253. data/distro/common/markdown/man8/chef-client.mkd +0 -75
  254. data/distro/common/markdown/man8/chef-expander.mkd +0 -81
  255. data/distro/common/markdown/man8/chef-expanderctl.mkd +0 -57
  256. data/distro/common/markdown/man8/chef-server-webui.mkd +0 -121
  257. data/distro/common/markdown/man8/chef-server.mkd +0 -120
  258. data/distro/common/markdown/man8/chef-solo.mkd +0 -107
  259. data/distro/common/markdown/man8/chef-solr.mkd +0 -89
  260. data/distro/powershell/chef/chef.psm1 +0 -459
  261. data/tasks/cbgb.rb +0 -84
@@ -1,375 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
-
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml">
6
- <head>
7
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
-
9
- <title>knife cookbook site &mdash; chef-client Man Pages</title>
10
-
11
- <link rel="stylesheet" href="_static/guide.css" type="text/css" />
12
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
13
-
14
- <script type="text/javascript">
15
- var DOCUMENTATION_OPTIONS = {
16
- URL_ROOT: './',
17
- VERSION: '',
18
- COLLAPSE_INDEX: false,
19
- FILE_SUFFIX: '.html',
20
- HAS_SOURCE: true
21
- };
22
- </script>
23
- <script type="text/javascript" src="_static/jquery.js"></script>
24
- <script type="text/javascript" src="_static/underscore.js"></script>
25
- <script type="text/javascript" src="_static/doctools.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div style="background-color: #212c35; text-align: left; padding: 0px 0px 0px 0px">
31
- <a href="http://docs.getchef.com/"><img src="_static/chef_html_logo.png" border="0" alt="Chef"/></a>
32
- </div>
33
-
34
-
35
-
36
-
37
- <div class="document">
38
- <div class="documentwrapper">
39
-
40
- <div class="body">
41
-
42
- <div class="section" id="knife-cookbook-site">
43
- <h1>knife cookbook site<a class="headerlink" href="#knife-cookbook-site" title="Permalink to this headline">¶</a></h1>
44
- <p>The Cookbooks Site API is used to provide access to the cookbooks community hosted at <a class="reference external" href="https://supermarket.getchef.com/cookbooks">https://supermarket.getchef.com/cookbooks</a>. All of the cookbooks in the community are accessible through a RESTful API located at <a class="reference external" href="https://supermarket.getchef.com/api/v1/cookbooks">https://supermarket.getchef.com/api/v1/cookbooks</a> by using any of the supported endpoints. In most cases, using knife and the <strong>knife cookbook site</strong> sub-command (and any of its arguments) is the recommended method of interacting with these cookbooks, but in some cases, using the Cookbooks Site API directly may make sense.</p>
45
- <p>The <strong>knife cookbook site</strong> subcommand is used to interact with cookbooks that are located at <a class="reference external" href="https://supermarket.getchef.com/cookbooks">https://supermarket.getchef.com/cookbooks</a>. A user account is required for any community actions that write data to this site. The following arguments do not require a user account: <tt class="docutils literal"><span class="pre">download</span></tt>, <tt class="docutils literal"><span class="pre">search</span></tt>, <tt class="docutils literal"><span class="pre">install</span></tt>, and <tt class="docutils literal"><span class="pre">list</span></tt>.</p>
46
- <div class="admonition note">
47
- <p class="first admonition-title">Note</p>
48
- <p class="last">Review the list of <a class="reference internal" href="knife_common_options.html"><em>common options</em></a> available to this (and all) knife subcommands and plugins.</p>
49
- </div>
50
- <div class="section" id="download">
51
- <h2>download<a class="headerlink" href="#download" title="Permalink to this headline">¶</a></h2>
52
- <p>The <tt class="docutils literal"><span class="pre">download</span></tt> argument is used to download a cookbook from the community website. A cookbook will be downloaded as a tar.gz archive and placed in the current working directory. If a cookbook (or cookbook version) has been deprecated and the <tt class="docutils literal"><span class="pre">--force</span></tt> option is not used, knife will alert the user that the cookbook is deprecated and then will provide the name of the most recent non-deprecated version of that cookbook.</p>
53
- <div class="section" id="syntax">
54
- <h3>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h3>
55
- <p>This argument has the following syntax:</p>
56
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site download COOKBOOK_NAME <span class="o">[</span>COOKBOOK_VERSION<span class="o">]</span> <span class="o">(</span>options<span class="o">)</span>
57
- </pre></div>
58
- </div>
59
- </div>
60
- <div class="section" id="options">
61
- <h3>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h3>
62
- <p>This argument has the following options:</p>
63
- <dl class="docutils">
64
- <dt><tt class="docutils literal"><span class="pre">COOKBOOK_VERSION</span></tt></dt>
65
- <dd>The version of a cookbook to be downloaded. If a cookbook has only one version, this option does not need to be specified. If a cookbook has more than one version and this option is not specified, the most recent version of the cookbook will be downloaded.</dd>
66
- <dt><tt class="docutils literal"><span class="pre">-f</span> <span class="pre">FILE</span></tt>, <tt class="docutils literal"><span class="pre">--file</span> <span class="pre">FILE</span></tt></dt>
67
- <dd>The file to which a cookbook download is written.</dd>
68
- <dt><tt class="docutils literal"><span class="pre">--force</span></tt></dt>
69
- <dd>Use to overwrite an existing directory.</dd>
70
- </dl>
71
- </div>
72
- <div class="section" id="examples">
73
- <h3>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h3>
74
- <p>The following examples show how to use this knife subcommand:</p>
75
- <p><strong>Download a cookbook</strong></p>
76
- <p>To download the cookbook <tt class="docutils literal"><span class="pre">getting-started</span></tt>, enter:</p>
77
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site download getting-started
78
- </pre></div>
79
- </div>
80
- <p>to return something like:</p>
81
- <div class="highlight-bash"><div class="highlight"><pre>Downloading getting-started from the cookbooks site at version 0.3.0 to
82
- /Users/sdanna/opscodesupport/getting-started-0.3.0.tar.gz
83
- Cookbook saved: /Users/sdanna/opscodesupport/getting-started-0.3.0.tar.gz
84
- </pre></div>
85
- </div>
86
- </div>
87
- </div>
88
- <div class="section" id="install">
89
- <h2>install<a class="headerlink" href="#install" title="Permalink to this headline">¶</a></h2>
90
- <p>The <tt class="docutils literal"><span class="pre">install</span></tt> argument is used to install a cookbook that has been downloaded from the community site to a local git repository . This action uses the git version control system in conjunction with the <a class="reference external" href="https://supermarket.getchef.com/cookbooks">https://supermarket.getchef.com/cookbooks</a> site to install community-contributed cookbooks to the local chef-repo. Using this argument does the following:</p>
91
- <blockquote>
92
- <div><ol class="arabic simple">
93
- <li>A new &#8220;pristine copy&#8221; branch is created in git for tracking the upstream.</li>
94
- <li>All existing versions of a cookbook are removed from the branch.</li>
95
- <li>The cookbook is downloaded from <a class="reference external" href="https://supermarket.getchef.com/cookbooks">https://supermarket.getchef.com/cookbooks</a> in the tar.gz format.</li>
96
- <li>The downloaded cookbook is untarred and its contents are committed to git and a tag is created.</li>
97
- <li>The &#8220;pristine copy&#8221; branch is merged into the master branch.</li>
98
- </ol>
99
- </div></blockquote>
100
- <p>This process allows the upstream cookbook in the master branch to be modified while letting git maintain changes as a separate patch. When an updated upstream version becomes available, those changes can be merged while maintaining any local modifications.</p>
101
- <div class="section" id="id1">
102
- <h3>Syntax<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
103
- <p>This argument has the following syntax:</p>
104
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site install COOKBOOK_NAME <span class="o">[</span>COOKBOOK_VERSION<span class="o">]</span> <span class="o">(</span>options<span class="o">)</span>
105
- </pre></div>
106
- </div>
107
- </div>
108
- <div class="section" id="id2">
109
- <h3>Options<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
110
- <p>This argument has the following options:</p>
111
- <dl class="docutils">
112
- <dt><tt class="docutils literal"><span class="pre">-b</span></tt>, <tt class="docutils literal"><span class="pre">--use-current-branch</span></tt></dt>
113
- <dd>Use to ensure that the current branch is used.</dd>
114
- <dt><tt class="docutils literal"><span class="pre">-B</span> <span class="pre">BRANCH</span></tt>, <tt class="docutils literal"><span class="pre">--branch</span> <span class="pre">BRANCH</span></tt></dt>
115
- <dd>The name of the default branch. This will default to the master branch.</dd>
116
- <dt><tt class="docutils literal"><span class="pre">COOKBOOK_VERSION</span></tt></dt>
117
- <dd>The version of the cookbook to be installed. If a version is not specified, the most recent version of the cookbook will be installed.</dd>
118
- <dt><tt class="docutils literal"><span class="pre">-D</span></tt>, <tt class="docutils literal"><span class="pre">--skip-dependencies</span></tt></dt>
119
- <dd>Use to ensure that all cookbooks to which the installed cookbook has a dependency will not be installed.</dd>
120
- <dt><tt class="docutils literal"><span class="pre">-o</span> <span class="pre">PATH:PATH</span></tt>, <tt class="docutils literal"><span class="pre">--cookbook-path</span> <span class="pre">PATH:PATH</span></tt></dt>
121
- <dd>The directory in which cookbooks are created. This can be a colon-separated path.</dd>
122
- </dl>
123
- </div>
124
- <div class="section" id="id3">
125
- <h3>Examples<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
126
- <p>The following examples show how to use this knife subcommand:</p>
127
- <p><strong>Install a cookbook</strong></p>
128
- <p>To install the cookbook <tt class="docutils literal"><span class="pre">getting-started</span></tt>, enter:</p>
129
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site install getting-started
130
- </pre></div>
131
- </div>
132
- <p>to return something like:</p>
133
- <div class="highlight-bash"><div class="highlight"><pre>Installing getting-started to /Users/sdanna/opscodesupport/.chef/../cookbooks
134
- Checking out the master branch.
135
- Creating pristine copy branch chef-vendor-getting-started
136
- Downloading getting-started from the cookbooks site at version 0.3.0 to
137
- /Users/sdanna/opscodesupport/.chef/../cookbooks/getting-started.tar.gz
138
- Cookbook saved: /Users/sdanna/opscodesupport/.chef/../cookbooks/getting-started.tar.gz
139
- Removing pre-existing version.
140
- Uncompressing getting-started version /Users/sdanna/opscodesupport/.chef/../cookbooks.
141
- removing downloaded tarball
142
- 1 files updated, committing changes
143
- Creating tag cookbook-site-imported-getting-started-0.3.0
144
- Checking out the master branch.
145
- Updating 4d44b5b..b4c32f2
146
- Fast-forward
147
- cookbooks/getting-started/README.rdoc | 4 +++
148
- cookbooks/getting-started/attributes/default.rb | 1 +
149
- cookbooks/getting-started/metadata.json | 29 ++++++++++++++++++++
150
- cookbooks/getting-started/metadata.rb | 6 ++++
151
- cookbooks/getting-started/recipes/default.rb | 23 +++++++++++++++
152
- .../templates/default/chef-getting-started.txt.erb | 5 +++
153
- 6 files changed, 68 insertions<span class="o">(</span>+<span class="o">)</span>, 0 deletions<span class="o">(</span>-<span class="o">)</span>
154
- create mode 100644 cookbooks/getting-started/README.rdoc
155
- create mode 100644 cookbooks/getting-started/attributes/default.rb
156
- create mode 100644 cookbooks/getting-started/metadata.json
157
- create mode 100644 cookbooks/getting-started/metadata.rb
158
- create mode 100644 cookbooks/getting-started/recipes/default.rb
159
- create mode 100644 cookbooks/getting-started/templates/default/chef-getting-started.txt.erb
160
- Cookbook getting-started version 0.3.0 successfully installed
161
- </pre></div>
162
- </div>
163
- </div>
164
- </div>
165
- <div class="section" id="list">
166
- <h2>list<a class="headerlink" href="#list" title="Permalink to this headline">¶</a></h2>
167
- <p>The <tt class="docutils literal"><span class="pre">list</span></tt> argument is used to view a list of cookbooks that are currently available at <a class="reference external" href="https://supermarket.getchef.com/cookbooks">https://supermarket.getchef.com/cookbooks</a>.</p>
168
- <div class="section" id="id4">
169
- <h3>Syntax<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
170
- <p>This argument has the following syntax:</p>
171
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site list
172
- </pre></div>
173
- </div>
174
- </div>
175
- <div class="section" id="id5">
176
- <h3>Options<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
177
- <p>This argument has the following options:</p>
178
- <dl class="docutils">
179
- <dt><tt class="docutils literal"><span class="pre">-w</span></tt>, <tt class="docutils literal"><span class="pre">--with-uri</span></tt></dt>
180
- <dd>Use to show the corresponding URIs.</dd>
181
- </dl>
182
- </div>
183
- <div class="section" id="id6">
184
- <h3>Examples<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
185
- <p>The following examples show how to use this knife subcommand:</p>
186
- <p><strong>View a list of cookbooks</strong></p>
187
- <p>To view a list of cookbooks at <a class="reference external" href="https://supermarket.getchef.com/cookbooks">https://supermarket.getchef.com/cookbooks</a> server, enter:</p>
188
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site list
189
- </pre></div>
190
- </div>
191
- <p>to return:</p>
192
- <div class="highlight-python"><div class="highlight"><pre>1password homesick rabbitmq
193
- 7-zip hostname rabbitmq-management
194
- AmazonEC2Tag hosts rabbitmq_chef
195
- R hosts-awareness rackspaceknife
196
- accounts htop radiant
197
- ack-grep hudson rails
198
- activemq icinga rails_enterprise
199
- ad id3lib redis-package
200
- ad-likewise iftop redis2
201
- ant iis redmine
202
- [...truncated...]
203
- </pre></div>
204
- </div>
205
- </div>
206
- </div>
207
- <div class="section" id="search">
208
- <h2>search<a class="headerlink" href="#search" title="Permalink to this headline">¶</a></h2>
209
- <p>The <tt class="docutils literal"><span class="pre">search</span></tt> argument is used to search for a cookbook at <a class="reference external" href="https://supermarket.getchef.com/cookbooks">https://supermarket.getchef.com/cookbooks</a>. A search query is used to return a list of cookbooks at <a class="reference external" href="https://supermarket.getchef.com/cookbooks">https://supermarket.getchef.com/cookbooks</a> and uses the same syntax as the <strong>knife search</strong> sub-command.</p>
210
- <div class="section" id="id7">
211
- <h3>Syntax<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
212
- <p>This argument has the following syntax:</p>
213
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site search SEARCH_QUERY <span class="o">(</span>options<span class="o">)</span>
214
- </pre></div>
215
- </div>
216
- </div>
217
- <div class="section" id="id8">
218
- <h3>Options<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
219
- <p>This command does not have any specific options.</p>
220
- </div>
221
- <div class="section" id="id9">
222
- <h3>Examples<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3>
223
- <p>The following examples show how to use this knife subcommand:</p>
224
- <p><strong>Search for cookbooks</strong></p>
225
- <p>To search for all of the cookbooks that can be used with Apache, enter:</p>
226
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site search apache*
227
- </pre></div>
228
- </div>
229
- <p>to return something like:</p>
230
- <div class="highlight-bash"><div class="highlight"><pre>apache2:
231
- cookbook: https://supermarket.chef.io/api/v1/cookbooks/apache2
232
- cookbook_description: Installs and configures apache2 using Debian symlinks with helper definitions
233
- cookbook_maintainer: opscode
234
- cookbook_name: apache2
235
- instiki:
236
- cookbook: https://supermarket.chef.io/api/v1/cookbooks/instiki
237
- cookbook_description: Installs instiki, a Ruby on Rails wiki server under passenger+Apache2.
238
- cookbook_maintainer: jtimberman
239
- cookbook_name: instiki
240
- kickstart:
241
- cookbook: https://supermarket.chef.io/api/v1/cookbooks/kickstart
242
- cookbook_description: Creates apache2 vhost and serves a kickstart file.
243
- cookbook_maintainer: opscode
244
- cookbook_name: kickstart
245
- <span class="o">[</span>...truncated...<span class="o">]</span>
246
- </pre></div>
247
- </div>
248
- </div>
249
- </div>
250
- <div class="section" id="share">
251
- <h2>share<a class="headerlink" href="#share" title="Permalink to this headline">¶</a></h2>
252
- <p>The <tt class="docutils literal"><span class="pre">share</span></tt> argument is used to add a cookbook to <a class="reference external" href="https://supermarket.getchef.com/cookbooks">https://supermarket.getchef.com/cookbooks</a>. This action will require a user account and a certificate for <a class="reference external" href="https://supermarket.getchef.com">https://supermarket.getchef.com</a>. By default, knife will use the user name and API key that is identified in the configuration file used during the upload; otherwise these values must be specified on the command line or in an alternate configuration file. If a cookbook already exists on <a class="reference external" href="https://supermarket.getchef.com/cookbooks">https://supermarket.getchef.com/cookbooks</a>, then only an owner or maintainer of that cookbook can make updates.</p>
253
- <div class="section" id="id10">
254
- <h3>Syntax<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3>
255
- <p>This argument has the following syntax:</p>
256
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site share COOKBOOK_NAME CATEGORY <span class="o">(</span>options<span class="o">)</span>
257
- </pre></div>
258
- </div>
259
- </div>
260
- <div class="section" id="id11">
261
- <h3>Options<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h3>
262
- <p>This argument has the following options:</p>
263
- <dl class="docutils">
264
- <dt><tt class="docutils literal"><span class="pre">CATEGORY</span></tt></dt>
265
- <dd>The cookbook category: <tt class="docutils literal"><span class="pre">&quot;Databases&quot;</span></tt>, <tt class="docutils literal"><span class="pre">&quot;Web</span> <span class="pre">Servers&quot;</span></tt>, <tt class="docutils literal"><span class="pre">&quot;Process</span> <span class="pre">Management&quot;</span></tt>, <tt class="docutils literal"><span class="pre">&quot;Monitoring</span> <span class="pre">&amp;</span> <span class="pre">Trending&quot;</span></tt>, <tt class="docutils literal"><span class="pre">&quot;Programming</span> <span class="pre">Languages&quot;</span></tt>, <tt class="docutils literal"><span class="pre">&quot;Package</span> <span class="pre">Management&quot;</span></tt>, <tt class="docutils literal"><span class="pre">&quot;Applications&quot;</span></tt>, <tt class="docutils literal"><span class="pre">&quot;Networking&quot;</span></tt>, <tt class="docutils literal"><span class="pre">&quot;Operating</span> <span class="pre">Systems</span> <span class="pre">&amp;</span> <span class="pre">Virtualization&quot;</span></tt>, <tt class="docutils literal"><span class="pre">&quot;Utilities&quot;</span></tt>, or <tt class="docutils literal"><span class="pre">&quot;Other&quot;</span></tt>.</dd>
266
- <dt><tt class="docutils literal"><span class="pre">-n</span></tt>, <tt class="docutils literal"><span class="pre">--dry-run</span></tt></dt>
267
- <dd>Use to take no action and only print out results. Default: <tt class="docutils literal"><span class="pre">false</span></tt>.</dd>
268
- <dt><tt class="docutils literal"><span class="pre">-o</span> <span class="pre">PATH:PATH</span></tt>, <tt class="docutils literal"><span class="pre">--cookbook-path</span> <span class="pre">PATH:PATH</span></tt></dt>
269
- <dd>The directory in which cookbooks are created. This can be a colon-separated path.</dd>
270
- </dl>
271
- </div>
272
- <div class="section" id="id12">
273
- <h3>Examples<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
274
- <p>The following examples show how to use this knife subcommand:</p>
275
- <p><strong>Share a cookbook</strong></p>
276
- <p>To share a cookbook named <tt class="docutils literal"><span class="pre">apache2</span></tt>:</p>
277
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site share <span class="s2">&quot;apache2&quot;</span> <span class="s2">&quot;Web Servers&quot;</span>
278
- </pre></div>
279
- </div>
280
- </div>
281
- </div>
282
- <div class="section" id="show">
283
- <h2>show<a class="headerlink" href="#show" title="Permalink to this headline">¶</a></h2>
284
- <p>The <tt class="docutils literal"><span class="pre">show</span></tt> argument is used to view information about a cookbook on <a class="reference external" href="https://supermarket.getchef.com/cookbooks">https://supermarket.getchef.com/cookbooks</a>.</p>
285
- <div class="section" id="id13">
286
- <h3>Syntax<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3>
287
- <p>This argument has the following syntax:</p>
288
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site show COOKBOOK_NAME <span class="o">[</span>COOKBOOK_VERSION<span class="o">]</span>
289
- </pre></div>
290
- </div>
291
- </div>
292
- <div class="section" id="id14">
293
- <h3>Options<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h3>
294
- <p>This argument has the following options:</p>
295
- <dl class="docutils">
296
- <dt><tt class="docutils literal"><span class="pre">COOKBOOK_VERSION</span></tt></dt>
297
- <dd>The version of a cookbook to be shown. If a cookbook has only one version, this option does not need to be specified. If a cookbook has more than one version and this option is not specified, a list of cookbook versions will be returned.</dd>
298
- </dl>
299
- </div>
300
- <div class="section" id="id15">
301
- <h3>Examples<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h3>
302
- <p>The following examples show how to use this knife subcommand:</p>
303
- <p><strong>Show cookbook data</strong></p>
304
- <p>To show the details for a cookbook named <tt class="docutils literal"><span class="pre">haproxy</span></tt>:</p>
305
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site show haproxy
306
- </pre></div>
307
- </div>
308
- <p>to return something like:</p>
309
- <div class="highlight-bash"><div class="highlight"><pre>average_rating:
310
- category: Networking
311
- created_at: 2009-10-25T23:51:07Z
312
- description: Installs and configures haproxy
313
- external_url:
314
- latest_version: https://supermarket.chef.io/api/v1/cookbooks/haproxy/versions/1_0_3
315
- maintainer: opscode
316
- name: haproxy
317
- updated_at: 2011-06-30T21:53:25Z
318
- versions:
319
- https://supermarket.chef.io/api/v1/cookbooks/haproxy/versions/1_0_3
320
- https://supermarket.chef.io/api/v1/cookbooks/haproxy/versions/1_0_2
321
- https://supermarket.chef.io/api/v1/cookbooks/haproxy/versions/1_0_1
322
- https://supermarket.chef.io/api/v1/cookbooks/haproxy/versions/1_0_0
323
- https://supermarket.chef.io/api/v1/cookbooks/haproxy/versions/0_8_1
324
- https://supermarket.chef.io/api/v1/cookbooks/haproxy/versions/0_8_0
325
- https://supermarket.chef.io/api/v1/cookbooks/haproxy/versions/0_7_0
326
- </pre></div>
327
- </div>
328
- <p><strong>Show cookbook data as JSON</strong></p>
329
- <p>To view information in JSON format, use the <tt class="docutils literal"><span class="pre">-F</span></tt> common option as part of the command like this:</p>
330
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife role show devops -F json
331
- </pre></div>
332
- </div>
333
- <p>Other formats available include <tt class="docutils literal"><span class="pre">text</span></tt>, <tt class="docutils literal"><span class="pre">yaml</span></tt>, and <tt class="docutils literal"><span class="pre">pp</span></tt>.</p>
334
- </div>
335
- </div>
336
- <div class="section" id="unshare">
337
- <h2>unshare<a class="headerlink" href="#unshare" title="Permalink to this headline">¶</a></h2>
338
- <p>The <tt class="docutils literal"><span class="pre">unshare</span></tt> argument is used to stop the sharing of a cookbook at <a class="reference external" href="https://supermarket.getchef.com/cookbooks">https://supermarket.getchef.com/cookbooks</a>. Only the maintainer of a cookbook may perform this action.</p>
339
- <div class="section" id="id16">
340
- <h3>Syntax<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h3>
341
- <p>This argument has the following syntax:</p>
342
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site unshare COOKBOOK_NAME
343
- </pre></div>
344
- </div>
345
- </div>
346
- <div class="section" id="id17">
347
- <h3>Options<a class="headerlink" href="#id17" title="Permalink to this headline">¶</a></h3>
348
- <p>This command does not have any specific options.</p>
349
- </div>
350
- <div class="section" id="id18">
351
- <h3>Examples<a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h3>
352
- <p>The following examples show how to use this knife subcommand:</p>
353
- <p><strong>Unshare a cookbook</strong></p>
354
- <p>To unshare a cookbook named <tt class="docutils literal"><span class="pre">getting-started</span></tt>, enter:</p>
355
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site unshare getting-started
356
- </pre></div>
357
- </div>
358
- </div>
359
- </div>
360
- </div>
361
-
362
-
363
- </div>
364
-
365
- </div>
366
-
367
-
368
- <div class="clearer"></div>
369
- </div>
370
-
371
-
372
-
373
-
374
- </body>
375
- </html>
@@ -1,374 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
-
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml">
6
- <head>
7
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
-
9
- <title>knife data bag &mdash; chef-client Man Pages</title>
10
-
11
- <link rel="stylesheet" href="_static/guide.css" type="text/css" />
12
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
13
-
14
- <script type="text/javascript">
15
- var DOCUMENTATION_OPTIONS = {
16
- URL_ROOT: './',
17
- VERSION: '',
18
- COLLAPSE_INDEX: false,
19
- FILE_SUFFIX: '.html',
20
- HAS_SOURCE: true
21
- };
22
- </script>
23
- <script type="text/javascript" src="_static/jquery.js"></script>
24
- <script type="text/javascript" src="_static/underscore.js"></script>
25
- <script type="text/javascript" src="_static/doctools.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div style="background-color: #212c35; text-align: left; padding: 0px 0px 0px 0px">
31
- <a href="http://docs.getchef.com/"><img src="_static/chef_html_logo.png" border="0" alt="Chef"/></a>
32
- </div>
33
-
34
-
35
-
36
-
37
- <div class="document">
38
- <div class="documentwrapper">
39
-
40
- <div class="body">
41
-
42
- <div class="section" id="knife-data-bag">
43
- <h1>knife data bag<a class="headerlink" href="#knife-data-bag" title="Permalink to this headline">¶</a></h1>
44
- <p>A data bag is a global variable that is stored as JSON data and is accessible from a Chef server. A data bag is indexed for searching and can be loaded by a recipe or accessed during a search.</p>
45
- <p>A data bag item may be encrypted using <a class="reference external" href="https://en.wikipedia.org/wiki/Symmetric-key_algorithm">shared secret encryption</a>. This allows each data bag item to store confidential information (such as a database password) or to be managed in a source control system (without plain-text data appearing in revision history). Each data bag item may be encrypted individually; if a data bag contains multiple encrypted data bag items, these data bag items are not required to share the same encryption keys.</p>
46
- <p>The <strong>knife data bag</strong> subcommand is used to manage arbitrary stores of globally available JSON data.</p>
47
- <div class="admonition note">
48
- <p class="first admonition-title">Note</p>
49
- <p class="last">Review the list of <a class="reference internal" href="knife_common_options.html"><em>common options</em></a> available to this (and all) knife subcommands and plugins.</p>
50
- </div>
51
- <div class="section" id="create">
52
- <h2>create<a class="headerlink" href="#create" title="Permalink to this headline">¶</a></h2>
53
- <p>The <tt class="docutils literal"><span class="pre">create</span></tt> argument is used to add a data bag to the Chef server.</p>
54
- <div class="section" id="syntax">
55
- <h3>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h3>
56
- <p>This argument has the following syntax:</p>
57
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag create DATA_BAG_NAME <span class="o">[</span>DATA_BAG_ITEM<span class="o">]</span> <span class="o">(</span>options<span class="o">)</span>
58
- </pre></div>
59
- </div>
60
- </div>
61
- <div class="section" id="options">
62
- <h3>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h3>
63
- <p>This argument has the following options:</p>
64
- <dl class="docutils">
65
- <dt><tt class="docutils literal"><span class="pre">DATA_BAG_ITEM</span></tt></dt>
66
- <dd>The name of a specific item within a data bag.</dd>
67
- <dt><tt class="docutils literal"><span class="pre">--secret</span> <span class="pre">SECRET</span></tt></dt>
68
- <dd>The encryption key that is used for values contained within a data bag item. If <tt class="docutils literal"><span class="pre">secret</span></tt> is not specified, the chef-client will look for a secret at the path specified by the <tt class="docutils literal"><span class="pre">encrypted_data_bag_secret</span></tt> setting in the client.rb file.</dd>
69
- <dt><tt class="docutils literal"><span class="pre">--secret-file</span> <span class="pre">FILE</span></tt></dt>
70
- <dd>The path to the file that contains the encryption key.</dd>
71
- </dl>
72
- <div class="admonition note">
73
- <p class="first admonition-title">Note</p>
74
- <p class="last">For encrypted data bag items, use <em>either</em> <tt class="docutils literal"><span class="pre">--secret</span></tt> or <tt class="docutils literal"><span class="pre">--secret-file</span></tt>, not both.</p>
75
- </div>
76
- </div>
77
- <div class="section" id="examples">
78
- <h3>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h3>
79
- <p>The following examples show how to use this knife subcommand:</p>
80
- <p><strong>Create a data bag</strong></p>
81
- <p>To create a data bag named &#8220;admins&#8221;, enter:</p>
82
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag create admins
83
- </pre></div>
84
- </div>
85
- <p>to return:</p>
86
- <div class="highlight-bash"><div class="highlight"><pre>Created data_bag<span class="o">[</span>admins<span class="o">]</span>
87
- </pre></div>
88
- </div>
89
- </div>
90
- </div>
91
- <div class="section" id="delete">
92
- <h2>delete<a class="headerlink" href="#delete" title="Permalink to this headline">¶</a></h2>
93
- <p>The <tt class="docutils literal"><span class="pre">delete</span></tt> argument is used to delete a data bag or a data bag item from a Chef server.</p>
94
- <div class="section" id="id1">
95
- <h3>Syntax<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
96
- <p>This argument has the following syntax:</p>
97
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag delete DATA_BAG_NAME <span class="o">[</span>DATA_BAG_ITEM<span class="o">]</span> <span class="o">(</span>options<span class="o">)</span>
98
- </pre></div>
99
- </div>
100
- </div>
101
- <div class="section" id="id2">
102
- <h3>Options<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
103
- <p>This argument has the following options:</p>
104
- <dl class="docutils">
105
- <dt><tt class="docutils literal"><span class="pre">DATA_BAG_ITEM</span></tt></dt>
106
- <dd>The name of a specific item within a data bag.</dd>
107
- </dl>
108
- </div>
109
- <div class="section" id="id3">
110
- <h3>Examples<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
111
- <p>The following examples show how to use this knife subcommand:</p>
112
- <p><strong>Delete a data bag</strong></p>
113
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag delete data_bag_name
114
- </pre></div>
115
- </div>
116
- <p><strong>Delete a data bag item</strong></p>
117
- <p>To delete an item named &#8220;charlie&#8221;, enter:</p>
118
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag delete admins charlie
119
- </pre></div>
120
- </div>
121
- <p>Type <tt class="docutils literal"><span class="pre">Y</span></tt> to confirm a deletion.</p>
122
- </div>
123
- </div>
124
- <div class="section" id="edit">
125
- <h2>edit<a class="headerlink" href="#edit" title="Permalink to this headline">¶</a></h2>
126
- <p>The <tt class="docutils literal"><span class="pre">edit</span></tt> argument is used to edit the data contained in a data bag. If encryption is being used, the data bag will be decrypted, the data will be made available in the $EDITOR, and then encrypted again before saving it to the Chef server.</p>
127
- <div class="section" id="id4">
128
- <h3>Syntax<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
129
- <p>This argument has the following syntax:</p>
130
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag edit DATA_BAG_NAME <span class="o">[</span>DATA_BAG_ITEM<span class="o">]</span> <span class="o">(</span>options<span class="o">)</span>
131
- </pre></div>
132
- </div>
133
- </div>
134
- <div class="section" id="id5">
135
- <h3>Options<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
136
- <p>This argument has the following options:</p>
137
- <dl class="docutils">
138
- <dt><tt class="docutils literal"><span class="pre">DATA_BAG_ITEM</span></tt></dt>
139
- <dd>The name of a specific item within a data bag.</dd>
140
- <dt><tt class="docutils literal"><span class="pre">--secret</span> <span class="pre">SECRET</span></tt></dt>
141
- <dd>The encryption key that is used for values contained within a data bag item. If <tt class="docutils literal"><span class="pre">secret</span></tt> is not specified, the chef-client will look for a secret at the path specified by the <tt class="docutils literal"><span class="pre">encrypted_data_bag_secret</span></tt> setting in the client.rb file.</dd>
142
- <dt><tt class="docutils literal"><span class="pre">--secret-file</span> <span class="pre">FILE</span></tt></dt>
143
- <dd>The path to the file that contains the encryption key.</dd>
144
- </dl>
145
- <div class="admonition note">
146
- <p class="first admonition-title">Note</p>
147
- <p class="last">For encrypted data bag items, use <em>either</em> <tt class="docutils literal"><span class="pre">--secret</span></tt> or <tt class="docutils literal"><span class="pre">--secret-file</span></tt>, not both.</p>
148
- </div>
149
- </div>
150
- <div class="section" id="id6">
151
- <h3>Examples<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
152
- <p>The following examples show how to use this knife subcommand:</p>
153
- <p><strong>Edit a data bag</strong></p>
154
- <p>To edit the contents of a data bag, enter:</p>
155
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag edit dogs tibetanspaniel
156
- </pre></div>
157
- </div>
158
- <p>where <tt class="docutils literal"><span class="pre">dogs</span></tt> is the name of the data bag and <tt class="docutils literal"><span class="pre">tibetanspaniel</span></tt> is the name of the data bag item. This will return something similar to the following in the knife editor:</p>
159
- <div class="highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
160
- <span class="s2">&quot;name&quot;</span><span class="o">:</span><span class="s2">&quot;data_bag_item_dogs_tibetanspaniel&quot;</span><span class="p">,</span>
161
- <span class="s2">&quot;json_class&quot;</span><span class="o">:</span><span class="s2">&quot;Chef::DataBagItem&quot;</span><span class="p">,</span>
162
- <span class="s2">&quot;chef_type&quot;</span><span class="o">:</span><span class="s2">&quot;data_bag_item&quot;</span><span class="p">,</span>
163
- <span class="s2">&quot;data_bag&quot;</span><span class="o">:</span><span class="s2">&quot;dogs&quot;</span><span class="p">,</span>
164
- <span class="s2">&quot;raw_data&quot;</span><span class="o">:</span>
165
- <span class="p">{</span>
166
- <span class="s2">&quot;description&quot;</span><span class="o">:</span><span class="s2">&quot;small dog that likes to sit in windows&quot;</span><span class="p">,</span>
167
- <span class="s2">&quot;id&quot;</span><span class="o">:</span><span class="s2">&quot;tibetanspaniel&quot;</span>
168
- <span class="p">}</span>
169
- <span class="p">}</span>
170
- </pre></div>
171
- </div>
172
- <p>Make the necessary changes to the key-value pairs under <tt class="docutils literal"><span class="pre">raw_data</span></tt> and save them.</p>
173
- <p><strong>Edit a data bag item</strong></p>
174
- <p>To edit an item named &#8220;charlie&#8221; that is contained in a data bag named &#8220;admins&#8221;, enter:</p>
175
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag edit admins charlie
176
- </pre></div>
177
- </div>
178
- <p>to open the $EDITOR. Once opened, you can update the data before saving it to the Chef server. For example, by changing:</p>
179
- <div class="highlight-bash"><div class="highlight"><pre><span class="o">{</span>
180
- <span class="s2">&quot;id&quot;</span>: <span class="s2">&quot;charlie&quot;</span>
181
- <span class="o">}</span>
182
- </pre></div>
183
- </div>
184
- <p>to:</p>
185
- <div class="highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
186
- <span class="s2">&quot;id&quot;</span><span class="o">:</span> <span class="s2">&quot;charlie&quot;</span><span class="p">,</span>
187
- <span class="s2">&quot;uid&quot;</span><span class="o">:</span> <span class="mi">1005</span><span class="p">,</span>
188
- <span class="s2">&quot;gid&quot;</span><span class="o">:</span> <span class="s2">&quot;ops&quot;</span><span class="p">,</span>
189
- <span class="s2">&quot;shell&quot;</span><span class="o">:</span> <span class="s2">&quot;/bin/zsh&quot;</span><span class="p">,</span>
190
- <span class="s2">&quot;comment&quot;</span><span class="o">:</span> <span class="s2">&quot;Crazy Charlie&quot;</span>
191
- <span class="p">}</span>
192
- </pre></div>
193
- </div>
194
- </div>
195
- </div>
196
- <div class="section" id="from-file">
197
- <h2>from file<a class="headerlink" href="#from-file" title="Permalink to this headline">¶</a></h2>
198
- <p>The <tt class="docutils literal"><span class="pre">from</span> <span class="pre">file</span></tt> argument is used to:</p>
199
- <ul class="simple">
200
- <li>Add a data bag item to a data bag</li>
201
- <li>Update the contents of an existing data bag item</li>
202
- </ul>
203
- <p>The data bag itself must already exist on the Chef server and must be specified as part of the command. The contents of the data bag item are specified using a JSON file. This JSON file may be located at a relative or absolute path; its location must be specified as part of the command. The JSON file that defines the contents of the data bag item must at least contain the name of the data bag item&#8212;<tt class="docutils literal"><span class="pre">&quot;id&quot;:</span> <span class="pre">&quot;name&quot;</span></tt>.</p>
204
- <div class="admonition warning">
205
- <p class="first admonition-title">Warning</p>
206
- <p class="last">A chef-client must be version 11.6 (or higher) when using the <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">data</span> <span class="pre">bag</span> <span class="pre">from</span> <span class="pre">file</span></tt> argument with the Enterprise Chef or Open Source Chef version 11 servers.</p>
207
- </div>
208
- <div class="section" id="id7">
209
- <h3>Syntax<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
210
- <p>This argument has the following syntax:</p>
211
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag from file DATA_BAG_NAME_or_PATH
212
- </pre></div>
213
- </div>
214
- </div>
215
- <div class="section" id="id8">
216
- <h3>Options<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
217
- <p>This argument has the following options:</p>
218
- <dl class="docutils">
219
- <dt><tt class="docutils literal"><span class="pre">-a</span></tt>, <tt class="docutils literal"><span class="pre">--all</span></tt></dt>
220
- <dd>Use to upload all data bags found at the specified path.</dd>
221
- <dt><tt class="docutils literal"><span class="pre">--secret</span> <span class="pre">SECRET</span></tt></dt>
222
- <dd>The encryption key that is used for values contained within a data bag item. If <tt class="docutils literal"><span class="pre">secret</span></tt> is not specified, the chef-client will look for a secret at the path specified by the <tt class="docutils literal"><span class="pre">encrypted_data_bag_secret</span></tt> setting in the client.rb file.</dd>
223
- <dt><tt class="docutils literal"><span class="pre">--secret-file</span> <span class="pre">FILE</span></tt></dt>
224
- <dd>The path to the file that contains the encryption key.</dd>
225
- </dl>
226
- <div class="admonition note">
227
- <p class="first admonition-title">Note</p>
228
- <p class="last">For encrypted data bag items, use <em>either</em> <tt class="docutils literal"><span class="pre">--secret</span></tt> or <tt class="docutils literal"><span class="pre">--secret-file</span></tt>, not both.</p>
229
- </div>
230
- </div>
231
- <div class="section" id="id9">
232
- <h3>Examples<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3>
233
- <p>The following examples show how to use this knife subcommand:</p>
234
- <p><strong>Create a data bag from a file</strong></p>
235
- <p>To create a data bag on the Chef server from a file:</p>
236
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag from file <span class="s2">&quot;path to JSON file&quot;</span>
237
- </pre></div>
238
- </div>
239
- <p><strong>Create an encrypted data bag from a file</strong></p>
240
- <p>To create a data bag named &#8220;devops_data&#8221; that contains encrypted data, enter:</p>
241
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag from file devops_data --secret-file <span class="s2">&quot;path to decryption file&quot;</span>
242
- </pre></div>
243
- </div>
244
- </div>
245
- </div>
246
- <div class="section" id="list">
247
- <h2>list<a class="headerlink" href="#list" title="Permalink to this headline">¶</a></h2>
248
- <p>The <tt class="docutils literal"><span class="pre">list</span></tt> argument is used to view a list of data bags that are currently available on the Chef server.</p>
249
- <div class="section" id="id10">
250
- <h3>Syntax<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3>
251
- <p>This argument has the following syntax:</p>
252
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag list
253
- </pre></div>
254
- </div>
255
- </div>
256
- <div class="section" id="id11">
257
- <h3>Options<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h3>
258
- <p>This argument has the following options:</p>
259
- <dl class="docutils">
260
- <dt><tt class="docutils literal"><span class="pre">-w</span></tt>, <tt class="docutils literal"><span class="pre">--with-uri</span></tt></dt>
261
- <dd>Use to show the corresponding URIs.</dd>
262
- </dl>
263
- </div>
264
- <div class="section" id="id12">
265
- <h3>Examples<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
266
- <p>The following examples show how to use this knife subcommand:</p>
267
- <p><strong>View a list of data bags</strong></p>
268
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag list
269
- </pre></div>
270
- </div>
271
- </div>
272
- </div>
273
- <div class="section" id="show">
274
- <h2>show<a class="headerlink" href="#show" title="Permalink to this headline">¶</a></h2>
275
- <p>The <tt class="docutils literal"><span class="pre">show</span></tt> argument is used to view the contents of a data bag.</p>
276
- <div class="section" id="id13">
277
- <h3>Syntax<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3>
278
- <p>This argument has the following syntax:</p>
279
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag show DATA_BAG_NAME <span class="o">(</span>options<span class="o">)</span>
280
- </pre></div>
281
- </div>
282
- </div>
283
- <div class="section" id="id14">
284
- <h3>Options<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h3>
285
- <p>This argument has the following options:</p>
286
- <dl class="docutils">
287
- <dt><tt class="docutils literal"><span class="pre">DATA_BAG_ITEM</span></tt></dt>
288
- <dd>The name of a specific item within a data bag.</dd>
289
- <dt><tt class="docutils literal"><span class="pre">--secret</span> <span class="pre">SECRET</span></tt></dt>
290
- <dd>The encryption key that is used for values contained within a data bag item. If <tt class="docutils literal"><span class="pre">secret</span></tt> is not specified, the chef-client will look for a secret at the path specified by the <tt class="docutils literal"><span class="pre">encrypted_data_bag_secret</span></tt> setting in the client.rb file.</dd>
291
- <dt><tt class="docutils literal"><span class="pre">--secret-file</span> <span class="pre">FILE</span></tt></dt>
292
- <dd>The path to the file that contains the encryption key.</dd>
293
- </dl>
294
- <div class="admonition note">
295
- <p class="first admonition-title">Note</p>
296
- <p class="last">For encrypted data bag items, use <em>either</em> <tt class="docutils literal"><span class="pre">--secret</span></tt> or <tt class="docutils literal"><span class="pre">--secret-file</span></tt>, not both.</p>
297
- </div>
298
- </div>
299
- <div class="section" id="id15">
300
- <h3>Examples<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h3>
301
- <p>The following examples show how to use this knife subcommand:</p>
302
- <p><strong>Show a data bag</strong></p>
303
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag show admins
304
- </pre></div>
305
- </div>
306
- <p>to return something like:</p>
307
- <div class="highlight-bash"><div class="highlight"><pre>charlie
308
- </pre></div>
309
- </div>
310
- <p><strong>Show a data bag item</strong></p>
311
- <p>To show the contents of a specific item within data bag, enter:</p>
312
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag show admins charlie
313
- </pre></div>
314
- </div>
315
- <p>to return:</p>
316
- <div class="highlight-bash"><div class="highlight"><pre>comment: Crazy Charlie
317
- gid: ops
318
- id: charlie
319
- shell: /bin/zsh
320
- uid: 1005
321
- </pre></div>
322
- </div>
323
- <p><strong>Show a data bag, encrypted</strong></p>
324
- <p>To show the contents of a data bag named <tt class="docutils literal"><span class="pre">passwords</span></tt> with an item that contains encrypted data named <tt class="docutils literal"><span class="pre">mysql</span></tt>, enter:</p>
325
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag show passwords mysql
326
- </pre></div>
327
- </div>
328
- <p>to return:</p>
329
- <div class="highlight-javascript"><div class="highlight"><pre>## sample:
330
- {
331
- &quot;id&quot;: &quot;mysql&quot;,
332
- &quot;pass&quot;: &quot;trywgFA6R70NO28PNhMpGhEvKBZuxouemnbnAUQsUyo=\n&quot;,
333
- &quot;user&quot;: &quot;e/p+8WJYVHY9fHcEgAAReg==\n&quot;
334
- }
335
- </pre></div>
336
- </div>
337
- <p><strong>Show a data bag, decrypted</strong></p>
338
- <p>To show the decrypted contents of the same data bag, enter:</p>
339
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag show --secret-file /path/to/decryption/file passwords mysql
340
- </pre></div>
341
- </div>
342
- <p>to return:</p>
343
- <div class="highlight-javascript"><div class="highlight"><pre>## sample:
344
- {
345
- &quot;id&quot;: &quot;mysql&quot;,
346
- &quot;pass&quot;: &quot;thesecret123&quot;,
347
- &quot;user&quot;: &quot;fred&quot;
348
- }
349
- </pre></div>
350
- </div>
351
- <p><strong>Show a data bag as JSON</strong></p>
352
- <p>To view information in JSON format, use the <tt class="docutils literal"><span class="pre">-F</span></tt> common option as part of the command like this:</p>
353
- <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag show admins -F json
354
- </pre></div>
355
- </div>
356
- <p>Other formats available include <tt class="docutils literal"><span class="pre">text</span></tt>, <tt class="docutils literal"><span class="pre">yaml</span></tt>, and <tt class="docutils literal"><span class="pre">pp</span></tt>.</p>
357
- </div>
358
- </div>
359
- </div>
360
-
361
-
362
- </div>
363
-
364
- </div>
365
-
366
-
367
- <div class="clearer"></div>
368
- </div>
369
-
370
-
371
-
372
-
373
- </body>
374
- </html>