summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel DeLeo <dan@opscode.com>2011-04-12 11:21:00 -0700
committerDaniel DeLeo <dan@opscode.com>2011-04-12 11:21:00 -0700
commitb76c31154a1bc1bbe01fa710225266d6b61ac195 (patch)
tree86c62ac844c67c887babd93b942b1aa39b834c78
parentf479f7a317be87e61f5ccdf4ee7ce3201e374508 (diff)
parenta940c6d3d20966e7cf7444cc9c9862f5ceaefa5b (diff)
downloadchef-b76c31154a1bc1bbe01fa710225266d6b61ac195.tar.gz
Merge branch 'master' into pl-master
-rw-r--r--Rakefile2
-rw-r--r--chef-expander/lib/chef/expander/version.rb2
-rw-r--r--chef-server-api/Gemfile.lock6
-rw-r--r--chef-server-api/config/init.rb1
-rw-r--r--chef-server-api/lib/chef-server-api/version.rb2
-rw-r--r--chef-server-webui/lib/chef-server-webui/version.rb2
-rw-r--r--chef-server/lib/chef-server/version.rb2
-rw-r--r--chef-solr/lib/chef/solr/version.rb2
-rw-r--r--chef/distro/common/html/knife-bootstrap.1.html79
-rw-r--r--chef/distro/common/html/knife-client.1.html47
-rw-r--r--chef/distro/common/html/knife-configure.1.html2
-rw-r--r--chef/distro/common/html/knife-cookbook-site.1.html110
-rw-r--r--chef/distro/common/html/knife-cookbook.1.html292
-rw-r--r--chef/distro/common/html/knife-data-bag.1.html2
-rw-r--r--chef/distro/common/html/knife-environment.1.html180
-rw-r--r--chef/distro/common/html/knife-exec.1.html47
-rw-r--r--chef/distro/common/html/knife-index.1.html2
-rw-r--r--chef/distro/common/html/knife-node.1.html8
-rw-r--r--chef/distro/common/html/knife-recipe.1.html2
-rw-r--r--chef/distro/common/html/knife-role.1.html102
-rw-r--r--chef/distro/common/html/knife-search.1.html45
-rw-r--r--chef/distro/common/html/knife-ssh.1.html59
-rw-r--r--chef/distro/common/html/knife-status.1.html35
-rw-r--r--chef/distro/common/html/knife-tag.1.html46
-rw-r--r--chef/distro/common/html/knife.1.html255
-rw-r--r--chef/distro/common/html/shef.1.html283
-rw-r--r--chef/distro/common/man/man1/knife-bootstrap.160
-rw-r--r--chef/distro/common/man/man1/knife-client.123
-rw-r--r--chef/distro/common/man/man1/knife-configure.12
-rw-r--r--chef/distro/common/man/man1/knife-cookbook-site.186
-rw-r--r--chef/distro/common/man/man1/knife-cookbook.1322
-rw-r--r--chef/distro/common/man/man1/knife-data-bag.12
-rw-r--r--chef/distro/common/man/man1/knife-environment.1169
-rw-r--r--chef/distro/common/man/man1/knife-exec.139
-rw-r--r--chef/distro/common/man/man1/knife-index.12
-rw-r--r--chef/distro/common/man/man1/knife-node.13
-rw-r--r--chef/distro/common/man/man1/knife-recipe.113
-rw-r--r--chef/distro/common/man/man1/knife-role.172
-rw-r--r--chef/distro/common/man/man1/knife-search.130
-rw-r--r--chef/distro/common/man/man1/knife-ssh.145
-rw-r--r--chef/distro/common/man/man1/knife-status.116
-rw-r--r--chef/distro/common/man/man1/knife-tag.134
-rw-r--r--chef/distro/common/man/man1/knife.1277
-rw-r--r--chef/distro/common/man/man1/shef.1263
-rw-r--r--chef/distro/common/markdown/man1/knife-bootstrap.mkd64
-rw-r--r--chef/distro/common/markdown/man1/knife-client.mkd36
-rw-r--r--chef/distro/common/markdown/man1/knife-cookbook-site.mkd78
-rw-r--r--chef/distro/common/markdown/man1/knife-cookbook.mkd323
-rw-r--r--chef/distro/common/markdown/man1/knife-environment.mkd145
-rw-r--r--chef/distro/common/markdown/man1/knife-exec.mkd30
-rw-r--r--chef/distro/common/markdown/man1/knife-node.mkd2
-rw-r--r--chef/distro/common/markdown/man1/knife-recipe.mkd24
-rw-r--r--chef/distro/common/markdown/man1/knife-role.mkd66
-rw-r--r--chef/distro/common/markdown/man1/knife-search.mkd1
-rw-r--r--chef/distro/common/markdown/man1/knife-ssh.mkd2
-rw-r--r--chef/distro/common/markdown/man1/knife-status.mkd2
-rw-r--r--chef/distro/common/markdown/man1/knife-tag.mkd31
-rw-r--r--chef/distro/common/markdown/man1/knife.mkd258
-rw-r--r--chef/distro/common/markdown/man1/shef.mkd189
-rw-r--r--chef/lib/chef/api_client.rb71
-rw-r--r--chef/lib/chef/application/knife.rb2
-rw-r--r--chef/lib/chef/client.rb1
-rw-r--r--chef/lib/chef/cookbook/cookbook_version_loader.rb36
-rw-r--r--chef/lib/chef/cookbook/metadata.rb1
-rw-r--r--chef/lib/chef/cookbook_uploader.rb98
-rw-r--r--chef/lib/chef/cookbook_version.rb4
-rw-r--r--chef/lib/chef/couchdb.rb1
-rw-r--r--chef/lib/chef/knife.rb14
-rw-r--r--chef/lib/chef/knife/bootstrap/centos5-gems.erb20
-rw-r--r--chef/lib/chef/knife/bootstrap/fedora13-gems.erb2
-rw-r--r--chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb4
-rw-r--r--chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb2
-rw-r--r--chef/lib/chef/knife/client_create.rb2
-rw-r--r--chef/lib/chef/knife/cookbook_bulk_delete.rb16
-rw-r--r--chef/lib/chef/knife/cookbook_list.rb2
-rw-r--r--chef/lib/chef/knife/cookbook_show.rb1
-rw-r--r--chef/lib/chef/knife/cookbook_site_download.rb10
-rw-r--r--chef/lib/chef/knife/cookbook_site_list.rb2
-rw-r--r--chef/lib/chef/knife/cookbook_site_search.rb2
-rw-r--r--chef/lib/chef/knife/cookbook_site_show.rb6
-rw-r--r--chef/lib/chef/knife/cookbook_upload.rb15
-rw-r--r--chef/lib/chef/knife/core/generic_presenter.rb6
-rw-r--r--chef/lib/chef/knife/core/ui.rb2
-rw-r--r--chef/lib/chef/knife/help.rb8
-rw-r--r--chef/lib/chef/knife/node_bulk_delete.rb40
-rw-r--r--chef/lib/chef/knife/recipe_list.rb1
-rw-r--r--chef/lib/chef/knife/role_bulk_delete.rb31
-rw-r--r--chef/lib/chef/knife/tag_create.rb31
-rw-r--r--chef/lib/chef/knife/tag_delete.rb39
-rw-r--r--chef/lib/chef/knife/tag_list.rb30
-rw-r--r--chef/lib/chef/mixin/language.rb4
-rw-r--r--chef/lib/chef/node.rb1
-rw-r--r--chef/lib/chef/rest.rb13
-rw-r--r--chef/lib/chef/role.rb1
-rw-r--r--chef/lib/chef/shef.rb1
-rw-r--r--chef/lib/chef/version.rb2
-rw-r--r--chef/spec/unit/couchdb_spec.rb5
-rw-r--r--chef/spec/unit/knife/cookbook_bulk_delete_spec.rb3
-rw-r--r--chef/spec/unit/knife/core/ui_spec.rb2
-rw-r--r--chef/spec/unit/knife/node_bulk_delete_spec.rb68
-rw-r--r--chef/spec/unit/knife/role_bulk_delete_spec.rb34
-rw-r--r--chef/spec/unit/knife_spec.rb16
-rw-r--r--chef/spec/unit/rest_spec.rb4
-rw-r--r--features/support/env.rb2
104 files changed, 3621 insertions, 1359 deletions
diff --git a/Rakefile b/Rakefile
index c154bf0029..631baa87cb 100644
--- a/Rakefile
+++ b/Rakefile
@@ -157,7 +157,7 @@ def start_dev_environment(type="normal")
sleep 2
configure_rabbitmq(type)
start_chef_solr(type)
- start_chef_solr_indexer(type)
+ start_chef_expander(type)
start_chef_server(type)
start_chef_webui(type)
puts "Running CouchDB at #{@couchdb_server_pid}"
diff --git a/chef-expander/lib/chef/expander/version.rb b/chef-expander/lib/chef/expander/version.rb
index d003cc0f83..bd286e5abe 100644
--- a/chef-expander/lib/chef/expander/version.rb
+++ b/chef-expander/lib/chef/expander/version.rb
@@ -23,7 +23,7 @@ require 'open3'
module Chef
module Expander
- VERSION = "0.10.0.beta.8"
+ VERSION = "0.10.0.beta.9"
def self.version
@rev ||= begin
diff --git a/chef-server-api/Gemfile.lock b/chef-server-api/Gemfile.lock
index 89d6e18615..98d5019451 100644
--- a/chef-server-api/Gemfile.lock
+++ b/chef-server-api/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: ../chef
specs:
- chef (0.10.0.beta.8)
+ chef (0.10.0.beta.9)
bunny (>= 0.6.0)
erubis
highline
@@ -21,8 +21,8 @@ PATH
PATH
remote: ../chef-solr
specs:
- chef-solr (0.10.0.beta.8)
- chef (= 0.10.0.beta.8)
+ chef-solr (0.10.0.beta.9)
+ chef (= 0.10.0.beta.9)
GEM
remote: http://rubygems.org/
diff --git a/chef-server-api/config/init.rb b/chef-server-api/config/init.rb
index 281224d530..01114ac7c1 100644
--- a/chef-server-api/config/init.rb
+++ b/chef-server-api/config/init.rb
@@ -65,6 +65,7 @@ end
unless Merb::Config.environment == "test"
# create the couch design docs for nodes, roles, and databags
+ Chef::CouchDB.new.create_db
Chef::CouchDB.new.create_id_map
Chef::Node.create_design_document
Chef::Role.create_design_document
diff --git a/chef-server-api/lib/chef-server-api/version.rb b/chef-server-api/lib/chef-server-api/version.rb
index d4e69a35f0..a5f934df44 100644
--- a/chef-server-api/lib/chef-server-api/version.rb
+++ b/chef-server-api/lib/chef-server-api/version.rb
@@ -1,3 +1,3 @@
module ChefServerApi
- VERSION = '0.10.0.beta.8'
+ VERSION = '0.10.0.beta.9'
end
diff --git a/chef-server-webui/lib/chef-server-webui/version.rb b/chef-server-webui/lib/chef-server-webui/version.rb
index 5e652af9b8..f7bec375df 100644
--- a/chef-server-webui/lib/chef-server-webui/version.rb
+++ b/chef-server-webui/lib/chef-server-webui/version.rb
@@ -1,3 +1,3 @@
module ChefServerWebui
- VERSION = '0.10.0.beta.8'
+ VERSION = '0.10.0.beta.9'
end
diff --git a/chef-server/lib/chef-server/version.rb b/chef-server/lib/chef-server/version.rb
index b950d27384..3d76c432bc 100644
--- a/chef-server/lib/chef-server/version.rb
+++ b/chef-server/lib/chef-server/version.rb
@@ -17,5 +17,5 @@
#
module ChefServer
- VERSION = '0.10.0.beta.8'
+ VERSION = '0.10.0.beta.9'
end
diff --git a/chef-solr/lib/chef/solr/version.rb b/chef-solr/lib/chef/solr/version.rb
index 5dae90d43e..61d23e504a 100644
--- a/chef-solr/lib/chef/solr/version.rb
+++ b/chef-solr/lib/chef/solr/version.rb
@@ -1,6 +1,6 @@
class Chef
class Solr
- VERSION = '0.10.0.beta.8'
+ VERSION = '0.10.0.beta.9'
# Solr Schema. Used to detect incompatibilities between installed solr and
# chef-solr versions.
diff --git a/chef/distro/common/html/knife-bootstrap.1.html b/chef/distro/common/html/knife-bootstrap.1.html
index bbc00b24cf..f94d34e42e 100644
--- a/chef/distro/common/html/knife-bootstrap.1.html
+++ b/chef/distro/common/html/knife-bootstrap.1.html
@@ -61,6 +61,9 @@
<div class='man-navigation' style='display:none'>
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
+ <a href="#DESCRIPTION">DESCRIPTION</a>
+ <a href="#EXAMPLES">EXAMPLES</a>
+ <a href="#BUGS">BUGS</a>
<a href="#SEE-ALSO">SEE ALSO</a>
<a href="#AUTHOR">AUTHOR</a>
<a href="#DOCUMENTATION">DOCUMENTATION</a>
@@ -97,12 +100,13 @@
</dl>
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
<p>Performs a Chef Bootstrap on the target node. The goal of the bootstrap
is to get Chef installed on the target system so it can run Chef Client
with a Chef Server. The main assumption is a baseline OS installation
exists. This sub-command is used internally by some cloud computing
-server create commands and the others will be migrated in a future
-version of Chef.</p>
+plugins.</p>
<p>The bootstrap sub-command supports supplying a template to perform the
bootstrap steps. If the distro is not specified (via <code>-d</code> or <code>--distro</code>
@@ -119,7 +123,8 @@ sub-command looks in the following locations for the template to use:</p>
</ul>
-<p>The default bootstrap templates are scripts that get copied to the target node (FQDN). As of Chef 0.9.8, the following distros are supported:</p>
+<p>The default bootstrap templates are scripts that get copied to the
+target node (FQDN). The following distros are supported:</p>
<ul>
<li>centos5-gems</li>
@@ -129,9 +134,15 @@ sub-command looks in the following locations for the template to use:</p>
</ul>
-<p>The gems installations will use RubyGems 1.3.6 and Chef installed as a gem. The apt installation will use the Opscode APT repository. The RubyGems installation requires installing gems with native extensions, so development related packages (ruby-dev, build-essential) are installed. These are not installed with the apt installation, as native extensions are already compiled in the required packages.</p>
+<p>The gems installations will use RubyGems 1.3.6 and Chef installed as a
+gem. The apt installation will use the Opscode APT repository. The
+RubyGems installation requires installing gems with native extensions,
+so development related packages (ruby-dev, build-essential) are
+installed. These are not installed with the apt installation, as native
+extensions are already compiled in the required packages.</p>
-<p>In addition to handling the software installation, these bootstrap templates do the following:</p>
+<p>In addition to handling the software installation, these bootstrap
+templates do the following:</p>
<ul>
<li>Write the validation.pem per the local knife configuration.</li>
@@ -140,7 +151,12 @@ sub-command looks in the following locations for the template to use:</p>
</ul>
-<p>In the case of the RubyGems, the <code>client.rb</code> will be written from scratch with a minimal set of values; see <strong>EXAMPLES</strong>. In the case of APT Package installation, <code>client.rb</code> will have the <code>validation_client_name</code> appended if it is not set to <code>chef-validator</code> (default config value), and the <code>node_name</code> will be added if <code>chef_node_name</code> option is specified.</p>
+<p>In the case of the RubyGems, the <code>client.rb</code> will be written from
+scratch with a minimal set of values; see <strong>EXAMPLES</strong>. In the case of
+APT Package installation, <code>client.rb</code> will have the
+<code>validation_client_name</code> appended if it is not set to <code>chef-validator</code>
+(default config value), and the <code>node_name</code> will be added if
+<code>chef_node_name</code> option is specified.</p>
<p>When this is complete, the bootstrapped node will have:</p>
@@ -151,7 +167,50 @@ sub-command looks in the following locations for the template to use:</p>
</ul>
-<p>Additional custom bootstrap templates can be created and stored in <code>.chef/bootstrap/DISTRO.erb</code>, replacing <strong>DISTRO</strong> with the value passed with the <code>-d</code> or <code>--distro</code> option. See <strong>EXAMPLES</strong> for more information.</p>
+<p>Additional custom bootstrap templates can be created and stored in
+<code>.chef/bootstrap/DISTRO.erb</code>, replacing <strong>DISTRO</strong> with the value passed
+with the <code>-d</code> or <code>--distro</code> option. See <strong>EXAMPLES</strong> for more
+information.</p>
+
+<h2 id="EXAMPLES">EXAMPLES</h2>
+
+<p>Setting up a custom bootstrap is fairly straightforward. Create a
+<code>.chef/bootstrap</code> directory in your Chef Repository or in
+<code>$HOME/.chef/bootstrap</code>. Then create the ERB template file.</p>
+
+<pre><code>mkdir ~/.chef/bootstrap
+vi ~/.chef/bootstrap/debian5.0-apt.erb
+</code></pre>
+
+<p>For example, to create a new bootstrap template that should be used when
+setting up a new Debian node. Edit the template to run the commands, set
+up the validation certificate and the client configuration file, and
+finally to run chef-client on completion. The bootstrap template can be
+called with:</p>
+
+<pre><code>knife bootstrap mynode.example.com --template-file ~/.chef/bootstrap/debian5.0-apt.erb
+</code></pre>
+
+<p>Or,</p>
+
+<pre><code>knife bootstrap mynode.example.com --distro debian5.0-apt
+</code></pre>
+
+<p>The <code>--distro</code> parameter will automatically look in the
+<code>~/.chef/bootstrap</code> directory for a file named <code>debian5.0-apt.erb</code>.</p>
+
+<p>Templates provided by the Chef installation are located in
+<code>BASEDIR/lib/chef/knife/bootstrap/*.erb</code>, where <em>BASEDIR</em> is the
+location where the package or Gem installed the Chef client libraries.</p>
+
+<h2 id="BUGS">BUGS</h2>
+
+<p><code>knife bootstrap</code> is not capable of bootstrapping multiple hosts in
+parallel.</p>
+
+<p>The bootstrap script is passed as an argument to <span class="man-ref">sh<span class="s">(1)</span></span> on the remote
+system, so sensitive information contained in the script will be visible
+to other users via the process list using tools such as <span class="man-ref">ps<span class="s">(1)</span></span>.</p>
<h2 id="SEE-ALSO">SEE ALSO</h2>
@@ -159,11 +218,11 @@ sub-command looks in the following locations for the template to use:</p>
<h2 id="AUTHOR">AUTHOR</h2>
-<p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#x3a;&#x61;&#x64;&#x61;&#x6d;&#x40;&#111;&#x70;&#x73;&#99;&#x6f;&#x64;&#101;&#x2e;&#99;&#x6f;&#x6d;" data-bare-link="true">&#97;&#100;&#x61;&#109;&#x40;&#111;&#112;&#x73;&#x63;&#x6f;&#100;&#101;&#46;&#x63;&#111;&#x6d;</a> with many contributions from the community.</p>
+<p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#111;&#58;&#x61;&#x64;&#97;&#109;&#64;&#111;&#x70;&#115;&#99;&#x6f;&#x64;&#101;&#x2e;&#x63;&#x6f;&#109;" data-bare-link="true">&#97;&#x64;&#97;&#x6d;&#64;&#111;&#112;&#x73;&#x63;&#x6f;&#x64;&#101;&#46;&#99;&#111;&#x6d;</a> with many contributions from the community.</p>
<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
-<p> This manual page was written by Joshua Timberman <a href="&#109;&#x61;&#x69;&#x6c;&#x74;&#111;&#58;&#106;&#111;&#115;&#104;&#x75;&#97;&#x40;&#x6f;&#112;&#x73;&#99;&#x6f;&#x64;&#101;&#x2e;&#99;&#111;&#109;" data-bare-link="true">&#106;&#111;&#115;&#x68;&#117;&#97;&#x40;&#x6f;&#x70;&#115;&#x63;&#x6f;&#100;&#x65;&#x2e;&#99;&#x6f;&#x6d;</a>.
+<p> This manual page was written by Joshua Timberman <a href="&#x6d;&#97;&#x69;&#x6c;&#116;&#x6f;&#x3a;&#106;&#111;&#115;&#104;&#117;&#97;&#64;&#111;&#112;&#x73;&#99;&#x6f;&#x64;&#101;&#x2e;&#x63;&#x6f;&#109;" data-bare-link="true">&#106;&#x6f;&#115;&#104;&#117;&#x61;&#64;&#111;&#x70;&#x73;&#x63;&#111;&#x64;&#x65;&#46;&#x63;&#111;&#109;</a>.
Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
<h2 id="CHEF">CHEF</h2>
@@ -172,7 +231,7 @@ sub-command looks in the following locations for the template to use:</p>
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-bootrap(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-client.1.html b/chef/distro/common/html/knife-client.1.html
index f8af84f933..efefcf51ed 100644
--- a/chef/distro/common/html/knife-client.1.html
+++ b/chef/distro/common/html/knife-client.1.html
@@ -61,8 +61,7 @@
<div class='man-navigation' style='display:none'>
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
- <a href="#DESCRIPTION">DESCRIPTION</a>
- <a href="#CLIENT-SUB-COMMANDS">CLIENT SUB-COMMANDS</a>
+ <a href="#SUB-COMMANDS">SUB-COMMANDS</a>
<a href="#BULK-DELETE">BULK DELETE</a>
<a href="#CREATE">CREATE</a>
<a href="#DELETE">DELETE</a>
@@ -70,6 +69,7 @@
<a href="#LIST">LIST</a>
<a href="#REREGISTER">REREGISTER</a>
<a href="#SHOW">SHOW</a>
+ <a href="#DESCRIPTION">DESCRIPTION</a>
<a href="#SEE-ALSO">SEE ALSO</a>
<a href="#AUTHOR">AUTHOR</a>
<a href="#DOCUMENTATION">DOCUMENTATION</a>
@@ -91,24 +91,10 @@
<p><strong>knife</strong> <strong>client</strong> <em>sub-command</em> <em>(options)</em></p>
-<h2 id="DESCRIPTION">DESCRIPTION</h2>
-
-<p>Clients are identities used for communication with the Chef Server API,
-roughly equivalent to user accounts on the Chef Server, except that
-clients only communicate with the Chef Server API and are authenticated
-via request signatures.</p>
-
-<p>In the typical case, there will be one client object on the server for
-each node, and the corresponding client and node will have identical
-names.</p>
-
-<p>In the Chef authorization model, there is one special client, the
-"validator", which is authorized to create new non-administrative
-clients but has minimal privileges otherwise. This identity is used as a
-sort of "guest account" to create a client identity when initially
-setting up a host for management with Chef.</p>
+<h2 id="SUB-COMMANDS">SUB-COMMANDS</h2>
-<h2 id="CLIENT-SUB-COMMANDS">CLIENT SUB-COMMANDS</h2>
+<p>Client subcommands follow a basic create, read, update, delete (CRUD)
+pattern. The Following subcommands are available:</p>
<h2 id="BULK-DELETE">BULK DELETE</h2>
@@ -187,17 +173,34 @@ Use care when reregistering the validator client.</p>
<p>Show a client. Output format is determined by the --format option.</p>
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p>Clients are identities used for communication with the Chef Server API,
+roughly equivalent to user accounts on the Chef Server, except that
+clients only communicate with the Chef Server API and are authenticated
+via request signatures.</p>
+
+<p>In the typical case, there will be one client object on the server for
+each node, and the corresponding client and node will have identical
+names.</p>
+
+<p>In the Chef authorization model, there is one special client, the
+"validator", which is authorized to create new non-administrative
+clients but has minimal privileges otherwise. This identity is used as a
+sort of "guest account" to create a client identity when initially
+setting up a host for management with Chef.</p>
+
<h2 id="SEE-ALSO">SEE ALSO</h2>
<p> <strong>knife-node</strong>(1)</p>
<h2 id="AUTHOR">AUTHOR</h2>
-<p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#x3a;&#x61;&#x64;&#x61;&#x6d;&#x40;&#111;&#x70;&#x73;&#99;&#x6f;&#x64;&#101;&#x2e;&#99;&#x6f;&#x6d;" data-bare-link="true">&#97;&#100;&#x61;&#109;&#x40;&#111;&#112;&#x73;&#x63;&#x6f;&#100;&#101;&#46;&#x63;&#111;&#x6d;</a> with many contributions from the community.</p>
+<p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#111;&#58;&#x61;&#x64;&#97;&#109;&#64;&#111;&#x70;&#115;&#99;&#x6f;&#x64;&#101;&#x2e;&#x63;&#x6f;&#109;" data-bare-link="true">&#97;&#x64;&#97;&#x6d;&#64;&#111;&#112;&#x73;&#x63;&#x6f;&#x64;&#101;&#46;&#99;&#111;&#x6d;</a> with many contributions from the community.</p>
<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
-<p> This manual page was written by Joshua Timberman <a href="&#109;&#x61;&#x69;&#x6c;&#x74;&#111;&#58;&#106;&#111;&#115;&#104;&#x75;&#97;&#x40;&#x6f;&#112;&#x73;&#99;&#x6f;&#x64;&#101;&#x2e;&#99;&#111;&#109;" data-bare-link="true">&#106;&#111;&#115;&#x68;&#117;&#97;&#x40;&#x6f;&#x70;&#115;&#x63;&#x6f;&#100;&#x65;&#x2e;&#99;&#x6f;&#x6d;</a>.
+<p> This manual page was written by Joshua Timberman <a href="&#x6d;&#97;&#x69;&#x6c;&#116;&#x6f;&#x3a;&#106;&#111;&#115;&#104;&#117;&#97;&#64;&#111;&#112;&#x73;&#99;&#x6f;&#x64;&#101;&#x2e;&#x63;&#x6f;&#109;" data-bare-link="true">&#106;&#x6f;&#115;&#104;&#117;&#x61;&#64;&#111;&#x70;&#x73;&#x63;&#111;&#x64;&#x65;&#46;&#x63;&#111;&#109;</a>.
Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
<h2 id="CHEF">CHEF</h2>
@@ -206,7 +209,7 @@ Use care when reregistering the validator client.</p>
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-client(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-configure.1.html b/chef/distro/common/html/knife-configure.1.html
index f407a4e941..a4b9f8c020 100644
--- a/chef/distro/common/html/knife-configure.1.html
+++ b/chef/distro/common/html/knife-configure.1.html
@@ -160,7 +160,7 @@ may need to modify that setting after copying to a remote host.</p></li>
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-configure(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-cookbook-site.1.html b/chef/distro/common/html/knife-cookbook-site.1.html
index 97c240fe54..456bd05b7f 100644
--- a/chef/distro/common/html/knife-cookbook-site.1.html
+++ b/chef/distro/common/html/knife-cookbook-site.1.html
@@ -62,6 +62,15 @@
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
<a href="#COOKBOOK-SITE-SUB-COMMANDS">COOKBOOK SITE SUB-COMMANDS</a>
+ <a href="#INSTALL">INSTALL</a>
+ <a href="#DOWNLOAD">DOWNLOAD</a>
+ <a href="#LIST">LIST</a>
+ <a href="#SEARCH">SEARCH</a>
+ <a href="#SHARE">SHARE</a>
+ <a href="#UNSHARE">UNSHARE</a>
+ <a href="#SHOW">SHOW</a>
+ <a href="#DESCRIPTION">DESCRIPTION</a>
+ <a href="#EXAMPLES">EXAMPLES</a>
<a href="#SEE-ALSO">SEE ALSO</a>
<a href="#AUTHOR">AUTHOR</a>
<a href="#DOCUMENTATION">DOCUMENTATION</a>
@@ -85,18 +94,55 @@
<h2 id="COOKBOOK-SITE-SUB-COMMANDS">COOKBOOK SITE SUB-COMMANDS</h2>
-<p>The following sub-commands are still in the context of cookbooks, but they make use of Opscode's Cookbook Community site, <em>http://cookbooks.opscode.com/</em>. That site has an API, and these sub-commands utilize that API, rather than the Chef Server API.</p>
+<p><code>knife cookbook site</code> provides the following subcommands:</p>
-<p><strong>cookbook site download COOKBOOK [VERSION]</strong> <em>(options)</em></p>
+<h2 id="INSTALL">INSTALL</h2>
+
+<p><strong>cookbook site install COOKBOOK [VERSION]</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-d</code>, <code>--dependencies</code></dt><dd>Grab dependencies automatically</dd>
+</dl>
+
+
+<p>Uses <span class="man-ref">git<span class="s">(1)</span></span> version control in conjunction with the cookbook site to
+install community contributed cookbooks to your local cookbook
+repository. Running <code>knife cookbook site install</code> does the following:</p>
+
+<ol>
+<li>A new "pristine copy" branch is created in git for tracking the
+upstream;</li>
+<li>All existing cookbooks are removed from the branch;</li>
+<li>The cookbook is downloaded from the cookbook site in tarball form;</li>
+<li>The downloaded cookbook is untarred, and its contents commited via git;</li>
+<li>The pristine copy branch is merged into the master branch.</li>
+</ol>
+
+
+<p>By installing cookbook with this process, you can locally modify the
+upstream cookbook in your master branch ant let git maintain your
+changes as a separate patch. When an updated upstream version becomes
+available, you will be able to merge the upstream changes while
+maintaining your local modifications.</p>
+
+<p>If <em>-d</em> is specified, the process is applied recursively to all the
+cookbooks <em>COOKBOOK</em> depends on (via metadata <em>dependencies</em>).</p>
+
+<h2 id="DOWNLOAD">DOWNLOAD</h2>
+
+<p><strong>knife cookbook site download COOKBOOK [VERSION]</strong> <em>(options)</em></p>
<dl>
<dt><code>-f</code>, <code>--file FILE</code></dt><dd>The filename to write to</dd>
</dl>
-<p>Downloads a specific cookbook from the Community site, optionally specifying a certain version.</p>
+<p>Downloads a specific cookbook from the Community site, optionally
+specifying a certain version.</p>
+
+<h2 id="LIST">LIST</h2>
-<p><strong>cookbook site list</strong> <em>(options)</em></p>
+<p><strong>knife cookbook site list</strong> <em>(options)</em></p>
<dl>
<dt><code>-w</code>, <code>--with-uri</code></dt><dd>Show corresponding URIs</dd>
@@ -105,11 +151,15 @@
<p>Lists available cookbooks from the Community site.</p>
-<p><strong>cookbook site search QUERY</strong> <em>(options)</em></p>
+<h2 id="SEARCH">SEARCH</h2>
+
+<p><strong>knife cookbook site search QUERY</strong> <em>(options)</em></p>
-<p>Searches the Community site with the specified query.</p>
+<p>Searches for available cookbooks matching the specified query.</p>
-<p><strong>cookbook site share COOKBOOK CATEGORY</strong> <em>(options)</em></p>
+<h2 id="SHARE">SHARE</h2>
+
+<p><strong>knife cookbook site share COOKBOOK CATEGORY</strong> <em>(options)</em></p>
<dl>
<dt><code>-k</code>, <code>--key KEY</code></dt><dd>API Client Key</dd>
@@ -118,36 +168,58 @@
</dl>
-<p>Uploads the specified cookbook using the given category to the Opscode cookbooks site. Requires a login user and certificate for the Opscode Cookbooks site. See <strong>EXAMPLES</strong> for usage if the Opscode user and certificate pair are not used for authenticating with the Chef Server. In other words, if the Chef Server is not the Opscode Platform.</p>
+<p>Uploads the specified cookbook using the given category to the Opscode
+cookbooks site. Requires a login user and certificate for the Opscode
+Cookbooks site. By default, knife will use the username and API key
+you've configured in your configuration file; otherwise you must
+explicitly set these values on the command line or use an alternate
+configuration file.</p>
+
+<h2 id="UNSHARE">UNSHARE</h2>
-<p><strong>cookbook site unshare COOKBOOK</strong></p>
+<p><strong>knife cookbook site unshare COOKBOOK</strong></p>
<p>Stops sharing the specified cookbook on the Opscode cookbooks site.</p>
-<p><strong>cookbook site show COOKBOOK [VERSION]</strong> <em>(options)</em></p>
+<h2 id="SHOW">SHOW</h2>
+
+<p><strong>knife cookbook site show COOKBOOK [VERSION]</strong> <em>(options)</em></p>
<p>Shows information from the site about a particular cookbook.</p>
-<p><strong>cookbook site vendor COOKBOOK [VERSION]</strong> <em>(options)</em></p>
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
-<dl>
-<dt><code>-d</code>, <code>--dependencies</code></dt><dd>Grab dependencies automatically</dd>
-</dl>
+<p>The cookbook site, <a href="http://community.opscode.com/" data-bare-link="true">http://community.opscode.com/</a>, is a cookbook
+distribution service operated by Opscode. This service provides users
+with a central location to publish cookbooks for sharing with other
+community members.</p>
+
+<p><code>knife cookbook site</code> commands provide an interface to the cookbook
+site's HTTP API. For commands that read data from the API, no account is
+required. In order to upload cookbooks using the <code>knife cookbook site
+share</code> command, you must create an account on the cookbook site and
+configure your credentials via command line option or in your knife
+configuration file.</p>
+
+<h2 id="EXAMPLES">EXAMPLES</h2>
+<p>Uploading cookbooks to the Opscode cookbooks site:</p>
-<p>Uses <code>git</code> version control in conjunction with the cookbook site to download upstream cookbooks. A new vendor branch is created in git, the cookbook downloaded from the site and untarred, then the master branch is merged. This allows the user to track upstream changes to cookbooks while merging in customizations. If <em>-d</em> is specified, all the cookbooks it depends on (via metadata <em>dependencies</em>) are downloaded and untarred as well, each using their own vendor branch.</p>
+<pre><code>knife cookbook site share example Other -k ~/.chef/USERNAME.pem -u USERNAME
+</code></pre>
<h2 id="SEE-ALSO">SEE ALSO</h2>
-<p> <strong>knife-environment</strong>(1)</p>
+<p> <strong><span class="man-ref">knife-cookbook<span class="s">(1)</span></span></strong>
+ <a href="http://community.opscode.com/cookbooks" data-bare-link="true">http://community.opscode.com/cookbooks</a></p>
<h2 id="AUTHOR">AUTHOR</h2>
-<p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#x69;&#x6c;&#x74;&#111;&#x3a;&#97;&#100;&#x61;&#109;&#64;&#111;&#x70;&#115;&#99;&#111;&#100;&#x65;&#x2e;&#99;&#x6f;&#109;" data-bare-link="true">&#x61;&#x64;&#x61;&#x6d;&#x40;&#111;&#x70;&#x73;&#x63;&#111;&#x64;&#101;&#x2e;&#x63;&#111;&#x6d;</a> with many contributions from the community.</p>
+<p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#105;&#108;&#116;&#x6f;&#58;&#97;&#100;&#97;&#109;&#x40;&#x6f;&#x70;&#x73;&#99;&#111;&#100;&#101;&#x2e;&#x63;&#111;&#x6d;" data-bare-link="true">&#97;&#100;&#x61;&#109;&#64;&#x6f;&#x70;&#x73;&#99;&#111;&#x64;&#101;&#x2e;&#x63;&#x6f;&#x6d;</a> with many contributions from the community.</p>
<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
-<p> This manual page was written by Joshua Timberman <a href="&#109;&#x61;&#105;&#108;&#x74;&#x6f;&#58;&#x6a;&#111;&#115;&#x68;&#x75;&#97;&#64;&#x6f;&#x70;&#x73;&#x63;&#111;&#100;&#x65;&#46;&#99;&#111;&#109;" data-bare-link="true">&#x6a;&#x6f;&#115;&#104;&#x75;&#x61;&#64;&#111;&#x70;&#115;&#99;&#x6f;&#x64;&#x65;&#x2e;&#x63;&#111;&#109;</a>.
+<p> This manual page was written by Joshua Timberman <a href="&#x6d;&#x61;&#105;&#108;&#116;&#x6f;&#x3a;&#x6a;&#111;&#115;&#x68;&#x75;&#x61;&#x40;&#111;&#x70;&#x73;&#x63;&#x6f;&#100;&#101;&#46;&#x63;&#111;&#x6d;" data-bare-link="true">&#x6a;&#111;&#115;&#104;&#x75;&#x61;&#x40;&#x6f;&#x70;&#x73;&#x63;&#x6f;&#100;&#101;&#x2e;&#99;&#x6f;&#109;</a>.
Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
<h2 id="CHEF">CHEF</h2>
@@ -156,7 +228,7 @@
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-cookbook-site(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-cookbook.1.html b/chef/distro/common/html/knife-cookbook.1.html
index 007b5d2e42..004fb5a26c 100644
--- a/chef/distro/common/html/knife-cookbook.1.html
+++ b/chef/distro/common/html/knife-cookbook.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv='content-type' value='text/html;charset=utf8'>
<meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
- <title>knife-cookbook(1) - Upload and manage Chef cookbooks</title>
+ <title>knife-cookbook(1) - upload and manage chef cookbooks</title>
<style type='text/css' media='all'>
/* style: man */
body#manpage {margin:0}
@@ -61,7 +61,23 @@
<div class='man-navigation' style='display:none'>
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
- <a href="#COOKBOOK-SUB-COMMANDS">COOKBOOK SUB-COMMANDS</a>
+ <a href="#SUB-COMMANDS">SUB-COMMANDS</a>
+ <a href="#LIST">LIST</a>
+ <a href="#SHOW">SHOW</a>
+ <a href="#UPLOAD">UPLOAD</a>
+ <a href="#DOWNLOAD">DOWNLOAD</a>
+ <a href="#DELETE">DELETE</a>
+ <a href="#BULK-DELETE">BULK DELETE</a>
+ <a href="#COOKBOOK-CREATE">COOKBOOK CREATE</a>
+ <a href="#METADATA">METADATA</a>
+ <a href="#METADATA-FROM-FILE">METADATA FROM FILE</a>
+ <a href="#TEST">TEST</a>
+ <a href="#RECIPE-LIST">RECIPE LIST</a>
+ <a href="#DESCRIPTION">DESCRIPTION</a>
+ <a href="#SEE-ALSO">SEE ALSO</a>
+ <a href="#AUTHOR">AUTHOR</a>
+ <a href="#DOCUMENTATION">DOCUMENTATION</a>
+ <a href="#CHEF">CHEF</a>
</div>
<ol class='man-decor man-head man head'>
@@ -72,158 +88,282 @@
<h2 id="NAME">NAME</h2>
<p class="man-name">
- <code>knife-cookbook</code> - <span class="man-whatis">Upload and manage Chef cookbooks</span>
+ <code>knife-cookbook</code> - <span class="man-whatis">upload and manage chef cookbooks</span>
</p>
<h2 id="SYNOPSIS">SYNOPSIS</h2>
<p><strong>knife</strong> <strong>cookbook</strong> <em>sub-command</em> <em>(options)</em></p>
-<h2 id="COOKBOOK-SUB-COMMANDS">COOKBOOK SUB-COMMANDS</h2>
+<h2 id="SUB-COMMANDS">SUB-COMMANDS</h2>
-<p>Cookbooks are the fundamental unit of distribution in Chef. They encapsulate all recipes of resources and assets used to configure a particular aspect of the infrastructure. The following sub-commands can be used to manipulate the cookbooks stored on the Chef Server.</p>
+<p><code>knife cookbook</code> supports the following sub commands:</p>
-<p><strong>cookbook bulk delete REGEX</strong> <em>(options)</em></p>
+<h2 id="LIST">LIST</h2>
+
+<p><strong>knife cookbook list</strong> <em>(options)</em></p>
<dl>
-<dt><code>-p</code>, <code>--purge</code></dt><dd>Purge files from backing store. This will disable any cookbook that contains any of the same files as the cookbook being purged.</dd>
+<dt><code>-a</code>, <code>--all</code></dt><dd>show all versions of a cookbook instead of just the most recent</dd>
+<dt><code>-w</code>, <code>--with-uri</code></dt><dd>show corresponding uris</dd>
</dl>
-<p>Delete cookbooks on the Chef Server based on a regular expression. The regular expression (<em>REGEX</em>) should be in quotes, not in //'s.</p>
+<p>Lists the cookbooks available on the Chef server.</p>
+
+<h2 id="SHOW">SHOW</h2>
-<p><strong>cookbook create COOKBOOK</strong> <em>(options)</em></p>
+<p><strong>knife cookbook show cookbook [version] [part] [filename]</strong> <em>(options)</em></p>
<dl>
-<dt><code>-o</code>, <code>--cookbook-path PATH</code></dt><dd>The directory where the cookbook will be created</dd>
-<dt><code>-r</code>, <code>--readme-format FORMAT</code></dt><dd>Format of the README file</dd>
-<dt><code>-C</code>, <code>--copyright COPYRIGHT</code></dt><dd>Name of Copyright holder</dd>
-<dt><code>-I</code>, <code>--license LICENSE</code></dt><dd>License for cookbook, apachev2 or none</dd>
-<dt><code>-E</code>, <code>--email EMAIL</code></dt><dd>Email address of cookbook maintainer</dd>
+<dt><code>-f</code>, <code>--fqdn fqdn </code></dt><dd>the fqdn of the host to see the file for</dd>
+<dt><code>-p</code>, <code>--platform platform </code></dt><dd>the platform to see the file for</dd>
+<dt><code>-v</code>, <code>--platform-version version</code></dt><dd>the platform version to see the file for</dd>
</dl>
-<p>This is a helper command that creates a new cookbook directory in the <code>cookbook_path</code>. The following directories and files are created for the named cookbook.</p>
+<p>show a particular part of a <em>cookbook</em> for the specified <em>version</em>. <em>part</em> can be one of:</p>
<ul>
-<li>COOKBOOK/attributes</li>
-<li>COOKBOOK/definitions</li>
-<li>COOKBOOK/files/default</li>
-<li>COOKBOOK/libraries</li>
-<li>COOKBOOK/metadata.rb</li>
-<li>COOKBOOK/providers</li>
-<li>COOKBOOK/README.rdoc</li>
-<li>COOKBOOK/recipes/default.rb</li>
-<li>COOKBOOK/resources</li>
-<li>COOKBOOK/templates/default</li>
+<li><em>attributes</em></li>
+<li><em>definitions</em></li>
+<li><em>files</em></li>
+<li><em>libraries</em></li>
+<li><em>providers</em></li>
+<li><em>recipes</em></li>
+<li><em>resources</em></li>
+<li><em>templates</em></li>
</ul>
-<p>Supported README formats are 'rdoc' (default), 'md', 'mkd', 'txt'. The README file will be written with the specified extension and a set of helpful starting headers.</p>
+<h2 id="UPLOAD">UPLOAD</h2>
-<p>Specify <code>-C</code> or <code>--copyright</code> with the name of the copyright holder as your name or your company/organization name in a quoted string. If this value is not specified an all-caps string <code>YOUR_COMPANY_NAME</code> is used which can be easily changed with find/replace.</p>
+<p><strong>knife cookbook upload [cookbooks...]</strong> <em>(options)</em></p>
-<p>Specify <code>-I</code> or <code>--license</code> with the license that the cookbook is distributed under for sharing with other people or posting to the Opscode Cookbooks site. Be aware of the licenses of files you put inside the cookbook and follow any restrictions they describe. When using <code>none</code> (default) or <code>apachev2</code>, comment header text and metadata file are pre-filled. The <code>none</code> license will be treated as non-redistributable.</p>
+<dl>
+<dt><code>-a</code>, <code>--all</code></dt><dd>upload all cookbooks, rather than just a single cookbook</dd>
+<dt><code>-o</code>, <code>--cookbook-path path:path</code></dt><dd>a colon-separated path to look for cookbooks in</dd>
+<dt><code>-E</code>, <code>--environment ENVIRONMENT</code></dt><dd>An <em>ENVIRONMENT</em> to apply the uploaded cookbooks to. Specifying this
+option will cause knife to edit the <em>ENVIRONMENT</em> to place a strict
+version constraint on the cookbook version(s) uploaded.</dd>
+<dt><code>--freeze</code></dt><dd>Sets the frozen flag on the uploaded cookbook(s) Any future attempt
+to modify the cookbook without changing the version number will
+return an error unless --force is specified.</dd>
+<dt class="flush"><code>--force</code></dt><dd>Overrides the frozen flag on a cookbook, allowing you to overwrite a
+cookbook version that has previously been uploaded with the --freeze
+option.</dd>
+</dl>
-<p>Specify <code>-E</code> or <code>--email</code> with the email address of the cookbook's maintainer. If this value is not specified, an all-caps string <code>YOUR_EMAIL</code> is used which can easily be changed with find/replace.</p>
-<p>The cookbook copyright, license and email settings can be filled in the <code>knife.rb</code>, for example with default values:</p>
+<p>Uploads one or more cookbooks from your local cookbook repository(ies)
+to the Chef Server. Only files that don't yet exist on the server will
+be uploaded.</p>
-<pre><code>cookbook_copyright "YOUR_COMPANY_NAME"
-cookbook_license "none"
-cookbook_email "YOUR_EMAIL"
-</code></pre>
+<h2 id="DOWNLOAD">DOWNLOAD</h2>
-<p><strong>cookbook delete COOKBOOK [VERSION]</strong> <em>(options)</em></p>
+<p><strong>knife cookbook download cookbook [version]</strong> <em>(options)</em></p>
<dl>
-<dt><code>-a</code>, <code>--all</code></dt><dd>Delete all versions</dd>
-<dt><code>-p</code>, <code>--purge</code></dt><dd>Purge files from backing store. This will disable any cookbook that contains any of the same files as the cookbook being purged.</dd>
+<dt><code>-d</code>, <code>--dir download_directory</code></dt><dd>the directory to download the cookbook into</dd>
+<dt><code>-f</code>, <code>--force</code></dt><dd>overwrite an existing directory with the download</dd>
+<dt><code>-n</code>, <code>--latest</code></dt><dd>download the latest version of the cookbook</dd>
</dl>
-<p>Delete the specified <em>VERSION</em> of the named <em>COOKBOOK</em>. If no version is specified, and only one version exists on the server, that version will be deleted. If multiple versions are available on the server, you will be prompted for a version to delete.</p>
+<p>download a cookbook from the chef server. if no version is specified and
+only one version exists on the server, that version will be downloaded.
+if no version is specified and multiple versions are available on the
+server, you will be prompted for a version to download.</p>
-<p><strong>cookbook download COOKBOOK [VERSION]</strong> <em>(options)</em></p>
+<h2 id="DELETE">DELETE</h2>
+
+<p><strong>knife cookbook delete cookbook [version]</strong> <em>(options)</em></p>
<dl>
-<dt><code>-d</code>, <code>--dir DOWNLOAD_DIRECTORY</code></dt><dd>The directory to download the cookbook into</dd>
-<dt><code>-f</code>, <code>--force</code></dt><dd>Overwrite an existing directory with the download</dd>
-<dt><code>-N</code>, <code>--latest</code></dt><dd>Download the latest version of the cookbook</dd>
+<dt><code>-a</code>, <code>--all</code></dt><dd>delete all versions</dd>
+<dt><code>-p</code>, <code>--purge</code></dt><dd>purge files from backing store. this will disable any cookbook that contains any of the same files as the cookbook being purged.</dd>
</dl>
-<p>Download a cookbook from the Chef Server. If no version is specified and only one version exists on the server, that version will be downloaded. If no version is specified and multiple versions are available on the server, you will be prompted for a version to download.</p>
+<p>delete the specified <em>version</em> of the named <em>cookbook</em>. if no version is
+specified, and only one version exists on the server, that version will
+be deleted. if multiple versions are available on the server, you will
+be prompted for a version to delete.</p>
+
+<h2 id="BULK-DELETE">BULK DELETE</h2>
-<p><strong>cookbook list</strong> <em>(options)</em></p>
+<p><strong>knife cookbook bulk delete regex</strong> <em>(options)</em></p>
<dl>
-<dt><code>-w</code>, <code>--with-uri</code></dt><dd>Show corresponding URIs</dd>
+<dt><code>-p</code>, <code>--purge</code></dt><dd>purge files from backing store. this will disable any cookbook that
+contains any of the same files as the cookbook being purged.</dd>
</dl>
-<p>List all the cookbooks.</p>
+<p>delete cookbooks on the chef server based on a regular expression. the
+regular expression (<em>regex</em>) should be in quotes, not in //'s.</p>
-<p><strong>cookbook metadata COOKBOOK</strong> <em>(options)</em></p>
+<h2 id="COOKBOOK-CREATE">COOKBOOK CREATE</h2>
+
+<p><strong>knife cookbook create cookbook</strong> <em>(options)</em></p>
<dl>
-<dt><code>-a</code>, <code>--all</code></dt><dd>Generate metadata for all cookbooks, rather than just a single cookbook</dd>
-<dt><code>-o</code>, <code>--cookbook-path PATH:PATH</code></dt><dd>A colon-separated path to look for cookbooks in</dd>
+<dt><code>-o</code>, <code>--cookbook-path path</code></dt><dd>the directory where the cookbook will be created</dd>
+<dt><code>-r</code>, <code>--readme-format format</code></dt><dd>format of the readme file</dd>
+<dt><code>-c</code>, <code>--copyright copyright</code></dt><dd>name of copyright holder</dd>
+<dt><code>-i</code>, <code>--license license</code></dt><dd>license for cookbook, apachev2 or none</dd>
+<dt><code>-e</code>, <code>--email email</code></dt><dd>email address of cookbook maintainer</dd>
</dl>
-<p>Generate cookbook metadata for the named <em>COOKBOOK</em>. The <em>PATH</em> used here specifies where the cookbooks directory is located and corresponds to the <code>cookbook_path</code> configuration option.</p>
+<p>this is a helper command that creates a new cookbook directory in the
+<code>cookbook_path</code>. the following directories and files are created for the
+named cookbook.</p>
+
+<ul>
+<li>cookbook/attributes</li>
+<li>cookbook/definitions</li>
+<li>cookbook/files/default</li>
+<li>cookbook/libraries</li>
+<li>cookbook/metadata.rb</li>
+<li>cookbook/providers</li>
+<li>cookbook/readme.rdoc</li>
+<li>cookbook/recipes/default.rb</li>
+<li>cookbook/resources</li>
+<li>cookbook/templates/default</li>
+</ul>
+
-<p><strong>cookbook metadata from FILE</strong> <em>(options)</em></p>
+<p>supported readme formats are 'rdoc' (default), 'md', 'mkd', 'txt'. the
+readme file will be written with the specified extension and a set of
+helpful starting headers.</p>
+
+<p>specify <code>-c</code> or <code>--copyright</code> with the name of the copyright holder as
+your name or your company/organization name in a quoted string. if this
+value is not specified an all-caps string <code>your_company_name</code> is used
+which can be easily changed with find/replace.</p>
+
+<p>specify <code>-i</code> or <code>--license</code> with the license that the cookbook is
+distributed under for sharing with other people or posting to the
+opscode cookbooks site. be aware of the licenses of files you put inside
+the cookbook and follow any restrictions they describe. when using
+<code>none</code> (default) or <code>apachev2</code>, comment header text and metadata file
+are pre-filled. the <code>none</code> license will be treated as
+non-redistributable.</p>
+
+<p>specify <code>-e</code> or <code>--email</code> with the email address of the cookbook's
+maintainer. if this value is not specified, an all-caps string
+<code>your_email</code> is used which can easily be changed with find/replace.</p>
+
+<p>the cookbook copyright, license and email settings can be filled in the
+<code>knife.rb</code>, for example with default values:</p>
+
+<pre><code>cookbook_copyright "your_company_name"
+cookbook_license "none"
+cookbook_email "your_email"
+</code></pre>
-<p>Load the cookbook metadata from a specified file.</p>
+<h2 id="METADATA">METADATA</h2>
-<p><strong>cookbook show COOKBOOK [VERSION] [PART] [FILENAME]</strong> <em>(options)</em></p>
+<p><strong>knife cookbook metadata cookbook</strong> <em>(options)</em></p>
<dl>
-<dt><code>-f</code>, <code>--fqdn FQDN </code></dt><dd>The FQDN of the host to see the file for</dd>
-<dt><code>-p</code>, <code>--platform PLATFORM </code></dt><dd>The platform to see the file for</dd>
-<dt><code>-V</code>, <code>--platform-version VERSION</code></dt><dd>The platform version to see the file for</dd>
+<dt><code>-a</code>, <code>--all</code></dt><dd>generate metadata for all cookbooks, rather than just a single cookbook</dd>
+<dt><code>-o</code>, <code>--cookbook-path path:path</code></dt><dd>a colon-separated path to look for cookbooks in</dd>
</dl>
-<p>Show a particular part of a <em>COOKBOOK</em> for the specified <em>VERSION</em>. <em>PART</em> can be one of:</p>
+<p>generate cookbook metadata for the named <em>cookbook</em>. the <em>path</em> used here specifies where the cookbooks directory is located and corresponds to the <code>cookbook_path</code> configuration option.</p>
-<ul>
-<li><em>attributes</em></li>
-<li><em>definitions</em></li>
-<li><em>files</em></li>
-<li><em>libraries</em></li>
-<li><em>providers</em></li>
-<li><em>recipes</em></li>
-<li><em>resources</em></li>
-<li><em>templates</em></li>
-</ul>
+<h2 id="METADATA-FROM-FILE">METADATA FROM FILE</h2>
+<p><strong>knife cookbook metadata from file</strong> <em>(options)</em></p>
-<p><strong>cookbook test [COOKBOOKS...]</strong> <em>(options)</em></p>
+<p>load the cookbook metadata from a specified file.</p>
+
+<h2 id="TEST">TEST</h2>
+
+<p><strong>knife cookbook test [cookbooks...]</strong> <em>(options)</em></p>
<dl>
-<dt><code>-a</code>, <code>--all</code></dt><dd>Test all cookbooks, rather than just a single cookbook</dd>
-<dt><code>-o</code>, <code>--cookbook-path PATH:PATH</code></dt><dd>A colon-separated path to look for cookbooks in</dd>
+<dt><code>-a</code>, <code>--all</code></dt><dd>test all cookbooks, rather than just a single cookbook</dd>
+<dt><code>-o</code>, <code>--cookbook-path path:path</code></dt><dd>a colon-separated path to look for cookbooks in</dd>
</dl>
-<p>Test the specified cookbooks for syntax errors. This uses the built-in Ruby syntax checking option for files in the cookbook ending in <code>.rb</code>, and the ERB syntax check for files ending in <code>.erb</code> (templates).</p>
+<p>test the specified cookbooks for syntax errors. this uses the built-in
+ruby syntax checking option for files in the cookbook ending in <code>.rb</code>,
+and the erb syntax check for files ending in <code>.erb</code> (templates).</p>
+
+<h2 id="RECIPE-LIST">RECIPE LIST</h2>
-<p><strong>cookbook upload [COOKBOOKS...]</strong> <em>(options)</em></p>
+<p><strong>knife recipe list [PATTERN]</strong></p>
+
+<p>List available recipes from the server. Specify <em>PATTERN</em> as a regular
+expression to limit the results.</p>
+
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p>Cookbooks are the fundamental unit of distribution in Chef. They
+encapsulate all recipes of resources and assets used to configure a
+particular aspect of the infrastructure. The following sub-commands can
+be used to manipulate the cookbooks stored on the Chef Server.</p>
+
+<p>On disk, cookbooks are directories with a defined structure. The
+following directories may appear within a cookbook:</p>
<dl>
-<dt><code>-a</code>, <code>--all</code></dt><dd>Upload all cookbooks, rather than just a single cookbook</dd>
-<dt><code>-o</code>, <code>--cookbook-path PATH:PATH</code></dt><dd>A colon-separated path to look for cookbooks in</dd>
+<dt>COOKBOOK/attributes/</dt><dd>Ruby files that define default parameters to be used in recipes</dd>
+<dt>COOKBOOK/definitions/</dt><dd>Ruby files that contain <em>resource definitions</em></dd>
+<dt>COOKBOOK/files/SPECIFICITY</dt><dd>Files of arbitrary type. These files may be downloaded by
+<span class="man-ref">chef-client<span class="s">(8)</span></span> when configuring a host.</dd>
+<dt>COOKBOOK/libraries/</dt><dd>Ruby files that contain library code needed for recipes</dd>
+<dt>COOKBOOK/providers/</dt><dd>Ruby files that contain Lightweight Provider definitions</dd>
+<dt>COOKBOOK/recipes/</dt><dd>Ruby files that use Chef's recipe DSL to describe the desired
+configuration of a system</dd>
+<dt>COOKBOOK/resources/</dt><dd>Ruby files that contain Lightweight Resource definitions</dd>
+<dt>COOKBOOK/templates/SPECIFICITY</dt><dd>ERuby (ERb) template files. These are referenced by <em>recipes</em> and
+evaluated to dynamically generate configuration files.</dd>
</dl>
-<p>Uploads the specified cookbooks to the Chef Server. The actual upload executes a number of commands, most of which occur on the local machine. The cookbook is staged in a temporary location. Then the <code>cookbook_path</code> (or <code>-o PATH</code>) is processed to search for the named cookbook, and each occurance is copied in the order specified. A syntax check is performed a la <code>cookbook test</code>, above. The metadata is generated, a la <code>cookbook metadata</code>. A <span class="man-ref">gzip<span class="s">(1)</span></span>'ed, <span class="man-ref">tar<span class="s">(1)</span></span> file is created, and is uploaded to the server.</p>
+<p><strong>SPECIFICITY</strong> is a feature of <em>files</em> and <em>templates</em> that allow you
+to specify alternate files to be used on a specific OS platform or host.
+The default specificity setting is <em>default</em>, that is files in
+<code>COOKBOOK/files/default</code> will be used when a more specific copy is not
+available. Further documentation for this feature is available on the
+Chef wiki: <a href="http://wiki.opscode.com/display/chef/File+Distribution#FileDistribution-FileSpecificity" data-bare-link="true">http://wiki.opscode.com/display/chef/File+Distribution#FileDistribution-FileSpecificity</a></p>
+
+<p>Cookbooks also contain a metadata file that defines various properties
+of the cookbook. The most important of these are the <em>version</em> and the
+<em>dependencies</em>. The <em>version</em> is used in combination with environments
+to select which copy of a given cookbook is distributed to a node. The
+<em>dependencies</em> are used by the server to determine which additional
+cookbooks must be distributed to a given host when it requires a
+cookbook.</p>
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p> <strong><span class="man-ref">knife-environment<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-cookbook-site<span class="s">(1)</span></span></strong>
+ <a href="http://wiki.opscode.com/display/chef/Cookbooks" data-bare-link="true">http://wiki.opscode.com/display/chef/Cookbooks</a>
+ <a href="http://wiki.opscode.com/display/chef/Metadata" data-bare-link="true">http://wiki.opscode.com/display/chef/Metadata</a></p>
+
+<h2 id="AUTHOR">AUTHOR</h2>
+
+<p> Chef was written by Adam Jacob <a href="&#109;&#97;&#105;&#x6c;&#116;&#111;&#x3a;&#97;&#100;&#x61;&#x6d;&#x40;&#111;&#112;&#115;&#99;&#111;&#x64;&#101;&#46;&#x63;&#111;&#x6d;" data-bare-link="true">&#x61;&#100;&#97;&#109;&#64;&#111;&#112;&#x73;&#99;&#111;&#x64;&#x65;&#46;&#x63;&#x6f;&#109;</a> with many contributions from the community.</p>
+
+<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
+
+<p> This manual page was written by Joshua Timberman <a href="&#109;&#97;&#x69;&#x6c;&#116;&#x6f;&#58;&#106;&#111;&#x73;&#104;&#117;&#97;&#x40;&#x6f;&#x70;&#x73;&#x63;&#111;&#x64;&#101;&#46;&#99;&#111;&#109;" data-bare-link="true">&#x6a;&#111;&#115;&#x68;&#x75;&#x61;&#x40;&#x6f;&#112;&#115;&#x63;&#111;&#100;&#x65;&#46;&#x63;&#x6f;&#109;</a>.
+ Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
+
+<h2 id="CHEF">CHEF</h2>
+
+<p> Knife is distributed with Chef. <a href="http://wiki.opscode.com/display/chef/Home" data-bare-link="true">http://wiki.opscode.com/display/chef/Home</a></p>
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-cookbook(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-data-bag.1.html b/chef/distro/common/html/knife-data-bag.1.html
index 03014e3c0d..ec19bc6568 100644
--- a/chef/distro/common/html/knife-data-bag.1.html
+++ b/chef/distro/common/html/knife-data-bag.1.html
@@ -224,7 +224,7 @@ encryption keys.</p>
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-data-bag(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-environment.1.html b/chef/distro/common/html/knife-environment.1.html
index b71f9dbef2..2a847a542e 100644
--- a/chef/distro/common/html/knife-environment.1.html
+++ b/chef/distro/common/html/knife-environment.1.html
@@ -61,7 +61,20 @@
<div class='man-navigation' style='display:none'>
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
- <a href="#ENVIRONMENT-SUBCOMMANDS">ENVIRONMENT SUBCOMMANDS</a>
+ <a href="#SUBCOMMANDS">SUBCOMMANDS</a>
+ <a href="#CREATE">CREATE</a>
+ <a href="#DELETE">DELETE</a>
+ <a href="#EDIT">EDIT</a>
+ <a href="#FROM-FILE">FROM FILE</a>
+ <a href="#LIST">LIST</a>
+ <a href="#SHOW">SHOW</a>
+ <a href="#DESCRIPTION">DESCRIPTION</a>
+ <a href="#SYNTAX">SYNTAX</a>
+ <a href="#FORMAT">FORMAT</a>
+ <a href="#SEE-ALSO">SEE ALSO</a>
+ <a href="#AUTHOR">AUTHOR</a>
+ <a href="#DOCUMENTATION">DOCUMENTATION</a>
+ <a href="#CHEF">CHEF</a>
</div>
<ol class='man-decor man-head man head'>
@@ -79,11 +92,172 @@
<p><strong>knife</strong> <strong>environment</strong> <em>sub-command</em> <em>(options)</em></p>
-<h2 id="ENVIRONMENT-SUBCOMMANDS">ENVIRONMENT SUBCOMMANDS</h2>
+<h2 id="SUBCOMMANDS">SUBCOMMANDS</h2>
+
+<p>Environment subcommands follow a basic create, read, update, delete
+(CRUD) pattern. The following subcommands are available:</p>
+
+<h2 id="CREATE">CREATE</h2>
+
+<p><strong>knife environment create</strong> <em>environment</em> <em>(options)</em></p>
+
+<dl>
+<dt><code>-d</code>, <code>--description DESCRIPTION</code></dt><dd>The value of the description field.</dd>
+</dl>
+
+
+<p>Create a new environment object on the Chef Server. The envrionment will
+be opened in the text editor for editing prior to creation if the -n
+option is not present.</p>
+
+<h2 id="DELETE">DELETE</h2>
+
+<p><strong>knife environment delete</strong> <em>environment</em> <em>(options)</em></p>
+
+<p>Destroy an environment on the Chef Server. A prompt for confirmation
+will be displayed if the -y options is not given.</p>
+
+<h2 id="EDIT">EDIT</h2>
+
+<p><strong>knife environment edit</strong> <em>environment</em> <em>(options)</em></p>
+
+<p>Fetch <em>environment</em> and display it in the text editor for editing. The
+environment will be saved to the Chef Server when the editing session
+exits.</p>
+
+<h2 id="FROM-FILE">FROM FILE</h2>
+
+<p><strong>knife environment from file</strong> <em>file</em> <em>(options)</em></p>
+
+<p>Create or update an environment from the JSON or Ruby format <em>file</em>. See
+<strong>format</strong> for the proper format of this file.</p>
+
+<h2 id="LIST">LIST</h2>
+
+<p><strong>knife environment list</strong> <em>(options)</em>
+ * <code>-w</code>, <code>--with-uri</code>:</p>
+
+<pre><code>Show the resource URI for each environment
+</code></pre>
+
+<h2 id="SHOW">SHOW</h2>
+
+<p><strong>knife environment show</strong> <em>environment</em> <em>(options)</em></p>
+
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p>Environments provide a means to apply policies to hosts in your
+infrastructure based on business function. For example, you may have a
+separate copy of your infrastructure called "dev" that runs the latest
+version of your application and should use the newest versions of your
+cookbooks when configuring systems, and a production instance of your
+infrastructure where you wish to update code and cookbooks in a more
+controlled fashion. In Chef, this function is implemented with
+<em>environments</em>.</p>
+
+<p>Environments contain two major components: a set of cookbook version
+constraints and environment attributes.</p>
+
+<h2 id="SYNTAX">SYNTAX</h2>
+
+<p>A cookbook version constraint is comprised of a <em>cookbook name</em> and a
+<em>version constraint</em>. The <em>cookbook name</em> is the name of a cookbook in
+your system, and the <em>version constraint</em> is a String describing the
+version(s) of that cookbook allowed in the environment. Only one
+<em>version constraint</em> is supported for a given <em>cookbook name</em>.</p>
+
+<p>The exact syntax used to define a cookbook version constraint varies
+depending on whether you use the JSON format or the Ruby format. In the
+JSON format, the cookbook version constraints for an environment are
+represented as a single JSON object, like this:</p>
+
+<pre><code>{"apache2": "&gt;= 1.5.0"}
+</code></pre>
+
+<p>In the Ruby format, the cookbook version contraints for an environment
+are represented as a Ruby Hash, like this:</p>
+
+<pre><code>{"apache2" =&gt; "&gt;= 1.5.0"}
+</code></pre>
+
+<p>A <em>version number</em> is a String comprised of two or three digits
+separated by a dot (.) character, or in other words, strings of the form
+"major.minor" or "major.minor.patch". "1.2" and "1.2.3" are examples of
+valid version numbers. Version numbers containing more than three digits
+or alphabetic characters are not supported.</p>
+
+<p>A <em>version constraint</em> String is composed of an <em>operator</em> and a
+<em>version number</em>. The following operators are available:</p>
+
+<dl>
+<dt><code>= VERSION</code></dt><dd>Equality. Only the exact version specified may be used.</dd>
+<dt><code>&gt; VERSION</code></dt><dd>Greater than. Only versions greater than <code>VERSION</code> may be used.</dd>
+<dt><code>&gt;= VERSION</code></dt><dd>Greater than or equal to. Only versions equal to VERSION or greater
+may be used.</dd>
+<dt><code>&lt; VERSION</code></dt><dd>Less than. Only versions less than VERSION may be used.</dd>
+<dt><code>&lt;= VERSION</code></dt><dd>Less than or equal to. Only versions lesser or equal to VERSION may
+be used.</dd>
+<dt><code>~&gt; VERSION</code></dt><dd>Pessimistic greater than. Depending on the number of components in
+the given VERSION, the constraint will be optimistic about future
+minor or patch revisions only. For example, <code>~&gt; 1.1</code> will match any
+version less than <code>2.0</code> and greater than or equal to <code>1.1.0</code>,
+whereas <code>~&gt; 2.0.5</code> will match any version less than <code>2.1.0</code> and
+greater than or equal to <code>2.0.5</code>.</dd>
+</dl>
+
+
+<h2 id="FORMAT">FORMAT</h2>
+
+<p>The JSON format of an envioronment is as follows:</p>
+
+<pre><code>{
+ "name": "dev",
+ "description": "The development environment",
+ "cookbook_versions": {
+ "couchdb": "= 11.0.0"
+ },
+ "json_class": "Chef::Environment",
+ "chef_type": "environment",
+ "default_attributes": {
+ "apache2": { "listen_ports": [ "80", "443" ] }
+ },
+ "override_attributes": {
+ "aws_s3_bucket": "production"
+ }
+}
+</code></pre>
+
+<p>The Ruby format of an environment is as follows:</p>
+
+<pre><code>name "dev"
+description "The development environment"
+cookbook_versions "couchdb" =&gt; "= 11.0.0"
+default_attributes "apache2" =&gt; { "listen_ports" =&gt; [ "80", "443" ] }
+override_attributes "aws_s3_bucket" =&gt; "production"
+</code></pre>
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p> <strong><span class="man-ref">knife-node<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-cookbook<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-role<span class="s">(1)</span></span></strong>
+ <a href="http://wiki.opscode.com/display/chef/Environments" data-bare-link="true">http://wiki.opscode.com/display/chef/Environments</a>
+ <a href="http://wiki.opscode.com/display/chef/Version+Constraints" data-bare-link="true">http://wiki.opscode.com/display/chef/Version+Constraints</a></p>
+
+<h2 id="AUTHOR">AUTHOR</h2>
+
+<p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#x69;&#x6c;&#x74;&#111;&#58;&#x61;&#x64;&#x61;&#x6d;&#x40;&#111;&#x70;&#x73;&#x63;&#111;&#100;&#101;&#46;&#x63;&#111;&#109;" data-bare-link="true">&#97;&#100;&#97;&#x6d;&#64;&#111;&#x70;&#x73;&#x63;&#111;&#100;&#101;&#46;&#99;&#111;&#x6d;</a> with many contributions from the community.</p>
+
+<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
+
+<p> This manual page was written by Daniel DeLeo <a href="&#x6d;&#x61;&#x69;&#108;&#x74;&#111;&#x3a;&#100;&#97;&#x6e;&#64;&#x6f;&#x70;&#115;&#x63;&#x6f;&#x64;&#x65;&#46;&#x63;&#x6f;&#x6d;" data-bare-link="true">&#100;&#97;&#110;&#64;&#111;&#112;&#115;&#x63;&#x6f;&#100;&#101;&#46;&#99;&#111;&#x6d;</a>.
+ Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
+
+<h2 id="CHEF">CHEF</h2>
+
+<p> Knife is distributed with Chef. <a href="http://wiki.opscode.com/display/chef/Home" data-bare-link="true">http://wiki.opscode.com/display/chef/Home</a></p>
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-environment(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-exec.1.html b/chef/distro/common/html/knife-exec.1.html
index 12dd059054..5450286ccb 100644
--- a/chef/distro/common/html/knife-exec.1.html
+++ b/chef/distro/common/html/knife-exec.1.html
@@ -61,7 +61,12 @@
<div class='man-navigation' style='display:none'>
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
- <a href="#EXEC-SUBCOMMAND">EXEC SUBCOMMAND</a>
+ <a href="#DESCRIPTION">DESCRIPTION</a>
+ <a href="#EXAMPLES">EXAMPLES</a>
+ <a href="#SEE-ALSO">SEE ALSO</a>
+ <a href="#AUTHOR">AUTHOR</a>
+ <a href="#DOCUMENTATION">DOCUMENTATION</a>
+ <a href="#CHEF">CHEF</a>
</div>
<ol class='man-decor man-head man head'>
@@ -79,11 +84,47 @@
<p><strong>knife</strong> <strong>exec</strong> <em>(options)</em></p>
-<h2 id="EXEC-SUBCOMMAND">EXEC SUBCOMMAND</h2>
+<dl>
+<dt><code>-E</code>, <code>--exec CODE</code></dt><dd>Provide a snippet of code to evaluate on the command line</dd>
+</dl>
+
+
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p><code>knife exec</code> runs arbitrary ruby scripts in a context similar to that of
+the <span class="man-ref">shef<span class="s">(1)</span></span> DSL. See the shef documentation for a description of the
+commands available.</p>
+
+<h2 id="EXAMPLES">EXAMPLES</h2>
+
+<dl>
+<dt>Make an API call against an arbitrary endpoint</dt><dd>knife exec -E 'api.get("nodes/fluke.localdomain/cookbooks")'<br />
+=> list of cookbooks for the node <em>fluke.localdomain</em></dd>
+<dt>Remove the role <em>obsolete</em> from all nodes</dt><dd>knife exec -E 'nodes.transform(:all){|n| n.run_list.delete("role[obsolete]")}'</dd>
+<dt>Generate the expanded run list for hosts in the <code>webserver</code> role</dt><dd>knife exec -E 'nodes.find(:roles => "webserver") {|n| n.expand!; n[:recipes]}'</dd>
+</dl>
+
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p> <strong><span class="man-ref">shef<span class="s">(1)</span></span></strong></p>
+
+<h2 id="AUTHOR">AUTHOR</h2>
+
+<p> Chef was written by Adam Jacob <a href="&#x6d;&#97;&#105;&#x6c;&#x74;&#111;&#x3a;&#x61;&#100;&#x61;&#109;&#64;&#111;&#112;&#x73;&#99;&#111;&#x64;&#x65;&#x2e;&#99;&#111;&#x6d;" data-bare-link="true">&#97;&#x64;&#97;&#x6d;&#x40;&#x6f;&#112;&#x73;&#99;&#x6f;&#x64;&#x65;&#46;&#x63;&#111;&#x6d;</a> with many contributions from the community.</p>
+
+<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
+
+<p> This manual page was written by Joshua Timberman <a href="&#109;&#x61;&#105;&#108;&#116;&#111;&#x3a;&#106;&#111;&#115;&#104;&#x75;&#97;&#64;&#111;&#112;&#115;&#99;&#x6f;&#x64;&#x65;&#46;&#99;&#x6f;&#x6d;" data-bare-link="true">&#x6a;&#111;&#x73;&#x68;&#x75;&#x61;&#x40;&#111;&#x70;&#x73;&#99;&#x6f;&#x64;&#x65;&#x2e;&#x63;&#x6f;&#109;</a>.
+ Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
+
+<h2 id="CHEF">CHEF</h2>
+
+<p> Knife is distributed with Chef. <a href="http://wiki.opscode.com/display/chef/Home" data-bare-link="true">http://wiki.opscode.com/display/chef/Home</a></p>
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-exec(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-index.1.html b/chef/distro/common/html/knife-index.1.html
index b7d06b21a5..ad264cc4cb 100644
--- a/chef/distro/common/html/knife-index.1.html
+++ b/chef/distro/common/html/knife-index.1.html
@@ -115,7 +115,7 @@ time for all objects to be indexed and available for search.</p>
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-index(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-node.1.html b/chef/distro/common/html/knife-node.1.html
index c78eb4a361..48741194a4 100644
--- a/chef/distro/common/html/knife-node.1.html
+++ b/chef/distro/common/html/knife-node.1.html
@@ -119,6 +119,8 @@ settings.</p>
<h2 id="NODE-SUB-COMMANDS">NODE SUB-COMMANDS</h2>
+<p>The following <code>node</code> subcommands are available:</p>
+
<h2 id="BULK-DELETE">BULK DELETE</h2>
<p><strong>knife node bulk delete</strong> <em>regex</em> <em>(options)</em></p>
@@ -245,11 +247,11 @@ run list, the correct syntax is "role[ROLE_NAME]"</p>
<h2 id="AUTHOR">AUTHOR</h2>
-<p> Chef was written by Adam Jacob <a href="&#109;&#x61;&#x69;&#x6c;&#116;&#111;&#x3a;&#x61;&#100;&#97;&#109;&#64;&#x6f;&#112;&#x73;&#x63;&#x6f;&#x64;&#x65;&#46;&#99;&#x6f;&#109;" data-bare-link="true">&#x61;&#100;&#x61;&#x6d;&#x40;&#111;&#x70;&#x73;&#x63;&#x6f;&#100;&#101;&#x2e;&#99;&#111;&#109;</a> with many contributions from the community.</p>
+<p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#105;&#108;&#116;&#x6f;&#58;&#97;&#100;&#97;&#109;&#x40;&#x6f;&#x70;&#x73;&#99;&#111;&#100;&#101;&#x2e;&#x63;&#111;&#x6d;" data-bare-link="true">&#97;&#100;&#x61;&#109;&#64;&#x6f;&#x70;&#x73;&#99;&#111;&#x64;&#101;&#x2e;&#x63;&#x6f;&#x6d;</a> with many contributions from the community.</p>
<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
-<p> This manual page was written by Joshua Timberman <a href="&#109;&#97;&#x69;&#x6c;&#x74;&#x6f;&#58;&#x6a;&#111;&#x73;&#104;&#117;&#x61;&#x40;&#111;&#112;&#x73;&#x63;&#x6f;&#100;&#101;&#x2e;&#x63;&#x6f;&#109;" data-bare-link="true">&#106;&#x6f;&#x73;&#104;&#x75;&#97;&#x40;&#111;&#x70;&#115;&#x63;&#111;&#100;&#101;&#46;&#x63;&#111;&#109;</a>.
+<p> This manual page was written by Joshua Timberman <a href="&#x6d;&#x61;&#105;&#108;&#116;&#x6f;&#x3a;&#x6a;&#111;&#115;&#x68;&#x75;&#x61;&#x40;&#111;&#x70;&#x73;&#x63;&#x6f;&#100;&#101;&#46;&#x63;&#111;&#x6d;" data-bare-link="true">&#x6a;&#111;&#115;&#104;&#x75;&#x61;&#x40;&#x6f;&#x70;&#x73;&#x63;&#x6f;&#100;&#101;&#x2e;&#99;&#x6f;&#109;</a>.
Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
<h2 id="CHEF">CHEF</h2>
@@ -258,7 +260,7 @@ run list, the correct syntax is "role[ROLE_NAME]"</p>
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-node(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-recipe.1.html b/chef/distro/common/html/knife-recipe.1.html
index 47b711b00a..d9268b69e9 100644
--- a/chef/distro/common/html/knife-recipe.1.html
+++ b/chef/distro/common/html/knife-recipe.1.html
@@ -82,7 +82,7 @@
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-recipe(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-role.1.html b/chef/distro/common/html/knife-role.1.html
index fb584356ce..ddb923dd05 100644
--- a/chef/distro/common/html/knife-role.1.html
+++ b/chef/distro/common/html/knife-role.1.html
@@ -62,6 +62,18 @@
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
<a href="#ROLE-SUB-COMMANDS">ROLE SUB-COMMANDS</a>
+ <a href="#LIST">LIST</a>
+ <a href="#SHOW">SHOW</a>
+ <a href="#CREATE">CREATE</a>
+ <a href="#EDIT">EDIT</a>
+ <a href="#FROM-FILE">FROM FILE</a>
+ <a href="#DELETE">DELETE</a>
+ <a href="#BULK-DELETE">BULK DELETE</a>
+ <a href="#DESCRIPTION">DESCRIPTION</a>
+ <a href="#SEE-ALSO">SEE ALSO</a>
+ <a href="#AUTHOR">AUTHOR</a>
+ <a href="#DOCUMENTATION">DOCUMENTATION</a>
+ <a href="#CHEF">CHEF</a>
</div>
<ol class='man-decor man-head man head'>
@@ -81,11 +93,33 @@
<h2 id="ROLE-SUB-COMMANDS">ROLE SUB-COMMANDS</h2>
-<p><strong>role bulk delete REGEX</strong> <em>(options)</em></p>
+<p>The following <code>role</code> subcommands are available:</p>
-<p>Delete roles on the Chef Server based on a regular expression. The regular expression (<em>REGEX</em>) should be in quotes, not in //'s.</p>
+<h2 id="LIST">LIST</h2>
-<p><strong>role create ROLE</strong> <em>(options)</em></p>
+<p><strong>knife role list</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-w</code>, <code>--with-uri</code></dt><dd>Show corresponding URIs</dd>
+</dl>
+
+
+<p>List roles.</p>
+
+<h2 id="SHOW">SHOW</h2>
+
+<p><strong>knife role show ROLE</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-a</code>, <code>--attribute ATTR</code></dt><dd>Show only one attribute</dd>
+</dl>
+
+
+<p>Show a specific role.</p>
+
+<h2 id="CREATE">CREATE</h2>
+
+<p><strong>knife role create ROLE</strong> <em>(options)</em></p>
<dl>
<dt><code>-d</code>, <code>--description</code></dt><dd>The role description</dd>
@@ -94,39 +128,69 @@
<p>Create a new role.</p>
-<p><strong>role delete ROLE</strong> <em>(options)</em></p>
-
-<p>Delete a role.</p>
+<h2 id="EDIT">EDIT</h2>
-<p><strong>role edit ROLE</strong> <em>(options)</em></p>
+<p><strong>knife role edit ROLE</strong> <em>(options)</em></p>
<p>Edit a role.</p>
-<p><strong>role from file FILE</strong> <em>(options)</em></p>
+<h2 id="FROM-FILE">FROM FILE</h2>
+
+<p><strong>knife role from file FILE</strong> <em>(options)</em></p>
<p>Create or update a role from a role Ruby DSL (<code>.rb</code>) or JSON file.</p>
-<p><strong>role list</strong> <em>(options)</em></p>
+<h2 id="DELETE">DELETE</h2>
-<dl>
-<dt><code>-w</code>, <code>--with-uri</code></dt><dd>Show corresponding URIs</dd>
-</dl>
+<p><strong>knife role delete ROLE</strong> <em>(options)</em></p>
+<p>Delete a role.</p>
-<p>List roles.</p>
+<h2 id="BULK-DELETE">BULK DELETE</h2>
-<p><strong>role show ROLE</strong> <em>(options)</em></p>
+<p><strong>knife role bulk delete REGEX</strong> <em>(options)</em></p>
-<dl>
-<dt><code>-a</code>, <code>--attribute ATTR</code></dt><dd>Show only one attribute</dd>
-</dl>
+<p>Delete roles on the Chef Server based on a regular expression. The regular expression (<em>REGEX</em>) should be in quotes, not in //'s.</p>
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
-<p>Show a specific role.</p>
+<p>Roles provide a mechanism to group repeated configuration settings.
+Roles are data structures that contain <strong>default_attributes</strong>, and
+<strong>override_attributes</strong>, which are nested hashes of configuration
+settings, and a <strong>run_list</strong>, which is an ordered list of recipes and
+roles that should be applied to a host by chef-client.</p>
+
+<p><strong>default_attributes</strong> will be overridden if they conflict with a value
+on a node that includes the role. Conversely, <strong>override_attributes</strong>
+will override any values set on nodes that apply them.</p>
+
+<p>When <strong>chef-client</strong>(8) configures a host, it will "expand" the
+<strong>run_list</strong> included in that host's node data. The expansion process
+will recursively replace any roles in the run_list with that role's
+run_list.</p>
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p> <strong><span class="man-ref">knife-node<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-environment<span class="s">(1)</span></span></strong>
+ <a href="http://wiki.opscode.com/display/chef/Roles" data-bare-link="true">http://wiki.opscode.com/display/chef/Roles</a>
+ <a href="http://wiki.opscode.com/display/chef/Attributes" data-bare-link="true">http://wiki.opscode.com/display/chef/Attributes</a></p>
+
+<h2 id="AUTHOR">AUTHOR</h2>
+
+<p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#x69;&#108;&#116;&#x6f;&#x3a;&#97;&#x64;&#97;&#x6d;&#64;&#111;&#x70;&#x73;&#99;&#111;&#100;&#x65;&#46;&#x63;&#111;&#x6d;" data-bare-link="true">&#x61;&#100;&#97;&#x6d;&#x40;&#111;&#112;&#x73;&#x63;&#x6f;&#100;&#x65;&#x2e;&#x63;&#x6f;&#109;</a> with many contributions from the community.</p>
+
+<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
+
+<p> This manual page was written by Joshua Timberman <a href="&#x6d;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#58;&#x6a;&#x6f;&#x73;&#x68;&#117;&#97;&#x40;&#x6f;&#x70;&#x73;&#x63;&#111;&#x64;&#x65;&#46;&#99;&#111;&#x6d;" data-bare-link="true">&#106;&#x6f;&#x73;&#104;&#117;&#x61;&#x40;&#x6f;&#112;&#115;&#x63;&#x6f;&#x64;&#101;&#x2e;&#99;&#x6f;&#x6d;</a>.
+ Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
+
+<h2 id="CHEF">CHEF</h2>
+
+<p> Knife is distributed with Chef. <a href="http://wiki.opscode.com/display/chef/Home" data-bare-link="true">http://wiki.opscode.com/display/chef/Home</a></p>
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-role(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-search.1.html b/chef/distro/common/html/knife-search.1.html
index 63ca5975bd..a872b0a9da 100644
--- a/chef/distro/common/html/knife-search.1.html
+++ b/chef/distro/common/html/knife-search.1.html
@@ -61,6 +61,13 @@
<div class='man-navigation' style='display:none'>
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
+ <a href="#DESCRIPTION">DESCRIPTION</a>
+ <a href="#SYNTAX">SYNTAX</a>
+ <a href="#EXAMPLES">EXAMPLES</a>
+ <a href="#SEE-ALSO">SEE ALSO</a>
+ <a href="#AUTHOR">AUTHOR</a>
+ <a href="#DOCUMENTATION">DOCUMENTATION</a>
+ <a href="#CHEF">CHEF</a>
</div>
<ol class='man-decor man-head man head'>
@@ -85,14 +92,48 @@
<dt><code>-r</code>, <code>--run-list</code></dt><dd>Show only the run list</dd>
<dt><code>-o</code>, <code>--sort SORT</code></dt><dd>The order to sort the results in</dd>
<dt><code>-b</code>, <code>--start ROW</code></dt><dd>The row to start returning results at</dd>
+<dt><code>-m</code>, <code>--medium</code></dt><dd>Display medium sized output when searching nodes using the default
+summary format</dd>
+<dt><code>-l</code>, <code>--long</code></dt><dd>Display long output when searching nodes using the default summary
+format</dd>
</dl>
-<p>Search indexes are a feature of the Chef Server and the search sub-command allows querying any of the available indexes using SOLR query syntax. The following data types are indexed for search: <em>node</em>, <em>role</em>, <em>client</em>, <em>data bag</em>.</p>
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p>Search indexes are a feature of the Chef Server and the search
+sub-command allows querying any of the available indexes using SOLR
+query syntax. The following data types are indexed for search:
+* <em>node</em>
+* <em>role</em>
+* <em>environment</em>
+* <em>data bag</em></p>
+
+<h2 id="SYNTAX">SYNTAX</h2>
+
+<h2 id="EXAMPLES">EXAMPLES</h2>
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p> <strong>knife-ssh</strong>(1)
+ <a href="http://wiki.opscode.com/display/chef/Attributes" data-bare-link="true">http://wiki.opscode.com/display/chef/Attributes</a></p>
+
+<h2 id="AUTHOR">AUTHOR</h2>
+
+<p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#105;&#108;&#116;&#x6f;&#x3a;&#x61;&#100;&#x61;&#109;&#x40;&#x6f;&#112;&#x73;&#99;&#111;&#100;&#101;&#x2e;&#x63;&#x6f;&#x6d;" data-bare-link="true">&#x61;&#x64;&#x61;&#109;&#64;&#111;&#x70;&#x73;&#x63;&#x6f;&#x64;&#x65;&#x2e;&#99;&#111;&#109;</a> with many contributions from the community.</p>
+
+<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
+
+<p> This manual page was written by Joshua Timberman <a href="&#109;&#97;&#105;&#x6c;&#x74;&#111;&#58;&#x6a;&#x6f;&#x73;&#104;&#117;&#97;&#x40;&#x6f;&#x70;&#x73;&#99;&#111;&#x64;&#101;&#x2e;&#99;&#x6f;&#109;" data-bare-link="true">&#x6a;&#x6f;&#115;&#x68;&#x75;&#97;&#x40;&#x6f;&#x70;&#115;&#x63;&#x6f;&#100;&#101;&#46;&#x63;&#111;&#109;</a>.
+ Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
+
+<h2 id="CHEF">CHEF</h2>
+
+<p> Knife is distributed with Chef. <a href="http://wiki.opscode.com/display/chef/Home" data-bare-link="true">http://wiki.opscode.com/display/chef/Home</a></p>
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-search(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-ssh.1.html b/chef/distro/common/html/knife-ssh.1.html
index 70b09060d0..c2f99b5727 100644
--- a/chef/distro/common/html/knife-ssh.1.html
+++ b/chef/distro/common/html/knife-ssh.1.html
@@ -61,6 +61,12 @@
<div class='man-navigation' style='display:none'>
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
+ <a href="#DESCRIPTION">DESCRIPTION</a>
+ <a href="#TERMINAL-MULTIPLEXING-AND-TERMINAL-TAB-SUPPORT">TERMINAL MULTIPLEXING AND TERMINAL TAB SUPPORT</a>
+ <a href="#SEE-ALSO">SEE ALSO</a>
+ <a href="#AUTHOR">AUTHOR</a>
+ <a href="#DOCUMENTATION">DOCUMENTATION</a>
+ <a href="#CHEF">CHEF</a>
</div>
<ol class='man-decor man-head man head'>
@@ -87,11 +93,60 @@
</dl>
-<p>The <em>ssh</em> sub-command opens an ssh session to each of the nodes in the search results of the <em>QUERY</em>. This sub-command requires that the net-ssh-multi and highline Ruby libraries are installed. On Debian systems, these are the libnet-ssh-multi-ruby and libhighline-ruby packages. They can also be installed as RubyGems (net-ssh-multi and highline, respectively).</p>
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p>The <em>ssh</em> sub-command opens an ssh session to each of the nodes in the
+search results of the <em>QUERY</em>. This sub-command requires that the
+net-ssh-multi and highline Ruby libraries are installed. On Debian
+systems, these are the libnet-ssh-multi-ruby and libhighline-ruby
+packages. They can also be installed as RubyGems (net-ssh-multi and
+highline, respectively).</p>
+
+<h2 id="TERMINAL-MULTIPLEXING-AND-TERMINAL-TAB-SUPPORT">TERMINAL MULTIPLEXING AND TERMINAL TAB SUPPORT</h2>
+
+<p><code>knife ssh</code> integrates with several terminal multiplexer programs to
+provide a more convenient means of managing multiple ssh sessions. When
+the <em>COMMAND</em> option matches one of these, <code>knife ssh</code> will create
+multiple interactive ssh sessions running locally in the terminal
+multiplexer instead of invoking the command on the remote host.</p>
+
+<p>The available multiplexers are:
+ * <code>interactive</code>:</p>
+
+<pre><code>A built-in multiplexer. `interactive` supports running commands on a
+subset of the connected hosts in parallel
+</code></pre>
+
+<dl>
+<dt><strong>screen</strong>(1)</dt><dd>Runs ssh interactively inside <code>screen</code>. ~/.screenrc will be sourced
+if it exists.</dd>
+<dt class="flush"><strong>tmux</strong>(1)</dt><dd>Runs ssh interactively inside tmux.</dd>
+<dt><code>macterm</code> (Mac OS X only)</dt><dd>Opens a Terminal.app window and creates a tab for each ssh session.
+You must install the rb-appscript gem before you can use this
+option.</dd>
+</dl>
+
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p> <strong>knife-search</strong>(1)</p>
+
+<h2 id="AUTHOR">AUTHOR</h2>
+
+<p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#105;&#108;&#116;&#x6f;&#x3a;&#x61;&#100;&#x61;&#109;&#x40;&#x6f;&#112;&#x73;&#99;&#111;&#100;&#101;&#x2e;&#x63;&#x6f;&#x6d;" data-bare-link="true">&#x61;&#x64;&#x61;&#109;&#64;&#111;&#x70;&#x73;&#x63;&#x6f;&#x64;&#x65;&#x2e;&#99;&#111;&#109;</a> with many contributions from the community.</p>
+
+<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
+
+<p> This manual page was written by Joshua Timberman <a href="&#109;&#97;&#105;&#x6c;&#x74;&#111;&#58;&#x6a;&#x6f;&#x73;&#104;&#117;&#97;&#x40;&#x6f;&#x70;&#x73;&#99;&#111;&#x64;&#101;&#x2e;&#99;&#x6f;&#109;" data-bare-link="true">&#x6a;&#x6f;&#115;&#x68;&#x75;&#97;&#x40;&#x6f;&#x70;&#115;&#x63;&#x6f;&#100;&#101;&#46;&#x63;&#111;&#109;</a>.
+ Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
+
+<h2 id="CHEF">CHEF</h2>
+
+<p> Knife is distributed with Chef. <a href="http://wiki.opscode.com/display/chef/Home" data-bare-link="true">http://wiki.opscode.com/display/chef/Home</a></p>
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-ssh(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-status.1.html b/chef/distro/common/html/knife-status.1.html
index ecbf78ec97..d76821c6b8 100644
--- a/chef/distro/common/html/knife-status.1.html
+++ b/chef/distro/common/html/knife-status.1.html
@@ -61,6 +61,11 @@
<div class='man-navigation' style='display:none'>
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
+ <a href="#DESCRIPTION">DESCRIPTION</a>
+ <a href="#SEE-ALSO">SEE ALSO</a>
+ <a href="#AUTHOR">AUTHOR</a>
+ <a href="#DOCUMENTATION">DOCUMENTATION</a>
+ <a href="#CHEF">CHEF</a>
</div>
<ol class='man-decor man-head man head'>
@@ -83,11 +88,37 @@
</dl>
-<p>The <em>status</em> sub-command searches the Chef Server for all nodes and displays information about the last time the node checked into the server and executed a <code>node.save</code>. The fields displayed are the relative checkin time, the node name, it's operating system platform and version, the fully-qualified domain name and the default IP address. If the <code>-r</code> option is given, the node's run list will also be displayed. Note that depending on the configuration of the nodes, the FQDN and IP displayed may not be publicly reachable.</p>
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p>The <em>status</em> sub-command searches the Chef Server for all nodes and
+displays information about the last time the node checked into the
+server and executed a <code>node.save</code>. The fields displayed are the relative
+checkin time, the node name, it's operating system platform and version,
+the fully-qualified domain name and the default IP address. If the <code>-r</code>
+option is given, the node's run list will also be displayed. Note that
+depending on the configuration of the nodes, the FQDN and IP displayed
+may not be publicly reachable.</p>
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p> <strong>knife-search</strong>(1)</p>
+
+<h2 id="AUTHOR">AUTHOR</h2>
+
+<p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#105;&#108;&#116;&#x6f;&#x3a;&#x61;&#100;&#x61;&#109;&#x40;&#x6f;&#112;&#x73;&#99;&#111;&#100;&#101;&#x2e;&#x63;&#x6f;&#x6d;" data-bare-link="true">&#x61;&#x64;&#x61;&#109;&#64;&#111;&#x70;&#x73;&#x63;&#x6f;&#x64;&#x65;&#x2e;&#99;&#111;&#109;</a> with many contributions from the community.</p>
+
+<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
+
+<p> This manual page was written by Joshua Timberman <a href="&#109;&#97;&#105;&#x6c;&#x74;&#111;&#58;&#x6a;&#x6f;&#x73;&#104;&#117;&#97;&#x40;&#x6f;&#x70;&#x73;&#99;&#111;&#x64;&#101;&#x2e;&#99;&#x6f;&#109;" data-bare-link="true">&#x6a;&#x6f;&#115;&#x68;&#x75;&#97;&#x40;&#x6f;&#x70;&#115;&#x63;&#x6f;&#100;&#101;&#46;&#x63;&#111;&#109;</a>.
+ Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
+
+<h2 id="CHEF">CHEF</h2>
+
+<p> Knife is distributed with Chef. <a href="http://wiki.opscode.com/display/chef/Home" data-bare-link="true">http://wiki.opscode.com/display/chef/Home</a></p>
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-status(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife-tag.1.html b/chef/distro/common/html/knife-tag.1.html
index 0c790e1c8a..d4c3a07ead 100644
--- a/chef/distro/common/html/knife-tag.1.html
+++ b/chef/distro/common/html/knife-tag.1.html
@@ -62,6 +62,13 @@
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
<a href="#TAG-SUBCOMMANDS">TAG SUBCOMMANDS</a>
+ <a href="#CREATE">CREATE</a>
+ <a href="#DELETE">DELETE</a>
+ <a href="#LIST">LIST</a>
+ <a href="#SEE-ALSO">SEE ALSO</a>
+ <a href="#AUTHOR">AUTHOR</a>
+ <a href="#DOCUMENTATION">DOCUMENTATION</a>
+ <a href="#CHEF">CHEF</a>
</div>
<ol class='man-decor man-head man head'>
@@ -81,9 +88,46 @@
<h2 id="TAG-SUBCOMMANDS">TAG SUBCOMMANDS</h2>
+<p>The following <code>tag</code> subcommands are available:</p>
+
+<h2 id="CREATE">CREATE</h2>
+
+<p><strong>knife tag create</strong> <em>node</em> <em>tag</em> [<em>...</em>]</p>
+
+<p>Adds one or more tags to <em>node</em></p>
+
+<h2 id="DELETE">DELETE</h2>
+
+<p><strong>knife tag delete</strong> <em>node</em> <em>tag</em> [<em>...</em>]</p>
+
+<p>Removes one or more tags from <em>node</em></p>
+
+<h2 id="LIST">LIST</h2>
+
+<p><strong>knife tag list</strong> <em>node</em></p>
+
+<p>Lists the tags applied to <em>node</em></p>
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p> <strong><span class="man-ref">knife-node<span class="s">(1)</span></span></strong></p>
+
+<h2 id="AUTHOR">AUTHOR</h2>
+
+<p> Chef was written by Adam Jacob <a href="&#109;&#97;&#x69;&#108;&#x74;&#x6f;&#x3a;&#97;&#100;&#x61;&#109;&#64;&#x6f;&#112;&#x73;&#x63;&#x6f;&#x64;&#x65;&#x2e;&#x63;&#x6f;&#x6d;" data-bare-link="true">&#x61;&#100;&#97;&#109;&#x40;&#111;&#x70;&#115;&#x63;&#x6f;&#x64;&#x65;&#x2e;&#x63;&#111;&#x6d;</a> with many contributions from the community.</p>
+
+<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
+
+<p> This manual page was written by Daniel DeLeo <a href="&#x6d;&#x61;&#105;&#x6c;&#116;&#111;&#x3a;&#100;&#x61;&#110;&#x40;&#111;&#112;&#115;&#x63;&#x6f;&#100;&#x65;&#x2e;&#99;&#111;&#109;" data-bare-link="true">&#100;&#x61;&#x6e;&#x40;&#111;&#112;&#115;&#99;&#111;&#100;&#x65;&#46;&#x63;&#x6f;&#109;</a>.
+ Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
+
+<h2 id="CHEF">CHEF</h2>
+
+<p> Knife is distributed with Chef. <a href="http://wiki.opscode.com/display/chef/Home" data-bare-link="true">http://wiki.opscode.com/display/chef/Home</a></p>
+
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife-tag(1)</li>
</ol>
diff --git a/chef/distro/common/html/knife.1.html b/chef/distro/common/html/knife.1.html
index 1c9b985b07..244b1393ab 100644
--- a/chef/distro/common/html/knife.1.html
+++ b/chef/distro/common/html/knife.1.html
@@ -3,7 +3,7 @@
<head>
<meta http-equiv='content-type' value='text/html;charset=utf8'>
<meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
- <title>knife(1) - Chef Server REST API utility</title>
+ <title>knife(1) - Chef Server API client utility</title>
<style type='text/css' media='all'>
/* style: man */
body#manpage {margin:0}
@@ -62,9 +62,8 @@
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
<a href="#DESCRIPTION">DESCRIPTION</a>
- <a href="#GENERAL-OPTIONS">GENERAL OPTIONS</a>
+ <a href="#OPTIONS">OPTIONS</a>
<a href="#SUB-COMMANDS">SUB-COMMANDS</a>
- <a href="#GENERAL-SUB-COMMANDS">GENERAL SUB-COMMANDS</a>
<a href="#CONFIGURATION">CONFIGURATION</a>
<a href="#FILES">FILES</a>
<a href="#CHEF-WORKFLOW">CHEF WORKFLOW</a>
@@ -72,6 +71,9 @@
<a href="#ENVIRONMENT">ENVIRONMENT</a>
<a href="#SEE-ALSO">SEE ALSO</a>
<a href="#AUTHOR">AUTHOR</a>
+ <a href="#DOCUMENTATION">DOCUMENTATION</a>
+ <a href="#LICENSE">LICENSE</a>
+ <a href="#CHEF">CHEF</a>
</div>
<ol class='man-decor man-head man head'>
@@ -82,30 +84,45 @@
<h2 id="NAME">NAME</h2>
<p class="man-name">
- <code>knife</code> - <span class="man-whatis">Chef Server REST API utility</span>
+ <code>knife</code> - <span class="man-whatis">Chef Server API client utility</span>
</p>
<h2 id="SYNOPSIS">SYNOPSIS</h2>
-<p><strong>knife</strong> <em>sub-command</em> <em>(options)</em></p>
+<p><strong>knife</strong> <em>sub-command</em> [<em>argument</em>...] <em>(options)</em></p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
-<p>This manual page documents knife, a command-line utility used to
-interact with a Chef server directly through the RESTful API. Knife uses
-sub-commands to take various actions on different types of Chef objects.
-Some sub-commands take additional options. General options follow
-sub-commands and their options. A configuration file can be created for
-common defaults.</p>
+<p>Knife is a command-line utility used to manage data on a Chef server
+through the HTTP(S) API. Knife is organized into groups of subcommands
+centered around the various object types in Chef. Each category of
+subcommand is documented in its own manual page. Available topics are:</p>
-<p>Unless otherwise specified, output is in JSON format, and input files
-are also JSON format.</p>
+<ul>
+<li>bootstrap</li>
+<li>client</li>
+<li>configure</li>
+<li>cookbook-site</li>
+<li>cookbook</li>
+<li>data-bag</li>
+<li>environment</li>
+<li>exec</li>
+<li>index</li>
+<li>node</li>
+<li>recipe</li>
+<li>role</li>
+<li>search</li>
+<li>ssh</li>
+<li>status</li>
+<li>tag</li>
+</ul>
-<p>The Chef class <code>Chef::Config</code> that configures the behavior of how knife
-runs has options that correspond to command-line options. These are
-noted as <code>Chef::Config</code> values.</p>
-<h2 id="GENERAL-OPTIONS">GENERAL OPTIONS</h2>
+<p>If the knife manuals are in your <code>MANPATH</code>, you can access help for the
+above topics using <code>man knife-TOPIC</code>; otherwise, you can view the
+documentation using <code>knife help TOPIC</code>.</p>
+
+<h2 id="OPTIONS">OPTIONS</h2>
<dl>
<dt><code>-s</code>, <code>--server-url</code> URL</dt><dd>Chef Server URL, corresponds to <code>Chef::Config</code> <code>chef_server_url</code>.</dd>
@@ -120,17 +137,15 @@ noted as <code>Chef::Config</code> values.</p>
<dt><code>-p</code>, <code>--print-after</code></dt><dd>Show the data after a destructive operation</dd>
<dt><code>-v</code>, <code>--version</code></dt><dd>Show chef version</dd>
<dt><code>-y</code>, <code>--yes</code></dt><dd>Say yes to all prompts for confirmation</dd>
-<dt><code>-h</code>, <code>--help</code></dt><dd>Show this message</dd>
+<dt><code>-h</code>, <code>--help</code></dt><dd>Show the available options for a command.</dd>
</dl>
-<p>Usage information for sub-commands can be displayed with <code>knife SUB-COMMAND --help</code>.</p>
-
<h2 id="SUB-COMMANDS">SUB-COMMANDS</h2>
-<p>Knife sub-commands are structured as <em>NOUN verb NOUN (options)</em>. The
-sub-commands are meant to be intuitively named. Because the Chef Server
-API is RESTful, sub-commands generally utilize CRUD operations.</p>
+<p>Sub-commands that operate on the basic Chef data types are structured as
+<em>NOUN verb NOUN (options)</em>. For all data types, the following commands
+are available:</p>
<ul>
<li>create (create)</li>
@@ -140,13 +155,8 @@ API is RESTful, sub-commands generally utilize CRUD operations.</p>
</ul>
-<p>Objects stored on the server support these, as described below.</p>
-
-<h2 id="GENERAL-SUB-COMMANDS">GENERAL SUB-COMMANDS</h2>
-
-<p><strong>recipe list [PATTERN]</strong></p>
-
-<p>List available recipes from the server. Specify <em>PATTERN</em> as a regular expression to limit the results.</p>
+<p>Knife also includes commands that take actions other than displaying or
+modifying data on the Chef Server, such as <strong><span class="man-ref">knife-ssh<span class="s">(1)</span></span></strong>.</p>
<h2 id="CONFIGURATION">CONFIGURATION</h2>
@@ -158,68 +168,32 @@ be <code>.chef/knife.rb</code> in the current directory of the repository.</p>
<p>If the config file exists, knife uses these settings for <strong>GENERAL OPTIONS</strong> defaults.</p>
-<p><code>log_level</code></p>
-
-<p>A Ruby symbol specifying the log level. Corresponds to <code>-l</code> or <code>--log_level</code> option. Default is <em>:info</em>. Valid values are:</p>
-
<ul>
-<li>:info</li>
-<li>:debug</li>
-<li>:warn</li>
-<li>:fatal</li>
-</ul>
-
-
-<p><code>log_location</code></p>
-
-<p>Corresponds to the <code>-L</code> or <code>--log-file</code> option. Defaults is <strong>STDOUT</strong>.
-Valid values are <strong>STDOUT</strong> or a filename.</p>
-
-<p><code>node_name</code></p>
-
-<p>User to authenticate to the Chef server. Corresponds to the <code>-u</code> or
-<code>--user</code> option. This is requested from the user when running this
-sub-command.</p>
-
-<p><code>client_key</code></p>
-
-<p>Private key file to authenticate to the Chef server. Corresponds to the
-<code>-k</code> or <code>--key</code> option. This is requested from the user when running
-this sub-command.</p>
-
-<p><code>chef_server_url</code></p>
-
-<p>URL of the Chef server. Corresponds to the <code>-s</code> or <code>--server-url</code>
-option. This is requested from the user when running this sub-command.</p>
-
-<p><code>cache_type</code></p>
-
-<p>The type of cache to use. Default is BasicFile. This can be any type of
+<li><code>node_name</code>:
+User or client identity (i.e., <em>name</em>) to use for authenticating
+requests to the Chef Server.</li>
+<li><code>client_key</code>:
+Private key file to authenticate to the Chef server. Corresponds to the
+<code>-k</code> or <code>--key</code> option.</li>
+<li><code>chef_server_url</code>:
+URL of the Chef server. Corresponds to the <code>-s</code> or <code>--server-url</code>
+option. This is requested from the user when running this sub-command.</li>
+<li><code>cache_type</code>:
+The type of cache to use. Default is BasicFile. This can be any type of
Cache that moneta supports: BasicFile, Berkeley, Couch, DataMapper,
File, LMC, Memcache, Memory, MongoDB, Redis, Rufus, S3, SDBM, Tyrant,
-Xattr, YAML.</p>
-
-<p><code>cache_options</code></p>
-
-<p>Specifies various options to use for caching. Default reads the Chef
-client configuration (/etc/chef/checksums).</p>
-
-<p><code>validation_client_name</code></p>
-
-<p>Specifies the name of the client used to validate new clients. This is
-requested from the user when running the configuration sub-command.</p>
-
-<p><code>validation_key</code></p>
-
-<p>Specifies the private key file to use for generating ec2 instance data
-for validating new clients. This is implied from the
-<code>validation_client_name</code>.</p>
-
-<p><code>cookbook_copyright</code>
-<code>cookbook_email</code>
-<code>cookbook_license</code></p>
-
-<p>Used by <code>knife cookbook create</code> sub-command to specify the copyright
+Xattr, YAML.</li>
+<li><code>cache_options</code>:
+Specifies various options to use for caching. These options are
+dependent on the <code>cache_type</code>.</li>
+<li><code>validation_client_name</code>:
+Specifies the name of the client used to validate new clients.</li>
+<li><code>validation_key</code>:
+Specifies the private key file to use when bootstrapping new hosts.
+See <span class="man-ref">knife-client<span class="s">(1)</span></span> for more information about the validation
+client.</li>
+<li><code>cookbook_copyright</code>, <code>cookbook_email</code>, <code>cookbook_license</code>
+Used by <code>knife cookbook create</code> sub-command to specify the copyright
holder, maintainer email and license (respectively) for new cookbooks.
The copyright holder is listed as the maintainer in the cookbook's
metadata and as the Copyright in the comments of the default recipe. The
@@ -228,27 +202,9 @@ determines what preamble to put in the comment of the default recipe,
and is listed as the license in the cookbook metadata. Currently
supported licenses are "apachev2" and "none". Any other values will
result in an empty license in the metadata (needs to be filled in by the
-author), and no comment preamble in the default recipe.</p>
-
-<p><code>knife[:aws_access_key_id]</code>
-<code>knife[:aws_secret_access_key]</code></p>
-
-<p>Specifies the Amazon AWS EC2 credentials to use when running the ec2 sub-commands.</p>
-
-<p><code>knife[:rackspace_api_username]</code>
-<code>knife[:rackspace_api_key]</code></p>
-
-<p>Specifies the Rackspace Cloud credentials to use when running the rackspace sub-commands.</p>
-
-<p><code>knife[:terremark_username]</code>
-<code>knife[:terremark_password]</code>
-<code>knife[:terremark_service]</code></p>
-
-<p>Specifies the Terremark vCloud credentials to use when running the terremark sub-commands.</p>
-
-<p><code>knife[:slicehost_password]</code></p>
+author), and no comment preamble in the default recipe.</li>
+</ul>
-<p>Specifies the Slicehost password to use when running the slicdehost sub-commands.</p>
<h2 id="FILES">FILES</h2>
@@ -279,50 +235,6 @@ recommended though, and git fits with a lot of the workflow paradigms.</p>
<h2 id="EXAMPLES">EXAMPLES</h2>
-<p>Example client config (<code>/etc/chef/client.rb</code>) from <code>knife configure
-client</code>. The same configuration is used when using the <code>knife bootstrap</code>
-command with the default <code>gem</code> templates that come with Chef.</p>
-
-<pre><code>log_level :info
-log_location STDOUT
-chef_server_url 'https://api.opscode.com/organizations/ORGNAME'
-validation_client_name 'ORGNAME-validator'
-</code></pre>
-
-<p>Setting up a custom bootstrap is fairly straightforward. Create
-<code>.chef/bootstrap</code> in your Chef Repository directory or in
-<code>$HOME/.chef/bootstrap</code>. Then create the ERB template file.</p>
-
-<pre><code>mkdir ~/.chef/bootstrap
-vi ~/.chef/bootstrap/debian5.0-apt.erb
-</code></pre>
-
-<p>For example, to create a new bootstrap template that should be used when
-setting up a new Debian node. Edit the template to run the commands, set
-up the validation certificate and the client configuration file, and
-finally to run chef-client on completion. The bootstrap template can be
-called with:</p>
-
-<pre><code>knife bootstrap mynode.example.com --template-file ~/.chef/bootstrap/debian5.0-apt.erb
-</code></pre>
-
-<p>Or,</p>
-
-<pre><code>knife bootstrap mynode.example.com --distro debian5.0-apt
-</code></pre>
-
-<p>The <code>--distro</code> parameter will automatically look in the
-<code>~/.chef/bootstrap</code> directory for a file named <code>debian5.0-apt.erb</code>.</p>
-
-<p>Templates provided by the Chef installation are located in
-<code>BASEDIR/lib/chef/knife/bootstrap/*.erb</code>, where <em>BASEDIR</em> is the
-location where the package or Gem installed the Chef client libraries.</p>
-
-<p>Uploading cookbooks to the Opscode cookbooks site using the user/certificate specifically:</p>
-
-<pre><code>knife cookbook site share example Other -k ~/.chef/USERNAME.pem -u USERNAME
-</code></pre>
-
<h2 id="ENVIRONMENT">ENVIRONMENT</h2>
<dl>
@@ -334,25 +246,46 @@ data editing entirely.</dd>
<h2 id="SEE-ALSO">SEE ALSO</h2>
-<p>Full documentation for Chef is located on the Chef wiki, http://wiki.opscode.com/display/chef/Home/.</p>
+<p> <strong><span class="man-ref">chef-client<span class="s">(8)</span></span></strong> <strong><span class="man-ref">chef-server<span class="s">(8)</span></span></strong> <strong><span class="man-ref">shef<span class="s">(1)</span></span></strong></p>
-<p>JSON is JavaScript Object Notation and more information can be found at http://json.org/.</p>
+<p> <strong><span class="man-ref">knife-bootstrap<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-client<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-configure<span class="s">(1)</span></span></strong>
+ <strong><span class="man-ref">knife-cookbook-site<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-cookbook<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-data-bag<span class="s">(1)</span></span></strong>
+ <strong><span class="man-ref">knife-environment<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-exec<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-index<span class="s">(1)</span></span></strong>
+ <strong><span class="man-ref">knife-node<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-recipe<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-role<span class="s">(1)</span></span></strong>
+ <strong><span class="man-ref">knife-search<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-ssh<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-tag<span class="s">(1)</span></span></strong></p>
-<p>SOLR is an open source search engine. The Chef Server includes a SOLR installation. More information about SOLR, including the search query syntax, can be found at http://lucene.apache.org/solr/.</p>
+<p> Complete Chef documentation is available online: <a href="http://wiki.opscode.com/display/chef/Home/" data-bare-link="true">http://wiki.opscode.com/display/chef/Home/</a></p>
-<p>Git is a version control system and documented at http://git-scm.com/.</p>
+<p> JSON is JavaScript Object Notation <a href="http://json.org/" data-bare-link="true">http://json.org/</a></p>
-<p>This manual page was generated in nroff from Markdown with ronn. Ryan Tomayko wrote ronn and more information can be found at http://rtomayko.github.com/ronn/ronn.5.html.</p>
+<p> SOLR is an open source search engine. <a href="http://lucene.apache.org/solr/" data-bare-link="true">http://lucene.apache.org/solr/</a></p>
+
+<p> <strong><span class="man-ref">git<span class="s">(1)</span></span></strong> is a version control system <a href="http://git-scm.com/" data-bare-link="true">http://git-scm.com/</a></p>
+
+<p> This manual page was generated from Markdown with <strong><span class="man-ref">ronn<span class="s">(1)</span></span></strong> <a href="http://rtomayko.github.com/ronn/ronn.1.html" data-bare-link="true">http://rtomayko.github.com/ronn/ronn.1.html</a></p>
<h2 id="AUTHOR">AUTHOR</h2>
-<p>Chef was written by Adam Jacob <a href="&#109;&#97;&#105;&#108;&#x74;&#111;&#x3a;&#x61;&#100;&#97;&#109;&#x40;&#x6f;&#x70;&#115;&#x63;&#x6f;&#100;&#101;&#x2e;&#99;&#111;&#x6d;" data-bare-link="true">&#x61;&#x64;&#97;&#x6d;&#x40;&#x6f;&#x70;&#115;&#x63;&#x6f;&#100;&#x65;&#46;&#x63;&#x6f;&#x6d;</a> of Opscode (<a href="http://www.opscode.com" data-bare-link="true">http://www.opscode.com</a>), with contributions from the community. This manual page was written by Joshua Timberman <a href="&#x6d;&#x61;&#x69;&#108;&#116;&#x6f;&#58;&#106;&#111;&#115;&#104;&#117;&#x61;&#64;&#x6f;&#112;&#x73;&#x63;&#111;&#100;&#x65;&#x2e;&#99;&#111;&#x6d;" data-bare-link="true">&#x6a;&#111;&#x73;&#104;&#x75;&#x61;&#x40;&#111;&#112;&#x73;&#x63;&#x6f;&#x64;&#x65;&#46;&#99;&#x6f;&#109;</a>. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
+<p> Chef was written by Adam Jacob <a href="&#109;&#x61;&#105;&#108;&#x74;&#x6f;&#x3a;&#97;&#100;&#x61;&#x6d;&#x40;&#x6f;&#112;&#x73;&#x63;&#111;&#100;&#x65;&#46;&#x63;&#x6f;&#x6d;" data-bare-link="true">&#x61;&#100;&#97;&#x6d;&#x40;&#111;&#112;&#115;&#x63;&#x6f;&#100;&#x65;&#x2e;&#x63;&#111;&#x6d;</a> of Opscode
+ (<a href="http://www.opscode.com" data-bare-link="true">http://www.opscode.com</a>), with contributions from the community.</p>
+
+<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
+
+<p> This manual page was written by Joshua Timberman <a href="&#x6d;&#x61;&#105;&#108;&#x74;&#x6f;&#x3a;&#106;&#x6f;&#x73;&#x68;&#x75;&#x61;&#64;&#111;&#112;&#x73;&#x63;&#x6f;&#100;&#x65;&#x2e;&#99;&#111;&#x6d;" data-bare-link="true">&#106;&#111;&#115;&#x68;&#117;&#x61;&#x40;&#111;&#x70;&#x73;&#x63;&#111;&#x64;&#x65;&#x2e;&#99;&#111;&#x6d;</a>.</p>
+
+<h2 id="LICENSE">LICENSE</h2>
+
+<p> Both Chef and this documentation are released under the terms of the
+ Apache 2.0 License. You may view the license online: <a href="http://www.apache.org/licenses/LICENSE-2.0.html" data-bare-link="true">http://www.apache.org/licenses/LICENSE-2.0.html</a>
+ On some systems, the complete text of the Apache 2.0 License may be found in <code>/usr/share/common-licenses/Apache-2.0</code>.</p>
+
+<h2 id="CHEF">CHEF</h2>
-<p>On Debian systems, the complete text of the Apache 2.0 License can be found in <code>/usr/share/common-licenses/Apache-2.0</code>.</p>
+<p> Knife is distributed with Chef. <a href="http://wiki.opscode.com/display/chef/Home" data-bare-link="true">http://wiki.opscode.com/display/chef/Home</a></p>
<ol class='man-decor man-foot man foot'>
- <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
<li class='tc'>April 2011</li>
<li class='tr'>knife(1)</li>
</ol>
diff --git a/chef/distro/common/html/shef.1.html b/chef/distro/common/html/shef.1.html
new file mode 100644
index 0000000000..de2e106973
--- /dev/null
+++ b/chef/distro/common/html/shef.1.html
@@ -0,0 +1,283 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv='content-type' value='text/html;charset=utf8'>
+ <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
+ <title>shef(1) - Interactive Chef Console</title>
+ <style type='text/css' media='all'>
+ /* style: man */
+ body#manpage {margin:0}
+ .mp {max-width:100ex;padding:0 9ex 1ex 4ex}
+ .mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
+ .mp h2 {margin:10px 0 0 0}
+ .mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
+ .mp h3 {margin:0 0 0 4ex}
+ .mp dt {margin:0;clear:left}
+ .mp dt.flush {float:left;width:8ex}
+ .mp dd {margin:0 0 0 9ex}
+ .mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
+ .mp pre {margin-bottom:20px}
+ .mp pre+h2,.mp pre+h3 {margin-top:22px}
+ .mp h2+pre,.mp h3+pre {margin-top:5px}
+ .mp img {display:block;margin:auto}
+ .mp h1.man-title {display:none}
+ .mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
+ .mp h2 {font-size:16px;line-height:1.25}
+ .mp h1 {font-size:20px;line-height:2}
+ .mp {text-align:justify;background:#fff}
+ .mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
+ .mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
+ .mp u {text-decoration:underline}
+ .mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
+ .mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
+ .mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
+ .mp b.man-ref {font-weight:normal;color:#434241}
+ .mp pre {padding:0 4ex}
+ .mp pre code {font-weight:normal;color:#434241}
+ .mp h2+pre,h3+pre {padding-left:0}
+ ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
+ ol.man-decor {width:100%}
+ ol.man-decor li.tl {text-align:left}
+ ol.man-decor li.tc {text-align:center;letter-spacing:4px}
+ ol.man-decor li.tr {text-align:right;float:right}
+ </style>
+ <style type='text/css' media='all'>
+ /* style: toc */
+ .man-navigation {display:block !important;position:fixed;top:0;left:113ex;height:100%;width:100%;padding:48px 0 0 0;border-left:1px solid #dbdbdb;background:#eee}
+ .man-navigation a,.man-navigation a:hover,.man-navigation a:link,.man-navigation a:visited {display:block;margin:0;padding:5px 2px 5px 30px;color:#999;text-decoration:none}
+ .man-navigation a:hover {color:#111;text-decoration:underline}
+ </style>
+</head>
+<!--
+ The following styles are deprecated and will be removed at some point:
+ div#man, div#man ol.man, div#man ol.head, div#man ol.man.
+
+ The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
+ .man-navigation should be used instead.
+-->
+<body id='manpage'>
+ <div class='mp' id='man'>
+
+ <div class='man-navigation' style='display:none'>
+ <a href="#NAME">NAME</a>
+ <a href="#SYNOPSIS">SYNOPSIS</a>
+ <a href="#DESCRIPTION">DESCRIPTION</a>
+ <a href="#SYNTAX">SYNTAX</a>
+ <a href="#PRIMARY-MODE">PRIMARY MODE</a>
+ <a href="#RECIPE-MODE">RECIPE MODE</a>
+ <a href="#EXAMPLES">EXAMPLES</a>
+ <a href="#BUGS">BUGS</a>
+ <a href="#SEE-ALSO">SEE ALSO</a>
+ <a href="#AUTHOR">AUTHOR</a>
+ <a href="#DOCUMENTATION">DOCUMENTATION</a>
+ <a href="#CHEF">CHEF</a>
+ </div>
+
+ <ol class='man-decor man-head man head'>
+ <li class='tl'>shef(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>shef(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>shef</code> - <span class="man-whatis">Interactive Chef Console</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>shef</strong> [<em>named configuration</em>] <em>(options)</em></p>
+
+<dl>
+<dt><code>-S</code>, <code>--server CHEF_SERVER_URL</code></dt><dd>The chef server URL</dd>
+<dt><code>-z</code>, <code>--client</code></dt><dd>chef-client mode</dd>
+<dt><code>-c</code>, <code>--config CONFIG</code></dt><dd>The configuration file to use</dd>
+<dt><code>-j</code>, <code>--json-attributes JSON_ATTRIBS</code></dt><dd>Load attributes from a JSON file or URL</dd>
+<dt><code>-l</code>, <code>--log-level LOG_LEVEL</code></dt><dd>Set the logging level</dd>
+<dt><code>-s</code>, <code>--solo</code></dt><dd>chef-solo shef session</dd>
+<dt><code>-a</code>, <code>--standalone</code></dt><dd>standalone shef session</dd>
+<dt><code>-v</code>, <code>--version</code></dt><dd>Show chef version</dd>
+<dt><code>-h</code>, <code>--help</code></dt><dd>Show command options</dd>
+</dl>
+
+
+<p>When no --config option is specified, shef attempts to load a default configuration file:</p>
+
+<ul>
+<li>If a <em>named configuration</em> is given, shef will load ~/.chef/<em>named
+configuration</em>/shef.rb</li>
+<li>If no <em>named configuration</em> is given shef will load ~/.chef/shef.rb if it exists</li>
+<li>Shef falls back to loading /etc/chef/client.rb or /etc/chef/solo.rb if -z or
+-s options are given and no shef.rb can be found.</li>
+<li>The --config option takes precedence over implicit configuration
+paths.</li>
+</ul>
+
+
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p><code>shef</code> is an <span class="man-ref">irb<span class="s">(1)</span></span> (interactive ruby) session customized for Chef.
+<code>shef</code> serves two primary functions: it provides a means to
+interact with a Chef Server interactively using a convenient DSL; it
+allows you to define and run Chef recipes interactively.</p>
+
+<h2 id="SYNTAX">SYNTAX</h2>
+
+<p>Shef uses irb's subsession feature to provide multiple modes of
+interaction. In addition to the primary mode which is entered on start,
+<code>recipe</code> and <code>attributes</code> modes are available.</p>
+
+<h2 id="PRIMARY-MODE">PRIMARY MODE</h2>
+
+<p>The following commands are available in the primary
+session:</p>
+
+<dl>
+<dt class="flush"><code>help</code></dt><dd>Prints a list of available commands</dd>
+<dt class="flush"><code>version</code></dt><dd>Prints the Chef version</dd>
+<dt class="flush"><code>recipe</code></dt><dd>Switches to <code>recipe</code> mode</dd>
+<dt><code>attributes</code></dt><dd>Switches to <code>attributes</code> mode</dd>
+<dt><code>run_chef</code></dt><dd>Initiates a chef run</dd>
+<dt class="flush"><code>reset</code></dt><dd>reinitializes shef</dd>
+<dt><code>echo :on|:off</code></dt><dd>Turns irb's echo function on or off. Echo is <em>on</em> by default.</dd>
+<dt><code>tracing :on|:off</code></dt><dd>Turns irb's function tracing feature on or off. Tracing is extremely
+verbose and expected to be of interest primarily to developers.</dd>
+<dt class="flush"><code>node</code></dt><dd>Returns the <em>node</em> object for the current host. See <span class="man-ref">knife-node<span class="s">(1)</span></span>
+for more information about nodes.</dd>
+<dt class="flush"><code>ohai</code></dt><dd>Prints the attributes of <em>node</em></dd>
+</dl>
+
+
+<p>In addition to these commands, shef provides a DSL for accessing data on
+the Chef Server. When working with remote data in shef, you chain method
+calls in the form <em>object type</em>.<em>operation</em>, where <em>object type</em> is in
+plural form. The following object types are available:</p>
+
+<ul>
+<li><code>nodes</code></li>
+<li><code>roles</code></li>
+<li><code>data_bags</code></li>
+<li><code>clients</code></li>
+<li><code>cookbooks</code></li>
+</ul>
+
+
+<p>For each <em>object type</em> the following operations are available:</p>
+
+<dl>
+<dt><em>object type</em>.all(<em>&amp;block</em>)</dt><dd>Loads all items from the server. If the optional code <em>block</em> is
+given, each item will be passed to the block and the results
+returned, similar to ruby's <code>Enumerable#map</code> method.</dd>
+<dt><em>object type</em>.show(<em>object name</em>)</dt><dd><p>Aliased as <em>object type</em>.load</p>
+
+<p>Loads the singular item identified by <em>object name</em>.</p></dd>
+<dt><em>object type</em>.search(<em>query</em>, <em>&amp;block</em>)</dt><dd><p>Aliased as <em>object type</em>.find</p>
+
+<p>Runs a search against the server and returns the matching items. If
+the optional code <em>block</em> is given each item will be passed to the
+block and the results returned.</p>
+
+<p>The <em>query</em> may be a Solr/Lucene format query given as a String, or
+a Hash of conditions. If a Hash is given, the options will be ANDed
+together. To join conditions with OR, use negative queries, or any
+advanced search syntax, you must provide give the query in String
+form.</p></dd>
+<dt><em>object type</em>.transform(:all|<em>query</em>, <em>&amp;block</em>)</dt><dd><p>Aliased as <em>object type</em>.bulk_edit</p>
+
+<p>Bulk edit objects by processing them with the (required) code <em>block</em>.
+You can edit all objects of the given type by passing the Symbol
+<code>:all</code> as the argument, or only a subset by passing a <em>query</em> as the
+argument. The <em>query</em> is evaluated in the same way as with
+<strong>search</strong>.</p>
+
+<p>The return value of the code <em>block</em> is used to alter the behavior
+of <code>transform</code>. If the value returned from the block is <code>nil</code> or
+<code>false</code>, the object will not be saved. Otherwise, the object is
+saved after being passed to the block. This behavior can be
+exploited to create a dry run to test a data transformation.</p></dd>
+</dl>
+
+
+<h2 id="RECIPE-MODE">RECIPE MODE</h2>
+
+<p>Recipe mode implements Chef's recipe DSL. Exhaustively documenting this
+DSL is outside the scope of this document. See the following pages in
+the Chef documentation for more information:</p>
+
+<ul>
+<li><a href="http://wiki.opscode.com/display/chef/Resources" data-bare-link="true">http://wiki.opscode.com/display/chef/Resources</a></li>
+<li><a href="http://wiki.opscode.com/display/chef/Recipes" data-bare-link="true">http://wiki.opscode.com/display/chef/Recipes</a></li>
+</ul>
+
+
+<p>Once you have defined resources in the recipe, you can trigger a
+convergence run via <code>run_chef</code></p>
+
+<h2 id="EXAMPLES">EXAMPLES</h2>
+
+<ul>
+<li><p>A "Hello World" interactive recipe</p>
+
+<p>chef > recipe<br />
+chef:recipe > echo :off<br />
+chef:recipe > file "/tmp/hello_world"<br />
+chef:recipe > run_chef<br />
+[Sat, 09 Apr 2011 08:56:56 -0700] INFO: Processing file[/tmp/hello_world] action create ((irb#1) line 2)<br />
+[Sat, 09 Apr 2011 08:56:56 -0700] INFO: file[/tmp/hello_world] created file /tmp/hello_world<br />
+chef:recipe > pp ls '/tmp'<br />
+[".",<br />
+"..",<br />
+"hello_world"]</p></li>
+<li><p>Search for <em>nodes</em> by role, and print their IP addresses</p>
+
+<p>chef > nodes.find(:roles => 'monitoring-server') {|n| n[:ipaddress] }<br />
+=> ["10.254.199.5"]</p></li>
+<li><p>Remove the role <em>obsolete</em> from every node in the system</p>
+
+<p>chef > nodes.transform(:all) {|n| n.run_list.delete('role[obsolete]') }<br />
+ => [node[chef098b2.opschef.com], node[ree-woot], node[graphite-dev], node[fluke.localdomain], node[ghost.local], node[kallistec]]</p></li>
+</ul>
+
+
+<h2 id="BUGS">BUGS</h2>
+
+<p>The name <code>shef</code> is clever in print but is confusing when spoken aloud.
+Pronouncing <code>shef</code> as <code>chef console</code> is an imperfect workaround.</p>
+
+<p><code>shef</code> often does not perfectly replicate the context in which
+<span class="man-ref">chef-client<span class="s">(8)</span></span> configures a host, which may lead to discrepancies in
+observed behavior.</p>
+
+<p><code>shef</code> has to duplicate much code from chef-client's internal libraries
+and may become out of sync with the behavior of those libraries.</p>
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p> <span class="man-ref">chef-client<span class="s">(8)</span></span> <span class="man-ref">knife<span class="s">(1)</span></span>
+ <a href="http://wiki.opscode.com/display/chef/Shef" data-bare-link="true">http://wiki.opscode.com/display/chef/Shef</a></p>
+
+<h2 id="AUTHOR">AUTHOR</h2>
+
+<p> Chef was written by Adam Jacob <a href="&#x6d;&#97;&#105;&#x6c;&#x74;&#111;&#x3a;&#x61;&#100;&#x61;&#109;&#64;&#111;&#112;&#x73;&#99;&#111;&#x64;&#x65;&#x2e;&#99;&#111;&#x6d;" data-bare-link="true">&#97;&#x64;&#97;&#x6d;&#x40;&#x6f;&#112;&#x73;&#99;&#x6f;&#x64;&#x65;&#46;&#x63;&#111;&#x6d;</a> with many
+ contributions from the community. Shef was written by Daniel DeLeo.</p>
+
+<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
+
+<p> This manual page was written by Daniel DeLeo <a href="&#109;&#x61;&#105;&#108;&#116;&#111;&#x3a;&#100;&#97;&#110;&#64;&#x6f;&#112;&#115;&#99;&#111;&#100;&#101;&#x2e;&#x63;&#x6f;&#109;" data-bare-link="true">&#100;&#x61;&#x6e;&#x40;&#111;&#x70;&#x73;&#x63;&#x6f;&#x64;&#101;&#x2e;&#x63;&#111;&#x6d;</a>.
+ Permission is granted to copy, distribute and / or modify this
+ document under the terms of the Apache 2.0 License.</p>
+
+<h2 id="CHEF">CHEF</h2>
+
+<p> Shef is distributed with Chef. <a href="http://wiki.opscode.com/display/chef/Home" data-bare-link="true">http://wiki.opscode.com/display/chef/Home</a></p>
+
+
+ <ol class='man-decor man-foot man foot'>
+ <li class='tl'>Chef 0.10.0.beta.9</li>
+ <li class='tc'>April 2011</li>
+ <li class='tr'>shef(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/man/man1/knife-bootstrap.1 b/chef/distro/common/man/man1/knife-bootstrap.1
index 753ae8bfa7..be70b8addc 100644
--- a/chef/distro/common/man/man1/knife-bootstrap.1
+++ b/chef/distro/common/man/man1/knife-bootstrap.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-BOOTRAP" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-BOOTRAP" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
\fBknife\-bootrap\fR \- Install Chef Client on a remote host
@@ -53,8 +53,8 @@ Execute the bootstrap via sudo
\fB\-d\fR, \fB\-\-distro DISTRO\fR
Bootstrap a distro using a template
.
-.P
-Performs a Chef Bootstrap on the target node\. The goal of the bootstrap is to get Chef installed on the target system so it can run Chef Client with a Chef Server\. The main assumption is a baseline OS installation exists\. This sub\-command is used internally by some cloud computing server create commands and the others will be migrated in a future version of Chef\.
+.SH "DESCRIPTION"
+Performs a Chef Bootstrap on the target node\. The goal of the bootstrap is to get Chef installed on the target system so it can run Chef Client with a Chef Server\. The main assumption is a baseline OS installation exists\. This sub\-command is used internally by some cloud computing plugins\.
.
.P
The bootstrap sub\-command supports supplying a template to perform the bootstrap steps\. If the distro is not specified (via \fB\-d\fR or \fB\-\-distro\fR option), an Ubuntu 10\.04 host bootstrapped with RubyGems is assumed\. The \fBDISTRO\fR value corresponds to the base filename of the template, in other words \fBDISTRO\fR\.erb\. A template file can be specified with the \fB\-\-template\-file\fR option in which case the \fBDISTRO\fR is not used\. The sub\-command looks in the following locations for the template to use:
@@ -71,7 +71,7 @@ The bootstrap sub\-command supports supplying a template to perform the bootstra
.IP "" 0
.
.P
-The default bootstrap templates are scripts that get copied to the target node (FQDN)\. As of Chef 0\.9\.8, the following distros are supported:
+The default bootstrap templates are scripts that get copied to the target node (FQDN)\. The following distros are supported:
.
.IP "\(bu" 4
centos5\-gems
@@ -124,6 +124,58 @@ Have run Chef with its default run list if one is specfied\.
.P
Additional custom bootstrap templates can be created and stored in \fB\.chef/bootstrap/DISTRO\.erb\fR, replacing \fBDISTRO\fR with the value passed with the \fB\-d\fR or \fB\-\-distro\fR option\. See \fBEXAMPLES\fR for more information\.
.
+.SH "EXAMPLES"
+Setting up a custom bootstrap is fairly straightforward\. Create a \fB\.chef/bootstrap\fR directory in your Chef Repository or in \fB$HOME/\.chef/bootstrap\fR\. Then create the ERB template file\.
+.
+.IP "" 4
+.
+.nf
+
+mkdir ~/\.chef/bootstrap
+vi ~/\.chef/bootstrap/debian5\.0\-apt\.erb
+.
+.fi
+.
+.IP "" 0
+.
+.P
+For example, to create a new bootstrap template that should be used when setting up a new Debian node\. Edit the template to run the commands, set up the validation certificate and the client configuration file, and finally to run chef\-client on completion\. The bootstrap template can be called with:
+.
+.IP "" 4
+.
+.nf
+
+knife bootstrap mynode\.example\.com \-\-template\-file ~/\.chef/bootstrap/debian5\.0\-apt\.erb
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Or,
+.
+.IP "" 4
+.
+.nf
+
+knife bootstrap mynode\.example\.com \-\-distro debian5\.0\-apt
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The \fB\-\-distro\fR parameter will automatically look in the \fB~/\.chef/bootstrap\fR directory for a file named \fBdebian5\.0\-apt\.erb\fR\.
+.
+.P
+Templates provided by the Chef installation are located in \fBBASEDIR/lib/chef/knife/bootstrap/*\.erb\fR, where \fIBASEDIR\fR is the location where the package or Gem installed the Chef client libraries\.
+.
+.SH "BUGS"
+\fBknife bootstrap\fR is not capable of bootstrapping multiple hosts in parallel\.
+.
+.P
+The bootstrap script is passed as an argument to sh(1) on the remote system, so sensitive information contained in the script will be visible to other users via the process list using tools such as ps(1)\.
+.
.SH "SEE ALSO"
\fBknife\-ssh\fR(1)
.
diff --git a/chef/distro/common/man/man1/knife-client.1 b/chef/distro/common/man/man1/knife-client.1
index d217ec3312..b4a1927e61 100644
--- a/chef/distro/common/man/man1/knife-client.1
+++ b/chef/distro/common/man/man1/knife-client.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-CLIENT" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-CLIENT" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
\fBknife\-client\fR \- Manage Chef API Clients
@@ -9,16 +9,8 @@
.SH "SYNOPSIS"
\fBknife\fR \fBclient\fR \fIsub\-command\fR \fI(options)\fR
.
-.SH "DESCRIPTION"
-Clients are identities used for communication with the Chef Server API, roughly equivalent to user accounts on the Chef Server, except that clients only communicate with the Chef Server API and are authenticated via request signatures\.
-.
-.P
-In the typical case, there will be one client object on the server for each node, and the corresponding client and node will have identical names\.
-.
-.P
-In the Chef authorization model, there is one special client, the "validator", which is authorized to create new non\-administrative clients but has minimal privileges otherwise\. This identity is used as a sort of "guest account" to create a client identity when initially setting up a host for management with Chef\.
-.
-.SH "CLIENT SUB\-COMMANDS"
+.SH "SUB\-COMMANDS"
+Client subcommands follow a basic create, read, update, delete (CRUD) pattern\. The Following subcommands are available:
.
.SH "BULK DELETE"
\fBknife client bulk delete\fR \fIregex\fR \fI(options)\fR
@@ -85,6 +77,15 @@ Show only one attribute
.P
Show a client\. Output format is determined by the \-\-format option\.
.
+.SH "DESCRIPTION"
+Clients are identities used for communication with the Chef Server API, roughly equivalent to user accounts on the Chef Server, except that clients only communicate with the Chef Server API and are authenticated via request signatures\.
+.
+.P
+In the typical case, there will be one client object on the server for each node, and the corresponding client and node will have identical names\.
+.
+.P
+In the Chef authorization model, there is one special client, the "validator", which is authorized to create new non\-administrative clients but has minimal privileges otherwise\. This identity is used as a sort of "guest account" to create a client identity when initially setting up a host for management with Chef\.
+.
.SH "SEE ALSO"
\fBknife\-node\fR(1)
.
diff --git a/chef/distro/common/man/man1/knife-configure.1 b/chef/distro/common/man/man1/knife-configure.1
index 202ca02c23..9d351fade2 100644
--- a/chef/distro/common/man/man1/knife-configure.1
+++ b/chef/distro/common/man/man1/knife-configure.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-CONFIGURE" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-CONFIGURE" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
\fBknife\-configure\fR \- Generate configuration files for knife or Chef Client
diff --git a/chef/distro/common/man/man1/knife-cookbook-site.1 b/chef/distro/common/man/man1/knife-cookbook-site.1
index c3c5fd34ab..d1d220efff 100644
--- a/chef/distro/common/man/man1/knife-cookbook-site.1
+++ b/chef/distro/common/man/man1/knife-cookbook-site.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-COOKBOOK\-SITE" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-COOKBOOK\-SITE" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
\fBknife\-cookbook\-site\fR \- Install and update open source cookbooks
@@ -10,10 +10,43 @@
\fBknife\fR \fBcookbook site\fR \fIsub\-command\fR \fI(options)\fR
.
.SH "COOKBOOK SITE SUB\-COMMANDS"
-The following sub\-commands are still in the context of cookbooks, but they make use of Opscode\'s Cookbook Community site, \fIhttp://cookbooks\.opscode\.com/\fR\. That site has an API, and these sub\-commands utilize that API, rather than the Chef Server API\.
+\fBknife cookbook site\fR provides the following subcommands:
+.
+.SH "INSTALL"
+\fBcookbook site install COOKBOOK [VERSION]\fR \fI(options)\fR
+.
+.TP
+\fB\-d\fR, \fB\-\-dependencies\fR
+Grab dependencies automatically
+.
+.P
+Uses git(1) version control in conjunction with the cookbook site to install community contributed cookbooks to your local cookbook repository\. Running \fBknife cookbook site install\fR does the following:
+.
+.IP "1." 4
+A new "pristine copy" branch is created in git for tracking the upstream;
+.
+.IP "2." 4
+All existing cookbooks are removed from the branch;
+.
+.IP "3." 4
+The cookbook is downloaded from the cookbook site in tarball form;
+.
+.IP "4." 4
+The downloaded cookbook is untarred, and its contents commited via git;
+.
+.IP "5." 4
+The pristine copy branch is merged into the master branch\.
+.
+.IP "" 0
+.
+.P
+By installing cookbook with this process, you can locally modify the upstream cookbook in your master branch ant let git maintain your changes as a separate patch\. When an updated upstream version becomes available, you will be able to merge the upstream changes while maintaining your local modifications\.
.
.P
-\fBcookbook site download COOKBOOK [VERSION]\fR \fI(options)\fR
+If \fI\-d\fR is specified, the process is applied recursively to all the cookbooks \fICOOKBOOK\fR depends on (via metadata \fIdependencies\fR)\.
+.
+.SH "DOWNLOAD"
+\fBknife cookbook site download COOKBOOK [VERSION]\fR \fI(options)\fR
.
.TP
\fB\-f\fR, \fB\-\-file FILE\fR
@@ -22,8 +55,8 @@ The filename to write to
.P
Downloads a specific cookbook from the Community site, optionally specifying a certain version\.
.
-.P
-\fBcookbook site list\fR \fI(options)\fR
+.SH "LIST"
+\fBknife cookbook site list\fR \fI(options)\fR
.
.TP
\fB\-w\fR, \fB\-\-with\-uri\fR
@@ -32,14 +65,14 @@ Show corresponding URIs
.P
Lists available cookbooks from the Community site\.
.
-.P
-\fBcookbook site search QUERY\fR \fI(options)\fR
+.SH "SEARCH"
+\fBknife cookbook site search QUERY\fR \fI(options)\fR
.
.P
-Searches the Community site with the specified query\.
+Searches for available cookbooks matching the specified query\.
.
-.P
-\fBcookbook site share COOKBOOK CATEGORY\fR \fI(options)\fR
+.SH "SHARE"
+\fBknife cookbook site share COOKBOOK CATEGORY\fR \fI(options)\fR
.
.TP
\fB\-k\fR, \fB\-\-key KEY\fR
@@ -54,32 +87,41 @@ API Client Username
A colon\-separated path to look for cookbooks in
.
.P
-Uploads the specified cookbook using the given category to the Opscode cookbooks site\. Requires a login user and certificate for the Opscode Cookbooks site\. See \fBEXAMPLES\fR for usage if the Opscode user and certificate pair are not used for authenticating with the Chef Server\. In other words, if the Chef Server is not the Opscode Platform\.
+Uploads the specified cookbook using the given category to the Opscode cookbooks site\. Requires a login user and certificate for the Opscode Cookbooks site\. By default, knife will use the username and API key you\'ve configured in your configuration file; otherwise you must explicitly set these values on the command line or use an alternate configuration file\.
.
-.P
-\fBcookbook site unshare COOKBOOK\fR
+.SH "UNSHARE"
+\fBknife cookbook site unshare COOKBOOK\fR
.
.P
Stops sharing the specified cookbook on the Opscode cookbooks site\.
.
-.P
-\fBcookbook site show COOKBOOK [VERSION]\fR \fI(options)\fR
+.SH "SHOW"
+\fBknife cookbook site show COOKBOOK [VERSION]\fR \fI(options)\fR
.
.P
Shows information from the site about a particular cookbook\.
.
+.SH "DESCRIPTION"
+The cookbook site, \fIhttp://community\.opscode\.com/\fR, is a cookbook distribution service operated by Opscode\. This service provides users with a central location to publish cookbooks for sharing with other community members\.
+.
.P
-\fBcookbook site vendor COOKBOOK [VERSION]\fR \fI(options)\fR
+\fBknife cookbook site\fR commands provide an interface to the cookbook site\'s HTTP API\. For commands that read data from the API, no account is required\. In order to upload cookbooks using the \fBknife cookbook site share\fR command, you must create an account on the cookbook site and configure your credentials via command line option or in your knife configuration file\.
.
-.TP
-\fB\-d\fR, \fB\-\-dependencies\fR
-Grab dependencies automatically
+.SH "EXAMPLES"
+Uploading cookbooks to the Opscode cookbooks site:
.
-.P
-Uses \fBgit\fR version control in conjunction with the cookbook site to download upstream cookbooks\. A new vendor branch is created in git, the cookbook downloaded from the site and untarred, then the master branch is merged\. This allows the user to track upstream changes to cookbooks while merging in customizations\. If \fI\-d\fR is specified, all the cookbooks it depends on (via metadata \fIdependencies\fR) are downloaded and untarred as well, each using their own vendor branch\.
+.IP "" 4
+.
+.nf
+
+knife cookbook site share example Other \-k ~/\.chef/USERNAME\.pem \-u USERNAME
+.
+.fi
+.
+.IP "" 0
.
.SH "SEE ALSO"
-\fBknife\-environment\fR(1)
+\fBknife\-cookbook(1)\fR \fIhttp://community\.opscode\.com/cookbooks\fR
.
.SH "AUTHOR"
Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
diff --git a/chef/distro/common/man/man1/knife-cookbook.1 b/chef/distro/common/man/man1/knife-cookbook.1
index 08c1dd35da..475a773ec7 100644
--- a/chef/distro/common/man/man1/knife-cookbook.1
+++ b/chef/distro/common/man/man1/knife-cookbook.1
@@ -1,242 +1,320 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-COOKBOOK" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-COOKBOOK" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
-\fBknife\-cookbook\fR \- Upload and manage Chef cookbooks
+\fBknife\-cookbook\fR \- upload and manage chef cookbooks
.
.SH "SYNOPSIS"
\fBknife\fR \fBcookbook\fR \fIsub\-command\fR \fI(options)\fR
.
-.SH "COOKBOOK SUB\-COMMANDS"
-Cookbooks are the fundamental unit of distribution in Chef\. They encapsulate all recipes of resources and assets used to configure a particular aspect of the infrastructure\. The following sub\-commands can be used to manipulate the cookbooks stored on the Chef Server\.
+.SH "SUB\-COMMANDS"
+\fBknife cookbook\fR supports the following sub commands:
.
-.P
-\fBcookbook bulk delete REGEX\fR \fI(options)\fR
+.SH "LIST"
+\fBknife cookbook list\fR \fI(options)\fR
.
.TP
-\fB\-p\fR, \fB\-\-purge\fR
-Purge files from backing store\. This will disable any cookbook that contains any of the same files as the cookbook being purged\.
+\fB\-a\fR, \fB\-\-all\fR
+show all versions of a cookbook instead of just the most recent
.
-.P
-Delete cookbooks on the Chef Server based on a regular expression\. The regular expression (\fIREGEX\fR) should be in quotes, not in //\'s\.
+.TP
+\fB\-w\fR, \fB\-\-with\-uri\fR
+show corresponding uris
.
.P
-\fBcookbook create COOKBOOK\fR \fI(options)\fR
-.
-.TP
-\fB\-o\fR, \fB\-\-cookbook\-path PATH\fR
-The directory where the cookbook will be created
+Lists the cookbooks available on the Chef server\.
.
-.TP
-\fB\-r\fR, \fB\-\-readme\-format FORMAT\fR
-Format of the README file
+.SH "SHOW"
+\fBknife cookbook show cookbook [version] [part] [filename]\fR \fI(options)\fR
.
.TP
-\fB\-C\fR, \fB\-\-copyright COPYRIGHT\fR
-Name of Copyright holder
+\fB\-f\fR, \fB\-\-fqdn fqdn\fR
+the fqdn of the host to see the file for
.
.TP
-\fB\-I\fR, \fB\-\-license LICENSE\fR
-License for cookbook, apachev2 or none
+\fB\-p\fR, \fB\-\-platform platform\fR
+the platform to see the file for
.
.TP
-\fB\-E\fR, \fB\-\-email EMAIL\fR
-Email address of cookbook maintainer
+\fB\-v\fR, \fB\-\-platform\-version version\fR
+the platform version to see the file for
.
.P
-This is a helper command that creates a new cookbook directory in the \fBcookbook_path\fR\. The following directories and files are created for the named cookbook\.
-.
-.IP "\(bu" 4
-COOKBOOK/attributes
+show a particular part of a \fIcookbook\fR for the specified \fIversion\fR\. \fIpart\fR can be one of:
.
.IP "\(bu" 4
-COOKBOOK/definitions
-.
-.IP "\(bu" 4
-COOKBOOK/files/default
+\fIattributes\fR
.
.IP "\(bu" 4
-COOKBOOK/libraries
+\fIdefinitions\fR
.
.IP "\(bu" 4
-COOKBOOK/metadata\.rb
+\fIfiles\fR
.
.IP "\(bu" 4
-COOKBOOK/providers
+\fIlibraries\fR
.
.IP "\(bu" 4
-COOKBOOK/README\.rdoc
+\fIproviders\fR
.
.IP "\(bu" 4
-COOKBOOK/recipes/default\.rb
+\fIrecipes\fR
.
.IP "\(bu" 4
-COOKBOOK/resources
+\fIresources\fR
.
.IP "\(bu" 4
-COOKBOOK/templates/default
+\fItemplates\fR
.
.IP "" 0
.
-.P
-Supported README formats are \'rdoc\' (default), \'md\', \'mkd\', \'txt\'\. The README file will be written with the specified extension and a set of helpful starting headers\.
-.
-.P
-Specify \fB\-C\fR or \fB\-\-copyright\fR with the name of the copyright holder as your name or your company/organization name in a quoted string\. If this value is not specified an all\-caps string \fBYOUR_COMPANY_NAME\fR is used which can be easily changed with find/replace\.
-.
-.P
-Specify \fB\-I\fR or \fB\-\-license\fR with the license that the cookbook is distributed under for sharing with other people or posting to the Opscode Cookbooks site\. Be aware of the licenses of files you put inside the cookbook and follow any restrictions they describe\. When using \fBnone\fR (default) or \fBapachev2\fR, comment header text and metadata file are pre\-filled\. The \fBnone\fR license will be treated as non\-redistributable\.
-.
-.P
-Specify \fB\-E\fR or \fB\-\-email\fR with the email address of the cookbook\'s maintainer\. If this value is not specified, an all\-caps string \fBYOUR_EMAIL\fR is used which can easily be changed with find/replace\.
-.
-.P
-The cookbook copyright, license and email settings can be filled in the \fBknife\.rb\fR, for example with default values:
+.SH "UPLOAD"
+\fBknife cookbook upload [cookbooks\.\.\.]\fR \fI(options)\fR
.
-.IP "" 4
-.
-.nf
-
-cookbook_copyright "YOUR_COMPANY_NAME"
-cookbook_license "none"
-cookbook_email "YOUR_EMAIL"
-.
-.fi
+.TP
+\fB\-a\fR, \fB\-\-all\fR
+upload all cookbooks, rather than just a single cookbook
.
-.IP "" 0
+.TP
+\fB\-o\fR, \fB\-\-cookbook\-path path:path\fR
+a colon\-separated path to look for cookbooks in
.
-.P
-\fBcookbook delete COOKBOOK [VERSION]\fR \fI(options)\fR
+.TP
+\fB\-E\fR, \fB\-\-environment ENVIRONMENT\fR
+An \fIENVIRONMENT\fR to apply the uploaded cookbooks to\. Specifying this option will cause knife to edit the \fIENVIRONMENT\fR to place a strict version constraint on the cookbook version(s) uploaded\.
.
.TP
-\fB\-a\fR, \fB\-\-all\fR
-Delete all versions
+\fB\-\-freeze\fR
+Sets the frozen flag on the uploaded cookbook(s) Any future attempt to modify the cookbook without changing the version number will return an error unless \-\-force is specified\.
.
.TP
-\fB\-p\fR, \fB\-\-purge\fR
-Purge files from backing store\. This will disable any cookbook that contains any of the same files as the cookbook being purged\.
+\fB\-\-force\fR
+Overrides the frozen flag on a cookbook, allowing you to overwrite a cookbook version that has previously been uploaded with the \-\-freeze option\.
.
.P
-Delete the specified \fIVERSION\fR of the named \fICOOKBOOK\fR\. If no version is specified, and only one version exists on the server, that version will be deleted\. If multiple versions are available on the server, you will be prompted for a version to delete\.
+Uploads one or more cookbooks from your local cookbook repository(ies) to the Chef Server\. Only files that don\'t yet exist on the server will be uploaded\.
.
-.P
-\fBcookbook download COOKBOOK [VERSION]\fR \fI(options)\fR
+.SH "DOWNLOAD"
+\fBknife cookbook download cookbook [version]\fR \fI(options)\fR
.
.TP
-\fB\-d\fR, \fB\-\-dir DOWNLOAD_DIRECTORY\fR
-The directory to download the cookbook into
+\fB\-d\fR, \fB\-\-dir download_directory\fR
+the directory to download the cookbook into
.
.TP
\fB\-f\fR, \fB\-\-force\fR
-Overwrite an existing directory with the download
+overwrite an existing directory with the download
.
.TP
-\fB\-N\fR, \fB\-\-latest\fR
-Download the latest version of the cookbook
+\fB\-n\fR, \fB\-\-latest\fR
+download the latest version of the cookbook
.
.P
-Download a cookbook from the Chef Server\. If no version is specified and only one version exists on the server, that version will be downloaded\. If no version is specified and multiple versions are available on the server, you will be prompted for a version to download\.
+download a cookbook from the chef server\. if no version is specified and only one version exists on the server, that version will be downloaded\. if no version is specified and multiple versions are available on the server, you will be prompted for a version to download\.
.
-.P
-\fBcookbook list\fR \fI(options)\fR
+.SH "DELETE"
+\fBknife cookbook delete cookbook [version]\fR \fI(options)\fR
.
.TP
-\fB\-w\fR, \fB\-\-with\-uri\fR
-Show corresponding URIs
+\fB\-a\fR, \fB\-\-all\fR
+delete all versions
.
-.P
-List all the cookbooks\.
+.TP
+\fB\-p\fR, \fB\-\-purge\fR
+purge files from backing store\. this will disable any cookbook that contains any of the same files as the cookbook being purged\.
.
.P
-\fBcookbook metadata COOKBOOK\fR \fI(options)\fR
+delete the specified \fIversion\fR of the named \fIcookbook\fR\. if no version is specified, and only one version exists on the server, that version will be deleted\. if multiple versions are available on the server, you will be prompted for a version to delete\.
.
-.TP
-\fB\-a\fR, \fB\-\-all\fR
-Generate metadata for all cookbooks, rather than just a single cookbook
+.SH "BULK DELETE"
+\fBknife cookbook bulk delete regex\fR \fI(options)\fR
.
.TP
-\fB\-o\fR, \fB\-\-cookbook\-path PATH:PATH\fR
-A colon\-separated path to look for cookbooks in
+\fB\-p\fR, \fB\-\-purge\fR
+purge files from backing store\. this will disable any cookbook that contains any of the same files as the cookbook being purged\.
.
.P
-Generate cookbook metadata for the named \fICOOKBOOK\fR\. The \fIPATH\fR used here specifies where the cookbooks directory is located and corresponds to the \fBcookbook_path\fR configuration option\.
+delete cookbooks on the chef server based on a regular expression\. the regular expression (\fIregex\fR) should be in quotes, not in //\'s\.
.
-.P
-\fBcookbook metadata from FILE\fR \fI(options)\fR
+.SH "COOKBOOK CREATE"
+\fBknife cookbook create cookbook\fR \fI(options)\fR
.
-.P
-Load the cookbook metadata from a specified file\.
+.TP
+\fB\-o\fR, \fB\-\-cookbook\-path path\fR
+the directory where the cookbook will be created
.
-.P
-\fBcookbook show COOKBOOK [VERSION] [PART] [FILENAME]\fR \fI(options)\fR
+.TP
+\fB\-r\fR, \fB\-\-readme\-format format\fR
+format of the readme file
.
.TP
-\fB\-f\fR, \fB\-\-fqdn FQDN\fR
-The FQDN of the host to see the file for
+\fB\-c\fR, \fB\-\-copyright copyright\fR
+name of copyright holder
.
.TP
-\fB\-p\fR, \fB\-\-platform PLATFORM\fR
-The platform to see the file for
+\fB\-i\fR, \fB\-\-license license\fR
+license for cookbook, apachev2 or none
.
.TP
-\fB\-V\fR, \fB\-\-platform\-version VERSION\fR
-The platform version to see the file for
+\fB\-e\fR, \fB\-\-email email\fR
+email address of cookbook maintainer
.
.P
-Show a particular part of a \fICOOKBOOK\fR for the specified \fIVERSION\fR\. \fIPART\fR can be one of:
+this is a helper command that creates a new cookbook directory in the \fBcookbook_path\fR\. the following directories and files are created for the named cookbook\.
.
.IP "\(bu" 4
-\fIattributes\fR
+cookbook/attributes
.
.IP "\(bu" 4
-\fIdefinitions\fR
+cookbook/definitions
.
.IP "\(bu" 4
-\fIfiles\fR
+cookbook/files/default
.
.IP "\(bu" 4
-\fIlibraries\fR
+cookbook/libraries
.
.IP "\(bu" 4
-\fIproviders\fR
+cookbook/metadata\.rb
.
.IP "\(bu" 4
-\fIrecipes\fR
+cookbook/providers
.
.IP "\(bu" 4
-\fIresources\fR
+cookbook/readme\.rdoc
.
.IP "\(bu" 4
-\fItemplates\fR
+cookbook/recipes/default\.rb
+.
+.IP "\(bu" 4
+cookbook/resources
+.
+.IP "\(bu" 4
+cookbook/templates/default
.
.IP "" 0
.
.P
-\fBcookbook test [COOKBOOKS\.\.\.]\fR \fI(options)\fR
+supported readme formats are \'rdoc\' (default), \'md\', \'mkd\', \'txt\'\. the readme file will be written with the specified extension and a set of helpful starting headers\.
+.
+.P
+specify \fB\-c\fR or \fB\-\-copyright\fR with the name of the copyright holder as your name or your company/organization name in a quoted string\. if this value is not specified an all\-caps string \fByour_company_name\fR is used which can be easily changed with find/replace\.
+.
+.P
+specify \fB\-i\fR or \fB\-\-license\fR with the license that the cookbook is distributed under for sharing with other people or posting to the opscode cookbooks site\. be aware of the licenses of files you put inside the cookbook and follow any restrictions they describe\. when using \fBnone\fR (default) or \fBapachev2\fR, comment header text and metadata file are pre\-filled\. the \fBnone\fR license will be treated as non\-redistributable\.
+.
+.P
+specify \fB\-e\fR or \fB\-\-email\fR with the email address of the cookbook\'s maintainer\. if this value is not specified, an all\-caps string \fByour_email\fR is used which can easily be changed with find/replace\.
+.
+.P
+the cookbook copyright, license and email settings can be filled in the \fBknife\.rb\fR, for example with default values:
+.
+.IP "" 4
+.
+.nf
+
+cookbook_copyright "your_company_name"
+cookbook_license "none"
+cookbook_email "your_email"
+.
+.fi
+.
+.IP "" 0
+.
+.SH "METADATA"
+\fBknife cookbook metadata cookbook\fR \fI(options)\fR
.
.TP
\fB\-a\fR, \fB\-\-all\fR
-Test all cookbooks, rather than just a single cookbook
+generate metadata for all cookbooks, rather than just a single cookbook
.
.TP
-\fB\-o\fR, \fB\-\-cookbook\-path PATH:PATH\fR
-A colon\-separated path to look for cookbooks in
+\fB\-o\fR, \fB\-\-cookbook\-path path:path\fR
+a colon\-separated path to look for cookbooks in
.
.P
-Test the specified cookbooks for syntax errors\. This uses the built\-in Ruby syntax checking option for files in the cookbook ending in \fB\.rb\fR, and the ERB syntax check for files ending in \fB\.erb\fR (templates)\.
+generate cookbook metadata for the named \fIcookbook\fR\. the \fIpath\fR used here specifies where the cookbooks directory is located and corresponds to the \fBcookbook_path\fR configuration option\.
+.
+.SH "METADATA FROM FILE"
+\fBknife cookbook metadata from file\fR \fI(options)\fR
.
.P
-\fBcookbook upload [COOKBOOKS\.\.\.]\fR \fI(options)\fR
+load the cookbook metadata from a specified file\.
+.
+.SH "TEST"
+\fBknife cookbook test [cookbooks\.\.\.]\fR \fI(options)\fR
.
.TP
\fB\-a\fR, \fB\-\-all\fR
-Upload all cookbooks, rather than just a single cookbook
+test all cookbooks, rather than just a single cookbook
.
.TP
-\fB\-o\fR, \fB\-\-cookbook\-path PATH:PATH\fR
-A colon\-separated path to look for cookbooks in
+\fB\-o\fR, \fB\-\-cookbook\-path path:path\fR
+a colon\-separated path to look for cookbooks in
.
.P
-Uploads the specified cookbooks to the Chef Server\. The actual upload executes a number of commands, most of which occur on the local machine\. The cookbook is staged in a temporary location\. Then the \fBcookbook_path\fR (or \fB\-o PATH\fR) is processed to search for the named cookbook, and each occurance is copied in the order specified\. A syntax check is performed a la \fBcookbook test\fR, above\. The metadata is generated, a la \fBcookbook metadata\fR\. A gzip(1)\'ed, tar(1) file is created, and is uploaded to the server\.
+test the specified cookbooks for syntax errors\. this uses the built\-in ruby syntax checking option for files in the cookbook ending in \fB\.rb\fR, and the erb syntax check for files ending in \fB\.erb\fR (templates)\.
+.
+.SH "RECIPE LIST"
+\fBknife recipe list [PATTERN]\fR
+.
+.P
+List available recipes from the server\. Specify \fIPATTERN\fR as a regular expression to limit the results\.
+.
+.SH "DESCRIPTION"
+Cookbooks are the fundamental unit of distribution in Chef\. They encapsulate all recipes of resources and assets used to configure a particular aspect of the infrastructure\. The following sub\-commands can be used to manipulate the cookbooks stored on the Chef Server\.
+.
+.P
+On disk, cookbooks are directories with a defined structure\. The following directories may appear within a cookbook:
+.
+.TP
+COOKBOOK/attributes/
+Ruby files that define default parameters to be used in recipes
+.
+.TP
+COOKBOOK/definitions/
+Ruby files that contain \fIresource definitions\fR
+.
+.TP
+COOKBOOK/files/SPECIFICITY
+Files of arbitrary type\. These files may be downloaded by chef\-client(8) when configuring a host\.
+.
+.TP
+COOKBOOK/libraries/
+Ruby files that contain library code needed for recipes
+.
+.TP
+COOKBOOK/providers/
+Ruby files that contain Lightweight Provider definitions
+.
+.TP
+COOKBOOK/recipes/
+Ruby files that use Chef\'s recipe DSL to describe the desired configuration of a system
+.
+.TP
+COOKBOOK/resources/
+Ruby files that contain Lightweight Resource definitions
+.
+.TP
+COOKBOOK/templates/SPECIFICITY
+ERuby (ERb) template files\. These are referenced by \fIrecipes\fR and evaluated to dynamically generate configuration files\.
+.
+.P
+\fBSPECIFICITY\fR is a feature of \fIfiles\fR and \fItemplates\fR that allow you to specify alternate files to be used on a specific OS platform or host\. The default specificity setting is \fIdefault\fR, that is files in \fBCOOKBOOK/files/default\fR will be used when a more specific copy is not available\. Further documentation for this feature is available on the Chef wiki: \fIhttp://wiki\.opscode\.com/display/chef/File+Distribution#FileDistribution\-FileSpecificity\fR
+.
+.P
+Cookbooks also contain a metadata file that defines various properties of the cookbook\. The most important of these are the \fIversion\fR and the \fIdependencies\fR\. The \fIversion\fR is used in combination with environments to select which copy of a given cookbook is distributed to a node\. The \fIdependencies\fR are used by the server to determine which additional cookbooks must be distributed to a given host when it requires a cookbook\.
+.
+.SH "SEE ALSO"
+\fBknife\-environment(1)\fR \fBknife\-cookbook\-site(1)\fR \fIhttp://wiki\.opscode\.com/display/chef/Cookbooks\fR \fIhttp://wiki\.opscode\.com/display/chef/Metadata\fR
+.
+.SH "AUTHOR"
+Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
+.
+.SH "DOCUMENTATION"
+This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
+.
+.SH "CHEF"
+Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
diff --git a/chef/distro/common/man/man1/knife-data-bag.1 b/chef/distro/common/man/man1/knife-data-bag.1
index 2b662cbfad..627acc712b 100644
--- a/chef/distro/common/man/man1/knife-data-bag.1
+++ b/chef/distro/common/man/man1/knife-data-bag.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-DATA\-BAG" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-DATA\-BAG" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
\fBknife\-data\-bag\fR \- Store arbitrary data on a Chef Server
diff --git a/chef/distro/common/man/man1/knife-environment.1 b/chef/distro/common/man/man1/knife-environment.1
index 33f42c367e..ab192f27ae 100644
--- a/chef/distro/common/man/man1/knife-environment.1
+++ b/chef/distro/common/man/man1/knife-environment.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-ENVIRONMENT" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-ENVIRONMENT" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
\fBknife\-environment\fR \- Define cookbook policies for the environments in your infrastructure
@@ -9,5 +9,170 @@
.SH "SYNOPSIS"
\fBknife\fR \fBenvironment\fR \fIsub\-command\fR \fI(options)\fR
.
-.SH "ENVIRONMENT SUBCOMMANDS"
+.SH "SUBCOMMANDS"
+Environment subcommands follow a basic create, read, update, delete (CRUD) pattern\. The following subcommands are available:
+.
+.SH "CREATE"
+\fBknife environment create\fR \fIenvironment\fR \fI(options)\fR
+.
+.TP
+\fB\-d\fR, \fB\-\-description DESCRIPTION\fR
+The value of the description field\.
+.
+.P
+Create a new environment object on the Chef Server\. The envrionment will be opened in the text editor for editing prior to creation if the \-n option is not present\.
+.
+.SH "DELETE"
+\fBknife environment delete\fR \fIenvironment\fR \fI(options)\fR
+.
+.P
+Destroy an environment on the Chef Server\. A prompt for confirmation will be displayed if the \-y options is not given\.
+.
+.SH "EDIT"
+\fBknife environment edit\fR \fIenvironment\fR \fI(options)\fR
+.
+.P
+Fetch \fIenvironment\fR and display it in the text editor for editing\. The environment will be saved to the Chef Server when the editing session exits\.
+.
+.SH "FROM FILE"
+\fBknife environment from file\fR \fIfile\fR \fI(options)\fR
+.
+.P
+Create or update an environment from the JSON or Ruby format \fIfile\fR\. See \fBformat\fR for the proper format of this file\.
+.
+.SH "LIST"
+\fBknife environment list\fR \fI(options)\fR * \fB\-w\fR, \fB\-\-with\-uri\fR:
+.
+.IP "" 4
+.
+.nf
+
+Show the resource URI for each environment
+.
+.fi
+.
+.IP "" 0
+.
+.SH "SHOW"
+\fBknife environment show\fR \fIenvironment\fR \fI(options)\fR
+.
+.SH "DESCRIPTION"
+Environments provide a means to apply policies to hosts in your infrastructure based on business function\. For example, you may have a separate copy of your infrastructure called "dev" that runs the latest version of your application and should use the newest versions of your cookbooks when configuring systems, and a production instance of your infrastructure where you wish to update code and cookbooks in a more controlled fashion\. In Chef, this function is implemented with \fIenvironments\fR\.
+.
+.P
+Environments contain two major components: a set of cookbook version constraints and environment attributes\.
+.
+.SH "SYNTAX"
+A cookbook version constraint is comprised of a \fIcookbook name\fR and a \fIversion constraint\fR\. The \fIcookbook name\fR is the name of a cookbook in your system, and the \fIversion constraint\fR is a String describing the version(s) of that cookbook allowed in the environment\. Only one \fIversion constraint\fR is supported for a given \fIcookbook name\fR\.
+.
+.P
+The exact syntax used to define a cookbook version constraint varies depending on whether you use the JSON format or the Ruby format\. In the JSON format, the cookbook version constraints for an environment are represented as a single JSON object, like this:
+.
+.IP "" 4
+.
+.nf
+
+{"apache2": ">= 1\.5\.0"}
+.
+.fi
+.
+.IP "" 0
+.
+.P
+In the Ruby format, the cookbook version contraints for an environment are represented as a Ruby Hash, like this:
+.
+.IP "" 4
+.
+.nf
+{"apache2" => ">= 1\.5\.0"}
+.
+.fi
+.
+.IP "" 0
+.
+.P
+A \fIversion number\fR is a String comprised of two or three digits separated by a dot (\.) character, or in other words, strings of the form "major\.minor" or "major\.minor\.patch"\. "1\.2" and "1\.2\.3" are examples of valid version numbers\. Version numbers containing more than three digits or alphabetic characters are not supported\.
+.
+.P
+A \fIversion constraint\fR String is composed of an \fIoperator\fR and a \fIversion number\fR\. The following operators are available:
+.
+.TP
+\fB= VERSION\fR
+Equality\. Only the exact version specified may be used\.
+.
+.TP
+\fB> VERSION\fR
+Greater than\. Only versions greater than \fBVERSION\fR may be used\.
+.
+.TP
+\fB>= VERSION\fR
+Greater than or equal to\. Only versions equal to VERSION or greater may be used\.
+.
+.TP
+\fB< VERSION\fR
+Less than\. Only versions less than VERSION may be used\.
+.
+.TP
+\fB<= VERSION\fR
+Less than or equal to\. Only versions lesser or equal to VERSION may be used\.
+.
+.TP
+\fB~> VERSION\fR
+Pessimistic greater than\. Depending on the number of components in the given VERSION, the constraint will be optimistic about future minor or patch revisions only\. For example, \fB~> 1\.1\fR will match any version less than \fB2\.0\fR and greater than or equal to \fB1\.1\.0\fR, whereas \fB~> 2\.0\.5\fR will match any version less than \fB2\.1\.0\fR and greater than or equal to \fB2\.0\.5\fR\.
+.
+.SH "FORMAT"
+The JSON format of an envioronment is as follows:
+.
+.IP "" 4
+.
+.nf
+
+{
+ "name": "dev",
+ "description": "The development environment",
+ "cookbook_versions": {
+ "couchdb": "= 11\.0\.0"
+ },
+ "json_class": "Chef::Environment",
+ "chef_type": "environment",
+ "default_attributes": {
+ "apache2": { "listen_ports": [ "80", "443" ] }
+ },
+ "override_attributes": {
+ "aws_s3_bucket": "production"
+ }
+}
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The Ruby format of an environment is as follows:
+.
+.IP "" 4
+.
+.nf
+
+name "dev"
+description "The development environment"
+cookbook_versions "couchdb" => "= 11\.0\.0"
+default_attributes "apache2" => { "listen_ports" => [ "80", "443" ] }
+override_attributes "aws_s3_bucket" => "production"
+.
+.fi
+.
+.IP "" 0
+.
+.SH "SEE ALSO"
+\fBknife\-node(1)\fR \fBknife\-cookbook(1)\fR \fBknife\-role(1)\fR \fIhttp://wiki\.opscode\.com/display/chef/Environments\fR \fIhttp://wiki\.opscode\.com/display/chef/Version+Constraints\fR
+.
+.SH "AUTHOR"
+Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
+.
+.SH "DOCUMENTATION"
+This manual page was written by Daniel DeLeo \fIdan@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
+.
+.SH "CHEF"
+Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
diff --git a/chef/distro/common/man/man1/knife-exec.1 b/chef/distro/common/man/man1/knife-exec.1
index 6c61086a94..574efd3a5c 100644
--- a/chef/distro/common/man/man1/knife-exec.1
+++ b/chef/distro/common/man/man1/knife-exec.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-EXEC" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-EXEC" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
\fBknife\-exec\fR \- Run user scripts using the Chef API DSL
@@ -9,5 +9,38 @@
.SH "SYNOPSIS"
\fBknife\fR \fBexec\fR \fI(options)\fR
.
-.SH "EXEC SUBCOMMAND"
-
+.TP
+\fB\-E\fR, \fB\-\-exec CODE\fR
+Provide a snippet of code to evaluate on the command line
+.
+.SH "DESCRIPTION"
+\fBknife exec\fR runs arbitrary ruby scripts in a context similar to that of the shef(1) DSL\. See the shef documentation for a description of the commands available\.
+.
+.SH "EXAMPLES"
+.
+.TP
+Make an API call against an arbitrary endpoint
+knife exec \-E \'api\.get("nodes/fluke\.localdomain/cookbooks")\'
+.
+.br
+=> list of cookbooks for the node \fIfluke\.localdomain\fR
+.
+.TP
+Remove the role \fIobsolete\fR from all nodes
+knife exec \-E \'nodes\.transform(:all){|n| n\.run_list\.delete("role[obsolete]")}\'
+.
+.TP
+Generate the expanded run list for hosts in the \fBwebserver\fR role
+knife exec \-E \'nodes\.find(:roles => "webserver") {|n| n\.expand!; n[:recipes]}\'
+.
+.SH "SEE ALSO"
+\fBshef(1)\fR
+.
+.SH "AUTHOR"
+Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
+.
+.SH "DOCUMENTATION"
+This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
+.
+.SH "CHEF"
+Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
diff --git a/chef/distro/common/man/man1/knife-index.1 b/chef/distro/common/man/man1/knife-index.1
index a2467b5272..c170c45053 100644
--- a/chef/distro/common/man/man1/knife-index.1
+++ b/chef/distro/common/man/man1/knife-index.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-INDEX" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-INDEX" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
\fBknife\-index\fR \- Rebuild the search index on a Chef Server
diff --git a/chef/distro/common/man/man1/knife-node.1 b/chef/distro/common/man/man1/knife-node.1
index 51c7413233..f76f870f46 100644
--- a/chef/distro/common/man/man1/knife-node.1
+++ b/chef/distro/common/man/man1/knife-node.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-NODE" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-NODE" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
\fBknife\-node\fR \- Manage the hosts in your infrastructure
@@ -19,6 +19,7 @@ When a host communicates with a Chef Server, it authenticates using its \fBnode_
By default \fBchef\-client\fR(8) will create a node using the FQDN of the host for the node name, though this may be overridden by configuration settings\.
.
.SH "NODE SUB\-COMMANDS"
+The following \fBnode\fR subcommands are available:
.
.SH "BULK DELETE"
\fBknife node bulk delete\fR \fIregex\fR \fI(options)\fR
diff --git a/chef/distro/common/man/man1/knife-recipe.1 b/chef/distro/common/man/man1/knife-recipe.1
deleted file mode 100644
index a89c570072..0000000000
--- a/chef/distro/common/man/man1/knife-recipe.1
+++ /dev/null
@@ -1,13 +0,0 @@
-.\" generated with Ronn/v0.7.3
-.\" http://github.com/rtomayko/ronn/tree/0.7.3
-.
-.TH "KNIFE\-RECIPE" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
-.
-.SH "NAME"
-\fBknife\-recipe\fR \- List the recipes available on a Chef Server
-.
-.SH "SYNOPSIS"
-\fBknife\fR \fBrecipe list [PATTERN]\fR
-.
-.P
-List the recipes available on the server\. The results shown can be limited with the optional PATTERN, which is a regular expression\. PATTERN should be given in quotes, without slashes\.
diff --git a/chef/distro/common/man/man1/knife-role.1 b/chef/distro/common/man/man1/knife-role.1
index c3b9d1716c..381ce15462 100644
--- a/chef/distro/common/man/man1/knife-role.1
+++ b/chef/distro/common/man/man1/knife-role.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-ROLE" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-ROLE" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
\fBknife\-role\fR \- Group common configuration settings
@@ -10,13 +10,30 @@
\fBknife\fR \fBrole\fR \fIsub\-command\fR \fI(options)\fR
.
.SH "ROLE SUB\-COMMANDS"
-\fBrole bulk delete REGEX\fR \fI(options)\fR
+The following \fBrole\fR subcommands are available:
+.
+.SH "LIST"
+\fBknife role list\fR \fI(options)\fR
+.
+.TP
+\fB\-w\fR, \fB\-\-with\-uri\fR
+Show corresponding URIs
.
.P
-Delete roles on the Chef Server based on a regular expression\. The regular expression (\fIREGEX\fR) should be in quotes, not in //\'s\.
+List roles\.
+.
+.SH "SHOW"
+\fBknife role show ROLE\fR \fI(options)\fR
+.
+.TP
+\fB\-a\fR, \fB\-\-attribute ATTR\fR
+Show only one attribute
.
.P
-\fBrole create ROLE\fR \fI(options)\fR
+Show a specific role\.
+.
+.SH "CREATE"
+\fBknife role create ROLE\fR \fI(options)\fR
.
.TP
\fB\-d\fR, \fB\-\-description\fR
@@ -25,40 +42,47 @@ The role description
.P
Create a new role\.
.
-.P
-\fBrole delete ROLE\fR \fI(options)\fR
+.SH "EDIT"
+\fBknife role edit ROLE\fR \fI(options)\fR
.
.P
-Delete a role\.
+Edit a role\.
.
-.P
-\fBrole edit ROLE\fR \fI(options)\fR
+.SH "FROM FILE"
+\fBknife role from file FILE\fR \fI(options)\fR
.
.P
-Edit a role\.
+Create or update a role from a role Ruby DSL (\fB\.rb\fR) or JSON file\.
.
-.P
-\fBrole from file FILE\fR \fI(options)\fR
+.SH "DELETE"
+\fBknife role delete ROLE\fR \fI(options)\fR
.
.P
-Create or update a role from a role Ruby DSL (\fB\.rb\fR) or JSON file\.
+Delete a role\.
+.
+.SH "BULK DELETE"
+\fBknife role bulk delete REGEX\fR \fI(options)\fR
.
.P
-\fBrole list\fR \fI(options)\fR
+Delete roles on the Chef Server based on a regular expression\. The regular expression (\fIREGEX\fR) should be in quotes, not in //\'s\.
.
-.TP
-\fB\-w\fR, \fB\-\-with\-uri\fR
-Show corresponding URIs
+.SH "DESCRIPTION"
+Roles provide a mechanism to group repeated configuration settings\. Roles are data structures that contain \fBdefault_attributes\fR, and \fBoverride_attributes\fR, which are nested hashes of configuration settings, and a \fBrun_list\fR, which is an ordered list of recipes and roles that should be applied to a host by chef\-client\.
.
.P
-List roles\.
+\fBdefault_attributes\fR will be overridden if they conflict with a value on a node that includes the role\. Conversely, \fBoverride_attributes\fR will override any values set on nodes that apply them\.
.
.P
-\fBrole show ROLE\fR \fI(options)\fR
+When \fBchef\-client\fR(8) configures a host, it will "expand" the \fBrun_list\fR included in that host\'s node data\. The expansion process will recursively replace any roles in the run_list with that role\'s run_list\.
.
-.TP
-\fB\-a\fR, \fB\-\-attribute ATTR\fR
-Show only one attribute
+.SH "SEE ALSO"
+\fBknife\-node(1)\fR \fBknife\-environment(1)\fR \fIhttp://wiki\.opscode\.com/display/chef/Roles\fR \fIhttp://wiki\.opscode\.com/display/chef/Attributes\fR
.
-.P
-Show a specific role\.
+.SH "AUTHOR"
+Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
+.
+.SH "DOCUMENTATION"
+This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
+.
+.SH "CHEF"
+Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
diff --git a/chef/distro/common/man/man1/knife-search.1 b/chef/distro/common/man/man1/knife-search.1
index 3b9c518b2c..d6bd4f524a 100644
--- a/chef/distro/common/man/man1/knife-search.1
+++ b/chef/distro/common/man/man1/knife-search.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-SEARCH" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-SEARCH" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
\fBknife\-search\fR \- Find objects on a Chef Server by query
@@ -33,5 +33,29 @@ The order to sort the results in
\fB\-b\fR, \fB\-\-start ROW\fR
The row to start returning results at
.
-.P
-Search indexes are a feature of the Chef Server and the search sub\-command allows querying any of the available indexes using SOLR query syntax\. The following data types are indexed for search: \fInode\fR, \fIrole\fR, \fIclient\fR, \fIdata bag\fR\.
+.TP
+\fB\-m\fR, \fB\-\-medium\fR
+Display medium sized output when searching nodes using the default summary format
+.
+.TP
+\fB\-l\fR, \fB\-\-long\fR
+Display long output when searching nodes using the default summary format
+.
+.SH "DESCRIPTION"
+Search indexes are a feature of the Chef Server and the search sub\-command allows querying any of the available indexes using SOLR query syntax\. The following data types are indexed for search: * \fInode\fR * \fIrole\fR * \fIenvironment\fR * \fIdata bag\fR
+.
+.SH "SYNTAX"
+.
+.SH "EXAMPLES"
+.
+.SH "SEE ALSO"
+\fBknife\-ssh\fR(1) \fIhttp://wiki\.opscode\.com/display/chef/Attributes\fR
+.
+.SH "AUTHOR"
+Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
+.
+.SH "DOCUMENTATION"
+This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
+.
+.SH "CHEF"
+Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
diff --git a/chef/distro/common/man/man1/knife-ssh.1 b/chef/distro/common/man/man1/knife-ssh.1
index 2361280720..f75fbbeacc 100644
--- a/chef/distro/common/man/man1/knife-ssh.1
+++ b/chef/distro/common/man/man1/knife-ssh.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-SSH" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-SSH" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
\fBknife\-ssh\fR \- Run a command or interactive session on multiple remote hosts
@@ -29,5 +29,46 @@ The ssh password
\fB\-x\fR, \fB\-\-ssh\-user USERNAME\fR
The ssh username
.
-.P
+.SH "DESCRIPTION"
The \fIssh\fR sub\-command opens an ssh session to each of the nodes in the search results of the \fIQUERY\fR\. This sub\-command requires that the net\-ssh\-multi and highline Ruby libraries are installed\. On Debian systems, these are the libnet\-ssh\-multi\-ruby and libhighline\-ruby packages\. They can also be installed as RubyGems (net\-ssh\-multi and highline, respectively)\.
+.
+.SH "TERMINAL MULTIPLEXING AND TERMINAL TAB SUPPORT"
+\fBknife ssh\fR integrates with several terminal multiplexer programs to provide a more convenient means of managing multiple ssh sessions\. When the \fICOMMAND\fR option matches one of these, \fBknife ssh\fR will create multiple interactive ssh sessions running locally in the terminal multiplexer instead of invoking the command on the remote host\.
+.
+.P
+The available multiplexers are: * \fBinteractive\fR:
+.
+.IP "" 4
+.
+.nf
+
+A built\-in multiplexer\. `interactive` supports running commands on a
+subset of the connected hosts in parallel
+.
+.fi
+.
+.IP "" 0
+.
+.TP
+\fBscreen\fR(1)
+Runs ssh interactively inside \fBscreen\fR\. ~/\.screenrc will be sourced if it exists\.
+.
+.TP
+\fBtmux\fR(1)
+Runs ssh interactively inside tmux\.
+.
+.TP
+\fBmacterm\fR (Mac OS X only)
+Opens a Terminal\.app window and creates a tab for each ssh session\. You must install the rb\-appscript gem before you can use this option\.
+.
+.SH "SEE ALSO"
+\fBknife\-search\fR(1)
+.
+.SH "AUTHOR"
+Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
+.
+.SH "DOCUMENTATION"
+This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
+.
+.SH "CHEF"
+Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
diff --git a/chef/distro/common/man/man1/knife-status.1 b/chef/distro/common/man/man1/knife-status.1
index 45280bec1b..bb35b49202 100644
--- a/chef/distro/common/man/man1/knife-status.1
+++ b/chef/distro/common/man/man1/knife-status.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-STATUS" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-STATUS" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
\fBknife\-status\fR \- Display status information for the nodes in your infrastructure
@@ -13,5 +13,17 @@
\fB\-r\fR, \fB\-\-run\-list RUN_LIST\fR
Show the run list
.
-.P
+.SH "DESCRIPTION"
The \fIstatus\fR sub\-command searches the Chef Server for all nodes and displays information about the last time the node checked into the server and executed a \fBnode\.save\fR\. The fields displayed are the relative checkin time, the node name, it\'s operating system platform and version, the fully\-qualified domain name and the default IP address\. If the \fB\-r\fR option is given, the node\'s run list will also be displayed\. Note that depending on the configuration of the nodes, the FQDN and IP displayed may not be publicly reachable\.
+.
+.SH "SEE ALSO"
+\fBknife\-search\fR(1)
+.
+.SH "AUTHOR"
+Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
+.
+.SH "DOCUMENTATION"
+This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
+.
+.SH "CHEF"
+Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
diff --git a/chef/distro/common/man/man1/knife-tag.1 b/chef/distro/common/man/man1/knife-tag.1
index 85de474f4e..d491207b41 100644
--- a/chef/distro/common/man/man1/knife-tag.1
+++ b/chef/distro/common/man/man1/knife-tag.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE\-TAG" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE\-TAG" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
\fBknife\-tag\fR \- Apply tags to nodes on a Chef Server
@@ -10,4 +10,34 @@
\fBknife\fR \fBtag\fR \fIsubcommand\fR \fI(options)\fR
.
.SH "TAG SUBCOMMANDS"
-
+The following \fBtag\fR subcommands are available:
+.
+.SH "CREATE"
+\fBknife tag create\fR \fInode\fR \fItag\fR [\fI\.\.\.\fR]
+.
+.P
+Adds one or more tags to \fInode\fR
+.
+.SH "DELETE"
+\fBknife tag delete\fR \fInode\fR \fItag\fR [\fI\.\.\.\fR]
+.
+.P
+Removes one or more tags from \fInode\fR
+.
+.SH "LIST"
+\fBknife tag list\fR \fInode\fR
+.
+.P
+Lists the tags applied to \fInode\fR
+.
+.SH "SEE ALSO"
+\fBknife\-node(1)\fR
+.
+.SH "AUTHOR"
+Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
+.
+.SH "DOCUMENTATION"
+This manual page was written by Daniel DeLeo \fIdan@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
+.
+.SH "CHEF"
+Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
diff --git a/chef/distro/common/man/man1/knife.1 b/chef/distro/common/man/man1/knife.1
index d019e20320..e012d7a146 100644
--- a/chef/distro/common/man/man1/knife.1
+++ b/chef/distro/common/man/man1/knife.1
@@ -1,24 +1,71 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "KNIFE" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
+.TH "KNIFE" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
.
.SH "NAME"
-\fBknife\fR \- Chef Server REST API utility
+\fBknife\fR \- Chef Server API client utility
.
.SH "SYNOPSIS"
-\fBknife\fR \fIsub\-command\fR \fI(options)\fR
+\fBknife\fR \fIsub\-command\fR [\fIargument\fR\.\.\.] \fI(options)\fR
.
.SH "DESCRIPTION"
-This manual page documents knife, a command\-line utility used to interact with a Chef server directly through the RESTful API\. Knife uses sub\-commands to take various actions on different types of Chef objects\. Some sub\-commands take additional options\. General options follow sub\-commands and their options\. A configuration file can be created for common defaults\.
+Knife is a command\-line utility used to manage data on a Chef server through the HTTP(S) API\. Knife is organized into groups of subcommands centered around the various object types in Chef\. Each category of subcommand is documented in its own manual page\. Available topics are:
.
-.P
-Unless otherwise specified, output is in JSON format, and input files are also JSON format\.
+.IP "\(bu" 4
+bootstrap
+.
+.IP "\(bu" 4
+client
+.
+.IP "\(bu" 4
+configure
+.
+.IP "\(bu" 4
+cookbook\-site
+.
+.IP "\(bu" 4
+cookbook
+.
+.IP "\(bu" 4
+data\-bag
+.
+.IP "\(bu" 4
+environment
+.
+.IP "\(bu" 4
+exec
+.
+.IP "\(bu" 4
+index
+.
+.IP "\(bu" 4
+node
+.
+.IP "\(bu" 4
+recipe
+.
+.IP "\(bu" 4
+role
+.
+.IP "\(bu" 4
+search
+.
+.IP "\(bu" 4
+ssh
+.
+.IP "\(bu" 4
+status
+.
+.IP "\(bu" 4
+tag
+.
+.IP "" 0
.
.P
-The Chef class \fBChef::Config\fR that configures the behavior of how knife runs has options that correspond to command\-line options\. These are noted as \fBChef::Config\fR values\.
+If the knife manuals are in your \fBMANPATH\fR, you can access help for the above topics using \fBman knife\-TOPIC\fR; otherwise, you can view the documentation using \fBknife help TOPIC\fR\.
.
-.SH "GENERAL OPTIONS"
+.SH "OPTIONS"
.
.TP
\fB\-s\fR, \fB\-\-server\-url\fR URL
@@ -70,13 +117,10 @@ Say yes to all prompts for confirmation
.
.TP
\fB\-h\fR, \fB\-\-help\fR
-Show this message
-.
-.P
-Usage information for sub\-commands can be displayed with \fBknife SUB\-COMMAND \-\-help\fR\.
+Show the available options for a command\.
.
.SH "SUB\-COMMANDS"
-Knife sub\-commands are structured as \fINOUN verb NOUN (options)\fR\. The sub\-commands are meant to be intuitively named\. Because the Chef Server API is RESTful, sub\-commands generally utilize CRUD operations\.
+Sub\-commands that operate on the basic Chef data types are structured as \fINOUN verb NOUN (options)\fR\. For all data types, the following commands are available:
.
.IP "\(bu" 4
create (create)
@@ -93,13 +137,7 @@ delete (destroy)
.IP "" 0
.
.P
-Objects stored on the server support these, as described below\.
-.
-.SH "GENERAL SUB\-COMMANDS"
-\fBrecipe list [PATTERN]\fR
-.
-.P
-List available recipes from the server\. Specify \fIPATTERN\fR as a regular expression to limit the results\.
+Knife also includes commands that take actions other than displaying or modifying data on the Chef Server, such as \fBknife\-ssh(1)\fR\.
.
.SH "CONFIGURATION"
The knife configuration file is a Ruby DSL to set configuration parameters for Knife\'s \fBGENERAL OPTIONS\fR\. The default location for the config file is \fB~/\.chef/knife\.rb\fR\. If managing multiple Chef repositories, per\-repository config files can be created\. The file must be \fB\.chef/knife\.rb\fR in the current directory of the repository\.
@@ -107,103 +145,31 @@ The knife configuration file is a Ruby DSL to set configuration parameters for K
.P
If the config file exists, knife uses these settings for \fBGENERAL OPTIONS\fR defaults\.
.
-.P
-\fBlog_level\fR
-.
-.P
-A Ruby symbol specifying the log level\. Corresponds to \fB\-l\fR or \fB\-\-log_level\fR option\. Default is \fI:info\fR\. Valid values are:
-.
.IP "\(bu" 4
-:info
+\fBnode_name\fR: User or client identity (i\.e\., \fIname\fR) to use for authenticating requests to the Chef Server\.
.
.IP "\(bu" 4
-:debug
+\fBclient_key\fR: Private key file to authenticate to the Chef server\. Corresponds to the \fB\-k\fR or \fB\-\-key\fR option\.
.
.IP "\(bu" 4
-:warn
+\fBchef_server_url\fR: URL of the Chef server\. Corresponds to the \fB\-s\fR or \fB\-\-server\-url\fR option\. This is requested from the user when running this sub\-command\.
.
.IP "\(bu" 4
-:fatal
-.
-.IP "" 0
-.
-.P
-\fBlog_location\fR
-.
-.P
-Corresponds to the \fB\-L\fR or \fB\-\-log\-file\fR option\. Defaults is \fBSTDOUT\fR\. Valid values are \fBSTDOUT\fR or a filename\.
-.
-.P
-\fBnode_name\fR
-.
-.P
-User to authenticate to the Chef server\. Corresponds to the \fB\-u\fR or \fB\-\-user\fR option\. This is requested from the user when running this sub\-command\.
-.
-.P
-\fBclient_key\fR
-.
-.P
-Private key file to authenticate to the Chef server\. Corresponds to the \fB\-k\fR or \fB\-\-key\fR option\. This is requested from the user when running this sub\-command\.
-.
-.P
-\fBchef_server_url\fR
-.
-.P
-URL of the Chef server\. Corresponds to the \fB\-s\fR or \fB\-\-server\-url\fR option\. This is requested from the user when running this sub\-command\.
-.
-.P
-\fBcache_type\fR
-.
-.P
-The type of cache to use\. Default is BasicFile\. This can be any type of Cache that moneta supports: BasicFile, Berkeley, Couch, DataMapper, File, LMC, Memcache, Memory, MongoDB, Redis, Rufus, S3, SDBM, Tyrant, Xattr, YAML\.
-.
-.P
-\fBcache_options\fR
-.
-.P
-Specifies various options to use for caching\. Default reads the Chef client configuration (/etc/chef/checksums)\.
-.
-.P
-\fBvalidation_client_name\fR
+\fBcache_type\fR: The type of cache to use\. Default is BasicFile\. This can be any type of Cache that moneta supports: BasicFile, Berkeley, Couch, DataMapper, File, LMC, Memcache, Memory, MongoDB, Redis, Rufus, S3, SDBM, Tyrant, Xattr, YAML\.
.
-.P
-Specifies the name of the client used to validate new clients\. This is requested from the user when running the configuration sub\-command\.
-.
-.P
-\fBvalidation_key\fR
-.
-.P
-Specifies the private key file to use for generating ec2 instance data for validating new clients\. This is implied from the \fBvalidation_client_name\fR\.
-.
-.P
-\fBcookbook_copyright\fR \fBcookbook_email\fR \fBcookbook_license\fR
-.
-.P
-Used by \fBknife cookbook create\fR sub\-command to specify the copyright holder, maintainer email and license (respectively) for new cookbooks\. The copyright holder is listed as the maintainer in the cookbook\'s metadata and as the Copyright in the comments of the default recipe\. The maintainer email is used in the cookbook metadata\. The license determines what preamble to put in the comment of the default recipe, and is listed as the license in the cookbook metadata\. Currently supported licenses are "apachev2" and "none"\. Any other values will result in an empty license in the metadata (needs to be filled in by the author), and no comment preamble in the default recipe\.
-.
-.P
-\fBknife[:aws_access_key_id]\fR \fBknife[:aws_secret_access_key]\fR
-.
-.P
-Specifies the Amazon AWS EC2 credentials to use when running the ec2 sub\-commands\.
-.
-.P
-\fBknife[:rackspace_api_username]\fR \fBknife[:rackspace_api_key]\fR
-.
-.P
-Specifies the Rackspace Cloud credentials to use when running the rackspace sub\-commands\.
+.IP "\(bu" 4
+\fBcache_options\fR: Specifies various options to use for caching\. These options are dependent on the \fBcache_type\fR\.
.
-.P
-\fBknife[:terremark_username]\fR \fBknife[:terremark_password]\fR \fBknife[:terremark_service]\fR
+.IP "\(bu" 4
+\fBvalidation_client_name\fR: Specifies the name of the client used to validate new clients\.
.
-.P
-Specifies the Terremark vCloud credentials to use when running the terremark sub\-commands\.
+.IP "\(bu" 4
+\fBvalidation_key\fR: Specifies the private key file to use when bootstrapping new hosts\. See knife\-client(1) for more information about the validation client\.
.
-.P
-\fBknife[:slicehost_password]\fR
+.IP "\(bu" 4
+\fBcookbook_copyright\fR, \fBcookbook_email\fR, \fBcookbook_license\fR Used by \fBknife cookbook create\fR sub\-command to specify the copyright holder, maintainer email and license (respectively) for new cookbooks\. The copyright holder is listed as the maintainer in the cookbook\'s metadata and as the Copyright in the comments of the default recipe\. The maintainer email is used in the cookbook metadata\. The license determines what preamble to put in the comment of the default recipe, and is listed as the license in the cookbook metadata\. Currently supported licenses are "apachev2" and "none"\. Any other values will result in an empty license in the metadata (needs to be filled in by the author), and no comment preamble in the default recipe\.
.
-.P
-Specifies the Slicehost password to use when running the slicdehost sub\-commands\.
+.IP "" 0
.
.SH "FILES"
\fI~/\.chef/knife\.rb\fR
@@ -244,79 +210,6 @@ Watch Chef configure systems!
A note about git: Opscode and many folks in the Chef community use git, but it is not required, except in the case of the \fBcookbook site vendor\fR sub\-command, as it uses git directly\. Version control is strongly recommended though, and git fits with a lot of the workflow paradigms\.
.
.SH "EXAMPLES"
-Example client config (\fB/etc/chef/client\.rb\fR) from \fBknife configure client\fR\. The same configuration is used when using the \fBknife bootstrap\fR command with the default \fBgem\fR templates that come with Chef\.
-.
-.IP "" 4
-.
-.nf
-
-log_level :info
-log_location STDOUT
-chef_server_url \'https://api\.opscode\.com/organizations/ORGNAME\'
-validation_client_name \'ORGNAME\-validator\'
-.
-.fi
-.
-.IP "" 0
-.
-.P
-Setting up a custom bootstrap is fairly straightforward\. Create \fB\.chef/bootstrap\fR in your Chef Repository directory or in \fB$HOME/\.chef/bootstrap\fR\. Then create the ERB template file\.
-.
-.IP "" 4
-.
-.nf
-
-mkdir ~/\.chef/bootstrap
-vi ~/\.chef/bootstrap/debian5\.0\-apt\.erb
-.
-.fi
-.
-.IP "" 0
-.
-.P
-For example, to create a new bootstrap template that should be used when setting up a new Debian node\. Edit the template to run the commands, set up the validation certificate and the client configuration file, and finally to run chef\-client on completion\. The bootstrap template can be called with:
-.
-.IP "" 4
-.
-.nf
-
-knife bootstrap mynode\.example\.com \-\-template\-file ~/\.chef/bootstrap/debian5\.0\-apt\.erb
-.
-.fi
-.
-.IP "" 0
-.
-.P
-Or,
-.
-.IP "" 4
-.
-.nf
-
-knife bootstrap mynode\.example\.com \-\-distro debian5\.0\-apt
-.
-.fi
-.
-.IP "" 0
-.
-.P
-The \fB\-\-distro\fR parameter will automatically look in the \fB~/\.chef/bootstrap\fR directory for a file named \fBdebian5\.0\-apt\.erb\fR\.
-.
-.P
-Templates provided by the Chef installation are located in \fBBASEDIR/lib/chef/knife/bootstrap/*\.erb\fR, where \fIBASEDIR\fR is the location where the package or Gem installed the Chef client libraries\.
-.
-.P
-Uploading cookbooks to the Opscode cookbooks site using the user/certificate specifically:
-.
-.IP "" 4
-.
-.nf
-
-knife cookbook site share example Other \-k ~/\.chef/USERNAME\.pem \-u USERNAME
-.
-.fi
-.
-.IP "" 0
.
.SH "ENVIRONMENT"
.
@@ -325,22 +218,34 @@ knife cookbook site share example Other \-k ~/\.chef/USERNAME\.pem \-u USERNAME
The text editor to use for editing data\. The \-\-editor option takes precedence over this value, and the \-\-no\-editor option supresses data editing entirely\.
.
.SH "SEE ALSO"
-Full documentation for Chef is located on the Chef wiki, http://wiki\.opscode\.com/display/chef/Home/\.
+\fBchef\-client(8)\fR \fBchef\-server(8)\fR \fBshef(1)\fR
.
.P
-JSON is JavaScript Object Notation and more information can be found at http://json\.org/\.
+\fBknife\-bootstrap(1)\fR \fBknife\-client(1)\fR \fBknife\-configure(1)\fR \fBknife\-cookbook\-site(1)\fR \fBknife\-cookbook(1)\fR \fBknife\-data\-bag(1)\fR \fBknife\-environment(1)\fR \fBknife\-exec(1)\fR \fBknife\-index(1)\fR \fBknife\-node(1)\fR \fBknife\-recipe(1)\fR \fBknife\-role(1)\fR \fBknife\-search(1)\fR \fBknife\-ssh(1)\fR \fBknife\-tag(1)\fR
.
.P
-SOLR is an open source search engine\. The Chef Server includes a SOLR installation\. More information about SOLR, including the search query syntax, can be found at http://lucene\.apache\.org/solr/\.
+Complete Chef documentation is available online: \fIhttp://wiki\.opscode\.com/display/chef/Home/\fR
.
.P
-Git is a version control system and documented at http://git\-scm\.com/\.
+JSON is JavaScript Object Notation \fIhttp://json\.org/\fR
.
.P
-This manual page was generated in nroff from Markdown with ronn\. Ryan Tomayko wrote ronn and more information can be found at http://rtomayko\.github\.com/ronn/ronn\.5\.html\.
+SOLR is an open source search engine\. \fIhttp://lucene\.apache\.org/solr/\fR
.
-.SH "AUTHOR"
-Chef was written by Adam Jacob \fIadam@opscode\.com\fR of Opscode (\fIhttp://www\.opscode\.com\fR), with contributions from the community\. This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
+.P
+\fBgit(1)\fR is a version control system \fIhttp://git\-scm\.com/\fR
.
.P
-On Debian systems, the complete text of the Apache 2\.0 License can be found in \fB/usr/share/common\-licenses/Apache\-2\.0\fR\.
+This manual page was generated from Markdown with \fBronn(1)\fR \fIhttp://rtomayko\.github\.com/ronn/ronn\.1\.html\fR
+.
+.SH "AUTHOR"
+Chef was written by Adam Jacob \fIadam@opscode\.com\fR of Opscode (\fIhttp://www\.opscode\.com\fR), with contributions from the community\.
+.
+.SH "DOCUMENTATION"
+This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\.
+.
+.SH "LICENSE"
+Both Chef and this documentation are released under the terms of the Apache 2\.0 License\. You may view the license online: \fIhttp://www\.apache\.org/licenses/LICENSE\-2\.0\.html\fR On some systems, the complete text of the Apache 2\.0 License may be found in \fB/usr/share/common\-licenses/Apache\-2\.0\fR\.
+.
+.SH "CHEF"
+Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
diff --git a/chef/distro/common/man/man1/shef.1 b/chef/distro/common/man/man1/shef.1
index 318d345ec0..d7329b8830 100644
--- a/chef/distro/common/man/man1/shef.1
+++ b/chef/distro/common/man/man1/shef.1
@@ -1,45 +1,256 @@
-.TH SHEF: "8" "March 2010" "Chef: 0.8.4" "System Administration Utilities"
-.SH NAME
-shef: \- Run Chef in an IRB session.
-.SH SYNOPSIS
-.B shef
-\fI(options)\fR
-.SH DESCRIPTION
-.TP
-This manual page documents shef, a command-line REPL console used to run Chef in an IRB session. It includes recipe and attribute file syntax, and interactive debugging features.
-\fB\-S\fR, \fB\-\-server\fR CHEFSERVERURL
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "SHEF" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
+.
+.SH "NAME"
+\fBshef\fR \- Interactive Chef Console
+.
+.SH "SYNOPSIS"
+\fBshef\fR [\fInamed configuration\fR] \fI(options)\fR
+.
+.TP
+\fB\-S\fR, \fB\-\-server CHEF_SERVER_URL\fR
The chef server URL
+.
.TP
\fB\-z\fR, \fB\-\-client\fR
-chef\-client shef session
+chef\-client mode
+.
.TP
-\fB\-c\fR, \fB\-\-config\fR CONFIG
+\fB\-c\fR, \fB\-\-config CONFIG\fR
The configuration file to use
+.
.TP
-\fB\-j\fR JSON_ATTRIBS
+\fB\-j\fR, \fB\-\-json\-attributes JSON_ATTRIBS\fR
Load attributes from a JSON file or URL
-.HP
-\fB\-\-json\-attributes\fR
+.
+.TP
+\fB\-l\fR, \fB\-\-log\-level LOG_LEVEL\fR
+Set the logging level
+.
.TP
\fB\-s\fR, \fB\-\-solo\fR
chef\-solo shef session
+.
.TP
\fB\-a\fR, \fB\-\-standalone\fR
standalone shef session
+.
.TP
\fB\-v\fR, \fB\-\-version\fR
Show chef version
+.
.TP
\fB\-h\fR, \fB\-\-help\fR
-Show this message
+Show command options
+.
+.P
+When no \-\-config option is specified, shef attempts to load a default configuration file:
+.
+.IP "\(bu" 4
+If a \fInamed configuration\fR is given, shef will load ~/\.chef/\fInamed configuration\fR/shef\.rb
+.
+.IP "\(bu" 4
+If no \fInamed configuration\fR is given shef will load ~/\.chef/shef\.rb if it exists
+.
+.IP "\(bu" 4
+Shef falls back to loading /etc/chef/client\.rb or /etc/chef/solo\.rb if \-z or \-s options are given and no shef\.rb can be found\.
+.
+.IP "\(bu" 4
+The \-\-config option takes precedence over implicit configuration paths\.
+.
+.IP "" 0
+.
+.SH "DESCRIPTION"
+\fBshef\fR is an irb(1) (interactive ruby) session customized for Chef\. \fBshef\fR serves two primary functions: it provides a means to interact with a Chef Server interactively using a convenient DSL; it allows you to define and run Chef recipes interactively\.
+.
+.SH "SYNTAX"
+Shef uses irb\'s subsession feature to provide multiple modes of interaction\. In addition to the primary mode which is entered on start, \fBrecipe\fR and \fBattributes\fR modes are available\.
+.
+.SH "PRIMARY MODE"
+The following commands are available in the primary session:
+.
+.TP
+\fBhelp\fR
+Prints a list of available commands
+.
+.TP
+\fBversion\fR
+Prints the Chef version
+.
+.TP
+\fBrecipe\fR
+Switches to \fBrecipe\fR mode
+.
+.TP
+\fBattributes\fR
+Switches to \fBattributes\fR mode
+.
+.TP
+\fBrun_chef\fR
+Initiates a chef run
+.
+.TP
+\fBreset\fR
+reinitializes shef
+.
+.TP
+\fBecho :on|:off\fR
+Turns irb\'s echo function on or off\. Echo is \fIon\fR by default\.
+.
+.TP
+\fBtracing :on|:off\fR
+Turns irb\'s function tracing feature on or off\. Tracing is extremely verbose and expected to be of interest primarily to developers\.
+.
+.TP
+\fBnode\fR
+Returns the \fInode\fR object for the current host\. See knife\-node(1) for more information about nodes\.
+.
+.TP
+\fBohai\fR
+Prints the attributes of \fInode\fR
+.
+.P
+In addition to these commands, shef provides a DSL for accessing data on the Chef Server\. When working with remote data in shef, you chain method calls in the form \fIobject type\fR\.\fIoperation\fR, where \fIobject type\fR is in plural form\. The following object types are available:
+.
+.IP "\(bu" 4
+\fBnodes\fR
+.
+.IP "\(bu" 4
+\fBroles\fR
+.
+.IP "\(bu" 4
+\fBdata_bags\fR
+.
+.IP "\(bu" 4
+\fBclients\fR
+.
+.IP "\(bu" 4
+\fBcookbooks\fR
+.
+.IP "" 0
+.
+.P
+For each \fIobject type\fR the following operations are available:
+.
+.TP
+\fIobject type\fR\.all(\fI&block\fR)
+Loads all items from the server\. If the optional code \fIblock\fR is given, each item will be passed to the block and the results returned, similar to ruby\'s \fBEnumerable#map\fR method\.
+.
+.TP
+\fIobject type\fR\.show(\fIobject name\fR)
+Aliased as \fIobject type\fR\.load
+.
+.IP
+Loads the singular item identified by \fIobject name\fR\.
+.
+.TP
+\fIobject type\fR\.search(\fIquery\fR, \fI&block\fR)
+Aliased as \fIobject type\fR\.find
+.
+.IP
+Runs a search against the server and returns the matching items\. If the optional code \fIblock\fR is given each item will be passed to the block and the results returned\.
+.
+.IP
+The \fIquery\fR may be a Solr/Lucene format query given as a String, or a Hash of conditions\. If a Hash is given, the options will be ANDed together\. To join conditions with OR, use negative queries, or any advanced search syntax, you must provide give the query in String form\.
+.
+.TP
+\fIobject type\fR\.transform(:all|\fIquery\fR, \fI&block\fR)
+Aliased as \fIobject type\fR\.bulk_edit
+.
+.IP
+Bulk edit objects by processing them with the (required) code \fIblock\fR\. You can edit all objects of the given type by passing the Symbol \fB:all\fR as the argument, or only a subset by passing a \fIquery\fR as the argument\. The \fIquery\fR is evaluated in the same way as with \fBsearch\fR\.
+.
+.IP
+The return value of the code \fIblock\fR is used to alter the behavior of \fBtransform\fR\. If the value returned from the block is \fBnil\fR or \fBfalse\fR, the object will not be saved\. Otherwise, the object is saved after being passed to the block\. This behavior can be exploited to create a dry run to test a data transformation\.
+.
+.SH "RECIPE MODE"
+Recipe mode implements Chef\'s recipe DSL\. Exhaustively documenting this DSL is outside the scope of this document\. See the following pages in the Chef documentation for more information:
+.
+.IP "\(bu" 4
+\fIhttp://wiki\.opscode\.com/display/chef/Resources\fR
+.
+.IP "\(bu" 4
+\fIhttp://wiki\.opscode\.com/display/chef/Recipes\fR
+.
+.IP "" 0
+.
+.P
+Once you have defined resources in the recipe, you can trigger a convergence run via \fBrun_chef\fR
+.
+.SH "EXAMPLES"
+.
+.IP "\(bu" 4
+A "Hello World" interactive recipe
+.
+.IP
+chef > recipe
+.
+.br
+chef:recipe > echo :off
+.
+.br
+chef:recipe > file "/tmp/hello_world"
+.
+.br
+chef:recipe > run_chef
+.
+.br
+[Sat, 09 Apr 2011 08:56:56 \-0700] INFO: Processing file[/tmp/hello_world] action create ((irb#1) line 2)
+.
+.br
+[Sat, 09 Apr 2011 08:56:56 \-0700] INFO: file[/tmp/hello_world] created file /tmp/hello_world
+.
+.br
+chef:recipe > pp ls \'/tmp\'
+.
+.br
+["\.",
+.
+.br
+"\.\.",
+.
+.br
+"hello_world"]
+.
+.IP "\(bu" 4
+Search for \fInodes\fR by role, and print their IP addresses
+.
+.IP
+chef > nodes\.find(:roles => \'monitoring\-server\') {|n| n[:ipaddress] }
+.
+.br
+=> ["10\.254\.199\.5"]
+.
+.IP "\(bu" 4
+Remove the role \fIobsolete\fR from every node in the system
+.
+.IP
+chef > nodes\.transform(:all) {|n| n\.run_list\.delete(\'role[obsolete]\') }
+.
+.br
+=> [node[chef098b2\.opschef\.com], node[ree\-woot], node[graphite\-dev], node[fluke\.localdomain], node[ghost\.local], node[kallistec]]
+.
+.IP "" 0
+.
+.SH "BUGS"
+The name \fBshef\fR is clever in print but is confusing when spoken aloud\. Pronouncing \fBshef\fR as \fBchef console\fR is an imperfect workaround\.
+.
+.P
+\fBshef\fR often does not perfectly replicate the context in which chef\-client(8) configures a host, which may lead to discrepancies in observed behavior\.
+.
+.P
+\fBshef\fR has to duplicate much code from chef\-client\'s internal libraries and may become out of sync with the behavior of those libraries\.
+.
.SH "SEE ALSO"
-The full documentation for
-.B shef
-is maintained on the Chef wiki, http://wiki.opscode.com/display/chef/Shef/.
-.SH AUTHOR
-Shef was written by Daniel DeLeo <dan@kallistec.com> as part of Chef, by Opscode, Inc.
-This manual page was written by Joshua Timberman <joshua@opscode.com> with help2man. Permission is granted
-to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.
-.PP
-On Debian systems, the complete text of the Apache 2.0 License can be found in
-/usr/share/common-licenses/Apache-2.0.
+chef\-client(8) knife(1) \fIhttp://wiki\.opscode\.com/display/chef/Shef\fR
+.
+.SH "AUTHOR"
+Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. Shef was written by Daniel DeLeo\.
+.
+.SH "DOCUMENTATION"
+This manual page was written by Daniel DeLeo \fIdan@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
+.
+.SH "CHEF"
+Shef is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
diff --git a/chef/distro/common/markdown/man1/knife-bootstrap.mkd b/chef/distro/common/markdown/man1/knife-bootstrap.mkd
index dd70f529d0..7789faec8e 100644
--- a/chef/distro/common/markdown/man1/knife-bootstrap.mkd
+++ b/chef/distro/common/markdown/man1/knife-bootstrap.mkd
@@ -28,12 +28,13 @@ __knife__ __bootstrap__ _(options)_
* `-d`, `--distro DISTRO`:
Bootstrap a distro using a template
+## DESCRIPTION
+
Performs a Chef Bootstrap on the target node. The goal of the bootstrap
is to get Chef installed on the target system so it can run Chef Client
with a Chef Server. The main assumption is a baseline OS installation
exists. This sub-command is used internally by some cloud computing
-server create commands and the others will be migrated in a future
-version of Chef.
+plugins.
The bootstrap sub-command supports supplying a template to perform the
bootstrap steps. If the distro is not specified (via `-d` or `--distro`
@@ -47,22 +48,34 @@ sub-command looks in the following locations for the template to use:
* `bootstrap` directory in the `$PWD/.chef`.
* `bootstrap` directory in the users `$HOME/.chef`.
-The default bootstrap templates are scripts that get copied to the target node (FQDN). As of Chef 0.9.8, the following distros are supported:
+The default bootstrap templates are scripts that get copied to the
+target node (FQDN). The following distros are supported:
* centos5-gems
* fedora13-gems
* ubuntu10.04-gems
* ubuntu10.04-apt
-The gems installations will use RubyGems 1.3.6 and Chef installed as a gem. The apt installation will use the Opscode APT repository. The RubyGems installation requires installing gems with native extensions, so development related packages (ruby-dev, build-essential) are installed. These are not installed with the apt installation, as native extensions are already compiled in the required packages.
+The gems installations will use RubyGems 1.3.6 and Chef installed as a
+gem. The apt installation will use the Opscode APT repository. The
+RubyGems installation requires installing gems with native extensions,
+so development related packages (ruby-dev, build-essential) are
+installed. These are not installed with the apt installation, as native
+extensions are already compiled in the required packages.
-In addition to handling the software installation, these bootstrap templates do the following:
+In addition to handling the software installation, these bootstrap
+templates do the following:
- Write the validation.pem per the local knife configuration.
- Write a default config file for Chef (`/etc/chef/client.rb`) using values from the `knife.rb`.
- Create a JSON attributes file containing the specified run list and run Chef.
-In the case of the RubyGems, the `client.rb` will be written from scratch with a minimal set of values; see __EXAMPLES__. In the case of APT Package installation, `client.rb` will have the `validation_client_name` appended if it is not set to `chef-validator` (default config value), and the `node_name` will be added if `chef_node_name` option is specified.
+In the case of the RubyGems, the `client.rb` will be written from
+scratch with a minimal set of values; see __EXAMPLES__. In the case of
+APT Package installation, `client.rb` will have the
+`validation_client_name` appended if it is not set to `chef-validator`
+(default config value), and the `node_name` will be added if
+`chef_node_name` option is specified.
When this is complete, the bootstrapped node will have:
@@ -70,8 +83,45 @@ When this is complete, the bootstrapped node will have:
- Be validated with the configured Chef Server.
- Have run Chef with its default run list if one is specfied.
-Additional custom bootstrap templates can be created and stored in `.chef/bootstrap/DISTRO.erb`, replacing __DISTRO__ with the value passed with the `-d` or `--distro` option. See __EXAMPLES__ for more information.
+Additional custom bootstrap templates can be created and stored in
+`.chef/bootstrap/DISTRO.erb`, replacing __DISTRO__ with the value passed
+with the `-d` or `--distro` option. See __EXAMPLES__ for more
+information.
+
+## EXAMPLES
+Setting up a custom bootstrap is fairly straightforward. Create a
+`.chef/bootstrap` directory in your Chef Repository or in
+`$HOME/.chef/bootstrap`. Then create the ERB template file.
+
+ mkdir ~/.chef/bootstrap
+ vi ~/.chef/bootstrap/debian5.0-apt.erb
+
+For example, to create a new bootstrap template that should be used when
+setting up a new Debian node. Edit the template to run the commands, set
+up the validation certificate and the client configuration file, and
+finally to run chef-client on completion. The bootstrap template can be
+called with:
+
+ knife bootstrap mynode.example.com --template-file ~/.chef/bootstrap/debian5.0-apt.erb
+
+Or,
+
+ knife bootstrap mynode.example.com --distro debian5.0-apt
+
+The `--distro` parameter will automatically look in the
+`~/.chef/bootstrap` directory for a file named `debian5.0-apt.erb`.
+
+Templates provided by the Chef installation are located in
+`BASEDIR/lib/chef/knife/bootstrap/*.erb`, where _BASEDIR_ is the
+location where the package or Gem installed the Chef client libraries.
+
+## BUGS
+`knife bootstrap` is not capable of bootstrapping multiple hosts in
+parallel.
+The bootstrap script is passed as an argument to sh(1) on the remote
+system, so sensitive information contained in the script will be visible
+to other users via the process list using tools such as ps(1).
## SEE ALSO
__knife-ssh__(1)
diff --git a/chef/distro/common/markdown/man1/knife-client.mkd b/chef/distro/common/markdown/man1/knife-client.mkd
index 8764d7d71c..e7b732ef71 100644
--- a/chef/distro/common/markdown/man1/knife-client.mkd
+++ b/chef/distro/common/markdown/man1/knife-client.mkd
@@ -5,23 +5,9 @@ knife-client(1) -- Manage Chef API Clients
__knife__ __client__ _sub-command_ _(options)_
-## DESCRIPTION
-Clients are identities used for communication with the Chef Server API,
-roughly equivalent to user accounts on the Chef Server, except that
-clients only communicate with the Chef Server API and are authenticated
-via request signatures.
-
-In the typical case, there will be one client object on the server for
-each node, and the corresponding client and node will have identical
-names.
-
-In the Chef authorization model, there is one special client, the
-"validator", which is authorized to create new non-administrative
-clients but has minimal privileges otherwise. This identity is used as a
-sort of "guest account" to create a client identity when initially
-setting up a host for management with Chef.
-
-## CLIENT SUB-COMMANDS
+## SUB-COMMANDS
+Client subcommands follow a basic create, read, update, delete (CRUD)
+pattern. The Following subcommands are available:
## BULK DELETE
__knife client bulk delete__ _regex_ _(options)_
@@ -86,6 +72,22 @@ __client show__ _client name_ _(options)_
Show a client. Output format is determined by the --format option.
+## DESCRIPTION
+Clients are identities used for communication with the Chef Server API,
+roughly equivalent to user accounts on the Chef Server, except that
+clients only communicate with the Chef Server API and are authenticated
+via request signatures.
+
+In the typical case, there will be one client object on the server for
+each node, and the corresponding client and node will have identical
+names.
+
+In the Chef authorization model, there is one special client, the
+"validator", which is authorized to create new non-administrative
+clients but has minimal privileges otherwise. This identity is used as a
+sort of "guest account" to create a client identity when initially
+setting up a host for management with Chef.
+
## SEE ALSO
__knife-node__(1)
diff --git a/chef/distro/common/markdown/man1/knife-cookbook-site.mkd b/chef/distro/common/markdown/man1/knife-cookbook-site.mkd
index 81adf0c54f..01d57c1056 100644
--- a/chef/distro/common/markdown/man1/knife-cookbook-site.mkd
+++ b/chef/distro/common/markdown/man1/knife-cookbook-site.mkd
@@ -6,28 +6,58 @@ knife-cookbook-site(1) -- Install and update open source cookbooks
__knife__ __cookbook site__ _sub-command_ _(options)_
## COOKBOOK SITE SUB-COMMANDS
+`knife cookbook site` provides the following subcommands:
-The following sub-commands are still in the context of cookbooks, but they make use of Opscode's Cookbook Community site, _http://cookbooks.opscode.com/_. That site has an API, and these sub-commands utilize that API, rather than the Chef Server API.
+## INSTALL
+__cookbook site install COOKBOOK [VERSION]__ _(options)_
-__cookbook site download COOKBOOK [VERSION]__ _(options)_
+ * `-d`, `--dependencies`:
+ Grab dependencies automatically
+
+Uses git(1) version control in conjunction with the cookbook site to
+install community contributed cookbooks to your local cookbook
+repository. Running `knife cookbook site install` does the following:
+
+1. A new "pristine copy" branch is created in git for tracking the
+ upstream;
+2. All existing cookbooks are removed from the branch;
+3. The cookbook is downloaded from the cookbook site in tarball form;
+4. The downloaded cookbook is untarred, and its contents commited via git;
+5. The pristine copy branch is merged into the master branch.
+
+By installing cookbook with this process, you can locally modify the
+upstream cookbook in your master branch ant let git maintain your
+changes as a separate patch. When an updated upstream version becomes
+available, you will be able to merge the upstream changes while
+maintaining your local modifications.
+
+If _-d_ is specified, the process is applied recursively to all the
+cookbooks _COOKBOOK_ depends on (via metadata _dependencies_).
+
+## DOWNLOAD
+__knife cookbook site download COOKBOOK [VERSION]__ _(options)_
* `-f`, `--file FILE`:
The filename to write to
-Downloads a specific cookbook from the Community site, optionally specifying a certain version.
+Downloads a specific cookbook from the Community site, optionally
+specifying a certain version.
-__cookbook site list__ _(options)_
+## LIST
+__knife cookbook site list__ _(options)_
* `-w`, `--with-uri`:
Show corresponding URIs
Lists available cookbooks from the Community site.
-__cookbook site search QUERY__ _(options)_
+## SEARCH
+__knife cookbook site search QUERY__ _(options)_
-Searches the Community site with the specified query.
+Searches for available cookbooks matching the specified query.
-__cookbook site share COOKBOOK CATEGORY__ _(options)_
+## SHARE
+__knife cookbook site share COOKBOOK CATEGORY__ _(options)_
* `-k`, `--key KEY`:
API Client Key
@@ -36,26 +66,44 @@ __cookbook site share COOKBOOK CATEGORY__ _(options)_
* `-o`, `--cookbook-path PATH:PATH`:
A colon-separated path to look for cookbooks in
-Uploads the specified cookbook using the given category to the Opscode cookbooks site. Requires a login user and certificate for the Opscode Cookbooks site. See __EXAMPLES__ for usage if the Opscode user and certificate pair are not used for authenticating with the Chef Server. In other words, if the Chef Server is not the Opscode Platform.
+Uploads the specified cookbook using the given category to the Opscode
+cookbooks site. Requires a login user and certificate for the Opscode
+Cookbooks site. By default, knife will use the username and API key
+you've configured in your configuration file; otherwise you must
+explicitly set these values on the command line or use an alternate
+configuration file.
-__cookbook site unshare COOKBOOK__
+## UNSHARE
+__knife cookbook site unshare COOKBOOK__
Stops sharing the specified cookbook on the Opscode cookbooks site.
-__cookbook site show COOKBOOK [VERSION]__ _(options)_
+## SHOW
+__knife cookbook site show COOKBOOK [VERSION]__ _(options)_
Shows information from the site about a particular cookbook.
-__cookbook site vendor COOKBOOK [VERSION]__ _(options)_
+## DESCRIPTION
+The cookbook site, <http://community.opscode.com/>, is a cookbook
+distribution service operated by Opscode. This service provides users
+with a central location to publish cookbooks for sharing with other
+community members.
- * `-d`, `--dependencies`:
- Grab dependencies automatically
+`knife cookbook site` commands provide an interface to the cookbook
+site's HTTP API. For commands that read data from the API, no account is
+required. In order to upload cookbooks using the `knife cookbook site
+share` command, you must create an account on the cookbook site and
+configure your credentials via command line option or in your knife
+configuration file.
-Uses `git` version control in conjunction with the cookbook site to download upstream cookbooks. A new vendor branch is created in git, the cookbook downloaded from the site and untarred, then the master branch is merged. This allows the user to track upstream changes to cookbooks while merging in customizations. If _-d_ is specified, all the cookbooks it depends on (via metadata _dependencies_) are downloaded and untarred as well, each using their own vendor branch.
+## EXAMPLES
+Uploading cookbooks to the Opscode cookbooks site:
+ knife cookbook site share example Other -k ~/.chef/USERNAME.pem -u USERNAME
## SEE ALSO
- __knife-environment__(1)
+ __knife-cookbook(1)__
+ <http://community.opscode.com/cookbooks>
## AUTHOR
Chef was written by Adam Jacob <adam@opscode.com> with many contributions from the community.
diff --git a/chef/distro/common/markdown/man1/knife-cookbook.mkd b/chef/distro/common/markdown/man1/knife-cookbook.mkd
index 02ae6f3f90..32bdcfdbc5 100644
--- a/chef/distro/common/markdown/man1/knife-cookbook.mkd
+++ b/chef/distro/common/markdown/man1/knife-cookbook.mkd
@@ -1,136 +1,253 @@
-knife-cookbook(1) -- Upload and manage Chef cookbooks
+knife-cookbook(1) -- upload and manage chef cookbooks
========================================
## SYNOPSIS
__knife__ __cookbook__ _sub-command_ _(options)_
-## COOKBOOK SUB-COMMANDS
+## SUB-COMMANDS
+`knife cookbook` supports the following sub commands:
-Cookbooks are the fundamental unit of distribution in Chef. They encapsulate all recipes of resources and assets used to configure a particular aspect of the infrastructure. The following sub-commands can be used to manipulate the cookbooks stored on the Chef Server.
+## LIST
+__knife cookbook list__ _(options)_
-__cookbook bulk delete REGEX__ _(options)_
-
- * `-p`, `--purge`:
- Purge files from backing store. This will disable any cookbook that contains any of the same files as the cookbook being purged.
-
-Delete cookbooks on the Chef Server based on a regular expression. The regular expression (_REGEX_) should be in quotes, not in //'s.
-
-__cookbook create COOKBOOK__ _(options)_
-
- * `-o`, `--cookbook-path PATH`:
- The directory where the cookbook will be created
- * `-r`, `--readme-format FORMAT`:
- Format of the README file
- * `-C`, `--copyright COPYRIGHT`:
- Name of Copyright holder
- * `-I`, `--license LICENSE`:
- License for cookbook, apachev2 or none
- * `-E`, `--email EMAIL`:
- Email address of cookbook maintainer
-
-This is a helper command that creates a new cookbook directory in the `cookbook_path`. The following directories and files are created for the named cookbook.
-
-* COOKBOOK/attributes
-* COOKBOOK/definitions
-* COOKBOOK/files/default
-* COOKBOOK/libraries
-* COOKBOOK/metadata.rb
-* COOKBOOK/providers
-* COOKBOOK/README.rdoc
-* COOKBOOK/recipes/default.rb
-* COOKBOOK/resources
-* COOKBOOK/templates/default
-
-Supported README formats are 'rdoc' (default), 'md', 'mkd', 'txt'. The README file will be written with the specified extension and a set of helpful starting headers.
+ * `-a`, `--all`:
+ show all versions of a cookbook instead of just the most recent
+ * `-w`, `--with-uri`:
+ show corresponding uris
-Specify `-C` or `--copyright` with the name of the copyright holder as your name or your company/organization name in a quoted string. If this value is not specified an all-caps string `YOUR_COMPANY_NAME` is used which can be easily changed with find/replace.
+Lists the cookbooks available on the Chef server.
-Specify `-I` or `--license` with the license that the cookbook is distributed under for sharing with other people or posting to the Opscode Cookbooks site. Be aware of the licenses of files you put inside the cookbook and follow any restrictions they describe. When using `none` (default) or `apachev2`, comment header text and metadata file are pre-filled. The `none` license will be treated as non-redistributable.
+## SHOW
+__knife cookbook show cookbook [version] [part] [filename]__ _(options)_
-Specify `-E` or `--email` with the email address of the cookbook's maintainer. If this value is not specified, an all-caps string `YOUR_EMAIL` is used which can easily be changed with find/replace.
+ * `-f`, `--fqdn fqdn `:
+ the fqdn of the host to see the file for
+ * `-p`, `--platform platform `:
+ the platform to see the file for
+ * `-v`, `--platform-version version`:
+ the platform version to see the file for
-The cookbook copyright, license and email settings can be filled in the `knife.rb`, for example with default values:
+show a particular part of a _cookbook_ for the specified _version_. _part_ can be one of:
- cookbook_copyright "YOUR_COMPANY_NAME"
- cookbook_license "none"
- cookbook_email "YOUR_EMAIL"
+ * _attributes_
+ * _definitions_
+ * _files_
+ * _libraries_
+ * _providers_
+ * _recipes_
+ * _resources_
+ * _templates_
-__cookbook delete COOKBOOK [VERSION]__ _(options)_
+## UPLOAD
+__knife cookbook upload [cookbooks...]__ _(options)_
* `-a`, `--all`:
- Delete all versions
- * `-p`, `--purge`:
- Purge files from backing store. This will disable any cookbook that contains any of the same files as the cookbook being purged.
-
-Delete the specified _VERSION_ of the named _COOKBOOK_. If no version is specified, and only one version exists on the server, that version will be deleted. If multiple versions are available on the server, you will be prompted for a version to delete.
-
-__cookbook download COOKBOOK [VERSION]__ _(options)_
-
- * `-d`, `--dir DOWNLOAD_DIRECTORY`:
- The directory to download the cookbook into
+ upload all cookbooks, rather than just a single cookbook
+ * `-o`, `--cookbook-path path:path`:
+ a colon-separated path to look for cookbooks in
+ * `-E`, `--environment ENVIRONMENT`:
+ An _ENVIRONMENT_ to apply the uploaded cookbooks to. Specifying this
+ option will cause knife to edit the _ENVIRONMENT_ to place a strict
+ version constraint on the cookbook version(s) uploaded.
+ * `--freeze`:
+ Sets the frozen flag on the uploaded cookbook(s) Any future attempt
+ to modify the cookbook without changing the version number will
+ return an error unless --force is specified.
+ * `--force`:
+ Overrides the frozen flag on a cookbook, allowing you to overwrite a
+ cookbook version that has previously been uploaded with the --freeze
+ option.
+
+Uploads one or more cookbooks from your local cookbook repository(ies)
+to the Chef Server. Only files that don't yet exist on the server will
+be uploaded.
+
+## DOWNLOAD
+__knife cookbook download cookbook [version]__ _(options)_
+
+ * `-d`, `--dir download_directory`:
+ the directory to download the cookbook into
* `-f`, `--force`:
- Overwrite an existing directory with the download
- * `-N`, `--latest`:
- Download the latest version of the cookbook
-
-Download a cookbook from the Chef Server. If no version is specified and only one version exists on the server, that version will be downloaded. If no version is specified and multiple versions are available on the server, you will be prompted for a version to download.
-
-__cookbook list__ _(options)_
+ overwrite an existing directory with the download
+ * `-n`, `--latest`:
+ download the latest version of the cookbook
- * `-w`, `--with-uri`:
- Show corresponding URIs
-
-List all the cookbooks.
+download a cookbook from the chef server. if no version is specified and
+only one version exists on the server, that version will be downloaded.
+if no version is specified and multiple versions are available on the
+server, you will be prompted for a version to download.
-__cookbook metadata COOKBOOK__ _(options)_
+## DELETE
+__knife cookbook delete cookbook [version]__ _(options)_
* `-a`, `--all`:
- Generate metadata for all cookbooks, rather than just a single cookbook
- * `-o`, `--cookbook-path PATH:PATH`:
- A colon-separated path to look for cookbooks in
-
-Generate cookbook metadata for the named _COOKBOOK_. The _PATH_ used here specifies where the cookbooks directory is located and corresponds to the `cookbook_path` configuration option.
+ delete all versions
+ * `-p`, `--purge`:
+ purge files from backing store. this will disable any cookbook that contains any of the same files as the cookbook being purged.
-__cookbook metadata from FILE__ _(options)_
+delete the specified _version_ of the named _cookbook_. if no version is
+specified, and only one version exists on the server, that version will
+be deleted. if multiple versions are available on the server, you will
+be prompted for a version to delete.
-Load the cookbook metadata from a specified file.
+## BULK DELETE
+__knife cookbook bulk delete regex__ _(options)_
-__cookbook show COOKBOOK [VERSION] [PART] [FILENAME]__ _(options)_
+ * `-p`, `--purge`:
+ purge files from backing store. this will disable any cookbook that
+ contains any of the same files as the cookbook being purged.
+
+delete cookbooks on the chef server based on a regular expression. the
+regular expression (_regex_) should be in quotes, not in //'s.
+
+## COOKBOOK CREATE
+__knife cookbook create cookbook__ _(options)_
+
+ * `-o`, `--cookbook-path path`:
+ the directory where the cookbook will be created
+ * `-r`, `--readme-format format`:
+ format of the readme file
+ * `-c`, `--copyright copyright`:
+ name of copyright holder
+ * `-i`, `--license license`:
+ license for cookbook, apachev2 or none
+ * `-e`, `--email email`:
+ email address of cookbook maintainer
+
+this is a helper command that creates a new cookbook directory in the
+`cookbook_path`. the following directories and files are created for the
+named cookbook.
+
+* cookbook/attributes
+* cookbook/definitions
+* cookbook/files/default
+* cookbook/libraries
+* cookbook/metadata.rb
+* cookbook/providers
+* cookbook/readme.rdoc
+* cookbook/recipes/default.rb
+* cookbook/resources
+* cookbook/templates/default
+
+supported readme formats are 'rdoc' (default), 'md', 'mkd', 'txt'. the
+readme file will be written with the specified extension and a set of
+helpful starting headers.
+
+specify `-c` or `--copyright` with the name of the copyright holder as
+your name or your company/organization name in a quoted string. if this
+value is not specified an all-caps string `your_company_name` is used
+which can be easily changed with find/replace.
+
+specify `-i` or `--license` with the license that the cookbook is
+distributed under for sharing with other people or posting to the
+opscode cookbooks site. be aware of the licenses of files you put inside
+the cookbook and follow any restrictions they describe. when using
+`none` (default) or `apachev2`, comment header text and metadata file
+are pre-filled. the `none` license will be treated as
+non-redistributable.
+
+specify `-e` or `--email` with the email address of the cookbook's
+maintainer. if this value is not specified, an all-caps string
+`your_email` is used which can easily be changed with find/replace.
+
+the cookbook copyright, license and email settings can be filled in the
+`knife.rb`, for example with default values:
+
+ cookbook_copyright "your_company_name"
+ cookbook_license "none"
+ cookbook_email "your_email"
- * `-f`, `--fqdn FQDN `:
- The FQDN of the host to see the file for
- * `-p`, `--platform PLATFORM `:
- The platform to see the file for
- * `-V`, `--platform-version VERSION`:
- The platform version to see the file for
-Show a particular part of a _COOKBOOK_ for the specified _VERSION_. _PART_ can be one of:
-
- * _attributes_
- * _definitions_
- * _files_
- * _libraries_
- * _providers_
- * _recipes_
- * _resources_
- * _templates_
-
-__cookbook test [COOKBOOKS...]__ _(options)_
+## METADATA
+__knife cookbook metadata cookbook__ _(options)_
* `-a`, `--all`:
- Test all cookbooks, rather than just a single cookbook
- * `-o`, `--cookbook-path PATH:PATH`:
- A colon-separated path to look for cookbooks in
+ generate metadata for all cookbooks, rather than just a single cookbook
+ * `-o`, `--cookbook-path path:path`:
+ a colon-separated path to look for cookbooks in
-Test the specified cookbooks for syntax errors. This uses the built-in Ruby syntax checking option for files in the cookbook ending in `.rb`, and the ERB syntax check for files ending in `.erb` (templates).
+generate cookbook metadata for the named _cookbook_. the _path_ used here specifies where the cookbooks directory is located and corresponds to the `cookbook_path` configuration option.
-__cookbook upload [COOKBOOKS...]__ _(options)_
+## METADATA FROM FILE
+__knife cookbook metadata from file__ _(options)_
- * `-a`, `--all`:
- Upload all cookbooks, rather than just a single cookbook
- * `-o`, `--cookbook-path PATH:PATH`:
- A colon-separated path to look for cookbooks in
+load the cookbook metadata from a specified file.
-Uploads the specified cookbooks to the Chef Server. The actual upload executes a number of commands, most of which occur on the local machine. The cookbook is staged in a temporary location. Then the `cookbook_path` (or `-o PATH`) is processed to search for the named cookbook, and each occurance is copied in the order specified. A syntax check is performed a la `cookbook test`, above. The metadata is generated, a la `cookbook metadata`. A gzip(1)'ed, tar(1) file is created, and is uploaded to the server.
+## TEST
+__knife cookbook test [cookbooks...]__ _(options)_
+ * `-a`, `--all`:
+ test all cookbooks, rather than just a single cookbook
+ * `-o`, `--cookbook-path path:path`:
+ a colon-separated path to look for cookbooks in
+
+test the specified cookbooks for syntax errors. this uses the built-in
+ruby syntax checking option for files in the cookbook ending in `.rb`,
+and the erb syntax check for files ending in `.erb` (templates).
+
+## RECIPE LIST
+__knife recipe list [PATTERN]__
+
+List available recipes from the server. Specify _PATTERN_ as a regular
+expression to limit the results.
+
+## DESCRIPTION
+Cookbooks are the fundamental unit of distribution in Chef. They
+encapsulate all recipes of resources and assets used to configure a
+particular aspect of the infrastructure. The following sub-commands can
+be used to manipulate the cookbooks stored on the Chef Server.
+
+On disk, cookbooks are directories with a defined structure. The
+following directories may appear within a cookbook:
+
+ * COOKBOOK/attributes/:
+ Ruby files that define default parameters to be used in recipes
+ * COOKBOOK/definitions/:
+ Ruby files that contain _resource definitions_
+ * COOKBOOK/files/SPECIFICITY:
+ Files of arbitrary type. These files may be downloaded by
+ chef-client(8) when configuring a host.
+ * COOKBOOK/libraries/:
+ Ruby files that contain library code needed for recipes
+ * COOKBOOK/providers/:
+ Ruby files that contain Lightweight Provider definitions
+ * COOKBOOK/recipes/:
+ Ruby files that use Chef's recipe DSL to describe the desired
+ configuration of a system
+ * COOKBOOK/resources/:
+ Ruby files that contain Lightweight Resource definitions
+ * COOKBOOK/templates/SPECIFICITY:
+ ERuby (ERb) template files. These are referenced by _recipes_ and
+ evaluated to dynamically generate configuration files.
+
+__SPECIFICITY__ is a feature of _files_ and _templates_ that allow you
+to specify alternate files to be used on a specific OS platform or host.
+The default specificity setting is _default_, that is files in
+`COOKBOOK/files/default` will be used when a more specific copy is not
+available. Further documentation for this feature is available on the
+Chef wiki: <http://wiki.opscode.com/display/chef/File+Distribution#FileDistribution-FileSpecificity>
+
+Cookbooks also contain a metadata file that defines various properties
+of the cookbook. The most important of these are the _version_ and the
+_dependencies_. The _version_ is used in combination with environments
+to select which copy of a given cookbook is distributed to a node. The
+_dependencies_ are used by the server to determine which additional
+cookbooks must be distributed to a given host when it requires a
+cookbook.
+
+## SEE ALSO
+ __knife-environment(1)__ __knife-cookbook-site(1)__
+ <http://wiki.opscode.com/display/chef/Cookbooks>
+ <http://wiki.opscode.com/display/chef/Metadata>
+
+## AUTHOR
+ Chef was written by Adam Jacob <adam@opscode.com> with many contributions from the community.
+
+## DOCUMENTATION
+ This manual page was written by Joshua Timberman <joshua@opscode.com>.
+ Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.
+
+
+## CHEF
+ Knife is distributed with Chef. <http://wiki.opscode.com/display/chef/Home>
diff --git a/chef/distro/common/markdown/man1/knife-environment.mkd b/chef/distro/common/markdown/man1/knife-environment.mkd
index 9c17dd3465..2eebffbce6 100644
--- a/chef/distro/common/markdown/man1/knife-environment.mkd
+++ b/chef/distro/common/markdown/man1/knife-environment.mkd
@@ -5,4 +5,147 @@ knife-environment(1) -- Define cookbook policies for the environments in your in
__knife__ __environment__ _sub-command_ _(options)_
-## ENVIRONMENT SUBCOMMANDS
+## SUBCOMMANDS
+Environment subcommands follow a basic create, read, update, delete
+(CRUD) pattern. The following subcommands are available:
+
+## CREATE
+__knife environment create__ _environment_ _(options)_
+
+ * `-d`, `--description DESCRIPTION`:
+ The value of the description field.
+
+Create a new environment object on the Chef Server. The envrionment will
+be opened in the text editor for editing prior to creation if the -n
+option is not present.
+
+## DELETE
+__knife environment delete__ _environment_ _(options)_
+
+Destroy an environment on the Chef Server. A prompt for confirmation
+will be displayed if the -y options is not given.
+
+## EDIT
+__knife environment edit__ _environment_ _(options)_
+
+Fetch _environment_ and display it in the text editor for editing. The
+environment will be saved to the Chef Server when the editing session
+exits.
+
+## FROM FILE
+__knife environment from file__ _file_ _(options)_
+
+Create or update an environment from the JSON or Ruby format _file_. See
+__format__ for the proper format of this file.
+
+## LIST
+__knife environment list__ _(options)_
+ * `-w`, `--with-uri`:
+ Show the resource URI for each environment
+
+## SHOW
+__knife environment show__ _environment_ _(options)_
+
+## DESCRIPTION
+Environments provide a means to apply policies to hosts in your
+infrastructure based on business function. For example, you may have a
+separate copy of your infrastructure called "dev" that runs the latest
+version of your application and should use the newest versions of your
+cookbooks when configuring systems, and a production instance of your
+infrastructure where you wish to update code and cookbooks in a more
+controlled fashion. In Chef, this function is implemented with
+_environments_.
+
+Environments contain two major components: a set of cookbook version
+constraints and environment attributes.
+
+## SYNTAX
+A cookbook version constraint is comprised of a _cookbook name_ and a
+_version constraint_. The _cookbook name_ is the name of a cookbook in
+your system, and the _version constraint_ is a String describing the
+version(s) of that cookbook allowed in the environment. Only one
+_version constraint_ is supported for a given _cookbook name_.
+
+The exact syntax used to define a cookbook version constraint varies
+depending on whether you use the JSON format or the Ruby format. In the
+JSON format, the cookbook version constraints for an environment are
+represented as a single JSON object, like this:
+
+ {"apache2": ">= 1.5.0"}
+
+In the Ruby format, the cookbook version contraints for an environment
+are represented as a Ruby Hash, like this:
+
+ {"apache2" => ">= 1.5.0"}
+
+A _version number_ is a String comprised of two or three digits
+separated by a dot (.) character, or in other words, strings of the form
+"major.minor" or "major.minor.patch". "1.2" and "1.2.3" are examples of
+valid version numbers. Version numbers containing more than three digits
+or alphabetic characters are not supported.
+
+A _version constraint_ String is composed of an _operator_ and a
+_version number_. The following operators are available:
+
+ * `= VERSION`:
+ Equality. Only the exact version specified may be used.
+ * `> VERSION`:
+ Greater than. Only versions greater than `VERSION` may be used.
+ * `>= VERSION`:
+ Greater than or equal to. Only versions equal to VERSION or greater
+ may be used.
+ * `< VERSION`:
+ Less than. Only versions less than VERSION may be used.
+ * `<= VERSION`:
+ Less than or equal to. Only versions lesser or equal to VERSION may
+ be used.
+ * `~> VERSION`:
+ Pessimistic greater than. Depending on the number of components in
+ the given VERSION, the constraint will be optimistic about future
+ minor or patch revisions only. For example, `~> 1.1` will match any
+ version less than `2.0` and greater than or equal to `1.1.0`,
+ whereas `~> 2.0.5` will match any version less than `2.1.0` and
+ greater than or equal to `2.0.5`.
+
+## FORMAT
+The JSON format of an envioronment is as follows:
+
+ {
+ "name": "dev",
+ "description": "The development environment",
+ "cookbook_versions": {
+ "couchdb": "= 11.0.0"
+ },
+ "json_class": "Chef::Environment",
+ "chef_type": "environment",
+ "default_attributes": {
+ "apache2": { "listen_ports": [ "80", "443" ] }
+ },
+ "override_attributes": {
+ "aws_s3_bucket": "production"
+ }
+ }
+
+The Ruby format of an environment is as follows:
+
+ name "dev"
+ description "The development environment"
+ cookbook_versions "couchdb" => "= 11.0.0"
+ default_attributes "apache2" => { "listen_ports" => [ "80", "443" ] }
+ override_attributes "aws_s3_bucket" => "production"
+
+
+## SEE ALSO
+ __knife-node(1)__ __knife-cookbook(1)__ __knife-role(1)__
+ <http://wiki.opscode.com/display/chef/Environments>
+ <http://wiki.opscode.com/display/chef/Version+Constraints>
+
+## AUTHOR
+ Chef was written by Adam Jacob <adam@opscode.com> with many contributions from the community.
+
+## DOCUMENTATION
+ This manual page was written by Daniel DeLeo <dan@opscode.com>.
+ Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.
+
+## CHEF
+ Knife is distributed with Chef. <http://wiki.opscode.com/display/chef/Home>
diff --git a/chef/distro/common/markdown/man1/knife-exec.mkd b/chef/distro/common/markdown/man1/knife-exec.mkd
index b0edfa0cb6..34d9297fb9 100644
--- a/chef/distro/common/markdown/man1/knife-exec.mkd
+++ b/chef/distro/common/markdown/man1/knife-exec.mkd
@@ -5,5 +5,33 @@ knife-exec(1) -- Run user scripts using the Chef API DSL
__knife__ __exec__ _(options)_
-## EXEC SUBCOMMAND
+ * `-E`, `--exec CODE`:
+ Provide a snippet of code to evaluate on the command line
+
+## DESCRIPTION
+`knife exec` runs arbitrary ruby scripts in a context similar to that of
+the shef(1) DSL. See the shef documentation for a description of the
+commands available.
+
+## EXAMPLES
+ * Make an API call against an arbitrary endpoint:
+ knife exec -E 'api.get("nodes/fluke.localdomain/cookbooks")'
+ => list of cookbooks for the node _fluke.localdomain_
+ * Remove the role _obsolete_ from all nodes:
+ knife exec -E 'nodes.transform(:all){|n| n.run\_list.delete("role[obsolete]")}'
+ * Generate the expanded run list for hosts in the `webserver` role:
+ knife exec -E 'nodes.find(:roles => "webserver") {|n| n.expand!; n[:recipes]}'
+
+## SEE ALSO
+ __shef(1)__
+
+## AUTHOR
+ Chef was written by Adam Jacob <adam@opscode.com> with many contributions from the community.
+
+## DOCUMENTATION
+ This manual page was written by Joshua Timberman <joshua@opscode.com>.
+ Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.
+
+## CHEF
+ Knife is distributed with Chef. <http://wiki.opscode.com/display/chef/Home>
diff --git a/chef/distro/common/markdown/man1/knife-node.mkd b/chef/distro/common/markdown/man1/knife-node.mkd
index 4b5d1cf4f8..5937897ed8 100644
--- a/chef/distro/common/markdown/man1/knife-node.mkd
+++ b/chef/distro/common/markdown/man1/knife-node.mkd
@@ -28,7 +28,7 @@ host for the node name, though this may be overridden by configuration
settings.
## NODE SUB-COMMANDS
-
+The following `node` subcommands are available:
## BULK DELETE
__knife node bulk delete__ _regex_ _(options)_
diff --git a/chef/distro/common/markdown/man1/knife-recipe.mkd b/chef/distro/common/markdown/man1/knife-recipe.mkd
deleted file mode 100644
index c795f13e92..0000000000
--- a/chef/distro/common/markdown/man1/knife-recipe.mkd
+++ /dev/null
@@ -1,24 +0,0 @@
-knife-recipe(1) -- List the recipes available on a Chef Server
-========================================
-
-## SYNOPSIS
-
-__knife__ __recipe list [PATTERN]__
-
-List the recipes available on the server. The results shown can be
-limited with the optional PATTERN, which is a regular expression.
-PATTERN should be given in quotes, without slashes.
-
-## SEE ALSO
- __knife-cookbook__(1)
-
-## AUTHOR
- Chef was written by Adam Jacob <adam@opscode.com> with many contributions from the community.
-
-## DOCUMENTATION
- This manual page was written by Joshua Timberman <joshua@opscode.com>.
- Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.
-
-## CHEF
- Knife is distributed with Chef. <http://wiki.opscode.com/display/chef/Home>
-
diff --git a/chef/distro/common/markdown/man1/knife-role.mkd b/chef/distro/common/markdown/man1/knife-role.mkd
index ac7b42f27e..7e0dac9bc5 100644
--- a/chef/distro/common/markdown/man1/knife-role.mkd
+++ b/chef/distro/common/markdown/man1/knife-role.mkd
@@ -5,29 +5,26 @@ knife-role(1) -- Group common configuration settings
__knife__ __role__ _sub-command_ _(options)_
-## DESCRIPTION
-Roles provide a mechanism to group repeated configuration settings.
-Roles are data structures that contain __default\_attributes__, and
-__override_attributes__, which are nested hashes of configuration
-settings, and a __run_list__, which is an ordered list of recipes and
-roles that should be applied to a host by chef-client.
+## ROLE SUB-COMMANDS
+The following `role` subcommands are available:
-__default_attributes__ will be overridden if they conflict with a value
-on a node that includes the role. Conversely, __override_attributes__
-will override any values set on nodes that apply them.
+## LIST
+__knife role list__ _(options)_
-When __chef-client__(8) configures a host, it will "expand" the
-__run_list__ included in that host's node data. The expansion process
-will recursively replace any roles in the run\_list with that role's
-run\_list.
+ * `-w`, `--with-uri`:
+ Show corresponding URIs
+List roles.
-## ROLE SUB-COMMANDS
+## SHOW
+__knife role show ROLE__ _(options)_
-__knife role bulk delete REGEX__ _(options)_
+ * `-a`, `--attribute ATTR`:
+ Show only one attribute
-Delete roles on the Chef Server based on a regular expression. The regular expression (_REGEX_) should be in quotes, not in //'s.
+Show a specific role.
+## CREATE
__knife role create ROLE__ _(options)_
* `-d`, `--description`:
@@ -35,36 +32,45 @@ __knife role create ROLE__ _(options)_
Create a new role.
-__knife role delete ROLE__ _(options)_
-
-Delete a role.
-
+## EDIT
__knife role edit ROLE__ _(options)_
Edit a role.
+## FROM FILE
__knife role from file FILE__ _(options)_
Create or update a role from a role Ruby DSL (`.rb`) or JSON file.
-__knife role list__ _(options)_
+## DELETE
+__knife role delete ROLE__ _(options)_
- * `-w`, `--with-uri`:
- Show corresponding URIs
+Delete a role.
-List roles.
+## BULK DELETE
+__knife role bulk delete REGEX__ _(options)_
-__knife role show ROLE__ _(options)_
+Delete roles on the Chef Server based on a regular expression. The regular expression (_REGEX_) should be in quotes, not in //'s.
- * `-a`, `--attribute ATTR`:
- Show only one attribute
+## DESCRIPTION
+Roles provide a mechanism to group repeated configuration settings.
+Roles are data structures that contain __default\_attributes__, and
+__override_attributes__, which are nested hashes of configuration
+settings, and a __run_list__, which is an ordered list of recipes and
+roles that should be applied to a host by chef-client.
-Show a specific role.
+__default_attributes__ will be overridden if they conflict with a value
+on a node that includes the role. Conversely, __override_attributes__
+will override any values set on nodes that apply them.
+When __chef-client__(8) configures a host, it will "expand" the
+__run_list__ included in that host's node data. The expansion process
+will recursively replace any roles in the run\_list with that role's
+run\_list.
## SEE ALSO
- __knife-node__(1)
-
+ __knife-node(1)__ __knife-environment(1)__
+ <http://wiki.opscode.com/display/chef/Roles>
<http://wiki.opscode.com/display/chef/Attributes>
## AUTHOR
diff --git a/chef/distro/common/markdown/man1/knife-search.mkd b/chef/distro/common/markdown/man1/knife-search.mkd
index 50ec98592d..3e35a7969f 100644
--- a/chef/distro/common/markdown/man1/knife-search.mkd
+++ b/chef/distro/common/markdown/man1/knife-search.mkd
@@ -40,7 +40,6 @@ query syntax. The following data types are indexed for search:
## SEE ALSO
__knife-ssh__(1)
-
<http://wiki.opscode.com/display/chef/Attributes>
## AUTHOR
diff --git a/chef/distro/common/markdown/man1/knife-ssh.mkd b/chef/distro/common/markdown/man1/knife-ssh.mkd
index c8da64d306..07dbaa0fa2 100644
--- a/chef/distro/common/markdown/man1/knife-ssh.mkd
+++ b/chef/distro/common/markdown/man1/knife-ssh.mkd
@@ -49,8 +49,6 @@ The available multiplexers are:
## SEE ALSO
__knife-search__(1)
- <http://wiki.opscode.com/display/chef/Attributes>
-
## AUTHOR
Chef was written by Adam Jacob <adam@opscode.com> with many contributions from the community.
diff --git a/chef/distro/common/markdown/man1/knife-status.mkd b/chef/distro/common/markdown/man1/knife-status.mkd
index f333f53fb5..07f0ff305a 100644
--- a/chef/distro/common/markdown/man1/knife-status.mkd
+++ b/chef/distro/common/markdown/man1/knife-status.mkd
@@ -23,8 +23,6 @@ may not be publicly reachable.
## SEE ALSO
__knife-search__(1)
- <http://wiki.opscode.com/display/chef/Attributes>
-
## AUTHOR
Chef was written by Adam Jacob <adam@opscode.com> with many contributions from the community.
diff --git a/chef/distro/common/markdown/man1/knife-tag.mkd b/chef/distro/common/markdown/man1/knife-tag.mkd
index c43c0631dd..6a1a2c4b56 100644
--- a/chef/distro/common/markdown/man1/knife-tag.mkd
+++ b/chef/distro/common/markdown/man1/knife-tag.mkd
@@ -6,3 +6,34 @@ knife-tag(1) -- Apply tags to nodes on a Chef Server
__knife__ __tag__ _subcommand_ _(options)_
## TAG SUBCOMMANDS
+The following `tag` subcommands are available:
+
+## CREATE
+__knife tag create__ _node_ _tag_ [_..._]
+
+Adds one or more tags to _node_
+
+## DELETE
+__knife tag delete__ _node_ _tag_ [_..._]
+
+Removes one or more tags from _node_
+
+## LIST
+__knife tag list__ _node_
+
+Lists the tags applied to _node_
+
+
+## SEE ALSO
+ __knife-node(1)__
+
+## AUTHOR
+ Chef was written by Adam Jacob <adam@opscode.com> with many contributions from the community.
+
+## DOCUMENTATION
+ This manual page was written by Daniel DeLeo <dan@opscode.com>.
+ Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.
+
+## CHEF
+ Knife is distributed with Chef. <http://wiki.opscode.com/display/chef/Home>
+
diff --git a/chef/distro/common/markdown/man1/knife.mkd b/chef/distro/common/markdown/man1/knife.mkd
index ebd056c920..fb29861138 100644
--- a/chef/distro/common/markdown/man1/knife.mkd
+++ b/chef/distro/common/markdown/man1/knife.mkd
@@ -1,28 +1,39 @@
-knife(1) -- Chef Server REST API utility
+knife(1) -- Chef Server API client utility
========================================
## SYNOPSIS
-__knife__ _sub-command_ _(options)_
+__knife__ _sub-command_ [_argument_...] _(options)_
## DESCRIPTION
-This manual page documents knife, a command-line utility used to
-interact with a Chef server directly through the RESTful API. Knife uses
-sub-commands to take various actions on different types of Chef objects.
-Some sub-commands take additional options. General options follow
-sub-commands and their options. A configuration file can be created for
-common defaults.
-
-Unless otherwise specified, output is in JSON format, and input files
-are also JSON format.
-
-The Chef class `Chef::Config` that configures the behavior of how knife
-runs has options that correspond to command-line options. These are
-noted as `Chef::Config` values.
-
-## GENERAL OPTIONS
-
+Knife is a command-line utility used to manage data on a Chef server
+through the HTTP(S) API. Knife is organized into groups of subcommands
+centered around the various object types in Chef. Each category of
+subcommand is documented in its own manual page. Available topics are:
+
+ * bootstrap
+ * client
+ * configure
+ * cookbook-site
+ * cookbook
+ * data-bag
+ * environment
+ * exec
+ * index
+ * node
+ * recipe
+ * role
+ * search
+ * ssh
+ * status
+ * tag
+
+If the knife manuals are in your `MANPATH`, you can access help for the
+above topics using `man knife-TOPIC`; otherwise, you can view the
+documentation using `knife help TOPIC`.
+
+## OPTIONS
* `-s`, `--server-url` URL:
Chef Server URL, corresponds to `Chef::Config` `chef_server_url`.
* `-k`, `--key` KEY:
@@ -48,29 +59,21 @@ noted as `Chef::Config` values.
* `-y`, `--yes`:
Say yes to all prompts for confirmation
* `-h`, `--help`:
- Show this message
-
-Usage information for sub-commands can be displayed with `knife SUB-COMMAND --help`.
+ Show the available options for a command.
## SUB-COMMANDS
-Knife sub-commands are structured as _NOUN verb NOUN (options)_. The
-sub-commands are meant to be intuitively named. Because the Chef Server
-API is RESTful, sub-commands generally utilize CRUD operations.
+Sub-commands that operate on the basic Chef data types are structured as
+_NOUN verb NOUN (options)_. For all data types, the following commands
+are available:
* create (create)
* list and show (read)
* edit (update)
* delete (destroy)
-Objects stored on the server support these, as described below.
-
-## GENERAL SUB-COMMANDS
-
-__recipe list [PATTERN]__
-
-List available recipes from the server. Specify _PATTERN_ as a regular expression to limit the results.
-
+Knife also includes commands that take actions other than displaying or
+modifying data on the Chef Server, such as __knife-ssh(1)__.
## CONFIGURATION
@@ -82,94 +85,40 @@ be `.chef/knife.rb` in the current directory of the repository.
If the config file exists, knife uses these settings for __GENERAL OPTIONS__ defaults.
-`log_level`
-
-A Ruby symbol specifying the log level. Corresponds to `-l` or `--log_level` option. Default is _:info_. Valid values are:
-
- * :info
- * :debug
- * :warn
- * :fatal
-
-`log_location`
-
-Corresponds to the `-L` or `--log-file` option. Defaults is __STDOUT__.
-Valid values are __STDOUT__ or a filename.
-
-`node_name`
-
-User to authenticate to the Chef server. Corresponds to the `-u` or
-`--user` option. This is requested from the user when running this
-sub-command.
-
-`client_key`
-
-Private key file to authenticate to the Chef server. Corresponds to the
-`-k` or `--key` option. This is requested from the user when running
-this sub-command.
-
-`chef_server_url`
-
-URL of the Chef server. Corresponds to the `-s` or `--server-url`
-option. This is requested from the user when running this sub-command.
-
-`cache_type`
-
-The type of cache to use. Default is BasicFile. This can be any type of
-Cache that moneta supports: BasicFile, Berkeley, Couch, DataMapper,
-File, LMC, Memcache, Memory, MongoDB, Redis, Rufus, S3, SDBM, Tyrant,
-Xattr, YAML.
-
-`cache_options`
-
-Specifies various options to use for caching. Default reads the Chef
-client configuration (/etc/chef/checksums).
-
-`validation_client_name`
-
-Specifies the name of the client used to validate new clients. This is
-requested from the user when running the configuration sub-command.
-
-`validation_key`
-
-Specifies the private key file to use for generating ec2 instance data
-for validating new clients. This is implied from the
-`validation_client_name`.
-
-`cookbook_copyright`
-`cookbook_email`
-`cookbook_license`
-
-Used by `knife cookbook create` sub-command to specify the copyright
-holder, maintainer email and license (respectively) for new cookbooks.
-The copyright holder is listed as the maintainer in the cookbook's
-metadata and as the Copyright in the comments of the default recipe. The
-maintainer email is used in the cookbook metadata. The license
-determines what preamble to put in the comment of the default recipe,
-and is listed as the license in the cookbook metadata. Currently
-supported licenses are "apachev2" and "none". Any other values will
-result in an empty license in the metadata (needs to be filled in by the
-author), and no comment preamble in the default recipe.
-
-`knife[:aws_access_key_id]`
-`knife[:aws_secret_access_key]`
-
-Specifies the Amazon AWS EC2 credentials to use when running the ec2 sub-commands.
-
-`knife[:rackspace_api_username]`
-`knife[:rackspace_api_key]`
-
-Specifies the Rackspace Cloud credentials to use when running the rackspace sub-commands.
-
-`knife[:terremark_username]`
-`knife[:terremark_password]`
-`knife[:terremark_service]`
-
-Specifies the Terremark vCloud credentials to use when running the terremark sub-commands.
-
-`knife[:slicehost_password]`
-
-Specifies the Slicehost password to use when running the slicdehost sub-commands.
+ * `node_name`:
+ User or client identity (i.e., _name_) to use for authenticating
+ requests to the Chef Server.
+ * `client_key`:
+ Private key file to authenticate to the Chef server. Corresponds to the
+ `-k` or `--key` option.
+ * `chef_server_url`:
+ URL of the Chef server. Corresponds to the `-s` or `--server-url`
+ option. This is requested from the user when running this sub-command.
+ * `cache_type`:
+ The type of cache to use. Default is BasicFile. This can be any type of
+ Cache that moneta supports: BasicFile, Berkeley, Couch, DataMapper,
+ File, LMC, Memcache, Memory, MongoDB, Redis, Rufus, S3, SDBM, Tyrant,
+ Xattr, YAML.
+ * `cache_options`:
+ Specifies various options to use for caching. These options are
+ dependent on the `cache_type`.
+ * `validation_client_name`:
+ Specifies the name of the client used to validate new clients.
+ * `validation_key`:
+ Specifies the private key file to use when bootstrapping new hosts.
+ See knife-client(1) for more information about the validation
+ client.
+ * `cookbook_copyright`, `cookbook_email`, `cookbook_license`
+ Used by `knife cookbook create` sub-command to specify the copyright
+ holder, maintainer email and license (respectively) for new cookbooks.
+ The copyright holder is listed as the maintainer in the cookbook's
+ metadata and as the Copyright in the comments of the default recipe. The
+ maintainer email is used in the cookbook metadata. The license
+ determines what preamble to put in the comment of the default recipe,
+ and is listed as the license in the cookbook metadata. Currently
+ supported licenses are "apachev2" and "none". Any other values will
+ result in an empty license in the metadata (needs to be filled in by the
+ author), and no comment preamble in the default recipe.
## FILES
@@ -197,44 +146,6 @@ recommended though, and git fits with a lot of the workflow paradigms.
## EXAMPLES
-Example client config (`/etc/chef/client.rb`) from `knife configure
-client`. The same configuration is used when using the `knife bootstrap`
-command with the default `gem` templates that come with Chef.
-
- log_level :info
- log_location STDOUT
- chef_server_url 'https://api.opscode.com/organizations/ORGNAME'
- validation_client_name 'ORGNAME-validator'
-
-Setting up a custom bootstrap is fairly straightforward. Create
-`.chef/bootstrap` in your Chef Repository directory or in
-`$HOME/.chef/bootstrap`. Then create the ERB template file.
-
- mkdir ~/.chef/bootstrap
- vi ~/.chef/bootstrap/debian5.0-apt.erb
-
-For example, to create a new bootstrap template that should be used when
-setting up a new Debian node. Edit the template to run the commands, set
-up the validation certificate and the client configuration file, and
-finally to run chef-client on completion. The bootstrap template can be
-called with:
-
- knife bootstrap mynode.example.com --template-file ~/.chef/bootstrap/debian5.0-apt.erb
-
-Or,
-
- knife bootstrap mynode.example.com --distro debian5.0-apt
-
-The `--distro` parameter will automatically look in the
-`~/.chef/bootstrap` directory for a file named `debian5.0-apt.erb`.
-
-Templates provided by the Chef installation are located in
-`BASEDIR/lib/chef/knife/bootstrap/*.erb`, where _BASEDIR_ is the
-location where the package or Gem installed the Chef client libraries.
-
-Uploading cookbooks to the Opscode cookbooks site using the user/certificate specifically:
-
- knife cookbook site share example Other -k ~/.chef/USERNAME.pem -u USERNAME
## ENVIRONMENT
* `EDITOR`:
@@ -243,19 +154,36 @@ Uploading cookbooks to the Opscode cookbooks site using the user/certificate spe
data editing entirely.
## SEE ALSO
+ __chef-client(8)__ __chef-server(8)__ __shef(1)__
-Full documentation for Chef is located on the Chef wiki, http://wiki.opscode.com/display/chef/Home/.
+ __knife-bootstrap(1)__ __knife-client(1)__ __knife-configure(1)__
+ __knife-cookbook-site(1)__ __knife-cookbook(1)__ __knife-data-bag(1)__
+ __knife-environment(1)__ __knife-exec(1)__ __knife-index(1)__
+ __knife-node(1)__ __knife-recipe(1)__ __knife-role(1)__
+ __knife-search(1)__ __knife-ssh(1)__ __knife-tag(1)__
-JSON is JavaScript Object Notation and more information can be found at http://json.org/.
+ Complete Chef documentation is available online: <http://wiki.opscode.com/display/chef/Home/>
-SOLR is an open source search engine. The Chef Server includes a SOLR installation. More information about SOLR, including the search query syntax, can be found at http://lucene.apache.org/solr/.
+ JSON is JavaScript Object Notation <http://json.org/>
-Git is a version control system and documented at http://git-scm.com/.
+ SOLR is an open source search engine. <http://lucene.apache.org/solr/>
-This manual page was generated in nroff from Markdown with ronn. Ryan Tomayko wrote ronn and more information can be found at http://rtomayko.github.com/ronn/ronn.5.html.
+ __git(1)__ is a version control system <http://git-scm.com/>
+
+ This manual page was generated from Markdown with __ronn(1)__ <http://rtomayko.github.com/ronn/ronn.1.html>
## AUTHOR
+ Chef was written by Adam Jacob <adam@opscode.com> of Opscode
+ (<http://www.opscode.com>), with contributions from the community.
+
+## DOCUMENTATION
+ This manual page was written by Joshua Timberman <joshua@opscode.com>.
+
+## LICENSE
+ Both Chef and this documentation are released under the terms of the
+ Apache 2.0 License. You may view the license online: <http://www.apache.org/licenses/LICENSE-2.0.html>
+ On some systems, the complete text of the Apache 2.0 License may be found in `/usr/share/common-licenses/Apache-2.0`.
-Chef was written by Adam Jacob <adam@opscode.com> of Opscode (<http://www.opscode.com>), with contributions from the community. This manual page was written by Joshua Timberman <joshua@opscode.com>. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.
+## CHEF
+ Knife is distributed with Chef. <http://wiki.opscode.com/display/chef/Home>
-On Debian systems, the complete text of the Apache 2.0 License can be found in `/usr/share/common-licenses/Apache-2.0`.
diff --git a/chef/distro/common/markdown/man1/shef.mkd b/chef/distro/common/markdown/man1/shef.mkd
new file mode 100644
index 0000000000..a2e0f04814
--- /dev/null
+++ b/chef/distro/common/markdown/man1/shef.mkd
@@ -0,0 +1,189 @@
+shef(1) -- Interactive Chef Console
+========================================
+
+## SYNOPSIS
+
+__shef__ [_named configuration_] _(options)_
+
+ * `-S`, `--server CHEF_SERVER_URL`:
+ The chef server URL
+ * `-z`, `--client`:
+ chef-client mode
+ * `-c`, `--config CONFIG`:
+ The configuration file to use
+ * `-j`, `--json-attributes JSON_ATTRIBS`:
+ Load attributes from a JSON file or URL
+ * `-l`, `--log-level LOG_LEVEL`:
+ Set the logging level
+ * `-s`, `--solo`:
+ chef-solo shef session
+ * `-a`, `--standalone`:
+ standalone shef session
+ * `-v`, `--version`:
+ Show chef version
+ * `-h`, `--help`:
+ Show command options
+
+When no --config option is specified, shef attempts to load a default configuration file:
+
+* If a _named configuration_ is given, shef will load ~/.chef/_named
+ configuration_/shef.rb
+* If no _named configuration_ is given shef will load ~/.chef/shef.rb if it exists
+* Shef falls back to loading /etc/chef/client.rb or /etc/chef/solo.rb if -z or
+ -s options are given and no shef.rb can be found.
+* The --config option takes precedence over implicit configuration
+ paths.
+
+## DESCRIPTION
+
+`shef` is an irb(1) (interactive ruby) session customized for Chef.
+`shef` serves two primary functions: it provides a means to
+interact with a Chef Server interactively using a convenient DSL; it
+allows you to define and run Chef recipes interactively.
+
+## SYNTAX
+Shef uses irb's subsession feature to provide multiple modes of
+interaction. In addition to the primary mode which is entered on start,
+`recipe` and `attributes` modes are available.
+
+## PRIMARY MODE
+The following commands are available in the primary
+session:
+
+ * `help`:
+ Prints a list of available commands
+ * `version`:
+ Prints the Chef version
+ * `recipe`:
+ Switches to `recipe` mode
+ * `attributes`:
+ Switches to `attributes` mode
+ * `run_chef`:
+ Initiates a chef run
+ * `reset`:
+ reinitializes shef
+ * `echo :on|:off`:
+ Turns irb's echo function on or off. Echo is _on_ by default.
+ * `tracing :on|:off`:
+ Turns irb's function tracing feature on or off. Tracing is extremely
+ verbose and expected to be of interest primarily to developers.
+ * `node`:
+ Returns the _node_ object for the current host. See knife-node(1)
+ for more information about nodes.
+ * `ohai`:
+ Prints the attributes of _node_
+
+In addition to these commands, shef provides a DSL for accessing data on
+the Chef Server. When working with remote data in shef, you chain method
+calls in the form _object type_._operation_, where _object type_ is in
+plural form. The following object types are available:
+
+ * `nodes`
+ * `roles`
+ * `data_bags`
+ * `clients`
+ * `cookbooks`
+
+For each _object type_ the following operations are available:
+
+ * _object type_.all(_&block_):
+ Loads all items from the server. If the optional code _block_ is
+ given, each item will be passed to the block and the results
+ returned, similar to ruby's `Enumerable#map` method.
+ * _object type_.show(_object name_):
+ Aliased as _object type_.load
+
+ Loads the singular item identified by _object name_.
+ * _object type_.search(_query_, _&block_):
+ Aliased as _object type_.find
+
+ Runs a search against the server and returns the matching items. If
+ the optional code _block_ is given each item will be passed to the
+ block and the results returned.
+
+ The _query_ may be a Solr/Lucene format query given as a String, or
+ a Hash of conditions. If a Hash is given, the options will be ANDed
+ together. To join conditions with OR, use negative queries, or any
+ advanced search syntax, you must provide give the query in String
+ form.
+ * _object type_.transform(:all|_query_, _&block_):
+ Aliased as _object type_.bulk_edit
+
+ Bulk edit objects by processing them with the (required) code _block_.
+ You can edit all objects of the given type by passing the Symbol
+ `:all` as the argument, or only a subset by passing a _query_ as the
+ argument. The _query_ is evaluated in the same way as with
+ __search__.
+
+ The return value of the code _block_ is used to alter the behavior
+ of `transform`. If the value returned from the block is `nil` or
+ `false`, the object will not be saved. Otherwise, the object is
+ saved after being passed to the block. This behavior can be
+ exploited to create a dry run to test a data transformation.
+
+## RECIPE MODE
+Recipe mode implements Chef's recipe DSL. Exhaustively documenting this
+DSL is outside the scope of this document. See the following pages in
+the Chef documentation for more information:
+
+ * <http://wiki.opscode.com/display/chef/Resources>
+ * <http://wiki.opscode.com/display/chef/Recipes>
+
+Once you have defined resources in the recipe, you can trigger a
+convergence run via `run_chef`
+
+## EXAMPLES
+
+* A "Hello World" interactive recipe
+
+ chef > recipe
+ chef:recipe > echo :off
+ chef:recipe > file "/tmp/hello\_world"
+ chef:recipe > run\_chef
+ [Sat, 09 Apr 2011 08:56:56 -0700] INFO: Processing file[/tmp/hello\_world] action create ((irb#1) line 2)
+ [Sat, 09 Apr 2011 08:56:56 -0700] INFO: file[/tmp/hello\_world] created file /tmp/hello\_world
+ chef:recipe > pp ls '/tmp'
+ [".",
+ "..",
+ "hello\_world"]
+
+* Search for _nodes_ by role, and print their IP addresses
+
+ chef > nodes.find(:roles => 'monitoring-server') {|n| n[:ipaddress] }
+ => ["10.254.199.5"]
+
+* Remove the role _obsolete_ from every node in the system
+
+ chef > nodes.transform(:all) {|n| n.run\_list.delete('role[obsolete]') }
+ => [node[chef098b2.opschef.com], node[ree-woot], node[graphite-dev], node[fluke.localdomain], node[ghost.local], node[kallistec]]
+
+
+## BUGS
+The name `shef` is clever in print but is confusing when spoken aloud.
+Pronouncing `shef` as `chef console` is an imperfect workaround.
+
+`shef` often does not perfectly replicate the context in which
+chef-client(8) configures a host, which may lead to discrepancies in
+observed behavior.
+
+`shef` has to duplicate much code from chef-client's internal libraries
+and may become out of sync with the behavior of those libraries.
+
+## SEE ALSO
+ chef-client(8) knife(1)
+ <http://wiki.opscode.com/display/chef/Shef>
+
+## AUTHOR
+ Chef was written by Adam Jacob <adam@opscode.com> with many
+ contributions from the community. Shef was written by Daniel DeLeo.
+
+## DOCUMENTATION
+ This manual page was written by Daniel DeLeo <dan@opscode.com>.
+ Permission is granted to copy, distribute and / or modify this
+ document under the terms of the Apache 2.0 License.
+
+## CHEF
+ Shef is distributed with Chef. <http://wiki.opscode.com/display/chef/Home>
+
+
+
diff --git a/chef/lib/chef/api_client.rb b/chef/lib/chef/api_client.rb
index a202bccb27..148090d7be 100644
--- a/chef/lib/chef/api_client.rb
+++ b/chef/lib/chef/api_client.rb
@@ -7,9 +7,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,22 +25,23 @@ require 'chef/certificate'
require 'chef/index_queue'
require 'chef/mash'
require 'chef/json_compat'
+require 'chef/search/query'
class Chef
- class ApiClient
-
+ class ApiClient
+
include Chef::Mixin::FromFile
include Chef::Mixin::ParamsValidate
include Chef::IndexQueue::Indexable
-
-
+
+
DESIGN_DOCUMENT = {
"version" => 1,
"language" => "javascript",
"views" => {
"all" => {
"map" => <<-EOJS
- function(doc) {
+ function(doc) {
if (doc.chef_type == "client") {
emit(doc.name, doc);
}
@@ -49,7 +50,7 @@ class Chef
},
"all_id" => {
"map" => <<-EOJS
- function(doc) {
+ function(doc) {
if (doc.chef_type == "client") {
emit(doc.name, doc.name);
}
@@ -60,10 +61,10 @@ class Chef
}
attr_accessor :couchdb_rev, :couchdb_id, :couchdb
-
+
# Create a new Chef::ApiClient object.
def initialize(couchdb=nil)
- @name = ''
+ @name = ''
@public_key = nil
@private_key = nil
@couchdb_rev = nil
@@ -76,7 +77,7 @@ class Chef
#
# @params [Optional String] The name must be alpha-numeric plus - and _.
# @return [String] The current value of the name.
- def name(arg=nil)
+ def name(arg=nil)
set_or_return(
:name,
arg,
@@ -84,7 +85,7 @@ class Chef
)
end
- # Gets or sets whether this client is an admin.
+ # Gets or sets whether this client is an admin.
#
# @params [Optional True/False] Should be true or false - default is false.
# @return [True/False] The current value
@@ -97,10 +98,10 @@ class Chef
end
# Gets or sets the public key.
- #
- # @params [Optional String] The string representation of the public key.
+ #
+ # @params [Optional String] The string representation of the public key.
# @return [String] The current value.
- def public_key(arg=nil)
+ def public_key(arg=nil)
set_or_return(
:public_key,
arg,
@@ -109,10 +110,10 @@ class Chef
end
# Gets or sets the private key.
- #
+ #
# @params [Optional String] The string representation of the private key.
# @return [String] The current value.
- def private_key(arg=nil)
+ def private_key(arg=nil)
set_or_return(
:private_key,
arg,
@@ -122,7 +123,7 @@ class Chef
# Creates a new public/private key pair, and populates the public_key and
# private_key attributes.
- #
+ #
# @return [True]
def create_keys
results = Chef::Certificate.gen_keypair(self.name)
@@ -133,7 +134,7 @@ class Chef
# The hash representation of the object. Includes the name and public_key,
# but never the private key.
- #
+ #
# @return [Hash]
def to_hash
result = {
@@ -148,12 +149,12 @@ class Chef
end
# The JSON representation of the object.
- #
+ #
# @return [String] the JSON string.
def to_json(*a)
to_hash.to_json(*a)
end
-
+
def self.json_create(o)
client = Chef::ApiClient.new
client.name(o["name"] || o["clientname"])
@@ -164,7 +165,7 @@ class Chef
client.index_id = client.couchdb_id
client
end
-
+
# List all the Chef::ApiClient objects in the CouchDB. If inflate is set
# to true, you will get the full list of all ApiClients, fully inflated.
def self.cdb_list(inflate=false, couchdb=nil)
@@ -172,7 +173,7 @@ class Chef
lookup = (inflate ? "value" : "key")
rs["rows"].collect { |r| r[lookup] }
end
-
+
def self.list(inflate=false)
if inflate
response = Hash.new
@@ -185,15 +186,15 @@ class Chef
Chef::REST.new(Chef::Config[:chef_server_url]).get_rest("clients")
end
end
-
+
# Load a client by name from CouchDB
- #
+ #
# @params [String] The name of the client to load
# @return [Chef::ApiClient] The resulting Chef::ApiClient object
def self.cdb_load(name, couchdb=nil)
(couchdb || Chef::CouchDB.new).load("client", name)
end
-
+
# Load a client by name via the API
def self.load(name)
response = Chef::REST.new(Chef::Config[:chef_server_url]).get_rest("clients/#{name}")
@@ -205,7 +206,7 @@ class Chef
client
end
end
-
+
# Remove this client from the CouchDB
#
# @params [String] The name of the client to delete
@@ -213,17 +214,17 @@ class Chef
def cdb_destroy
@couchdb.delete("client", @name, @couchdb_rev)
end
-
+
# Remove this client via the REST API
def destroy
Chef::REST.new(Chef::Config[:chef_server_url]).delete_rest("clients/#{@name}")
end
-
+
# Save this client to the CouchDB
def cdb_save
@couchdb_rev = @couchdb.store("client", @name, self)["rev"]
end
-
+
# Save this client via the REST API, returns a hash including the private key
def save(new_key=false, validation=false)
if validation
@@ -237,23 +238,23 @@ class Chef
rescue Net::HTTPServerException => e
# If that fails, go ahead and try and update it
if e.response.code == "409"
- r.put_rest("clients/#{name}", { :name => self.name, :admin => self.admin, :private_key => new_key })
+ r.put_rest("clients/#{name}", { :name => self.name, :admin => self.admin, :private_key => new_key })
else
raise e
end
end
- end
-
+ end
+
# Create the client via the REST API
def create
Chef::REST.new(Chef::Config[:chef_server_url]).post_rest("clients", self)
end
-
+
# Set up our CouchDB design document
def self.create_design_document(couchdb=nil)
(couchdb ||= Chef::CouchDB.new).create_design_document("clients", DESIGN_DOCUMENT)
end
-
+
# As a string
def to_s
"client[#{@name}]"
diff --git a/chef/lib/chef/application/knife.rb b/chef/lib/chef/application/knife.rb
index 335d3bfe88..879e109e83 100644
--- a/chef/lib/chef/application/knife.rb
+++ b/chef/lib/chef/application/knife.rb
@@ -24,7 +24,7 @@ class Chef::Application::Knife < Chef::Application
NO_COMMAND_GIVEN = "You need to pass a sub-command (e.g., knife SUB-COMMAND)\n"
- banner "Usage: #{$0} sub-command (options)"
+ banner "Usage: knife sub-command (options)"
option :config_file,
:short => "-c CONFIG",
diff --git a/chef/lib/chef/client.rb b/chef/lib/chef/client.rb
index 8384d41c22..fe4c9a46ed 100644
--- a/chef/lib/chef/client.rb
+++ b/chef/lib/chef/client.rb
@@ -22,6 +22,7 @@ require 'chef/config'
require 'chef/mixin/params_validate'
require 'chef/log'
require 'chef/rest'
+require 'chef/api_client'
require 'chef/platform'
require 'chef/node'
require 'chef/role'
diff --git a/chef/lib/chef/cookbook/cookbook_version_loader.rb b/chef/lib/chef/cookbook/cookbook_version_loader.rb
index ade4141fc0..48de17cc5a 100644
--- a/chef/lib/chef/cookbook/cookbook_version_loader.rb
+++ b/chef/lib/chef/cookbook/cookbook_version_loader.rb
@@ -56,7 +56,9 @@ class Chef
remove_ignored_files
- if File.exists?(File.join(@cookbook_path, "metadata.json"))
+ if File.exists?(File.join(@cookbook_path, "metadata.rb"))
+ @metadata_filenames << File.join(@cookbook_path, "metadata.rb")
+ elsif File.exists?(File.join(@cookbook_path, "metadata.json"))
@metadata_filenames << File.join(@cookbook_path, "metadata.json")
end
@@ -88,12 +90,14 @@ class Chef
# Generates the Cookbook::Metadata object
def metadata(cookbook_version)
@metadata = Chef::Cookbook::Metadata.new(cookbook_version)
- @metadata_filenames.each do |meta_json|
- begin
- @metadata.from_json(IO.read(meta_json))
- rescue JSON::ParserError
- Chef::Log.error("Couldn't parse cookbook metadata JSON for #@cookbook_name in " + meta_json)
- raise
+ @metadata_filenames.each do |metadata_file|
+ case metadata_file
+ when /\.rb$/
+ apply_ruby_metadata(metadata_file)
+ when /\.json$/
+ apply_json_metadata(metadata_file)
+ else
+ raise RuntimeError, "Invalid metadata file: #{metadata_file} for cookbook: #{cookbook_version}"
end
end
@metadata
@@ -146,6 +150,24 @@ class Chef
end
end
+ def apply_ruby_metadata(file)
+ begin
+ @metadata.from_file(file)
+ rescue JSON::ParserError
+ Chef::Log.error("Error evaluating metadata.rb for #@cookbook_name in " + file)
+ raise
+ end
+ end
+
+ def apply_json_metadata(file)
+ begin
+ @metadata.from_json(IO.read(file))
+ rescue JSON::ParserError
+ Chef::Log.error("Couldn't parse cookbook metadata JSON for #@cookbook_name in " + file)
+ raise
+ end
+ end
+
end
end
end
diff --git a/chef/lib/chef/cookbook/metadata.rb b/chef/lib/chef/cookbook/metadata.rb
index 407a29ddaa..3ee85b8010 100644
--- a/chef/lib/chef/cookbook/metadata.rb
+++ b/chef/lib/chef/cookbook/metadata.rb
@@ -18,6 +18,7 @@
# limitations under the License.
#
+require 'chef/mash'
require 'chef/mixin/from_file'
require 'chef/mixin/params_validate'
require 'chef/mixin/check_helper'
diff --git a/chef/lib/chef/cookbook_uploader.rb b/chef/lib/chef/cookbook_uploader.rb
index 877f320022..dec3dd194f 100644
--- a/chef/lib/chef/cookbook_uploader.rb
+++ b/chef/lib/chef/cookbook_uploader.rb
@@ -1,3 +1,5 @@
+
+require 'set'
require 'rest_client'
require 'chef/exceptions'
require 'chef/knife/cookbook_metadata'
@@ -10,6 +12,23 @@ require 'chef/cookbook/file_system_file_vendor'
class Chef
class CookbookUploader
+ def self.work_queue
+ @work_queue ||= Queue.new
+ end
+
+ def self.setup_worker_threads
+ @worker_threads ||= begin
+ work_queue
+ (1...10).map do
+ Thread.new do
+ loop do
+ work_queue.pop.call
+ end
+ end
+ end
+ end
+ end
+
attr_reader :cookbook
attr_reader :path
attr_reader :opts
@@ -35,51 +54,37 @@ class Chef
end
def upload_cookbook
+ Thread.abort_on_exception = true
Chef::Log.info("Saving #{cookbook.name}")
# Syntax Check
validate_cookbook
- # Generate metadata.json from metadata.rb
- build_metadata
-
# generate checksums of cookbook files and create a sandbox
checksum_files = cookbook.checksums
checksums = checksum_files.inject({}){|memo,elt| memo[elt.first]=nil ; memo}
new_sandbox = rest.post_rest("sandboxes", { :checksums => checksums })
Chef::Log.info("Uploading files")
+
+ self.class.setup_worker_threads
+
+ checksums_to_upload = Set.new
+
# upload the new checksums and commit the sandbox
new_sandbox['checksums'].each do |checksum, info|
if info['needs_upload'] == true
+ checksums_to_upload << checksum
Chef::Log.info("Uploading #{checksum_files[checksum]} (checksum hex = #{checksum}) to #{info['url']}")
-
- # Checksum is the hexadecimal representation of the md5,
- # but we need the base64 encoding for the content-md5
- # header
- checksum64 = Base64.encode64([checksum].pack("H*")).strip
- timestamp = Time.now.utc.iso8601
- file_contents = File.read(checksum_files[checksum])
- # TODO - 5/28/2010, cw: make signing and sending the request streaming
- sign_obj = Mixlib::Authentication::SignedHeaderAuth.signing_object(
- :http_method => :put,
- :path => URI.parse(info['url']).path,
- :body => file_contents,
- :timestamp => timestamp,
- :user_id => rest.client_name
- )
- headers = { 'content-type' => 'application/x-binary', 'content-md5' => checksum64, :accept => 'application/json' }
- headers.merge!(sign_obj.sign(OpenSSL::PKey::RSA.new(rest.signing_key)))
-
- begin
- RestClient::Resource.new(info['url'], :headers=>headers, :timeout=>1800, :open_timeout=>1800).put(file_contents)
- rescue RestClient::Exception => e
- Chef::Log.error("Upload failed: #{e.message}\n#{e.response.body}")
- raise
- end
+ self.class.work_queue << uploader_function_for(checksum_files[checksum], checksum, info['url'], checksums_to_upload)
else
Chef::Log.debug("#{checksum_files[checksum]} has not changed")
end
end
+
+ until checksums_to_upload.empty?
+ sleep 0.1
+ end
+
sandbox_url = new_sandbox['uri']
Chef::Log.debug("Committing sandbox")
# Retry if S3 is claims a checksum doesn't exist (the eventual
@@ -100,15 +105,36 @@ class Chef
Chef::Log.info("Upload complete!")
end
- def build_metadata
- Chef::Log.debug("Generating metadata")
- # FIXME: This knife command should be factored out into a
- # library for use here
- kcm = Chef::Knife::CookbookMetadata.new
- kcm.config[:cookbook_path] = path
- kcm.name_args = [ cookbook.name.to_s ]
- kcm.run
- cookbook.reload_metadata!
+ def worker_thread(work_queue)
+ end
+
+ def uploader_function_for(file, checksum, url, checksums_to_upload)
+ lambda do
+ # Checksum is the hexadecimal representation of the md5,
+ # but we need the base64 encoding for the content-md5
+ # header
+ checksum64 = Base64.encode64([checksum].pack("H*")).strip
+ timestamp = Time.now.utc.iso8601
+ file_contents = File.read(file)
+ # TODO - 5/28/2010, cw: make signing and sending the request streaming
+ sign_obj = Mixlib::Authentication::SignedHeaderAuth.signing_object(
+ :http_method => :put,
+ :path => URI.parse(url).path,
+ :body => file_contents,
+ :timestamp => timestamp,
+ :user_id => rest.client_name
+ )
+ headers = { 'content-type' => 'application/x-binary', 'content-md5' => checksum64, :accept => 'application/json' }
+ headers.merge!(sign_obj.sign(OpenSSL::PKey::RSA.new(rest.signing_key)))
+
+ begin
+ RestClient::Resource.new(url, :headers=>headers, :timeout=>1800, :open_timeout=>1800).put(file_contents)
+ checksums_to_upload.delete(checksum)
+ rescue RestClient::Exception => e
+ ui.error("Failed to upload #@cookbook : #{e.message}\n#{e.response.body}")
+ raise
+ end
+ end
end
def validate_cookbook
diff --git a/chef/lib/chef/cookbook_version.rb b/chef/lib/chef/cookbook_version.rb
index 45ac21c6ef..bce45578fb 100644
--- a/chef/lib/chef/cookbook_version.rb
+++ b/chef/lib/chef/cookbook_version.rb
@@ -861,7 +861,9 @@ class Chef
# [String]:: Array of cookbook versions, which are strings like 'x.y.z'
# nil:: if the cookbook doesn't exist. an error will also be logged.
def self.available_versions(cookbook_name)
- chef_server_rest.get_rest("cookbooks/#{cookbook_name}").values.flatten
+ chef_server_rest.get_rest("cookbooks/#{cookbook_name}")[cookbook_name]["versions"].map do |cb|
+ cb["version"]
+ end
rescue Net::HTTPServerException => e
if e.to_s =~ /^404/
Chef::Log.error("Cannot find a cookbook named #{cookbook_name}")
diff --git a/chef/lib/chef/couchdb.rb b/chef/lib/chef/couchdb.rb
index 3f269fa5f4..5788356a77 100644
--- a/chef/lib/chef/couchdb.rb
+++ b/chef/lib/chef/couchdb.rb
@@ -78,7 +78,6 @@ class Chef
end
def create_design_document(name, data)
- create_db
to_update = true
begin
old_doc = @rest.get_rest("#{couchdb_database}/_design/#{name}")
diff --git a/chef/lib/chef/knife.rb b/chef/lib/chef/knife.rb
index 83c0a74ab9..1b28f5382e 100644
--- a/chef/lib/chef/knife.rb
+++ b/chef/lib/chef/knife.rb
@@ -288,7 +288,8 @@ class Chef
read_config_file(config[:config_file])
else
# ...but do log a message if no config was found.
- self.msg("No knife configuration file found")
+ Chef::Config[:color] = config[:color] && !config[:no_color]
+ ui.warn("No knife configuration file found")
end
Chef::Config[:color] = config[:color] && !config[:no_color]
@@ -320,7 +321,7 @@ class Chef
Chef::Log.debug("Using configuration from #{config[:config_file]}")
if Chef::Config[:node_name].nil?
- raise ArgumentError, "No user specified, pass via -u or specifiy 'node_name' in #{config[:config_file] ? config[:config_file] : "~/.chef/knife.rb"}"
+ #raise ArgumentError, "No user specified, pass via -u or specifiy 'node_name' in #{config[:config_file] ? config[:config_file] : "~/.chef/knife.rb"}"
end
end
@@ -476,7 +477,7 @@ class Chef
output(format_for_display(object)) if config[:print_after]
obj_name = delete_name ? "#{delete_name}[#{name}]" : object
- self.msg("Deleted #{obj_name}!")
+ self.msg("Deleted #{obj_name}")
end
def bulk_delete(klass, fancy_name, delete_name=nil, list=nil, regex=nil, &block)
@@ -514,6 +515,13 @@ class Chef
end
end
+ def noauth_rest
+ @rest ||= begin
+ require 'chef/rest'
+ Chef::REST.new(Chef::Config[:chef_server_url], false, false)
+ end
+ end
+
def server_url
Chef::Config[:chef_server_url]
end
diff --git a/chef/lib/chef/knife/bootstrap/centos5-gems.erb b/chef/lib/chef/knife/bootstrap/centos5-gems.erb
index 0646f613c3..4f1256c173 100644
--- a/chef/lib/chef/knife/bootstrap/centos5-gems.erb
+++ b/chef/lib/chef/knife/bootstrap/centos5-gems.erb
@@ -1,11 +1,17 @@
bash -c '
-rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
-rpm -Uvh http://download.elff.bravenet.com/5/i386/elff-release-5-3.noarch.rpm
+if [ ! -f /usr/bin/chef-client ]; then
+ rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
+ rpm -Uvh http://download.elff.bravenet.com/5/i386/elff-release-5-3.noarch.rpm
-yum install -q -y ruby ruby-devel gcc gcc-c++ automake autoconf rubygems make
+ yum install -q -y ruby ruby-devel gcc gcc-c++ automake autoconf make
+
+ cd /tmp
+ wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
+ tar zxf rubygems-1.3.7.tgz
+ cd rubygems-1.3.7
+ ruby setup.rb --no-format-executable
+fi
-gem update --system
-gem update
gem install ohai chef --no-rdoc --no-ri --verbose <%= '--prerelease' if @config[:prerelease] %>
mkdir -p /etc/chef
@@ -25,10 +31,10 @@ log_location STDOUT
chef_server_url "<%= Chef::Config[:chef_server_url] %>"
validation_client_name "<%= Chef::Config[:validation_client_name] %>"
<% if @config[:chef_node_name] == nil %>
-# Using default node name"
+# Using default node name (fqdn)
<% else %>
node_name "<%= @config[:chef_node_name] %>"
-<% end %>
+<% end %>
EOP
) > /etc/chef/client.rb
diff --git a/chef/lib/chef/knife/bootstrap/fedora13-gems.erb b/chef/lib/chef/knife/bootstrap/fedora13-gems.erb
index 301f377dd3..c0b78f6323 100644
--- a/chef/lib/chef/knife/bootstrap/fedora13-gems.erb
+++ b/chef/lib/chef/knife/bootstrap/fedora13-gems.erb
@@ -25,7 +25,7 @@ validation_client_name "<%= Chef::Config[:validation_client_name] %>"
# Using default node name"
<% else %>
node_name "<%= @config[:chef_node_name] %>"
-<% end %>
+<% end %>
EOP
) > /etc/chef/client.rb
diff --git a/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb b/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb
index ab81c9713e..47690792b7 100644
--- a/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb
+++ b/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb
@@ -1,6 +1,6 @@
bash -c '
if [ ! -f /usr/bin/chef-client ]; then
- echo "chef chef/chef_server_url string <%= Chef::Config[:chef_server_url] %>" | debconf-set-selections
+ echo "chef chef/chef_server_url string <%= Chef::Config[:chef_server_url] %>" | debconf-set-selections
[ -f /etc/apt/sources.list.d/opscode.list ] || echo "deb http://apt.opscode.com lucid main" > /etc/apt/sources.list.d/opscode.list
wget -O- http://apt.opscode.com/packages@opscode.com.gpg.key | apt-key add -
fi
@@ -21,7 +21,7 @@ rm /tmp/validation.pem
<% if @config[:chef_node_name] %>
[ `grep -qx "node_name \"<%= @config[:chef_node_name] %>\"" /etc/chef/client.rb` ] || echo "node_name \"<%= @config[:chef_node_name] %>\"" >> /etc/chef/client.rb
-<% end -%>
+<% end -%>
(
cat <<'EOP'
diff --git a/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb b/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb
index 0b0dd1e332..31bb54d834 100644
--- a/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb
+++ b/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb
@@ -27,7 +27,7 @@ log_location STDOUT
chef_server_url "<%= Chef::Config[:chef_server_url] %>"
validation_client_name "<%= Chef::Config[:validation_client_name] %>"
<% if @config[:chef_node_name] == nil %>
-# Using default node name"
+# Using default node name (fqdn)
<% else %>
node_name "<%= @config[:chef_node_name] %>"
<% end %>
diff --git a/chef/lib/chef/knife/client_create.rb b/chef/lib/chef/knife/client_create.rb
index 6fb078b7d4..5e6af55bc4 100644
--- a/chef/lib/chef/knife/client_create.rb
+++ b/chef/lib/chef/knife/client_create.rb
@@ -57,7 +57,7 @@ class Chef
key = output.save
- ui.info("Created (or updated) #{output}")
+ ui.info("Created #{output}")
if config[:file]
File.open(config[:file], "w") do |f|
diff --git a/chef/lib/chef/knife/cookbook_bulk_delete.rb b/chef/lib/chef/knife/cookbook_bulk_delete.rb
index 6463bf5152..f8ad74d856 100644
--- a/chef/lib/chef/knife/cookbook_bulk_delete.rb
+++ b/chef/lib/chef/knife/cookbook_bulk_delete.rb
@@ -43,11 +43,21 @@ class Chef
all_cookbooks = Chef::CookbookVersion.list
cookbooks_names = all_cookbooks.keys.grep(regex)
cookbooks_to_delete = cookbooks_names.inject({}) { |hash, name| hash[name] = all_cookbooks[name];hash }
- output(format_list_for_display(cookbooks_to_delete))
+ ui.msg "All versions of the following cookbooks will be deleted:"
+ ui.msg ""
+ ui.msg ui.list(cookbooks_to_delete.keys.sort, :columns_down)
+ ui.msg ""
- ui.confirm("Do you really want to delete these cookbooks? All versions will be deleted. (Y/N) ", false)
+ unless config[:yes]
+ ui.confirm("Do you really want to delete these cookbooks? (Y/N) ", false)
+
+ if config[:purge]
+ ui.msg("Files that are common to multiple cookbooks are shared, so purging the files may break other cookbooks.")
+ ui.confirm("Are you sure you want to purge files instead of just deleting the cookbooks")
+ end
+ ui.msg ""
+ end
- ui.confirm("Files that are common to multiple cookbooks are shared, so purging the files may disable other cookbooks. Are you sure you want to purge files instead of just deleting the cookbooks") if config[:purge]
cookbooks_names.each do |cookbook_name|
versions = rest.get_rest("cookbooks/#{cookbook_name}")[cookbook_name]["versions"].map {|v| v["version"]}.flatten
diff --git a/chef/lib/chef/knife/cookbook_list.rb b/chef/lib/chef/knife/cookbook_list.rb
index f8edb990de..349181d177 100644
--- a/chef/lib/chef/knife/cookbook_list.rb
+++ b/chef/lib/chef/knife/cookbook_list.rb
@@ -32,7 +32,7 @@ class Chef
option :all_versions,
:short => "-a",
- :long => "--show-all-versions",
+ :long => "--all",
:description => "Show all available versions."
def run
diff --git a/chef/lib/chef/knife/cookbook_show.rb b/chef/lib/chef/knife/cookbook_show.rb
index 074a4a7ea4..3545d20817 100644
--- a/chef/lib/chef/knife/cookbook_show.rb
+++ b/chef/lib/chef/knife/cookbook_show.rb
@@ -25,6 +25,7 @@ class Chef
deps do
require 'chef/json_compat'
require 'uri'
+ require 'chef/cookbook_version'
end
banner "knife cookbook show COOKBOOK [VERSION] [PART] [FILENAME] (options)"
diff --git a/chef/lib/chef/knife/cookbook_site_download.rb b/chef/lib/chef/knife/cookbook_site_download.rb
index e146e1da24..0cf547ccac 100644
--- a/chef/lib/chef/knife/cookbook_site_download.rb
+++ b/chef/lib/chef/knife/cookbook_site_download.rb
@@ -33,17 +33,17 @@ class Chef
def run
if @name_args.length == 1
- current = rest.get_rest("http://cookbooks.opscode.com/api/v1/cookbooks/#{name_args[0]}")
- cookbook_data = rest.get_rest(current["latest_version"])
+ current = noauth_rest.get_rest("http://cookbooks.opscode.com/api/v1/cookbooks/#{name_args[0]}")
+ cookbook_data = noauth_rest.get_rest(current["latest_version"])
else
- cookbook_data = rest.get_rest("http://cookbooks.opscode.com/api/v1/cookbooks/#{name_args[0]}/versions/#{name_args[1].gsub('.', '_')}")
+ cookbook_data = noauth_rest.get_rest("http://cookbooks.opscode.com/api/v1/cookbooks/#{name_args[0]}/versions/#{name_args[1].gsub('.', '_')}")
end
@version = cookbook_data['version']
ui.info("Downloading #{@name_args[0]} from the cookbooks site at version #{cookbook_data['version']} to #{config[:file]}")
- rest.sign_on_redirect = false
- tf = rest.get_rest(cookbook_data["file"], true)
+ noauth_rest.sign_on_redirect = false
+ tf = noauth_rest.get_rest(cookbook_data["file"], true)
unless config[:file]
config[:file] = File.join(Dir.pwd, "#{@name_args[0]}-#{cookbook_data['version']}.tar.gz")
end
diff --git a/chef/lib/chef/knife/cookbook_site_list.rb b/chef/lib/chef/knife/cookbook_site_list.rb
index e55f20a911..107b3101ee 100644
--- a/chef/lib/chef/knife/cookbook_site_list.rb
+++ b/chef/lib/chef/knife/cookbook_site_list.rb
@@ -36,7 +36,7 @@ class Chef
def get_cookbook_list(items=10, start=0, cookbook_collection={})
cookbooks_url = "http://cookbooks.opscode.com/api/v1/cookbooks?items=#{items}&start=#{start}"
- cr = rest.get_rest(cookbooks_url)
+ cr = noauth_rest.get_rest(cookbooks_url)
cr["items"].each do |cookbook|
cookbook_collection[cookbook["cookbook_name"]] = cookbook
end
diff --git a/chef/lib/chef/knife/cookbook_site_search.rb b/chef/lib/chef/knife/cookbook_site_search.rb
index 3faa3c583e..5df7d67327 100644
--- a/chef/lib/chef/knife/cookbook_site_search.rb
+++ b/chef/lib/chef/knife/cookbook_site_search.rb
@@ -30,7 +30,7 @@ class Chef
def search_cookbook(query, items=10, start=0, cookbook_collection={})
cookbooks_url = "http://cookbooks.opscode.com/api/v1/search?q=#{query}&items=#{items}&start=#{start}"
- cr = rest.get_rest(cookbooks_url)
+ cr = noauth_rest.get_rest(cookbooks_url)
cr["items"].each do |cookbook|
cookbook_collection[cookbook["cookbook_name"]] = cookbook
end
diff --git a/chef/lib/chef/knife/cookbook_site_show.rb b/chef/lib/chef/knife/cookbook_site_show.rb
index 816c0d685e..cbaa815092 100644
--- a/chef/lib/chef/knife/cookbook_site_show.rb
+++ b/chef/lib/chef/knife/cookbook_site_show.rb
@@ -27,16 +27,16 @@ class Chef
def run
case @name_args.length
when 1
- cookbook_data = rest.get_rest("http://cookbooks.opscode.com/api/v1/cookbooks/#{@name_args[0]}")
+ cookbook_data = noauth_rest.get_rest("http://cookbooks.opscode.com/api/v1/cookbooks/#{@name_args[0]}")
when 2
- cookbook_data = rest.get_rest("http://cookbooks.opscode.com/api/v1/cookbooks/#{@name_args[0]}/versions/#{name_args[1].gsub('.', '_')}")
+ cookbook_data = noauth_rest.get_rest("http://cookbooks.opscode.com/api/v1/cookbooks/#{@name_args[0]}/versions/#{name_args[1].gsub('.', '_')}")
end
output(format_for_display(cookbook_data))
end
def get_cookbook_list(items=10, start=0, cookbook_collection={})
cookbooks_url = "http://cookbooks.opscode.com/api/v1/cookbooks?items=#{items}&start=#{start}"
- cr = rest.get_rest(cookbooks_url)
+ cr = noauth_rest.get_rest(cookbooks_url)
cr["items"].each do |cookbook|
cookbook_collection[cookbook["cookbook_name"]] = cookbook
end
diff --git a/chef/lib/chef/knife/cookbook_upload.rb b/chef/lib/chef/knife/cookbook_upload.rb
index bafe3cc2c8..471def07d4 100644
--- a/chef/lib/chef/knife/cookbook_upload.rb
+++ b/chef/lib/chef/knife/cookbook_upload.rb
@@ -68,9 +68,10 @@ class Chef
version_constraints_to_update = {}
if config[:all]
+ justify_width = cookbook_repo.cookbook_names.map {|name| name.size}.max.to_i + 2
cookbook_repo.each do |cookbook_name, cookbook|
cookbook.freeze_version if config[:freeze]
- upload(cookbook)
+ upload(cookbook, justify_width)
version_constraints_to_update[cookbook_name] = cookbook.version
end
else
@@ -79,11 +80,12 @@ class Chef
ui.error("You must specify the --all flag or at least one cookbook name")
exit 1
end
+ justify_width = @name_args.map {|name| name.size }.max.to_i + 2
@name_args.each do |cookbook_name|
begin
cookbook = cookbook_repo[cookbook_name]
cookbook.freeze_version if config[:freeze]
- upload(cookbook)
+ upload(cookbook, justify_width)
version_constraints_to_update[cookbook_name] = cookbook.version
rescue Exceptions::CookbookNotFoundInRepo => e
ui.error("Could not find cookbook #{cookbook_name} in your cookbook path, skipping it")
@@ -129,12 +131,9 @@ class Chef
end
end
- def upload(cookbook)
- if config[:all]
- ui.info("** #{cookbook.name} **")
- else
- ui.info "Uploading #{cookbook.name}..."
- end
+ def upload(cookbook, justify_width)
+ ui.info("Uploading #{cookbook.name.to_s.ljust(justify_width + 10)} [#{cookbook.version}]")
+
check_for_broken_links(cookbook)
Chef::CookbookUploader.new(cookbook, config[:cookbook_path], :force => config[:force]).upload_cookbook
rescue Net::HTTPServerException => e
diff --git a/chef/lib/chef/knife/core/generic_presenter.rb b/chef/lib/chef/knife/core/generic_presenter.rb
index 3823f7111a..e65dd5edb9 100644
--- a/chef/lib/chef/knife/core/generic_presenter.rb
+++ b/chef/lib/chef/knife/core/generic_presenter.rb
@@ -53,7 +53,7 @@ class Chef
# Returns a String representation of +data+ that is suitable for output
# to a terminal or perhaps for data interchange with another program.
- # The representation of the +data+ depends on the value of the
+ # The representation of the +data+ depends on the value of the
# `config[:format]` setting.
def format(data)
case parse_format_option
@@ -171,9 +171,9 @@ class Chef
collected[cookbook] = versions["versions"].map {|v| v['version']}
collected
end
- key_length = versions_by_cookbook.keys.map {|name| name.size }.max + 2
+ key_length = versions_by_cookbook.empty? ? 0 : versions_by_cookbook.keys.map {|name| name.size }.max + 2
versions_by_cookbook.sort.map do |cookbook, versions|
- "#{cookbook.ljust(key_length)} #{versions.join(',')}"
+ "#{cookbook.ljust(key_length)} #{versions.join(' ')}"
end
end
end
diff --git a/chef/lib/chef/knife/core/ui.rb b/chef/lib/chef/knife/core/ui.rb
index d402d60f58..dbea91134e 100644
--- a/chef/lib/chef/knife/core/ui.rb
+++ b/chef/lib/chef/knife/core/ui.rb
@@ -93,7 +93,7 @@ class Chef
# determined by the value of `config[:color]`. When output is not to a
# terminal, colored output is never used
def color?
- Chef::Config[:color] && stdout.tty?
+ Chef::Config[:color] && stdout.tty? && (RUBY_PLATFORM !~ /mswin|mingw32|windows/)
end
def ask(*args, &block)
diff --git a/chef/lib/chef/knife/help.rb b/chef/lib/chef/knife/help.rb
index f0e5f155a3..d2d2d79c13 100644
--- a/chef/lib/chef/knife/help.rb
+++ b/chef/lib/chef/knife/help.rb
@@ -25,14 +25,18 @@ class Chef
def run
if name_args.empty?
ui.info "Usage: knife SUBCOMMAND (options)"
- show_usage
+ ui.msg ""
+ # This command is atypical, the user is likely not interested in usage of
+ # this command, but knife in general. So hack the banner.
+ opt_parser.banner = "General Knife Options:"
+ ui.msg opt_parser.to_s
ui.msg ""
ui.info "For further help:"
ui.info(<<-MOAR_HELP)
knife help list list help topics
knife help knife show general knife help
knife help TOPIC display the manual for TOPIC
- knife COMMAND --help show the options for a command
+ knife SUBCOMMAND --help show the options for a command
MOAR_HELP
exit 1
else
diff --git a/chef/lib/chef/knife/node_bulk_delete.rb b/chef/lib/chef/knife/node_bulk_delete.rb
index dd2ddbfdff..89b2abe6ae 100644
--- a/chef/lib/chef/knife/node_bulk_delete.rb
+++ b/chef/lib/chef/knife/node_bulk_delete.rb
@@ -30,13 +30,47 @@ class Chef
banner "knife node bulk delete REGEX (options)"
def run
- if @name_args.length < 1
+ if name_args.length < 1
ui.fatal("You must supply a regular expression to match the results against")
exit 42
- else
- bulk_delete(Chef::Node, "node", nil, nil, @name_args[0])
+ end
+
+
+ nodes_to_delete = {}
+ matcher = /#{name_args[0]}/
+
+ all_nodes.each do |name, node|
+ next unless name =~ matcher
+ nodes_to_delete[name] = node
+ end
+
+ if nodes_to_delete.empty?
+ ui.msg "No nodes match the expression /#{name_args[0]}/"
+ exit 0
+ end
+
+ ui.msg("The following nodes will be deleted:")
+ ui.msg("")
+ ui.msg(ui.list(nodes_to_delete.keys.sort, :columns_down))
+ ui.msg("")
+ ui.confirm("Are you sure you want to delete these nodes")
+
+
+ nodes_to_delete.sort.each do |name, node|
+ node.destroy
+ ui.msg("Deleted node #{name}")
end
end
+
+ def all_nodes
+ node_uris_by_name = Chef::Node.list
+
+ node_uris_by_name.keys.inject({}) do |nodes_by_name, name|
+ nodes_by_name[name] = Chef::Node.new.tap {|n| n.name(name)}
+ nodes_by_name
+ end
+ end
+
end
end
end
diff --git a/chef/lib/chef/knife/recipe_list.rb b/chef/lib/chef/knife/recipe_list.rb
index 25c181bc08..ed7d2a9509 100644
--- a/chef/lib/chef/knife/recipe_list.rb
+++ b/chef/lib/chef/knife/recipe_list.rb
@@ -23,7 +23,6 @@ class Chef::Knife::RecipeList < Chef::Knife
def run
recipes = rest.get_rest('cookbooks/_recipes')
- recipes = recipes.keys.map { |cb| recipes[cb].map {|ver, rec| rec.map{ |rn| "#{cb}::#{rn} (#{ver})" }}}.flatten.uniq
if pattern = @name_args.first
recipes = recipes.grep(Regexp.new(pattern))
end
diff --git a/chef/lib/chef/knife/role_bulk_delete.rb b/chef/lib/chef/knife/role_bulk_delete.rb
index b9d4a06347..8b24f55846 100644
--- a/chef/lib/chef/knife/role_bulk_delete.rb
+++ b/chef/lib/chef/knife/role_bulk_delete.rb
@@ -31,10 +31,33 @@ class Chef
def run
if @name_args.length < 1
- ui.fatal("You must supply a regular expression to match the results against")
- exit 42
- else
- bulk_delete(Chef::Role, "role", nil, nil, @name_args[0])
+ ui.error("You must supply a regular expression to match the results against")
+ exit 1
+ end
+
+ all_roles = Chef::Role.list(true)
+
+ matcher = /#{@name_args[0]}/
+ roles_to_delete = {}
+ all_roles.each do |name, role|
+ next unless name =~ matcher
+ roles_to_delete[role.name] = role
+ end
+
+ if roles_to_delete.empty?
+ ui.info "No roles match the expression /#{@name_args[0]}/"
+ exit 0
+ end
+
+ ui.msg("The following roles will be deleted:")
+ ui.msg("")
+ ui.msg(ui.list(roles_to_delete.keys.sort, :columns_down))
+ ui.msg("")
+ ui.confirm("Are you sure you want to delete these roles")
+
+ roles_to_delete.sort.each do |name, role|
+ role.destroy
+ ui.msg("Deleted role #{name}")
end
end
end
diff --git a/chef/lib/chef/knife/tag_create.rb b/chef/lib/chef/knife/tag_create.rb
index 5d140b6dd4..d3ca95242d 100644
--- a/chef/lib/chef/knife/tag_create.rb
+++ b/chef/lib/chef/knife/tag_create.rb
@@ -1,3 +1,23 @@
+#
+# Author:: Ryan Davis (<ryand-ruby@zenspider.com>)
+# Author:: Daniel DeLeo (<dan@opscode.com>)
+# Author:: Nuo Yan (<nuo@opscode.com>)
+# Copyright:: Copyright (c) 2011 Ryan Davis and Opscode, Inc.
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
require 'chef/knife'
class Chef
@@ -12,19 +32,20 @@ class Chef
def run
name = @name_args[0]
- tags = @name_args[1..-1].join(",").split(/\s*,\s*/)
+ tags = @name_args[1..-1]
- unless name or tags.empty?
+ if name.nil? || tags.nil? || tags.empty?
show_usage
- # TODO: blah blah
- ui.fatal("You must specify a node name")
+ ui.fatal("You must specify a node name and at least one tag.")
exit 1
end
node = Chef::Node.load name
tags.each do |tag|
- node.tags << tag
+ (node.tags << tag).uniq!
end
+ node.save
+ ui.info("Created tags #{tags.join(", ")} for node #{name}.")
end
end
end
diff --git a/chef/lib/chef/knife/tag_delete.rb b/chef/lib/chef/knife/tag_delete.rb
index bb99a9e906..82270bd39a 100644
--- a/chef/lib/chef/knife/tag_delete.rb
+++ b/chef/lib/chef/knife/tag_delete.rb
@@ -1,3 +1,23 @@
+#
+# Author:: Ryan Davis (<ryand-ruby@zenspider.com>)
+# Author:: Daniel DeLeo (<dan@opscode.com>)
+# Author:: Nuo Yan (<nuo@opscode.com>)
+# Copyright:: Copyright (c) 2011 Ryan Davis and Opscode, Inc.
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
require 'chef/knife'
class Chef
@@ -12,19 +32,28 @@ class Chef
def run
name = @name_args[0]
- tags = @name_args[1..-1].join(",").split(/\s*,\s*/)
+ tags = @name_args[1..-1]
- unless name or tags.empty?
+ if name.nil? || tags.nil? || tags.empty?
show_usage
- # TODO: blah blah
- ui.fatal("You must specify a node name")
+ ui.fatal("You must specify a node name and at least one tag.")
exit 1
end
node = Chef::Node.load name
+ deleted_tags = Array.new
tags.each do |tag|
- node.tags.delete tag
+ unless node.tags.delete(tag).nil?
+ deleted_tags << tag
+ end
end
+ node.save
+ message = if deleted_tags.empty?
+ "Nothing has changed. The tags requested to be deleted do not exist."
+ else
+ "Deleted the following tags: #{deleted_tags.join(", ")}."
+ end
+ ui.info(message)
end
end
end
diff --git a/chef/lib/chef/knife/tag_list.rb b/chef/lib/chef/knife/tag_list.rb
index 1fc89de4ff..499eb8578c 100644
--- a/chef/lib/chef/knife/tag_list.rb
+++ b/chef/lib/chef/knife/tag_list.rb
@@ -1,3 +1,23 @@
+#
+# Author:: Ryan Davis (<ryand-ruby@zenspider.com>)
+# Author:: Daniel DeLeo (<dan@opscode.com>)
+# Author:: Nuo Yan (<nuo@opscode.com>)
+# Copyright:: Copyright (c) 2011 Ryan Davis and Opscode, Inc.
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
require 'chef/knife'
class Chef
@@ -12,17 +32,15 @@ class Chef
def run
name = @name_args[0]
- tags = @name_args[1..-1].join(",").split(/\s*,\s*/)
- unless name or tags.empty?
+ if name.nil?
show_usage
- # TODO: blah blah
- ui.fatal("You must specify a node name")
+ ui.fatal("You must specify a node name.")
exit 1
end
- node = Chef::Node.load name
- output node.tags
+ node = Chef::Node.load(name)
+ output(node.tags)
end
end
end
diff --git a/chef/lib/chef/mixin/language.rb b/chef/lib/chef/mixin/language.rb
index ce0f87dbb2..072ad920d9 100644
--- a/chef/lib/chef/mixin/language.rb
+++ b/chef/lib/chef/mixin/language.rb
@@ -143,7 +143,7 @@ class Chef
end
def data_bag(bag)
- DataBag.validate_name!(bag)
+ DataBag.validate_name!(bag.to_s)
rbag = DataBag.load(bag)
rbag.keys
rescue Exception
@@ -152,7 +152,7 @@ class Chef
end
def data_bag_item(bag, item)
- DataBag.validate_name!(bag)
+ DataBag.validate_name!(bag.to_s)
DataBagItem.validate_id!(item)
DataBagItem.load(bag, item)
rescue Exception
diff --git a/chef/lib/chef/node.rb b/chef/lib/chef/node.rb
index 4399e97616..68cf553f6b 100644
--- a/chef/lib/chef/node.rb
+++ b/chef/lib/chef/node.rb
@@ -36,6 +36,7 @@ require 'chef/node/attribute'
require 'chef/index_queue'
require 'chef/mash'
require 'chef/json_compat'
+require 'chef/search/query'
class Chef
class Node
diff --git a/chef/lib/chef/rest.rb b/chef/lib/chef/rest.rb
index adf180a645..7a180f8edf 100644
--- a/chef/lib/chef/rest.rb
+++ b/chef/lib/chef/rest.rb
@@ -305,14 +305,11 @@ class Chef
end
raise Timeout::Error, "Timeout connecting to #{url.host}:#{url.port} for #{rest_request.path}, giving up"
rescue Net::HTTPFatalError => e
- case e.response
- when Net::HTTPServiceUnavailable
- if http_retry_count - http_attempts + 1 > 0
- sleep_time = 1 + (2 ** http_attempts) + rand(2 ** http_attempts)
- Chef::Log.error("Service Unavailable for #{url}, retrying #{http_attempts}/#{http_retry_count} in #{sleep_time}s")
- sleep(sleep_time)
- retry
- end
+ if http_retry_count - http_attempts + 1 > 0
+ sleep_time = 1 + (2 ** http_attempts) + rand(2 ** http_attempts)
+ Chef::Log.error("Server returned error for #{url}, retrying #{http_attempts}/#{http_retry_count} in #{sleep_time}s")
+ sleep(sleep_time)
+ retry
end
raise
end
diff --git a/chef/lib/chef/role.rb b/chef/lib/chef/role.rb
index 48c5cf074a..18d293d0b2 100644
--- a/chef/lib/chef/role.rb
+++ b/chef/lib/chef/role.rb
@@ -26,6 +26,7 @@ require 'chef/run_list'
require 'chef/index_queue'
require 'chef/mash'
require 'chef/json_compat'
+require 'chef/search/query'
class Chef
class Role
diff --git a/chef/lib/chef/shef.rb b/chef/lib/chef/shef.rb
index 27e04e627e..ae81d072a7 100644
--- a/chef/lib/chef/shef.rb
+++ b/chef/lib/chef/shef.rb
@@ -20,6 +20,7 @@ require 'pp'
require 'etc'
require 'mixlib/cli'
+require 'chef'
require 'chef/version'
require 'chef/client'
require 'chef/config'
diff --git a/chef/lib/chef/version.rb b/chef/lib/chef/version.rb
index 3f0301d6c8..d2de7b1aa9 100644
--- a/chef/lib/chef/version.rb
+++ b/chef/lib/chef/version.rb
@@ -17,7 +17,7 @@
class Chef
CHEF_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__)))
- VERSION = '0.10.0.beta.8'
+ VERSION = '0.10.0.beta.9'
end
# NOTE: the Chef::Version class is defined in version_class.rb
diff --git a/chef/spec/unit/couchdb_spec.rb b/chef/spec/unit/couchdb_spec.rb
index cc96a507d1..0d4d48353a 100644
--- a/chef/spec/unit/couchdb_spec.rb
+++ b/chef/spec/unit/couchdb_spec.rb
@@ -101,11 +101,6 @@ describe Chef::CouchDB do
@couchdb.create_design_document("bob", @mock_data)
end
- it "should create the database if it does not exist" do
- @couchdb.should_receive(:create_db).and_return(true)
- do_create_design_document
- end
-
it "should fetch the existing design document" do
@rest.should_receive(:get_rest).with("chef/_design/bob")
do_create_design_document
diff --git a/chef/spec/unit/knife/cookbook_bulk_delete_spec.rb b/chef/spec/unit/knife/cookbook_bulk_delete_spec.rb
index b3f788cdc8..e3392a9ee8 100644
--- a/chef/spec/unit/knife/cookbook_bulk_delete_spec.rb
+++ b/chef/spec/unit/knife/cookbook_bulk_delete_spec.rb
@@ -55,8 +55,9 @@ describe Chef::Knife::CookbookBulkDelete do
end
it "should print the cookbooks you are about to delete" do
- @knife.should_receive(:output).with(@knife.format_list_for_display(@cookbooks))
+ expected = @knife.ui.list(@cookbooks.keys.sort, :columns_down)
@knife.run
+ @stdout.string.should match(/#{expected}/)
end
it "should confirm you really want to delete them" do
diff --git a/chef/spec/unit/knife/core/ui_spec.rb b/chef/spec/unit/knife/core/ui_spec.rb
index f632495659..77c478aceb 100644
--- a/chef/spec/unit/knife/core/ui_spec.rb
+++ b/chef/spec/unit/knife/core/ui_spec.rb
@@ -80,7 +80,7 @@ describe Chef::Knife::UI do
end
it "should return an array of the cookbooks with versions" do
- expected_response = [ "cookbook_name 3.0.0,2.0.0,1.0.0" ]
+ expected_response = [ "cookbook_name 3.0.0 2.0.0 1.0.0" ]
response = @ui.format_cookbook_list_for_display(@item)
response.should == expected_response
end
diff --git a/chef/spec/unit/knife/node_bulk_delete_spec.rb b/chef/spec/unit/knife/node_bulk_delete_spec.rb
index 59d387a9df..d14a01fa21 100644
--- a/chef/spec/unit/knife/node_bulk_delete_spec.rb
+++ b/chef/spec/unit/knife/node_bulk_delete_spec.rb
@@ -6,9 +6,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,41 +24,54 @@ describe Chef::Knife::NodeBulkDelete do
Chef::Config[:node_name] = "webmonkey.example.com"
@knife = Chef::Knife::NodeBulkDelete.new
- @knife.config = {
- :print_after => nil
- }
- @knife.name_args = ["."]
- @knife.stub!(:output).and_return(true)
- @knife.stub!(:confirm).and_return(true)
+ @knife.name_args = ["."]
+ @stdout = StringIO.new
+ @knife.ui.stub!(:stdout).and_return(@stdout)
+ @knife.ui.stub!(:confirm).and_return(true)
@nodes = Hash.new
%w{adam brent jacob}.each do |node_name|
- node = Chef::Node.new()
- node.name(node_name)
- node.stub!(:destroy).and_return(true)
- @nodes[node_name] = node
+ @nodes[node_name] = "http://localhost:4000/nodes/#{node_name}"
end
- Chef::Node.stub!(:list).and_return(@nodes)
end
- describe "run" do
-
- it "should get the list of inflated nodes" do
+ describe "when creating the list of nodes" do
+ it "fetches the node list" do
+ expected = @nodes.inject({}) do |inflatedish, (name, uri)|
+ inflatedish[name] = Chef::Node.new.tap {|n| n.name(name)}
+ inflatedish
+ end
Chef::Node.should_receive(:list).and_return(@nodes)
- @knife.run
+ # I hate not having == defined for anything :(
+ actual = @knife.all_nodes
+ actual.keys.should =~ expected.keys
+ actual.values.map {|n| n.name }.should =~ %w[adam brent jacob]
+ end
+ end
+
+ describe "run" do
+ before do
+ @inflatedish_list = @nodes.keys.inject({}) do |nodes_by_name, name|
+ node = Chef::Node.new()
+ node.name(name)
+ node.stub!(:destroy).and_return(true)
+ nodes_by_name[name] = node
+ nodes_by_name
+ end
+ @knife.stub!(:all_nodes).and_return(@inflatedish_list)
end
it "should print the nodes you are about to delete" do
- @knife.should_receive(:output).with(@knife.format_list_for_display(@nodes))
@knife.run
+ @stdout.string.should match(/#{@knife.ui.list(@nodes.keys.sort, :columns_down)}/)
end
it "should confirm you really want to delete them" do
- @knife.should_receive(:confirm)
+ @knife.ui.should_receive(:confirm)
@knife.run
end
it "should delete each node" do
- @nodes.each_value do |n|
+ @inflatedish_list.each_value do |n|
n.should_receive(:destroy)
end
@knife.run
@@ -66,9 +79,9 @@ describe Chef::Knife::NodeBulkDelete do
it "should only delete nodes that match the regex" do
@knife.name_args = ['adam']
- @nodes['adam'].should_receive(:destroy)
- @nodes['brent'].should_not_receive(:destroy)
- @nodes['jacob'].should_not_receive(:destroy)
+ @inflatedish_list['adam'].should_receive(:destroy)
+ @inflatedish_list['brent'].should_not_receive(:destroy)
+ @inflatedish_list['jacob'].should_not_receive(:destroy)
@knife.run
end
@@ -77,15 +90,6 @@ describe Chef::Knife::NodeBulkDelete do
lambda { @knife.run }.should raise_error(SystemExit)
end
- describe "with -p or --print-after" do
- it "should pretty print the node, formatted for display" do
- @knife.config[:print_after] = true
- @nodes.each_value do |n|
- @knife.should_receive(:output).with(@knife.format_for_display(n))
- end
- @knife.run
- end
- end
end
end
diff --git a/chef/spec/unit/knife/role_bulk_delete_spec.rb b/chef/spec/unit/knife/role_bulk_delete_spec.rb
index 22410d1f88..867320911b 100644
--- a/chef/spec/unit/knife/role_bulk_delete_spec.rb
+++ b/chef/spec/unit/knife/role_bulk_delete_spec.rb
@@ -6,9 +6,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,8 +26,9 @@ describe Chef::Knife::RoleBulkDelete do
:print_after => nil
}
@knife.name_args = ["."]
- @knife.stub!(:output).and_return(:true)
- @knife.stub!(:confirm).and_return(true)
+ @stdout = StringIO.new
+ @knife.ui.stub!(:stdout).and_return(@stdout)
+ @knife.ui.stub!(:confirm).and_return(true)
@roles = Hash.new
%w{dev staging production}.each do |role_name|
role = Chef::Role.new()
@@ -37,31 +38,31 @@ describe Chef::Knife::RoleBulkDelete do
end
Chef::Role.stub!(:list).and_return(@roles)
end
-
+
describe "run" do
-
+
it "should get the list of the roles" do
Chef::Role.should_receive(:list).and_return(@roles)
@knife.run
end
-
+
it "should print the roles you are about to delete" do
- @knife.should_receive(:output).with(@knife.format_list_for_display(@roles))
@knife.run
+ @stdout.string.should match(/#{@knife.ui.list(@roles.keys.sort, :columns_down)}/)
end
-
+
it "should confirm you really want to delete them" do
- @knife.should_receive(:confirm)
+ @knife.ui.should_receive(:confirm)
@knife.run
end
-
+
it "should delete each role" do
@roles.each_value do |r|
r.should_receive(:destroy)
end
@knife.run
end
-
+
it "should only delete roles that match the regex" do
@knife.name_args = ["dev"]
@roles["dev"].should_receive(:destroy)
@@ -75,14 +76,5 @@ describe Chef::Knife::RoleBulkDelete do
lambda { @knife.run }.should raise_error(SystemExit)
end
- describe "with -p or --print_after" do
- it "should pretty_print the roles, formatted for display" do
- @knife.config[:print_after] = true
- @roles.each_value do |n|
- @knife.should_receive(:output).with(@knife.format_for_display(n))
- end
- @knife.run
- end
- end
end
end
diff --git a/chef/spec/unit/knife_spec.rb b/chef/spec/unit/knife_spec.rb
index 000106c2fb..41af6e59ff 100644
--- a/chef/spec/unit/knife_spec.rb
+++ b/chef/spec/unit/knife_spec.rb
@@ -184,7 +184,7 @@ describe Chef::Knife do
it "formats 401s nicely" do
response = Net::HTTPUnauthorized.new("1.1", "401", "Unauthorized")
response.instance_variable_set(:@read, true) # I hate you, net/http.
- response.body = Chef::JSONCompat.to_json(:error => "y u no syncronize your clock?")
+ response.stub!(:body).and_return(Chef::JSONCompat.to_json(:error => "y u no syncronize your clock?"))
@knife.stub!(:run).and_raise(Net::HTTPServerException.new("401 Unauthorized", response))
@knife.run_with_pretty_exceptions
@stdout.string.should match(/ERROR: Failed to authenticate to/)
@@ -194,7 +194,7 @@ describe Chef::Knife do
it "formats 403s nicely" do
response = Net::HTTPForbidden.new("1.1", "403", "Forbidden")
response.instance_variable_set(:@read, true) # I hate you, net/http.
- response.body = Chef::JSONCompat.to_json(:error => "y u no administrator")
+ response.stub!(:body).and_return(Chef::JSONCompat.to_json(:error => "y u no administrator"))
@knife.stub!(:run).and_raise(Net::HTTPServerException.new("403 Forbidden", response))
@knife.stub!(:username).and_return("sadpanda")
@knife.run_with_pretty_exceptions
@@ -205,7 +205,7 @@ describe Chef::Knife do
it "formats 400s nicely" do
response = Net::HTTPBadRequest.new("1.1", "400", "Bad Request")
response.instance_variable_set(:@read, true) # I hate you, net/http.
- response.body = Chef::JSONCompat.to_json(:error => "y u search wrong")
+ response.stub!(:body).and_return(Chef::JSONCompat.to_json(:error => "y u search wrong"))
@knife.stub!(:run).and_raise(Net::HTTPServerException.new("400 Bad Request", response))
@knife.run_with_pretty_exceptions
@stdout.string.should match(%r[ERROR: The data in your request was invalid])
@@ -215,7 +215,7 @@ describe Chef::Knife do
it "formats 404s nicely" do
response = Net::HTTPNotFound.new("1.1", "404", "Not Found")
response.instance_variable_set(:@read, true) # I hate you, net/http.
- response.body = Chef::JSONCompat.to_json(:error => "nothing to see here")
+ response.stub!(:body).and_return(Chef::JSONCompat.to_json(:error => "nothing to see here"))
@knife.stub!(:run).and_raise(Net::HTTPServerException.new("404 Not Found", response))
@knife.run_with_pretty_exceptions
@stdout.string.should match(%r[ERROR: The object you are looking for could not be found])
@@ -225,7 +225,7 @@ describe Chef::Knife do
it "formats 500s nicely" do
response = Net::HTTPInternalServerError.new("1.1", "500", "Internal Server Error")
response.instance_variable_set(:@read, true) # I hate you, net/http.
- response.body = Chef::JSONCompat.to_json(:error => "sad trombone")
+ response.stub!(:body).and_return(Chef::JSONCompat.to_json(:error => "sad trombone"))
@knife.stub!(:run).and_raise(Net::HTTPFatalError.new("500 Internal Server Error", response))
@knife.run_with_pretty_exceptions
@stdout.string.should match(%r[ERROR: internal server error])
@@ -235,7 +235,7 @@ describe Chef::Knife do
it "formats 502s nicely" do
response = Net::HTTPBadGateway.new("1.1", "502", "Bad Gateway")
response.instance_variable_set(:@read, true) # I hate you, net/http.
- response.body = Chef::JSONCompat.to_json(:error => "sadder trombone")
+ response.stub!(:body).and_return(Chef::JSONCompat.to_json(:error => "sadder trombone"))
@knife.stub!(:run).and_raise(Net::HTTPFatalError.new("502 Bad Gateway", response))
@knife.run_with_pretty_exceptions
@stdout.string.should match(%r[ERROR: bad gateway])
@@ -245,7 +245,7 @@ describe Chef::Knife do
it "formats 503s nicely" do
response = Net::HTTPServiceUnavailable.new("1.1", "503", "Service Unavailable")
response.instance_variable_set(:@read, true) # I hate you, net/http.
- response.body = Chef::JSONCompat.to_json(:error => "saddest trombone")
+ response.stub!(:body).and_return(Chef::JSONCompat.to_json(:error => "saddest trombone"))
@knife.stub!(:run).and_raise(Net::HTTPFatalError.new("503 Service Unavailable", response))
@knife.run_with_pretty_exceptions
@stdout.string.should match(%r[ERROR: Service temporarily unavailable])
@@ -255,7 +255,7 @@ describe Chef::Knife do
it "formats other HTTP errors nicely" do
response = Net::HTTPPaymentRequired.new("1.1", "402", "Payment Required")
response.instance_variable_set(:@read, true) # I hate you, net/http.
- response.body = Chef::JSONCompat.to_json(:error => "nobugfixtillyoubuy")
+ response.stub!(:body).and_return(Chef::JSONCompat.to_json(:error => "nobugfixtillyoubuy"))
@knife.stub!(:run).and_raise(Net::HTTPServerException.new("402 Payment Required", response))
@knife.run_with_pretty_exceptions
@stdout.string.should match(%r[ERROR: Payment Required])
diff --git a/chef/spec/unit/rest_spec.rb b/chef/spec/unit/rest_spec.rb
index 8a9105c1d6..6b173e324b 100644
--- a/chef/spec/unit/rest_spec.rb
+++ b/chef/spec/unit/rest_spec.rb
@@ -226,6 +226,7 @@ describe Chef::REST do
http_response.stub!(:body).and_return('{ "error":[ "Ears get sore!", "Not even four" ] }')
http_response.stub!(:read_body)
@http_client.stub!(:request).and_yield(http_response).and_return(http_response)
+ @rest.stub!(:sleep)
lambda {@rest.run_request(:GET, @url)}.should raise_error(Net::HTTPFatalError)
@log_stringio.string.should match(Regexp.escape('WARN: HTTP Request Returned 500 drooling from inside of mouth: Ears get sore!, Not even four'))
end
@@ -234,6 +235,7 @@ describe Chef::REST do
@http_response = Net::HTTPServerError.new("1.1", "500", "drooling from inside of mouth")
http_response = Net::HTTPServerError.new("1.1", "500", "drooling from inside of mouth")
http_response.stub!(:read_body)
+ @rest.stub!(:sleep)
@http_client.stub!(:request).and_yield(http_response).and_return(http_response)
lambda {@rest.run_request(:GET, @url)}.should raise_error(Net::HTTPFatalError)
end
@@ -416,6 +418,7 @@ describe Chef::REST do
http_response.add_field("content-type", "application/json")
http_response.stub!(:body).and_return('{ "error":[ "Ears get sore!", "Not even four" ] }')
http_response.stub!(:read_body)
+ @rest.stub!(:sleep)
@http_client.stub!(:request).and_yield(http_response).and_return(http_response)
lambda {@rest.run_request(:GET, @url)}.should raise_error(Net::HTTPFatalError)
@@ -426,6 +429,7 @@ describe Chef::REST do
http_response = Net::HTTPServerError.new("1.1", "500", "drooling from inside of mouth")
http_response.stub!(:body)
http_response.stub!(:read_body)
+ @rest.stub!(:sleep)
@http_client.stub!(:request).and_yield(http_response).and_return(http_response)
lambda {@rest.api_request(:GET, @url)}.should raise_error(Net::HTTPFatalError)
end
diff --git a/features/support/env.rb b/features/support/env.rb
index d1a45d436d..8a2dfd1e66 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -17,7 +17,7 @@
Thread.abort_on_exception = true
require 'rubygems'
-require 'spec/expectations'
+require 'rspec/expectations'
CHEF_PROJECT_ROOT = File.expand_path(File.dirname(__FILE__) + '/../../')
KNIFE_CONFIG = CHEF_PROJECT_ROOT + '/features/data/config/knife.rb'