chef 11.12.8 → 11.14.0.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +4 -2
- data/distro/common/html/_sources/index.txt +6 -0
- data/distro/common/html/_sources/knife_ssl_check.txt +41 -0
- data/distro/common/html/_sources/knife_ssl_fetch.txt +41 -0
- data/distro/common/html/_static/basic.css +2 -5
- data/distro/common/html/_static/doctools.js +5 -14
- data/distro/common/html/_static/jquery.js +2 -154
- data/distro/common/html/_static/pygments.css +2 -2
- data/distro/common/html/_static/searchtools.js +212 -150
- data/distro/common/html/_static/underscore.js +29 -21
- data/distro/common/html/_static/websupport.js +1 -1
- data/distro/common/html/ctl_chef_client.html +15 -18
- data/distro/common/html/ctl_chef_server.html +7 -7
- data/distro/common/html/ctl_chef_shell.html +6 -6
- data/distro/common/html/ctl_chef_solo.html +7 -8
- data/distro/common/html/index.html +34 -24
- data/distro/common/html/knife.html +23 -24
- data/distro/common/html/knife_bootstrap.html +13 -9
- data/distro/common/html/knife_client.html +10 -11
- data/distro/common/html/knife_common_options.html +6 -7
- data/distro/common/html/knife_configure.html +3 -4
- data/distro/common/html/knife_cookbook.html +18 -11
- data/distro/common/html/knife_cookbook_site.html +14 -14
- data/distro/common/html/knife_data_bag.html +24 -23
- data/distro/common/html/knife_delete.html +4 -5
- data/distro/common/html/knife_deps.html +4 -5
- data/distro/common/html/knife_diff.html +6 -7
- data/distro/common/html/knife_download.html +12 -13
- data/distro/common/html/knife_edit.html +4 -5
- data/distro/common/html/knife_environment.html +8 -9
- data/distro/common/html/knife_exec.html +9 -10
- data/distro/common/html/knife_index_rebuild.html +4 -5
- data/distro/common/html/knife_list.html +8 -9
- data/distro/common/html/knife_node.html +34 -33
- data/distro/common/html/knife_raw.html +2 -3
- data/distro/common/html/knife_recipe_list.html +3 -4
- data/distro/common/html/knife_role.html +30 -29
- data/distro/common/html/knife_search.html +7 -7
- data/distro/common/html/knife_show.html +4 -5
- data/distro/common/html/knife_ssh.html +2 -3
- data/distro/common/html/knife_ssl_check.html +148 -0
- data/distro/common/html/knife_ssl_fetch.html +152 -0
- data/distro/common/html/knife_status.html +4 -5
- data/distro/common/html/knife_tag.html +2 -3
- data/distro/common/html/knife_upload.html +5 -6
- data/distro/common/html/knife_user.html +9 -10
- data/distro/common/html/knife_using.html +12 -12
- data/distro/common/html/knife_xargs.html +11 -12
- data/distro/common/html/search.html +1 -2
- data/distro/common/html/searchindex.js +1 -1
- data/distro/common/man/man1/chef-shell.1 +19 -11
- data/distro/common/man/man1/knife-bootstrap.1 +35 -19
- data/distro/common/man/man1/knife-client.1 +111 -28
- data/distro/common/man/man1/knife-configure.1 +30 -14
- data/distro/common/man/man1/knife-cookbook-site.1 +105 -22
- data/distro/common/man/man1/knife-cookbook.1 +164 -23
- data/distro/common/man/man1/knife-data-bag.1 +157 -33
- data/distro/common/man/man1/knife-delete.1 +21 -17
- data/distro/common/man/man1/knife-deps.1 +60 -16
- data/distro/common/man/man1/knife-diff.1 +37 -17
- data/distro/common/man/man1/knife-download.1 +68 -24
- data/distro/common/man/man1/knife-edit.1 +19 -15
- data/distro/common/man/man1/knife-environment.1 +105 -17
- data/distro/common/man/man1/knife-exec.1 +78 -18
- data/distro/common/man/man1/knife-index-rebuild.1 +16 -8
- data/distro/common/man/man1/knife-list.1 +39 -23
- data/distro/common/man/man1/knife-node.1 +170 -22
- data/distro/common/man/man1/knife-raw.1 +33 -13
- data/distro/common/man/man1/knife-recipe-list.1 +17 -5
- data/distro/common/man/man1/knife-role.1 +86 -18
- data/distro/common/man/man1/knife-search.1 +80 -16
- data/distro/common/man/man1/knife-show.1 +30 -14
- data/distro/common/man/man1/knife-ssh.1 +54 -14
- data/distro/common/man/man1/knife-ssl-check.1 +207 -0
- data/distro/common/man/man1/knife-ssl-fetch.1 +207 -0
- data/distro/common/man/man1/knife-status.1 +48 -12
- data/distro/common/man/man1/knife-tag.1 +30 -10
- data/distro/common/man/man1/knife-upload.1 +72 -20
- data/distro/common/man/man1/knife-user.1 +79 -23
- data/distro/common/man/man1/knife-xargs.1 +61 -53
- data/distro/common/man/man8/chef-client.8 +87 -29
- data/distro/common/man/man8/chef-solo.8 +36 -15
- data/lib/chef/application.rb +19 -14
- data/lib/chef/application/client.rb +5 -0
- data/lib/chef/application/solo.rb +5 -0
- data/lib/chef/application/windows_service_manager.rb +3 -0
- data/lib/chef/chef_fs/chef_fs_data_store.rb +72 -24
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb +20 -4
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbooks_dir.rb +20 -1
- data/lib/chef/chef_fs/file_system/file_system_entry.rb +10 -2
- data/lib/chef/client.rb +2 -3
- data/lib/chef/config.rb +34 -8
- data/lib/chef/cookbook/cookbook_version_loader.rb +45 -4
- data/lib/chef/cookbook_version.rb +38 -30
- data/lib/chef/dsl/recipe.rb +4 -1
- data/lib/chef/event_dispatch/base.rb +14 -0
- data/lib/chef/event_dispatch/events_output_stream.rb +29 -0
- data/lib/chef/exceptions.rb +8 -0
- data/lib/chef/formatters/base.rb +16 -45
- data/lib/chef/formatters/doc.rb +51 -26
- data/lib/chef/formatters/indentable_output_stream.rb +165 -0
- data/lib/chef/knife/node_environment_set.rb +54 -0
- data/lib/chef/knife/user_create.rb +1 -1
- data/lib/chef/monkey_patches/pathname.rb +32 -0
- data/lib/chef/node.rb +1 -1
- data/lib/chef/platform/provider_mapping.rb +345 -338
- data/lib/chef/policy_builder/expand_node_object.rb +1 -1
- data/lib/chef/policy_builder/policyfile.rb +1 -1
- data/lib/chef/provider.rb +1 -0
- data/lib/chef/provider/git.rb +1 -1
- data/lib/chef/provider/link.rb +2 -2
- data/lib/chef/provider/remote_file/content.rb +1 -1
- data/lib/chef/provider/remote_file/local_file.rb +8 -2
- data/lib/chef/provider/service/arch.rb +0 -1
- data/lib/chef/provider/service/debian.rb +0 -2
- data/lib/chef/provider/service/freebsd.rb +2 -1
- data/lib/chef/provider/service/gentoo.rb +1 -1
- data/lib/chef/provider/service/init.rb +0 -1
- data/lib/chef/provider/service/insserv.rb +0 -2
- data/lib/chef/provider/service/invokercd.rb +0 -2
- data/lib/chef/provider/service/macosx.rb +2 -1
- data/lib/chef/provider/service/redhat.rb +0 -1
- data/lib/chef/provider/service/simple.rb +1 -0
- data/lib/chef/provider/service/solaris.rb +1 -0
- data/lib/chef/provider/service/systemd.rb +1 -1
- data/lib/chef/provider/service/upstart.rb +1 -1
- data/lib/chef/provider/user.rb +9 -9
- data/lib/chef/provider/user/solaris.rb +2 -0
- data/lib/chef/resource.rb +1 -0
- data/lib/chef/resource/remote_file.rb +32 -6
- data/lib/chef/run_context.rb +22 -0
- data/lib/chef/run_lock.rb +43 -4
- data/lib/chef/version.rb +2 -2
- data/spec/functional/http/simple_spec.rb +84 -0
- data/spec/functional/resource/remote_file_spec.rb +107 -43
- data/spec/functional/rest_spec.rb +94 -0
- data/spec/functional/run_lock_spec.rb +1 -1
- data/spec/functional/win32/service_manager_spec.rb +6 -0
- data/spec/integration/knife/chef_fs_data_store_spec.rb +2 -0
- data/spec/integration/recipes/lwrp_inline_resources_spec.rb +76 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/support/mock/platform.rb +7 -0
- data/spec/support/pedant/pedant_config.rb +121 -0
- data/spec/support/pedant/run_pedant.rb +63 -0
- data/spec/support/pedant/stickywicket.pem +27 -0
- data/spec/support/shared/functional/http.rb +242 -0
- data/spec/support/shared/unit/api_error_inspector.rb +2 -2
- data/spec/unit/api_client_spec.rb +2 -2
- data/spec/unit/application/client_spec.rb +6 -1
- data/spec/unit/application/knife_spec.rb +4 -0
- data/spec/unit/application/solo_spec.rb +2 -0
- data/spec/unit/application_spec.rb +7 -0
- data/spec/unit/client_spec.rb +16 -0
- data/spec/unit/config_spec.rb +3 -20
- data/spec/unit/cookbook_version_spec.rb +224 -122
- data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +2 -2
- data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +2 -2
- data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +2 -2
- data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +2 -2
- data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +2 -2
- data/spec/unit/handler_spec.rb +0 -1
- data/spec/unit/knife/client_bulk_delete_spec.rb +3 -0
- data/spec/unit/knife/cookbook_bulk_delete_spec.rb +2 -0
- data/spec/unit/knife/cookbook_metadata_spec.rb +2 -2
- data/spec/unit/knife/cookbook_site_install_spec.rb +3 -1
- data/spec/unit/knife/cookbook_upload_spec.rb +10 -10
- data/spec/unit/knife/node_environment_set_spec.rb +80 -0
- data/spec/unit/knife/user_create_spec.rb +6 -4
- data/spec/unit/knife/user_edit_spec.rb +5 -0
- data/spec/unit/knife_spec.rb +3 -0
- data/spec/unit/mixin/securable_spec.rb +18 -20
- data/spec/unit/node/attribute_spec.rb +15 -2
- data/spec/unit/node/immutable_collections_spec.rb +4 -4
- data/spec/unit/provider/cron_spec.rb +14 -14
- data/spec/unit/provider/git_spec.rb +4 -4
- data/spec/unit/provider/group_spec.rb +1 -1
- data/spec/unit/provider/ohai_spec.rb +2 -2
- data/spec/unit/provider/remote_file/content_spec.rb +58 -35
- data/spec/unit/provider/remote_file/local_file_spec.rb +23 -0
- data/spec/unit/provider/service/solaris_smf_service_spec.rb +13 -13
- data/spec/unit/resource/mount_spec.rb +0 -1
- data/spec/unit/resource/remote_file_spec.rb +29 -0
- data/spec/unit/resource_spec.rb +1 -1
- data/spec/unit/run_context_spec.rb +7 -0
- data/spec/unit/run_lock_spec.rb +98 -0
- data/spec/unit/version_constraint_spec.rb +1 -1
- metadata +164 -151
- data/distro/common/html/_static/chef.css +0 -507
- data/distro/common/html/_static/chef_logo.png +0 -0
- data/lib/chef/checksum/storage.rb +0 -18
- data/lib/chef/checksum/storage/filesystem.rb +0 -56
- data/spec/unit/checksum/storage/filesystem_spec.rb +0 -70
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
2
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
3
|
|
@@ -14,7 +13,7 @@
|
|
14
13
|
|
15
14
|
<script type="text/javascript">
|
16
15
|
var DOCUMENTATION_OPTIONS = {
|
17
|
-
URL_ROOT: '',
|
16
|
+
URL_ROOT: './',
|
18
17
|
VERSION: '',
|
19
18
|
COLLAPSE_INDEX: false,
|
20
19
|
FILE_SUFFIX: '.html',
|
@@ -43,8 +42,8 @@
|
|
43
42
|
|
44
43
|
<div class="section" id="knife-cookbook-site">
|
45
44
|
<h1>knife cookbook site<a class="headerlink" href="#knife-cookbook-site" title="Permalink to this headline">¶</a></h1>
|
46
|
-
<p>The Cookbooks Site API is used to provide access to the cookbooks community hosted at <a class="reference external" href="
|
47
|
-
<p>The <strong>knife cookbook site</strong> subcommand is used to interact with cookbooks that are located at <a class="reference external" href="
|
45
|
+
<p>The Cookbooks Site API is used to provide access to the cookbooks community hosted at <a class="reference external" href="http://community.opscode.com/">http://community.opscode.com/</a>. All of the cookbooks in the community are accessible through a REST API located at <a class="reference external" href="https://cookbooks.opscode.com/api/v1/cookbooks">https://cookbooks.opscode.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 REST API directly may make sense.</p>
|
46
|
+
<p>The <strong>knife cookbook site</strong> subcommand is used to interact with cookbooks that are located at <a class="reference external" href="http://community.opscode.com/">http://community.opscode.com/</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>
|
48
47
|
<div class="admonition note">
|
49
48
|
<p class="first admonition-title">Note</p>
|
50
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>
|
@@ -87,12 +86,12 @@ Cookbook saved: /Users/sdanna/opscodesupport/getting-started-0.3.0.tar.gz
|
|
87
86
|
</div>
|
88
87
|
<div class="section" id="install">
|
89
88
|
<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="
|
89
|
+
<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="http://community.opscode.com/">http://community.opscode.com/</a> site to install community-contributed cookbooks to the local chef-repo. Using this argument does the following:</p>
|
91
90
|
<blockquote>
|
92
91
|
<div><ol class="arabic simple">
|
93
92
|
<li>A new “pristine copy” branch is created in git for tracking the upstream.</li>
|
94
93
|
<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="
|
94
|
+
<li>The cookbook is downloaded from <a class="reference external" href="http://community.opscode.com/">http://community.opscode.com/</a> in the tar.gz format.</li>
|
96
95
|
<li>The downloaded cookbook is untarred and its contents are committed to git and a tag is created.</li>
|
97
96
|
<li>The “pristine copy” branch is merged into the master branch.</li>
|
98
97
|
</ol>
|
@@ -164,7 +163,7 @@ Cookbook getting-started version 0.3.0 successfully installed
|
|
164
163
|
</div>
|
165
164
|
<div class="section" id="list">
|
166
165
|
<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="
|
166
|
+
<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="http://community.opscode.com/">http://community.opscode.com/</a>.</p>
|
168
167
|
<div class="section" id="id4">
|
169
168
|
<h3>Syntax<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
|
170
169
|
<p>This argument has the following syntax:</p>
|
@@ -184,12 +183,12 @@ Cookbook getting-started version 0.3.0 successfully installed
|
|
184
183
|
<h3>Examples<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
|
185
184
|
<p>The following examples show how to use this Knife subcommand:</p>
|
186
185
|
<p><strong>View a list of cookbooks</strong></p>
|
187
|
-
<p>To view a list of cookbooks at <a class="reference external" href="
|
186
|
+
<p>To view a list of cookbooks at <a class="reference external" href="http://community.opscode.com/">http://community.opscode.com/</a> server, enter:</p>
|
188
187
|
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site list
|
189
188
|
</pre></div>
|
190
189
|
</div>
|
191
190
|
<p>to return:</p>
|
192
|
-
<div class="highlight-python"><pre>1password homesick rabbitmq
|
191
|
+
<div class="highlight-python"><div class="highlight"><pre>1password homesick rabbitmq
|
193
192
|
7-zip hostname rabbitmq-management
|
194
193
|
AmazonEC2Tag hosts rabbitmq_chef
|
195
194
|
R hosts-awareness rackspaceknife
|
@@ -199,13 +198,14 @@ activemq icinga rails_enterprise
|
|
199
198
|
ad id3lib redis-package
|
200
199
|
ad-likewise iftop redis2
|
201
200
|
ant iis redmine
|
202
|
-
[...truncated...]
|
201
|
+
[...truncated...]
|
202
|
+
</pre></div>
|
203
203
|
</div>
|
204
204
|
</div>
|
205
205
|
</div>
|
206
206
|
<div class="section" id="search">
|
207
207
|
<h2>search<a class="headerlink" href="#search" title="Permalink to this headline">¶</a></h2>
|
208
|
-
<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="
|
208
|
+
<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="http://community.opscode.com/">http://community.opscode.com/</a>. A search query is used to return a list of cookbooks at <a class="reference external" href="http://community.opscode.com/">http://community.opscode.com/</a> and uses the same syntax as the <strong>knife search</strong> sub-command.</p>
|
209
209
|
<div class="section" id="id7">
|
210
210
|
<h3>Syntax<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
|
211
211
|
<p>This argument has the following syntax:</p>
|
@@ -248,7 +248,7 @@ kickstart:
|
|
248
248
|
</div>
|
249
249
|
<div class="section" id="share">
|
250
250
|
<h2>share<a class="headerlink" href="#share" title="Permalink to this headline">¶</a></h2>
|
251
|
-
<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="
|
251
|
+
<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="http://community.opscode.com/">http://community.opscode.com/</a>. This action will require a user account and a certificate for <a class="reference external" href="http://community.opscode.com">http://community.opscode.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="http://community.opscode.com/">http://community.opscode.com/</a>, then only an owner or maintainer of that cookbook can make updates.</p>
|
252
252
|
<div class="section" id="id10">
|
253
253
|
<h3>Syntax<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3>
|
254
254
|
<p>This argument has the following syntax:</p>
|
@@ -278,7 +278,7 @@ kickstart:
|
|
278
278
|
</div>
|
279
279
|
<div class="section" id="show">
|
280
280
|
<h2>show<a class="headerlink" href="#show" title="Permalink to this headline">¶</a></h2>
|
281
|
-
<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="
|
281
|
+
<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="http://community.opscode.com/">http://community.opscode.com/</a>.</p>
|
282
282
|
<div class="section" id="id13">
|
283
283
|
<h3>Syntax<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3>
|
284
284
|
<p>This argument has the following syntax:</p>
|
@@ -332,7 +332,7 @@ versions:
|
|
332
332
|
</div>
|
333
333
|
<div class="section" id="unshare">
|
334
334
|
<h2>unshare<a class="headerlink" href="#unshare" title="Permalink to this headline">¶</a></h2>
|
335
|
-
<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="
|
335
|
+
<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="http://community.opscode.com/">http://community.opscode.com/</a>. Only the maintainer of a cookbook may perform this action.</p>
|
336
336
|
<div class="section" id="id16">
|
337
337
|
<h3>Syntax<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h3>
|
338
338
|
<p>This argument has the following syntax:</p>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
2
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
3
|
|
@@ -14,7 +13,7 @@
|
|
14
13
|
|
15
14
|
<script type="text/javascript">
|
16
15
|
var DOCUMENTATION_OPTIONS = {
|
17
|
-
URL_ROOT: '',
|
16
|
+
URL_ROOT: './',
|
18
17
|
VERSION: '',
|
19
18
|
COLLAPSE_INDEX: false,
|
20
19
|
FILE_SUFFIX: '.html',
|
@@ -43,7 +42,7 @@
|
|
43
42
|
|
44
43
|
<div class="section" id="knife-data-bag">
|
45
44
|
<h1>knife data bag<a class="headerlink" href="#knife-data-bag" title="Permalink to this headline">¶</a></h1>
|
46
|
-
<p>A data bag is a global variable that is stored as JSON data and is accessible from a server. A data bag is indexed for searching and can be loaded by a recipe or accessed during a search
|
45
|
+
<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>
|
47
46
|
<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>
|
48
47
|
<p>The <strong>knife data bag</strong> subcommand is used to manage arbitrary stores of globally available JSON data.</p>
|
49
48
|
<div class="admonition note">
|
@@ -52,7 +51,7 @@
|
|
52
51
|
</div>
|
53
52
|
<div class="section" id="create">
|
54
53
|
<h2>create<a class="headerlink" href="#create" title="Permalink to this headline">¶</a></h2>
|
55
|
-
<p>The <tt class="docutils literal"><span class="pre">create</span></tt> argument is used to add a data bag to the server.</p>
|
54
|
+
<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>
|
56
55
|
<div class="section" id="syntax">
|
57
56
|
<h3>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h3>
|
58
57
|
<p>This argument has the following syntax:</p>
|
@@ -92,7 +91,7 @@
|
|
92
91
|
</div>
|
93
92
|
<div class="section" id="delete">
|
94
93
|
<h2>delete<a class="headerlink" href="#delete" title="Permalink to this headline">¶</a></h2>
|
95
|
-
<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 server.</p>
|
94
|
+
<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>
|
96
95
|
<div class="section" id="id1">
|
97
96
|
<h3>Syntax<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
|
98
97
|
<p>This argument has the following syntax:</p>
|
@@ -125,7 +124,7 @@
|
|
125
124
|
</div>
|
126
125
|
<div class="section" id="edit">
|
127
126
|
<h2>edit<a class="headerlink" href="#edit" title="Permalink to this headline">¶</a></h2>
|
128
|
-
<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 server.</p>
|
127
|
+
<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>
|
129
128
|
<div class="section" id="id4">
|
130
129
|
<h3>Syntax<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
|
131
130
|
<p>This argument has the following syntax:</p>
|
@@ -162,7 +161,7 @@
|
|
162
161
|
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag edit admins charlie
|
163
162
|
</pre></div>
|
164
163
|
</div>
|
165
|
-
<p>to open the $EDITOR. Once opened, you can update the data before saving it to the server. For example, by changing:</p>
|
164
|
+
<p>to open the $EDITOR. Once opened, you can update the data before saving it to the Chef server. For example, by changing:</p>
|
166
165
|
<div class="highlight-bash"><div class="highlight"><pre><span class="o">{</span>
|
167
166
|
<span class="s2">"id"</span>: <span class="s2">"charlie"</span>
|
168
167
|
<span class="o">}</span>
|
@@ -172,9 +171,9 @@
|
|
172
171
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
|
173
172
|
<span class="s2">"id"</span><span class="o">:</span> <span class="s2">"charlie"</span><span class="p">,</span>
|
174
173
|
<span class="s2">"uid"</span><span class="o">:</span> <span class="mi">1005</span><span class="p">,</span>
|
175
|
-
<span class="s2">"gid"</span><span class="o">:</span
|
176
|
-
<span class="s2">"shell"</span><span class="o">:</span
|
177
|
-
<span class="s2">"comment"</span><span class="o">:</span
|
174
|
+
<span class="s2">"gid"</span><span class="o">:</span> <span class="s2">"ops"</span><span class="p">,</span>
|
175
|
+
<span class="s2">"shell"</span><span class="o">:</span> <span class="s2">"/bin/zsh"</span><span class="p">,</span>
|
176
|
+
<span class="s2">"comment"</span><span class="o">:</span> <span class="s2">"Crazy Charlie"</span>
|
178
177
|
<span class="p">}</span>
|
179
178
|
</pre></div>
|
180
179
|
</div>
|
@@ -182,7 +181,7 @@
|
|
182
181
|
</div>
|
183
182
|
<div class="section" id="from-file">
|
184
183
|
<h2>from file<a class="headerlink" href="#from-file" title="Permalink to this headline">¶</a></h2>
|
185
|
-
<p>The <tt class="docutils literal"><span class="pre">from</span> <span class="pre">file</span></tt> argument is used to create a data bag on the server from a file. The path to the data bag file must specify one of the following:</p>
|
184
|
+
<p>The <tt class="docutils literal"><span class="pre">from</span> <span class="pre">file</span></tt> argument is used to create a data bag on the Chef server from a file. The path to the data bag file must specify one of the following:</p>
|
186
185
|
<ul class="simple">
|
187
186
|
<li>the name of a data bag</li>
|
188
187
|
<li>a relative or absolute path to a file</li>
|
@@ -219,7 +218,7 @@
|
|
219
218
|
<h3>Examples<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3>
|
220
219
|
<p>The following examples show how to use this Knife subcommand:</p>
|
221
220
|
<p><strong>Create a data bag from a file</strong></p>
|
222
|
-
<p>To create a data bag on the server from a file:</p>
|
221
|
+
<p>To create a data bag on the Chef server from a file:</p>
|
223
222
|
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag from file <span class="s2">"path to JSON file"</span>
|
224
223
|
</pre></div>
|
225
224
|
</div>
|
@@ -232,7 +231,7 @@
|
|
232
231
|
</div>
|
233
232
|
<div class="section" id="list">
|
234
233
|
<h2>list<a class="headerlink" href="#list" title="Permalink to this headline">¶</a></h2>
|
235
|
-
<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 server.</p>
|
234
|
+
<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>
|
236
235
|
<div class="section" id="id10">
|
237
236
|
<h3>Syntax<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3>
|
238
237
|
<p>This argument has the following syntax:</p>
|
@@ -313,12 +312,13 @@ uid: 1005
|
|
313
312
|
</pre></div>
|
314
313
|
</div>
|
315
314
|
<p>to return:</p>
|
316
|
-
<div class="highlight-javascript"><pre>## sample:
|
315
|
+
<div class="highlight-javascript"><div class="highlight"><pre>## sample:
|
317
316
|
{
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
}
|
317
|
+
"id": "mysql",
|
318
|
+
"pass": "trywgFA6R70NO28PNhMpGhEvKBZuxouemnbnAUQsUyo=\n",
|
319
|
+
"user": "e/p+8WJYVHY9fHcEgAAReg==\n"
|
320
|
+
}
|
321
|
+
</pre></div>
|
322
322
|
</div>
|
323
323
|
<p><strong>Show a data bag, decrypted</strong></p>
|
324
324
|
<p>To show the decrypted contents of the same data bag, enter:</p>
|
@@ -326,12 +326,13 @@ uid: 1005
|
|
326
326
|
</pre></div>
|
327
327
|
</div>
|
328
328
|
<p>to return:</p>
|
329
|
-
<div class="highlight-javascript"><pre>## sample:
|
329
|
+
<div class="highlight-javascript"><div class="highlight"><pre>## sample:
|
330
330
|
{
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
}
|
331
|
+
"id": "mysql",
|
332
|
+
"pass": "thesecret123",
|
333
|
+
"user": "fred"
|
334
|
+
}
|
335
|
+
</pre></div>
|
335
336
|
</div>
|
336
337
|
<p><strong>Show a data bag as JSON</strong></p>
|
337
338
|
<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>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
2
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
3
|
|
@@ -14,7 +13,7 @@
|
|
14
13
|
|
15
14
|
<script type="text/javascript">
|
16
15
|
var DOCUMENTATION_OPTIONS = {
|
17
|
-
URL_ROOT: '',
|
16
|
+
URL_ROOT: './',
|
18
17
|
VERSION: '',
|
19
18
|
COLLAPSE_INDEX: false,
|
20
19
|
FILE_SUFFIX: '.html',
|
@@ -43,10 +42,10 @@
|
|
43
42
|
|
44
43
|
<div class="section" id="knife-delete">
|
45
44
|
<h1>knife delete<a class="headerlink" href="#knife-delete" title="Permalink to this headline">¶</a></h1>
|
46
|
-
<p>The <strong>knife delete</strong> subcommand is used to delete an object from a server. This subcommand works similar to <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">cookbook</span> <span class="pre">delete</span></tt>, <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">data</span> <span class="pre">bag</span> <span class="pre">delete</span></tt>, <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">environment</span> <span class="pre">delete</span></tt>, <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">node</span> <span class="pre">delete</span></tt>, and <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">role</span> <span class="pre">delete</span></tt>, but with a single verb (and a single action).</p>
|
45
|
+
<p>The <strong>knife delete</strong> subcommand is used to delete an object from a Chef server. This subcommand works similar to <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">cookbook</span> <span class="pre">delete</span></tt>, <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">data</span> <span class="pre">bag</span> <span class="pre">delete</span></tt>, <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">environment</span> <span class="pre">delete</span></tt>, <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">node</span> <span class="pre">delete</span></tt>, and <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">role</span> <span class="pre">delete</span></tt>, but with a single verb (and a single action).</p>
|
47
46
|
<div class="section" id="syntax">
|
48
47
|
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
|
49
|
-
<p>This
|
48
|
+
<p>This subcommand has the following syntax:</p>
|
50
49
|
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife delete <span class="o">[</span>PATTERN...<span class="o">]</span> <span class="o">(</span>options<span class="o">)</span>
|
51
50
|
</pre></div>
|
52
51
|
</div>
|
@@ -62,7 +61,7 @@
|
|
62
61
|
<dt><tt class="docutils literal"><span class="pre">--both</span></tt></dt>
|
63
62
|
<dd>Indicates that both local and remote copies of an object should be deleted. Default: <tt class="docutils literal"><span class="pre">false</span></tt>.</dd>
|
64
63
|
<dt><tt class="docutils literal"><span class="pre">--chef-repo-path</span> <span class="pre">PATH</span></tt></dt>
|
65
|
-
<dd>The path to the chef-repo. This setting will override the default path to the chef-repo. Default: same as specified by <tt class="docutils literal"><span class="pre">chef_repo_path</span></tt> in
|
64
|
+
<dd>The path to the chef-repo. This setting will override the default path to the chef-repo. Default: same value as specified by <tt class="docutils literal"><span class="pre">chef_repo_path</span></tt> in client.rb.</dd>
|
66
65
|
<dt><tt class="docutils literal"><span class="pre">--concurrency</span></tt></dt>
|
67
66
|
<dd>The number of allowed concurrent connections. Default: <tt class="docutils literal"><span class="pre">10</span></tt>.</dd>
|
68
67
|
<dt><tt class="docutils literal"><span class="pre">--local</span></tt></dt>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
2
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
3
|
|
@@ -14,7 +13,7 @@
|
|
14
13
|
|
15
14
|
<script type="text/javascript">
|
16
15
|
var DOCUMENTATION_OPTIONS = {
|
17
|
-
URL_ROOT: '',
|
16
|
+
URL_ROOT: './',
|
18
17
|
VERSION: '',
|
19
18
|
COLLAPSE_INDEX: false,
|
20
19
|
FILE_SUFFIX: '.html',
|
@@ -46,7 +45,7 @@
|
|
46
45
|
<p>The <strong>knife deps</strong> subcommand is used to identify dependencies for a node, role, or cookbook.</p>
|
47
46
|
<div class="section" id="syntax">
|
48
47
|
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
|
49
|
-
<p>This
|
48
|
+
<p>This subcommand has the following syntax:</p>
|
50
49
|
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife deps <span class="o">(</span>options<span class="o">)</span>
|
51
50
|
</pre></div>
|
52
51
|
</div>
|
@@ -60,13 +59,13 @@
|
|
60
59
|
<p>This subcommand has the following options:</p>
|
61
60
|
<dl class="docutils">
|
62
61
|
<dt><tt class="docutils literal"><span class="pre">--chef-repo-path</span> <span class="pre">PATH</span></tt></dt>
|
63
|
-
<dd>The path to the chef-repo. This setting will override the default path to the chef-repo. Default: same as specified by <tt class="docutils literal"><span class="pre">chef_repo_path</span></tt> in
|
62
|
+
<dd>The path to the chef-repo. This setting will override the default path to the chef-repo. Default: same value as specified by <tt class="docutils literal"><span class="pre">chef_repo_path</span></tt> in client.rb.</dd>
|
64
63
|
<dt><tt class="docutils literal"><span class="pre">--concurrency</span></tt></dt>
|
65
64
|
<dd>The number of allowed concurrent connections. Default: <tt class="docutils literal"><span class="pre">10</span></tt>.</dd>
|
66
65
|
<dt><tt class="docutils literal"><span class="pre">--[no-]recurse</span></tt></dt>
|
67
66
|
<dd>Use <tt class="docutils literal"><span class="pre">--recurse</span></tt> to list dependencies recursively. This option can only be used when <tt class="docutils literal"><span class="pre">--tree</span></tt> is set to <tt class="docutils literal"><span class="pre">true</span></tt>. Default: <tt class="docutils literal"><span class="pre">--no-recurse</span></tt>.</dd>
|
68
67
|
<dt><tt class="docutils literal"><span class="pre">--remote</span></tt></dt>
|
69
|
-
<dd>Indicates that dependencies will be determined from objects located on the server instead of the local chef-repo. Default: <tt class="docutils literal"><span class="pre">false</span></tt>.</dd>
|
68
|
+
<dd>Indicates that dependencies will be determined from objects located on the Chef server instead of the local chef-repo. Default: <tt class="docutils literal"><span class="pre">false</span></tt>.</dd>
|
70
69
|
<dt><tt class="docutils literal"><span class="pre">--repo-mode</span> <span class="pre">MODE</span></tt></dt>
|
71
70
|
<dd>The layout of the local chef-repo. Possible values: <tt class="docutils literal"><span class="pre">static</span></tt>, <tt class="docutils literal"><span class="pre">everything</span></tt>, or <tt class="docutils literal"><span class="pre">hosted_everything</span></tt>. Use <tt class="docutils literal"><span class="pre">static</span></tt> for just roles, environments, cookbooks, and data bags. By default, <tt class="docutils literal"><span class="pre">everything</span></tt> and <tt class="docutils literal"><span class="pre">hosted_everything</span></tt> are dynamically selected depending on the server type. Default: <tt class="docutils literal"><span class="pre">everything</span></tt> / <tt class="docutils literal"><span class="pre">hosted_everything</span></tt>.</dd>
|
72
71
|
<dt><tt class="docutils literal"><span class="pre">--tree</span></tt></dt>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
2
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
3
|
|
@@ -14,7 +13,7 @@
|
|
14
13
|
|
15
14
|
<script type="text/javascript">
|
16
15
|
var DOCUMENTATION_OPTIONS = {
|
17
|
-
URL_ROOT: '',
|
16
|
+
URL_ROOT: './',
|
18
17
|
VERSION: '',
|
19
18
|
COLLAPSE_INDEX: false,
|
20
19
|
FILE_SUFFIX: '.html',
|
@@ -43,10 +42,10 @@
|
|
43
42
|
|
44
43
|
<div class="section" id="knife-diff">
|
45
44
|
<h1>knife diff<a class="headerlink" href="#knife-diff" title="Permalink to this headline">¶</a></h1>
|
46
|
-
<p>The <strong>knife diff</strong> subcommand is used to compare the differences between files and directories on the server and in the chef-repo. For example, to compare files on the server prior to an uploading or downloading files using the <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">download</span></tt> and <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">upload</span></tt> subcommands, or to ensure that certain files in multiple production environments are the same. This subcommand is similar to the <tt class="docutils literal"><span class="pre">git</span> <span class="pre">diff</span></tt> command that can be used to diff what is in the chef-repo with what is synced to a git repository.</p>
|
45
|
+
<p>The <strong>knife diff</strong> subcommand is used to compare the differences between files and directories on the Chef server and in the chef-repo. For example, to compare files on the Chef server prior to an uploading or downloading files using the <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">download</span></tt> and <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">upload</span></tt> subcommands, or to ensure that certain files in multiple production environments are the same. This subcommand is similar to the <tt class="docutils literal"><span class="pre">git</span> <span class="pre">diff</span></tt> command that can be used to diff what is in the chef-repo with what is synced to a git repository.</p>
|
47
46
|
<div class="section" id="syntax">
|
48
47
|
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
|
49
|
-
<p>This
|
48
|
+
<p>This subcommand has the following syntax:</p>
|
50
49
|
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife diff <span class="o">[</span>PATTERN...<span class="o">]</span> <span class="o">(</span>options<span class="o">)</span>
|
51
50
|
</pre></div>
|
52
51
|
</div>
|
@@ -60,9 +59,9 @@
|
|
60
59
|
<p>This subcommand has the following options:</p>
|
61
60
|
<dl class="docutils">
|
62
61
|
<dt><tt class="docutils literal"><span class="pre">--chef-repo-path</span> <span class="pre">PATH</span></tt></dt>
|
63
|
-
<dd>The path to the chef-repo. This setting will override the default path to the chef-repo. Default: same as specified by <tt class="docutils literal"><span class="pre">chef_repo_path</span></tt> in
|
62
|
+
<dd>The path to the chef-repo. This setting will override the default path to the chef-repo. Default: same value as specified by <tt class="docutils literal"><span class="pre">chef_repo_path</span></tt> in client.rb.</dd>
|
64
63
|
<dt><tt class="docutils literal"><span class="pre">--cookbook-version</span> <span class="pre">VERSION</span></tt></dt>
|
65
|
-
<dd>The version of a cookbook to
|
64
|
+
<dd>The version of a cookbook to download.</dd>
|
66
65
|
<dt><tt class="docutils literal"><span class="pre">--concurrency</span></tt></dt>
|
67
66
|
<dd>The number of allowed concurrent connections. Default: <tt class="docutils literal"><span class="pre">10</span></tt>.</dd>
|
68
67
|
<dt><tt class="docutils literal"><span class="pre">--diff-filter=[(A|D|M|T)...[*]]</span></tt></dt>
|
@@ -86,7 +85,7 @@
|
|
86
85
|
</pre></div>
|
87
86
|
</div>
|
88
87
|
<p><strong>Compare the chef-repo and the server</strong></p>
|
89
|
-
<p>To compare the differences between the local chef-repo and the files that are on the server, enter:</p>
|
88
|
+
<p>To compare the differences between the local chef-repo and the files that are on the Chef server, enter:</p>
|
90
89
|
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife diff
|
91
90
|
</pre></div>
|
92
91
|
</div>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
2
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
3
|
|
@@ -14,7 +13,7 @@
|
|
14
13
|
|
15
14
|
<script type="text/javascript">
|
16
15
|
var DOCUMENTATION_OPTIONS = {
|
17
|
-
URL_ROOT: '',
|
16
|
+
URL_ROOT: './',
|
18
17
|
VERSION: '',
|
19
18
|
COLLAPSE_INDEX: false,
|
20
19
|
FILE_SUFFIX: '.html',
|
@@ -43,10 +42,10 @@
|
|
43
42
|
|
44
43
|
<div class="section" id="knife-download">
|
45
44
|
<h1>knife download<a class="headerlink" href="#knife-download" title="Permalink to this headline">¶</a></h1>
|
46
|
-
<p>The <strong>knife download</strong> subcommand is used to download roles, cookbooks, environments, nodes, and data bags from the server to the current working directory. It can be used to back up data on the server, inspect the state of one or more files, or to extract out-of-process changes users may have made to files on the server, such as if a user made a change that bypassed version source control. This subcommand is often used in conjunction with <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">diff</span></tt>, which can be used to see exactly what changes will be downloaded, and then <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">upload</span></tt>, which does the opposite of <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">download</span></tt>.</p>
|
45
|
+
<p>The <strong>knife download</strong> subcommand is used to download roles, cookbooks, environments, nodes, and data bags from the Chef server to the current working directory. It can be used to back up data on the Chef server, inspect the state of one or more files, or to extract out-of-process changes users may have made to files on the Chef server, such as if a user made a change that bypassed version source control. This subcommand is often used in conjunction with <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">diff</span></tt>, which can be used to see exactly what changes will be downloaded, and then <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">upload</span></tt>, which does the opposite of <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">download</span></tt>.</p>
|
47
46
|
<div class="section" id="syntax">
|
48
47
|
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
|
49
|
-
<p>This
|
48
|
+
<p>This subcommand has the following syntax:</p>
|
50
49
|
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife download <span class="o">[</span>PATTERN...<span class="o">]</span> <span class="o">(</span>options<span class="o">)</span>
|
51
50
|
</pre></div>
|
52
51
|
</div>
|
@@ -60,13 +59,13 @@
|
|
60
59
|
<p>This subcommand has the following options:</p>
|
61
60
|
<dl class="docutils">
|
62
61
|
<dt><tt class="docutils literal"><span class="pre">--chef-repo-path</span> <span class="pre">PATH</span></tt></dt>
|
63
|
-
<dd>The path to the chef-repo. This setting will override the default path to the chef-repo. Default: same as specified by <tt class="docutils literal"><span class="pre">chef_repo_path</span></tt> in
|
62
|
+
<dd>The path to the chef-repo. This setting will override the default path to the chef-repo. Default: same value as specified by <tt class="docutils literal"><span class="pre">chef_repo_path</span></tt> in client.rb.</dd>
|
64
63
|
<dt><tt class="docutils literal"><span class="pre">--concurrency</span></tt></dt>
|
65
64
|
<dd>The number of allowed concurrent connections. Default: <tt class="docutils literal"><span class="pre">10</span></tt>.</dd>
|
66
65
|
<dt><tt class="docutils literal"><span class="pre">--cookbook-version</span> <span class="pre">VERSION</span></tt></dt>
|
67
|
-
<dd>The version of a cookbook to
|
66
|
+
<dd>The version of a cookbook to download.</dd>
|
68
67
|
<dt><tt class="docutils literal"><span class="pre">--[no-]force</span></tt></dt>
|
69
|
-
<dd>Use <tt class="docutils literal"><span class="pre">--force</span></tt> to download files even when the file on the hard drive is identical to the object on the server (role, cookbook, etc.).
|
68
|
+
<dd>Use <tt class="docutils literal"><span class="pre">--force</span></tt> to download files even when the file on the hard drive is identical to the object on the server (role, cookbook, etc.). By default, files are compared to see if they have equivalent content, and local files are only overwritten if they are different. Default: <tt class="docutils literal"><span class="pre">--no-force</span></tt>.</dd>
|
70
69
|
<dt><tt class="docutils literal"><span class="pre">-n</span></tt>, <tt class="docutils literal"><span class="pre">--dry-run</span></tt></dt>
|
71
70
|
<dd>Indicates that no action is taken and that results are only printed out. Default: <tt class="docutils literal"><span class="pre">false</span></tt>.</dd>
|
72
71
|
<dt><tt class="docutils literal"><span class="pre">--[no-]diff</span></tt></dt>
|
@@ -74,7 +73,7 @@
|
|
74
73
|
<dt><tt class="docutils literal"><span class="pre">--[no-]recurse</span></tt></dt>
|
75
74
|
<dd>Use <tt class="docutils literal"><span class="pre">--no-recurse</span></tt> to disable downloading a directory recursively. Default: <tt class="docutils literal"><span class="pre">--recurse</span></tt>.</dd>
|
76
75
|
<dt><tt class="docutils literal"><span class="pre">--[no-]purge</span></tt></dt>
|
77
|
-
<dd>Use <tt class="docutils literal"><span class="pre">--purge</span></tt> to delete local files and directories that do not exist on the server.
|
76
|
+
<dd>Use <tt class="docutils literal"><span class="pre">--purge</span></tt> to delete local files and directories that do not exist on the Chef server. By default, if a role, cookbook, etc. does not exist on the Chef server, the local file for said role will be left alone and NOT deleted. Default: <tt class="docutils literal"><span class="pre">--no-purge</span></tt>.</dd>
|
78
77
|
<dt><tt class="docutils literal"><span class="pre">--repo-mode</span> <span class="pre">MODE</span></tt></dt>
|
79
78
|
<dd>The layout of the local chef-repo. Possible values: <tt class="docutils literal"><span class="pre">static</span></tt>, <tt class="docutils literal"><span class="pre">everything</span></tt>, or <tt class="docutils literal"><span class="pre">hosted_everything</span></tt>. Use <tt class="docutils literal"><span class="pre">static</span></tt> for just roles, environments, cookbooks, and data bags. By default, <tt class="docutils literal"><span class="pre">everything</span></tt> and <tt class="docutils literal"><span class="pre">hosted_everything</span></tt> are dynamically selected depending on the server type. Default: <tt class="docutils literal"><span class="pre">everything</span></tt> / <tt class="docutils literal"><span class="pre">hosted_everything</span></tt>.</dd>
|
80
79
|
</dl>
|
@@ -83,12 +82,12 @@
|
|
83
82
|
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
|
84
83
|
<p>The following examples show how to use this Knife subcommand:</p>
|
85
84
|
<p><strong>Download the entire chef-repo</strong></p>
|
86
|
-
<p>To download the entire chef-repo from the server, browse to the top level of the chef-repo and enter:</p>
|
85
|
+
<p>To download the entire chef-repo from the Chef server, browse to the top level of the chef-repo and enter:</p>
|
87
86
|
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife download /
|
88
87
|
</pre></div>
|
89
88
|
</div>
|
90
89
|
<p><strong>Download the /cookbooks directory</strong></p>
|
91
|
-
<p>To download the <tt class="docutils literal"><span class="pre">cookbooks/</span></tt> directory from the server, browse to the top level of the chef-repo and enter:</p>
|
90
|
+
<p>To download the <tt class="docutils literal"><span class="pre">cookbooks/</span></tt> directory from the Chef server, browse to the top level of the chef-repo and enter:</p>
|
92
91
|
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife download cookbooks
|
93
92
|
</pre></div>
|
94
93
|
</div>
|
@@ -97,7 +96,7 @@
|
|
97
96
|
</pre></div>
|
98
97
|
</div>
|
99
98
|
<p><strong>Download the /environments directory</strong></p>
|
100
|
-
<p>To download the <tt class="docutils literal"><span class="pre">environments/</span></tt> directory from the server, browse to the top level of the chef-repo and enter:</p>
|
99
|
+
<p>To download the <tt class="docutils literal"><span class="pre">environments/</span></tt> directory from the Chef server, browse to the top level of the chef-repo and enter:</p>
|
101
100
|
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife download environments
|
102
101
|
</pre></div>
|
103
102
|
</div>
|
@@ -106,7 +105,7 @@
|
|
106
105
|
</pre></div>
|
107
106
|
</div>
|
108
107
|
<p><strong>Download an environment</strong></p>
|
109
|
-
<p>To download an environment named “production” from the server, browse to the top level of the chef-repo and enter:</p>
|
108
|
+
<p>To download an environment named “production” from the Chef server, browse to the top level of the chef-repo and enter:</p>
|
110
109
|
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife download environments/production.json
|
111
110
|
</pre></div>
|
112
111
|
</div>
|
@@ -115,7 +114,7 @@
|
|
115
114
|
</pre></div>
|
116
115
|
</div>
|
117
116
|
<p><strong>Download the /roles directory</strong></p>
|
118
|
-
<p>To download the <tt class="docutils literal"><span class="pre">roles/</span></tt> directory from the server, browse to the top level of the chef-repo and enter:</p>
|
117
|
+
<p>To download the <tt class="docutils literal"><span class="pre">roles/</span></tt> directory from the Chef server, browse to the top level of the chef-repo and enter:</p>
|
119
118
|
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife download roles
|
120
119
|
</pre></div>
|
121
120
|
</div>
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
2
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
3
|
|
@@ -14,7 +13,7 @@
|
|
14
13
|
|
15
14
|
<script type="text/javascript">
|
16
15
|
var DOCUMENTATION_OPTIONS = {
|
17
|
-
URL_ROOT: '',
|
16
|
+
URL_ROOT: './',
|
18
17
|
VERSION: '',
|
19
18
|
COLLAPSE_INDEX: false,
|
20
19
|
FILE_SUFFIX: '.html',
|
@@ -43,10 +42,10 @@
|
|
43
42
|
|
44
43
|
<div class="section" id="knife-edit">
|
45
44
|
<h1>knife edit<a class="headerlink" href="#knife-edit" title="Permalink to this headline">¶</a></h1>
|
46
|
-
<p>The <strong>knife edit</strong> subcommand is used to edit objects on the server. This subcommand works similar to <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">cookbook</span> <span class="pre">edit</span></tt>, <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">data</span> <span class="pre">bag</span> <span class="pre">edit</span></tt>, <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">environment</span> <span class="pre">edit</span></tt>, <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">node</span> <span class="pre">edit</span></tt>, and <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">role</span> <span class="pre">edit</span></tt>, but with a single verb (and a single action).</p>
|
45
|
+
<p>The <strong>knife edit</strong> subcommand is used to edit objects on the Chef server. This subcommand works similar to <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">cookbook</span> <span class="pre">edit</span></tt>, <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">data</span> <span class="pre">bag</span> <span class="pre">edit</span></tt>, <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">environment</span> <span class="pre">edit</span></tt>, <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">node</span> <span class="pre">edit</span></tt>, and <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">role</span> <span class="pre">edit</span></tt>, but with a single verb (and a single action).</p>
|
47
46
|
<div class="section" id="syntax">
|
48
47
|
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
|
49
|
-
<p>This
|
48
|
+
<p>This subcommand has the following syntax:</p>
|
50
49
|
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife edit <span class="o">(</span>options<span class="o">)</span>
|
51
50
|
</pre></div>
|
52
51
|
</div>
|
@@ -60,7 +59,7 @@
|
|
60
59
|
<p>This subcommand has the following options:</p>
|
61
60
|
<dl class="docutils">
|
62
61
|
<dt><tt class="docutils literal"><span class="pre">--chef-repo-path</span> <span class="pre">PATH</span></tt></dt>
|
63
|
-
<dd>The path to the chef-repo. This setting will override the default path to the chef-repo. Default: same as specified by <tt class="docutils literal"><span class="pre">chef_repo_path</span></tt> in
|
62
|
+
<dd>The path to the chef-repo. This setting will override the default path to the chef-repo. Default: same value as specified by <tt class="docutils literal"><span class="pre">chef_repo_path</span></tt> in client.rb.</dd>
|
64
63
|
<dt><tt class="docutils literal"><span class="pre">--concurrency</span></tt></dt>
|
65
64
|
<dd>The number of allowed concurrent connections. Default: <tt class="docutils literal"><span class="pre">10</span></tt>.</dd>
|
66
65
|
<dt><tt class="docutils literal"><span class="pre">--local</span></tt></dt>
|