summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel DeLeo <dan@opscode.com>2011-04-08 10:54:13 -0700
committerDaniel DeLeo <dan@opscode.com>2011-04-08 10:54:13 -0700
commitf479f7a317be87e61f5ccdf4ee7ce3201e374508 (patch)
treef0f772d337ddc5ab84d2eb04fc07437c4e87db43
parent09c18c0d88c69faedf54710dae74eb24602c96bd (diff)
parent2becd1667a2a92eeed11984a70a40d32b62cd9bf (diff)
downloadchef-f479f7a317be87e61f5ccdf4ee7ce3201e374508.tar.gz
Merge branch 'master' into pl-master
Conflicts: chef/lib/chef/environment.rb
-rw-r--r--chef-expander/lib/chef/expander/version.rb2
-rw-r--r--chef-server-api/Gemfile.lock6
-rw-r--r--chef-server-api/app/controllers/sandboxes.rb2
-rw-r--r--chef-server-api/lib/chef-server-api/version.rb2
-rw-r--r--chef-server-webui/app/controllers/openid_consumer.rb8
-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/Rakefile40
-rw-r--r--chef/distro/common/html/knife-bootstrap.1.html182
-rw-r--r--chef/distro/common/html/knife-client.1.html216
-rw-r--r--chef/distro/common/html/knife-configure.1.html170
-rw-r--r--chef/distro/common/html/knife-cookbook-site.1.html166
-rw-r--r--chef/distro/common/html/knife-cookbook.1.html233
-rw-r--r--chef/distro/common/html/knife-data-bag.1.html234
-rw-r--r--chef/distro/common/html/knife-environment.1.html93
-rw-r--r--chef/distro/common/html/knife-exec.1.html93
-rw-r--r--chef/distro/common/html/knife-index.1.html125
-rw-r--r--chef/distro/common/html/knife-node.1.html268
-rw-r--r--chef/distro/common/html/knife-recipe.1.html92
-rw-r--r--chef/distro/common/html/knife-role.1.html136
-rw-r--r--chef/distro/common/html/knife-search.1.html102
-rw-r--r--chef/distro/common/html/knife-ssh.1.html101
-rw-r--r--chef/distro/common/html/knife-status.1.html97
-rw-r--r--chef/distro/common/html/knife-tag.1.html93
-rw-r--r--chef/distro/common/html/knife.1.html362
-rw-r--r--chef/distro/common/man/man1/chef-indexer.142
-rw-r--r--chef/distro/common/man/man1/chef-solr-indexer.155
-rw-r--r--chef/distro/common/man/man1/knife-bootstrap.1137
-rw-r--r--chef/distro/common/man/man1/knife-client.198
-rw-r--r--chef/distro/common/man/man1/knife-configure.188
-rw-r--r--chef/distro/common/man/man1/knife-cookbook-site.191
-rw-r--r--chef/distro/common/man/man1/knife-cookbook.1242
-rw-r--r--chef/distro/common/man/man1/knife-data-bag.1130
-rw-r--r--chef/distro/common/man/man1/knife-environment.113
-rw-r--r--chef/distro/common/man/man1/knife-exec.113
-rw-r--r--chef/distro/common/man/man1/knife-index.129
-rw-r--r--chef/distro/common/man/man1/knife-node.1153
-rw-r--r--chef/distro/common/man/man1/knife-recipe.113
-rw-r--r--chef/distro/common/man/man1/knife-role.164
-rw-r--r--chef/distro/common/man/man1/knife-search.137
-rw-r--r--chef/distro/common/man/man1/knife-ssh.133
-rw-r--r--chef/distro/common/man/man1/knife-status.117
-rw-r--r--chef/distro/common/man/man1/knife-tag.113
-rw-r--r--chef/distro/common/man/man1/knife.1346
-rw-r--r--chef/distro/common/man/man1/shef.1 (renamed from chef/distro/common/man/man8/shef.8)0
-rw-r--r--chef/distro/common/man/man8/chef-server-webui.8 (renamed from chef/distro/common/man/man1/chef-server-webui.1)0
-rw-r--r--chef/distro/common/man/man8/chef-server.8 (renamed from chef/distro/common/man/man1/chef-server.1)0
-rw-r--r--chef/distro/common/man/man8/chef-solr-rebuild.837
-rw-r--r--chef/distro/common/man/man8/chef-solr.8 (renamed from chef/distro/common/man/man1/chef-solr.1)0
-rw-r--r--chef/distro/common/man/man8/knife.81349
-rw-r--r--chef/distro/common/markdown/knife.mkd865
-rw-r--r--chef/distro/common/markdown/man1/knife-bootstrap.mkd88
-rw-r--r--chef/distro/common/markdown/man1/knife-client.mkd101
-rw-r--r--chef/distro/common/markdown/man1/knife-configure.mkd70
-rw-r--r--chef/distro/common/markdown/man1/knife-cookbook-site.mkd69
-rw-r--r--chef/distro/common/markdown/man1/knife-cookbook.mkd136
-rw-r--r--chef/distro/common/markdown/man1/knife-data-bag.mkd117
-rw-r--r--chef/distro/common/markdown/man1/knife-environment.mkd8
-rw-r--r--chef/distro/common/markdown/man1/knife-exec.mkd9
-rw-r--r--chef/distro/common/markdown/man1/knife-index.mkd30
-rw-r--r--chef/distro/common/markdown/man1/knife-node.mkd147
-rw-r--r--chef/distro/common/markdown/man1/knife-recipe.mkd24
-rw-r--r--chef/distro/common/markdown/man1/knife-role.mkd79
-rw-r--r--chef/distro/common/markdown/man1/knife-search.mkd56
-rw-r--r--chef/distro/common/markdown/man1/knife-ssh.mkd64
-rw-r--r--chef/distro/common/markdown/man1/knife-status.mkd38
-rw-r--r--chef/distro/common/markdown/man1/knife-tag.mkd8
-rw-r--r--chef/distro/common/markdown/man1/knife.mkd261
-rw-r--r--chef/lib/chef/application.rb3
-rw-r--r--chef/lib/chef/application/client.rb36
-rw-r--r--chef/lib/chef/checksum.rb4
-rw-r--r--chef/lib/chef/checksum_cache.rb4
-rw-r--r--chef/lib/chef/client.rb6
-rw-r--r--chef/lib/chef/cookbook/metadata.rb116
-rw-r--r--chef/lib/chef/cookbook/remote_file_vendor.rb2
-rw-r--r--chef/lib/chef/cookbook/syntax_check.rb4
-rw-r--r--chef/lib/chef/cookbook_version.rb93
-rw-r--r--chef/lib/chef/cookbook_version_selector.rb9
-rw-r--r--chef/lib/chef/data_bag_item.rb2
-rw-r--r--chef/lib/chef/environment.rb42
-rw-r--r--chef/lib/chef/file_access_control.rb10
-rw-r--r--chef/lib/chef/index_queue/indexable.rb4
-rw-r--r--chef/lib/chef/knife.rb2
-rw-r--r--chef/lib/chef/knife/configure.rb4
-rw-r--r--chef/lib/chef/knife/cookbook_site_share.rb2
-rw-r--r--chef/lib/chef/knife/cookbook_upload.rb46
-rw-r--r--chef/lib/chef/knife/core/text_formatter.rb4
-rw-r--r--chef/lib/chef/knife/core/ui.rb2
-rw-r--r--chef/lib/chef/knife/help.rb98
-rw-r--r--chef/lib/chef/mixin/shell_out.rb4
-rw-r--r--chef/lib/chef/node.rb2
-rw-r--r--chef/lib/chef/provider/cookbook_file.rb9
-rw-r--r--chef/lib/chef/provider/cron.rb6
-rw-r--r--chef/lib/chef/provider/cron/solaris.rb14
-rw-r--r--chef/lib/chef/provider/deploy.rb81
-rw-r--r--chef/lib/chef/provider/directory.rb16
-rw-r--r--chef/lib/chef/provider/env.rb16
-rw-r--r--chef/lib/chef/provider/erl_call.rb13
-rw-r--r--chef/lib/chef/provider/execute.rb9
-rw-r--r--chef/lib/chef/provider/file.rb18
-rw-r--r--chef/lib/chef/provider/git.rb25
-rw-r--r--chef/lib/chef/provider/group.rb12
-rw-r--r--chef/lib/chef/provider/group/aix.rb2
-rw-r--r--chef/lib/chef/provider/group/dscl.rb4
-rw-r--r--chef/lib/chef/provider/group/gpasswd.rb6
-rw-r--r--chef/lib/chef/provider/group/groupadd.rb2
-rw-r--r--chef/lib/chef/provider/group/pw.rb6
-rw-r--r--chef/lib/chef/provider/group/usermod.rb4
-rw-r--r--chef/lib/chef/provider/group/windows.rb2
-rw-r--r--chef/lib/chef/provider/ifconfig.rb16
-rw-r--r--chef/lib/chef/provider/link.rb51
-rw-r--r--chef/lib/chef/provider/mdadm.rb20
-rw-r--r--chef/lib/chef/provider/mount.rb23
-rw-r--r--chef/lib/chef/provider/mount/mount.rb20
-rw-r--r--chef/lib/chef/provider/mount/windows.rb7
-rw-r--r--chef/lib/chef/provider/ohai.rb3
-rw-r--r--chef/lib/chef/provider/package.rb16
-rw-r--r--chef/lib/chef/provider/package/apt.rb36
-rw-r--r--chef/lib/chef/provider/package/dpkg.rb6
-rw-r--r--chef/lib/chef/provider/package/easy_install.rb4
-rw-r--r--chef/lib/chef/provider/package/freebsd.rb9
-rw-r--r--chef/lib/chef/provider/package/macports.rb4
-rw-r--r--chef/lib/chef/provider/package/pacman.rb4
-rw-r--r--chef/lib/chef/provider/package/portage.rb2
-rw-r--r--chef/lib/chef/provider/package/rpm.rb6
-rw-r--r--chef/lib/chef/provider/package/rubygems.rb14
-rw-r--r--chef/lib/chef/provider/package/solaris.rb18
-rw-r--r--chef/lib/chef/provider/package/yum.rb8
-rw-r--r--chef/lib/chef/provider/package/zypper.rb16
-rw-r--r--chef/lib/chef/provider/remote_directory.rb29
-rw-r--r--chef/lib/chef/provider/remote_file.rb23
-rw-r--r--chef/lib/chef/provider/route.rb18
-rw-r--r--chef/lib/chef/provider/ruby_block.rb1
-rw-r--r--chef/lib/chef/provider/service.rb26
-rw-r--r--chef/lib/chef/provider/service/debian.rb2
-rw-r--r--chef/lib/chef/provider/service/freebsd.rb34
-rw-r--r--chef/lib/chef/provider/service/gentoo.rb5
-rw-r--r--chef/lib/chef/provider/service/simple.rb12
-rw-r--r--chef/lib/chef/provider/service/upstart.rb16
-rw-r--r--chef/lib/chef/provider/service/windows.rb6
-rw-r--r--chef/lib/chef/provider/subversion.rb21
-rw-r--r--chef/lib/chef/provider/template.rb5
-rw-r--r--chef/lib/chef/provider/user.rb27
-rw-r--r--chef/lib/chef/provider/user/dscl.rb4
-rw-r--r--chef/lib/chef/provider/user/pw.rb8
-rw-r--r--chef/lib/chef/provider/user/useradd.rb6
-rw-r--r--chef/lib/chef/provider/user/windows.rb6
-rw-r--r--chef/lib/chef/resource.rb7
-rw-r--r--chef/lib/chef/resource/deploy.rb2
-rw-r--r--chef/lib/chef/rest.rb1
-rw-r--r--chef/lib/chef/rest/rest_request.rb4
-rw-r--r--chef/lib/chef/run_context.rb2
-rw-r--r--chef/lib/chef/shell_out.rb14
-rw-r--r--chef/lib/chef/solr_query.rb2
-rw-r--r--chef/lib/chef/solr_query/solr_http_request.rb2
-rw-r--r--chef/lib/chef/tasks/chef_repo.rake74
-rw-r--r--chef/lib/chef/version.rb2
-rw-r--r--chef/spec/unit/application_spec.rb22
-rw-r--r--chef/spec/unit/cookbook_version_spec.rb45
-rw-r--r--chef/spec/unit/handler/json_file_spec.rb10
-rw-r--r--chef/spec/unit/knife/client_create_spec.rb2
-rw-r--r--chef/spec/unit/knife_spec.rb2
-rw-r--r--chef/spec/unit/provider/cron/solaris_spec.rb24
-rw-r--r--chef/spec/unit/provider/cron_spec.rb12
-rw-r--r--chef/spec/unit/provider/deploy_spec.rb4
-rw-r--r--chef/spec/unit/provider/git_spec.rb23
-rw-r--r--chef/spec/unit/provider/group/dscl_spec.rb4
-rw-r--r--chef/spec/unit/provider/group/gpasswd_spec.rb4
-rw-r--r--chef/spec/unit/provider/group/pw_spec.rb6
-rw-r--r--chef/spec/unit/provider/group/usermod_spec.rb2
-rw-r--r--chef/spec/unit/provider/link_spec.rb6
-rw-r--r--chef/spec/unit/provider/package_spec.rb2
-rw-r--r--chef/spec/unit/provider/subversion_spec.rb1
-rw-r--r--chef/spec/unit/provider/user/pw_spec.rb4
-rw-r--r--chef/spec/unit/rest_spec.rb21
-rw-r--r--features/api/nodes/cookbook_sync_api.feature2
177 files changed, 6682 insertions, 2899 deletions
diff --git a/chef-expander/lib/chef/expander/version.rb b/chef-expander/lib/chef/expander/version.rb
index cc21549515..d003cc0f83 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.6"
+ VERSION = "0.10.0.beta.8"
def self.version
@rev ||= begin
diff --git a/chef-server-api/Gemfile.lock b/chef-server-api/Gemfile.lock
index b4643017eb..89d6e18615 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.6)
+ chef (0.10.0.beta.8)
bunny (>= 0.6.0)
erubis
highline
@@ -21,8 +21,8 @@ PATH
PATH
remote: ../chef-solr
specs:
- chef-solr (0.10.0.beta.6)
- chef (= 0.10.0.beta.6)
+ chef-solr (0.10.0.beta.8)
+ chef (= 0.10.0.beta.8)
GEM
remote: http://rubygems.org/
diff --git a/chef-server-api/app/controllers/sandboxes.rb b/chef-server-api/app/controllers/sandboxes.rb
index afea7cb1e6..e49209e324 100644
--- a/chef-server-api/app/controllers/sandboxes.rb
+++ b/chef-server-api/app/controllers/sandboxes.rb
@@ -135,7 +135,7 @@ class Sandboxes < Application
end
rescue
# undo the successful moves we did before
- Chef::Log.error("sandbox finalization: got exception moving files, undoing previous changes: #{$!} -- #{$!.backtrace.join("\n")}")
+ Chef::Log.error("Sandbox finalization: got exception moving files, undoing previous changes: #{$!} -- #{$!.backtrace.join("\n")}")
undo_steps.each do |undo_step|
undo_step.call
end
diff --git a/chef-server-api/lib/chef-server-api/version.rb b/chef-server-api/lib/chef-server-api/version.rb
index f921a8a581..d4e69a35f0 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.6'
+ VERSION = '0.10.0.beta.8'
end
diff --git a/chef-server-webui/app/controllers/openid_consumer.rb b/chef-server-webui/app/controllers/openid_consumer.rb
index aec6e2e0d7..fa9b140b13 100644
--- a/chef-server-webui/app/controllers/openid_consumer.rb
+++ b/chef-server-webui/app/controllers/openid_consumer.rb
@@ -121,10 +121,10 @@ class OpenidConsumer < Application
private
def is_authorized_openid_provider?(openid, authorized_providers)
- Chef::Log.debug("checking for valid openid provider: openid: #{openid}, authorized providers: #{authorized_providers}")
+ Chef::Log.debug("Checking for valid openid provider: openid: #{openid}, authorized providers: #{authorized_providers}")
if authorized_providers and openid
if authorized_providers.length > 0
- authorized_providers.detect { |p| Chef::Log.debug("openid: #{openid} (#{openid.class}), p: #{p} (#{p.class})"); openid.match(p) }
+ authorized_providers.detect { |p| Chef::Log.debug("Openid: #{openid} (#{openid.class}), p: #{p} (#{p.class})"); openid.match(p) }
else
true
end
@@ -134,10 +134,10 @@ class OpenidConsumer < Application
end
def is_authorized_openid_identifier?(openid, authorized_identifiers)
- Chef::Log.debug("checking for valid openid identifier: openid: #{openid}, authorized openids: #{authorized_identifiers}")
+ Chef::Log.debug("Checking for valid openid identifier: openid: #{openid}, authorized openids: #{authorized_identifiers}")
if authorized_identifiers and openid
if authorized_identifiers.length > 0
- authorized_identifiers.detect { |p| Chef::Log.debug("openid: #{openid} (#{openid.class}), p: #{p} (#{p.class})"); openid == p }
+ authorized_identifiers.detect { |p| Chef::Log.debug("Openid: #{openid} (#{openid.class}), p: #{p} (#{p.class})"); openid == p }
else
true
end
diff --git a/chef-server-webui/lib/chef-server-webui/version.rb b/chef-server-webui/lib/chef-server-webui/version.rb
index e1e3d8b850..5e652af9b8 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.6'
+ VERSION = '0.10.0.beta.8'
end
diff --git a/chef-server/lib/chef-server/version.rb b/chef-server/lib/chef-server/version.rb
index 1b54ca42de..b950d27384 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.6'
+ VERSION = '0.10.0.beta.8'
end
diff --git a/chef-solr/lib/chef/solr/version.rb b/chef-solr/lib/chef/solr/version.rb
index d93fbf923c..5dae90d43e 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.6'
+ VERSION = '0.10.0.beta.8'
# Solr Schema. Used to detect incompatibilities between installed solr and
# chef-solr versions.
diff --git a/chef/Rakefile b/chef/Rakefile
index a3a6a6efd5..94045326a2 100644
--- a/chef/Rakefile
+++ b/chef/Rakefile
@@ -28,6 +28,9 @@ GEM_NAME = "chef"
spec = eval(File.read("chef.gemspec"))
+# This has to be here or else the docs get generated *after* the gem is created
+task :gem => 'docs:man'
+
Rake::GemPackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end
@@ -55,10 +58,39 @@ task :uninstall do
sh %{gem uninstall #{GEM_NAME} -x -v #{Chef::VERSION} }
end
-desc "create a gemspec file"
-task :make_spec do
- File.open("#{GEM_NAME}.gemspec", "w") do |file|
- file.puts spec.to_ruby
+RONN_OPTS = "--manual='Chef Manual' --organization='Chef #{Chef::VERSION}' --date='#{Time.new.strftime('%Y-%m-%d')}'"
+
+namespace :docs do
+ desc "Regenerate manpages from markdown"
+ task :man
+
+ desc "Regenerate HTML manual from markdown"
+ task :html
+
+ if system('which ronn > /dev/null')
+ Dir['distro/common/markdown/man1/*.mkd'].each do |mkd|
+ basename = File.basename(mkd, '.mkd')
+ manfile = "distro/common/man/man1/#{basename}.1"
+ htmlfile = "distro/common/html/#{basename}.1.html"
+ file(manfile => mkd) do
+ sh "ronn -r #{RONN_OPTS} #{mkd} --pipe > #{manfile}"
+ end
+ task :man => manfile
+
+ file(htmlfile => mkd) do
+ sh "ronn -5 #{RONN_OPTS} --style=toc #{mkd} --pipe > #{htmlfile}"
+ end
+
+ task :html => htmlfile
+ end
+ else
+ puts "get with the program and install ronn"
end
+
+ task :all => [:man, :html]
end
+task :docs => "docs:all"
+
+
+
diff --git a/chef/distro/common/html/knife-bootstrap.1.html b/chef/distro/common/html/knife-bootstrap.1.html
new file mode 100644
index 0000000000..bbc00b24cf
--- /dev/null
+++ b/chef/distro/common/html/knife-bootstrap.1.html
@@ -0,0 +1,182 @@
+<!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>knife-bootrap(1) - Install Chef Client on a remote host</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="#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'>knife-bootrap(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-bootrap(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-bootrap</code> - <span class="man-whatis">Install Chef Client on a remote host</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <strong>bootstrap</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-i</code>, <code>--identity-file IDENTITY_FILE</code></dt><dd>The SSH identity file used for authentication</dd>
+<dt><code>-N</code>, <code>--node-name NAME</code></dt><dd>The Chef node name for your new node</dd>
+<dt><code>-P</code>, <code>--ssh-password PASSWORD</code></dt><dd>The ssh password</dd>
+<dt><code>-x</code>, <code>--ssh-user USERNAME</code></dt><dd>The ssh username</dd>
+<dt><code>--prerelease</code></dt><dd>Install pre-release Chef gems</dd>
+<dt><code>-r</code>, <code>--run-list RUN_LIST</code></dt><dd>Comma separated list of roles/recipes to apply</dd>
+<dt><code>-P</code>, <code>--ssh-password PASSWORD</code></dt><dd>The ssh password</dd>
+<dt><code>-x</code>, <code>--ssh-user USERNAME</code></dt><dd>The ssh username</dd>
+<dt><code>--template-file TEMPLATE</code></dt><dd>Full path to location of template to use</dd>
+<dt class="flush"><code>--sudo</code></dt><dd>Execute the bootstrap via sudo</dd>
+<dt><code>-d</code>, <code>--distro DISTRO</code></dt><dd>Bootstrap a distro using a template</dd>
+</dl>
+
+
+<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>
+
+<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>
+option), an Ubuntu 10.04 host bootstrapped with RubyGems is assumed. The
+<strong>DISTRO</strong> value corresponds to the base filename of the template, in
+other words <code>DISTRO</code>.erb. A template file can be specified with the
+<code>--template-file</code> option in which case the <strong>DISTRO</strong> is not used. The
+sub-command looks in the following locations for the template to use:</p>
+
+<ul>
+<li><code>bootstrap</code> directory in the installed Chef Knife library.</li>
+<li><code>bootstrap</code> directory in the <code>$PWD/.chef</code>.</li>
+<li><code>bootstrap</code> directory in the users <code>$HOME/.chef</code>.</li>
+</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>
+
+<ul>
+<li>centos5-gems</li>
+<li>fedora13-gems</li>
+<li>ubuntu10.04-gems</li>
+<li>ubuntu10.04-apt</li>
+</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>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>
+<li>Write a default config file for Chef (<code>/etc/chef/client.rb</code>) using values from the <code>knife.rb</code>.</li>
+<li>Create a JSON attributes file containing the specified run list and run Chef.</li>
+</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>When this is complete, the bootstrapped node will have:</p>
+
+<ul>
+<li>Latest Chef version installed from RubyGems or APT Packages from Opscode. This may be a later version than the local system.</li>
+<li>Be validated with the configured Chef Server.</li>
+<li>Have run Chef with its default run list if one is specfied.</li>
+</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>
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p> <strong>knife-ssh</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>
+
+<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>.
+ 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='tc'>April 2011</li>
+ <li class='tr'>knife-bootrap(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-client.1.html b/chef/distro/common/html/knife-client.1.html
new file mode 100644
index 0000000000..f8af84f933
--- /dev/null
+++ b/chef/distro/common/html/knife-client.1.html
@@ -0,0 +1,216 @@
+<!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>knife-client(1) - Manage Chef API Clients</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="#CLIENT-SUB-COMMANDS">CLIENT SUB-COMMANDS</a>
+ <a href="#BULK-DELETE">BULK DELETE</a>
+ <a href="#CREATE">CREATE</a>
+ <a href="#DELETE">DELETE</a>
+ <a href="#EDIT">EDIT</a>
+ <a href="#LIST">LIST</a>
+ <a href="#REREGISTER">REREGISTER</a>
+ <a href="#SHOW">SHOW</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'>knife-client(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-client(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-client</code> - <span class="man-whatis">Manage Chef API Clients</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<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="CLIENT-SUB-COMMANDS">CLIENT SUB-COMMANDS</h2>
+
+<h2 id="BULK-DELETE">BULK DELETE</h2>
+
+<p><strong>knife client bulk delete</strong> <em>regex</em> <em>(options)</em></p>
+
+<p>Delete clients where the client name matches the regular expression
+<em>regex</em> on the Chef Server. The regular expression should be given as a
+quoted string, and not surrounded by forward slashes.</p>
+
+<h2 id="CREATE">CREATE</h2>
+
+<p><strong>knife client create</strong> <em>client name</em> <em>(options)</em></p>
+
+<dl>
+<dt><code>-a</code>, <code>--admin </code></dt><dd>Create the client as an admin</dd>
+<dt><code>-f</code>, <code>--file FILE</code></dt><dd>Write the key to a file</dd>
+</dl>
+
+
+<p>Create a new client. This generates an RSA keypair. The private key will
+be displayed on <em>STDOUT</em> or written to the named file. The public half
+will be stored on the Server. For <em>chef-client</em> systems, the private key
+should be copied to the system as <code>/etc/chef/client.pem</code>.</p>
+
+<p>Admin clients should be created for users that will use <em>knife</em> to
+access the API as an administrator. The private key will generally be
+copied to <code>~/.chef/client\_name.pem</code> and referenced in the <code>knife.rb</code>
+configuration file.</p>
+
+<h2 id="DELETE">DELETE</h2>
+
+<p><strong>knife client delete</strong> <em>client name</em> <em>(options)</em></p>
+
+<p>Deletes a registered client.</p>
+
+<h2 id="EDIT">EDIT</h2>
+
+<p><strong>client edit</strong> <em>client name</em> <em>(options)</em></p>
+
+<p>Edit a registered client.</p>
+
+<h2 id="LIST">LIST</h2>
+
+<p><strong>client list</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-w</code>, <code>--with-uri</code></dt><dd> Show corresponding URIs</dd>
+</dl>
+
+
+<p>List all registered clients.</p>
+
+<h2 id="REREGISTER">REREGISTER</h2>
+
+<p><strong>client reregister</strong> <em>client name</em> <em>(options)</em></p>
+
+<dl>
+<dt><code>-f</code>, <code>--file FILE</code></dt><dd>Write the key to a file</dd>
+</dl>
+
+
+<p>Regenerate the RSA keypair for a client. The public half will be stored
+on the server and the private key displayed on <em>STDOUT</em> or written to
+the named file. This operation will invalidate the previous keypair used
+by the client, preventing it from authenticating with the Chef Server.
+Use care when reregistering the validator client.</p>
+
+<h2 id="SHOW">SHOW</h2>
+
+<p><strong>client show</strong> <em>client name</em> <em>(options)</em></p>
+
+<dl>
+<dt><code>-a</code>, <code>--attribute ATTR</code></dt><dd>Show only one attribute</dd>
+</dl>
+
+
+<p>Show a client. Output format is determined by the --format option.</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>
+
+<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>.
+ 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='tc'>April 2011</li>
+ <li class='tr'>knife-client(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-configure.1.html b/chef/distro/common/html/knife-configure.1.html
new file mode 100644
index 0000000000..f407a4e941
--- /dev/null
+++ b/chef/distro/common/html/knife-configure.1.html
@@ -0,0 +1,170 @@
+<!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>knife-configure(1) - Generate configuration files for knife or Chef Client</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="#CONFIGURE-SUBCOMMANDS">CONFIGURE SUBCOMMANDS</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'>
+ <li class='tl'>knife-configure(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-configure(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-configure</code> - <span class="man-whatis">Generate configuration files for knife or Chef Client</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <strong>configure</strong> [client] <em>(options)</em></p>
+
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p>Generates a knife.rb configuration file interactively. When given the
+--initial option, also creates a new administrative user.</p>
+
+<h2 id="CONFIGURE-SUBCOMMANDS">CONFIGURE SUBCOMMANDS</h2>
+
+<p><strong>knife configure</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-i</code>, <code>--initial</code></dt><dd>Create an initial API Client</dd>
+<dt><code>-r</code>, <code>--repository REPO</code></dt><dd>The path to your chef-repo</dd>
+</dl>
+
+
+<p>Create a configuration file for knife. This will prompt for values to
+enter into the file. Default values are listed in square brackets if no
+other entry is typed. See <strong>knife</strong>(1) for a description of
+configuration options.</p>
+
+<p><strong>knife configure client</strong> <em>directory</em></p>
+
+<p>Read the <em>knife.rb</em> config file and generate a config file suitable for
+use in <em>/etc/chef/client.rb</em> and copy the validation certificate into
+the specified <em>directory</em>.</p>
+
+<h2 id="EXAMPLES">EXAMPLES</h2>
+
+<ul>
+<li><p>On a freshly installed Chef Server, use <em>knife configure -i</em> to
+create an administrator and knife configuration file. Leave the
+field blank to accept the default value. On most systems, the
+default values are acceptable.</p>
+
+<p>user@host$ knife configure -i<br />
+Please enter the chef server URL: [http://localhost:4000]<br />
+Please enter a clientname for the new client: [username]<br />
+Please enter the existing admin clientname: [chef-webui]<br />
+Please enter the location of the existing admin client's private key: [/etc/chef/webui.pem]<br />
+Please enter the validation clientname: [chef-validator]<br />
+Please enter the location of the validation key: [/etc/chef/validation.pem]<br />
+Please enter the path to a chef repository (or leave blank):<br />
+Creating initial API user...<br />
+Created (or updated) client[username]<br />
+Configuration file written to /home/username/.chef/knife.rb</p>
+
+<p>This creates a new administrator client named <em>username</em>, writes
+a configuration file to <em>/home/username/.chef/knife.rb</em>, and the
+private key to <em>/home/username/.chef/username.pem</em>. The
+configuration file and private key may be copied to another system
+to facilitate administration of the Chef Server from a remote
+system. Depending on the value given for the Chef Server URL, you
+may need to modify that setting after copying to a remote host.</p></li>
+</ul>
+
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p> <strong>knife</strong>(1) <strong>knife-client</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>
+
+<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>.
+ 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='tc'>April 2011</li>
+ <li class='tr'>knife-configure(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-cookbook-site.1.html b/chef/distro/common/html/knife-cookbook-site.1.html
new file mode 100644
index 0000000000..97c240fe54
--- /dev/null
+++ b/chef/distro/common/html/knife-cookbook-site.1.html
@@ -0,0 +1,166 @@
+<!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>knife-cookbook-site(1) - Install and update open source cookbooks</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="#COOKBOOK-SITE-SUB-COMMANDS">COOKBOOK SITE SUB-COMMANDS</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'>knife-cookbook-site(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-cookbook-site(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-cookbook-site</code> - <span class="man-whatis">Install and update open source cookbooks</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <strong>cookbook site</strong> <em>sub-command</em> <em>(options)</em></p>
+
+<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><strong>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><strong>cookbook site list</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-w</code>, <code>--with-uri</code></dt><dd>Show corresponding URIs</dd>
+</dl>
+
+
+<p>Lists available cookbooks from the Community site.</p>
+
+<p><strong>cookbook site search QUERY</strong> <em>(options)</em></p>
+
+<p>Searches the Community site with the specified query.</p>
+
+<p><strong>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>
+<dt><code>-u</code>, <code>--user USER</code></dt><dd>API Client Username</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>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><strong>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>
+
+<p>Shows information from the site about a particular cookbook.</p>
+
+<p><strong>cookbook site vendor COOKBOOK [VERSION]</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-d</code>, <code>--dependencies</code></dt><dd>Grab dependencies automatically</dd>
+</dl>
+
+
+<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>
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p> <strong>knife-environment</strong>(1)</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>
+
+<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>.
+ 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='tc'>April 2011</li>
+ <li class='tr'>knife-cookbook-site(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-cookbook.1.html b/chef/distro/common/html/knife-cookbook.1.html
new file mode 100644
index 0000000000..007b5d2e42
--- /dev/null
+++ b/chef/distro/common/html/knife-cookbook.1.html
@@ -0,0 +1,233 @@
+<!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>knife-cookbook(1) - Upload and manage Chef cookbooks</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="#COOKBOOK-SUB-COMMANDS">COOKBOOK SUB-COMMANDS</a>
+ </div>
+
+ <ol class='man-decor man-head man head'>
+ <li class='tl'>knife-cookbook(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-cookbook(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <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>
+
+<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><strong>cookbook bulk delete REGEX</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>
+</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><strong>cookbook create COOKBOOK</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>
+</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>
+
+<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>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><strong>cookbook delete 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>
+</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><strong>cookbook download 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>
+</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><strong>cookbook list</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-w</code>, <code>--with-uri</code></dt><dd>Show corresponding URIs</dd>
+</dl>
+
+
+<p>List all the cookbooks.</p>
+
+<p><strong>cookbook metadata 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>
+</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><strong>cookbook metadata from FILE</strong> <em>(options)</em></p>
+
+<p>Load the cookbook metadata from a specified file.</p>
+
+<p><strong>cookbook show COOKBOOK [VERSION] [PART] [FILENAME]</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>
+</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>
+
+<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>
+
+
+<p><strong>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>
+</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><strong>cookbook upload [COOKBOOKS...]</strong> <em>(options)</em></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>
+</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>
+
+
+ <ol class='man-decor man-foot man foot'>
+ <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tc'>April 2011</li>
+ <li class='tr'>knife-cookbook(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-data-bag.1.html b/chef/distro/common/html/knife-data-bag.1.html
new file mode 100644
index 0000000000..03014e3c0d
--- /dev/null
+++ b/chef/distro/common/html/knife-data-bag.1.html
@@ -0,0 +1,234 @@
+<!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>knife-data-bag(1) - Store arbitrary data on a Chef Server</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="#DATA-BAG-SUB-COMMANDS">DATA BAG SUB-COMMANDS</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="#ENCRYPTION-SUPPORT">ENCRYPTION 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'>
+ <li class='tl'>knife-data-bag(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-data-bag(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-data-bag</code> - <span class="man-whatis">Store arbitrary data on a Chef Server</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <strong>data bag</strong> <em>sub-command</em> <em>(options)</em></p>
+
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p>Data bags are stores of arbitrary JSON data. Each data bag is a
+collection that may contain many items. Data Bag Items are indexed by
+the Chef Server and can be searched via <strong>knife-search</strong>(1).</p>
+
+<p>Data bags are available to all nodes configured by <strong>chef-client</strong>(8),
+and are therefore a convenient mechanism to store global information,
+such as lists of administrative accounts that should be configured on
+all hosts.</p>
+
+<h2 id="DATA-BAG-SUB-COMMANDS">DATA BAG SUB-COMMANDS</h2>
+
+<h2 id="CREATE">CREATE</h2>
+
+<p><strong>knife data bag create</strong> <em>bag name</em> [item id] <em>(options)</em></p>
+
+<dl>
+<dt><code>-s</code>, <code>--secret SECRET</code></dt><dd>A secret key used to encrypt the data bag item. See <strong>encryption support</strong> below.</dd>
+<dt><code>--secret-file SECRET_FILE</code></dt><dd>The path to a file containing the secret key to be used to encrypt
+the data bag item.</dd>
+</dl>
+
+
+<p>If <em>item id</em> is given, creates a new, empty data bag item and opens it for
+editing in your editor. The data bag will be created if it does not
+exist.</p>
+
+<p>If <em>item id</em> is not given, the data bag will be created.</p>
+
+<h2 id="DELETE">DELETE</h2>
+
+<p><strong>knife data bag delete</strong> <em>bag name</em> [item id] <em>(options)</em></p>
+
+<p>Delete a data bag, or an item from a data bag.</p>
+
+<h2 id="EDIT">EDIT</h2>
+
+<p><strong>knife data bag edit</strong> <em>bag name</em> <em>item id</em> <em>(options)</em></p>
+
+<dl>
+<dt><code>-s</code>, <code>--secret SECRET</code></dt><dd>A secret key used to encrypt the data bag item. See <strong>encryption support</strong> below.</dd>
+<dt><code>--secret-file SECRET_FILE</code></dt><dd>The path to a file containing the secret key to be used to encrypt
+the data bag item.</dd>
+</dl>
+
+
+<p>Edit an item in a data bag.</p>
+
+<h2 id="FROM-FILE">FROM FILE</h2>
+
+<p><strong>knife data bag from file</strong> <em>bag name</em> <em>file</em> <em>(options)</em></p>
+
+<dl>
+<dt><code>-s</code>, <code>--secret SECRET</code></dt><dd>A secret key used to encrypt the data bag item. See <strong>encryption support</strong> below.</dd>
+<dt><code>--secret-file SECRET_FILE</code></dt><dd>The path to a file containing the secret key to be used to encrypt
+the data bag item.</dd>
+</dl>
+
+
+<p>Load a data bag item from a JSON file. If <em>file</em> is a relative or
+absolute path to the file, that file will be used. Otherwise, the <em>file</em>
+parameter is treated as the base name of a data bag file in a Chef
+repository, and <code>knife</code> will search for the file in
+<code>./data_bags/bag_name/file</code>. For example <code>knife data bag from file users
+dan.json</code> would attempt to load the file <code>./data_bags/users/dan.json</code>.</p>
+
+<h2 id="LIST">LIST</h2>
+
+<p><strong>knife data bag list</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-w</code>, <code>--with-uri</code></dt><dd>Show corresponding URIs</dd>
+</dl>
+
+
+<p>Lists the data bags that exist on the Chef Server.</p>
+
+<h2 id="SHOW">SHOW</h2>
+
+<p><strong>knife data bag show BAG [ITEM]</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-s</code>, <code>--secret SECRET</code></dt><dd>A secret key used to encrypt the data bag item. See <strong>encryption support</strong> below.</dd>
+<dt><code>--secret-file SECRET_FILE</code></dt><dd>The path to a file containing the secret key to be used to encrypt
+the data bag item.</dd>
+</dl>
+
+
+<p>Show a specific data bag or an item in a data bag. The output will be
+formatted according to the --format option.</p>
+
+<h2 id="ENCRYPTION-SUPPORT">ENCRYPTION SUPPORT</h2>
+
+<p>Data Bag Items may be encrypted to keep their contents secret. This may
+be desireable when storing sensitive information such as database
+passwords, API keys, etc.</p>
+
+<p>Data Bag Item encryption uses the AES-256 CBC symmetric key algorithm.</p>
+
+<p><strong>CAVEATS:</strong> Keys are not encrypted; only values are encrypted. The "id"
+of a Data Bag Item is not encrypted, since it is used by Chef Server to
+store the item in its database. For example, given the following data bag item:</p>
+
+<pre><code>{"id": "important_passwords", "secret_password": "opensesame"}
+</code></pre>
+
+<p>The key "secret_password" will be visible to an evesdropper, but the
+value "opensesame" will be protected. Both the key "id" and its value
+"important_passwords" will be visible to an evesdropper.</p>
+
+<p>Chef Server does not provide a secure mechanism for distributing
+encryption keys.</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="&#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> 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;&#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>
+
+<h2 id="CHEF">CHEF</h2>
+
+<p> Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home</p>
+
+
+ <ol class='man-decor man-foot man foot'>
+ <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tc'>April 2011</li>
+ <li class='tr'>knife-data-bag(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-environment.1.html b/chef/distro/common/html/knife-environment.1.html
new file mode 100644
index 0000000000..b71f9dbef2
--- /dev/null
+++ b/chef/distro/common/html/knife-environment.1.html
@@ -0,0 +1,93 @@
+<!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>knife-environment(1) - Define cookbook policies for the environments in your infrastructure</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="#ENVIRONMENT-SUBCOMMANDS">ENVIRONMENT SUBCOMMANDS</a>
+ </div>
+
+ <ol class='man-decor man-head man head'>
+ <li class='tl'>knife-environment(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-environment(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-environment</code> - <span class="man-whatis">Define cookbook policies for the environments in your infrastructure</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <strong>environment</strong> <em>sub-command</em> <em>(options)</em></p>
+
+<h2 id="ENVIRONMENT-SUBCOMMANDS">ENVIRONMENT SUBCOMMANDS</h2>
+
+
+ <ol class='man-decor man-foot man foot'>
+ <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tc'>April 2011</li>
+ <li class='tr'>knife-environment(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-exec.1.html b/chef/distro/common/html/knife-exec.1.html
new file mode 100644
index 0000000000..12dd059054
--- /dev/null
+++ b/chef/distro/common/html/knife-exec.1.html
@@ -0,0 +1,93 @@
+<!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>knife-exec(1) - Run user scripts using the Chef API DSL</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="#EXEC-SUBCOMMAND">EXEC SUBCOMMAND</a>
+ </div>
+
+ <ol class='man-decor man-head man head'>
+ <li class='tl'>knife-exec(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-exec(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-exec</code> - <span class="man-whatis">Run user scripts using the Chef API DSL</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <strong>exec</strong> <em>(options)</em></p>
+
+<h2 id="EXEC-SUBCOMMAND">EXEC SUBCOMMAND</h2>
+
+
+ <ol class='man-decor man-foot man foot'>
+ <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tc'>April 2011</li>
+ <li class='tr'>knife-exec(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-index.1.html b/chef/distro/common/html/knife-index.1.html
new file mode 100644
index 0000000000..b7d06b21a5
--- /dev/null
+++ b/chef/distro/common/html/knife-index.1.html
@@ -0,0 +1,125 @@
+<!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>knife-index(1) - Rebuild the search index on a Chef Server</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="#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'>knife-index(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-index(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-index</code> - <span class="man-whatis">Rebuild the search index on a Chef Server</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <strong>index rebuild</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-y</code>, <code>--yes</code></dt><dd>don't bother to ask if I'm sure</dd>
+</dl>
+
+
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p>Rebuilds all the search indexes on the server. This is accomplished by
+deleting all objects from the search index, and then forwarding each
+item in the database to <strong>chef-expander</strong>(8) via <strong>rabbitmq-server</strong>(1).
+Depending on the number of objects in the database, it may take some
+time for all objects to be indexed and available for search.</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="&#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>
+
+<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>.
+ 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='tc'>April 2011</li>
+ <li class='tr'>knife-index(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-node.1.html b/chef/distro/common/html/knife-node.1.html
new file mode 100644
index 0000000000..c78eb4a361
--- /dev/null
+++ b/chef/distro/common/html/knife-node.1.html
@@ -0,0 +1,268 @@
+<!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>knife-node(1) - Manage the hosts in your infrastructure</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="#NODE-SUB-COMMANDS">NODE SUB-COMMANDS</a>
+ <a href="#BULK-DELETE">BULK DELETE</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="#RUN_LIST-ADD">RUN_LIST ADD</a>
+ <a href="#RUN_LIST-REMOVE">RUN_LIST REMOVE</a>
+ <a href="#SHOW">SHOW</a>
+ <a href="#RUN-LIST-ITEM-FORMAT">RUN LIST ITEM 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'>
+ <li class='tl'>knife-node(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-node(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-node</code> - <span class="man-whatis">Manage the hosts in your infrastructure</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <strong>node</strong> <em>sub-command</em> <em>(options)</em></p>
+
+<h2 id="DESCRIPTION">DESCRIPTION</h2>
+
+<p>Nodes are data structures that represent hosts configured with Chef.
+Nodes have a <strong>name</strong>, a String that uniquely identifies the node,
+<strong>attributes</strong>, a nested Hash of properties that describe how the host
+should be configured, a <strong>chef_environment</strong>, a String representing the
+environment to which the node belongs, and a <strong>run_list</strong>, an ordered
+list of <strong>recipes</strong> or <strong>roles</strong> that chef-client should apply when
+configuring a host.</p>
+
+<p>When a host communicates with a Chef Server, it authenticates using its
+<strong>node_name</strong> for identification and signs its reqests with a private
+key. The Server validates the request by looking up a <strong>client</strong> object
+with a name identical to the <strong>node_name</strong> submitted with the request
+and verifes the signature using the public key for that <strong>client</strong>
+object. <strong>NOTE</strong> that the <strong>client</strong> is a different object in the
+system. It is associated with a node by virtue of having a matching
+name.</p>
+
+<p>By default <strong>chef-client</strong>(8) will create a node using the FQDN of the
+host for the node name, though this may be overridden by configuration
+settings.</p>
+
+<h2 id="NODE-SUB-COMMANDS">NODE SUB-COMMANDS</h2>
+
+<h2 id="BULK-DELETE">BULK DELETE</h2>
+
+<p><strong>knife node bulk delete</strong> <em>regex</em> <em>(options)</em></p>
+
+<p>Deletes nodes for which the name matches the regular expression <em>regex</em>
+on the Chef Server. The regular expression should be given in quotes,
+and should not be surrounded with forward slashes (as is typical of
+regular expression literals in scripting languages).</p>
+
+<h2 id="CREATE">CREATE</h2>
+
+<p><strong>knife node create</strong> <em>name</em> <em>(options)</em></p>
+
+<p>Create a new node. Unless the --no-editor option is given, an empty node
+object will be created and displayed in your text editor. If the editor
+exits with a successful exit status, the node data will be posted to the
+Chef Server to create the node.</p>
+
+<h2 id="DELETE">DELETE</h2>
+
+<p><strong>knife node delete</strong> <em>name</em> <em>(options)</em></p>
+
+<p>Deletes the node identified by <em>name</em> on the Chef Server.</p>
+
+<h2 id="EDIT">EDIT</h2>
+
+<p><strong>knife node edit</strong> <em>name</em> <em>(options)</em></p>
+
+<dl>
+<dt><code>-a</code>, <code>--all</code></dt><dd>Display all node data in the editor. By default, default, override,
+and automatic attributes are not shown.</dd>
+</dl>
+
+
+<p>Edit the node identified by <em>name</em>. Like <strong>knife node create</strong>, the node
+will be displayed in your text editor unless the -n option is present.</p>
+
+<h2 id="FROM-FILE">FROM FILE</h2>
+
+<p><strong>knife node from file</strong> <em>file</em> <em>(options)</em></p>
+
+<p>Create a node from a JSON format <em>file</em>.</p>
+
+<h2 id="LIST">LIST</h2>
+
+<p><strong>knife node list</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-w</code>, <code>--with-uri</code></dt><dd>Show corresponding URIs</dd>
+</dl>
+
+
+<p>List all nodes.</p>
+
+<h2 id="RUN_LIST-ADD">RUN_LIST ADD</h2>
+
+<p><strong>knife node run_list add</strong> <em>name</em> <em>run list item</em> <em>(options)</em></p>
+
+<dl>
+<dt><code>-a</code>, <code>--after ITEM</code></dt><dd>Place the ENTRY in the run list after ITEM</dd>
+</dl>
+
+
+<p>Add the <em>run list item</em> to the node's <code>run_list</code>. See Run list</p>
+
+<h2 id="RUN_LIST-REMOVE">RUN_LIST REMOVE</h2>
+
+<p><strong>knife node run_list remove</strong> <em>node name</em> <em>run list item</em> <em>(options)</em></p>
+
+<p>Remove the <em>run list item</em> from the node's <code>run_list</code>.</p>
+
+<h2 id="SHOW">SHOW</h2>
+
+<p><strong>knife node show</strong> <em>node name</em> <em>(options)</em></p>
+
+<dl>
+<dt><code>-a</code>, <code>--attribute [ATTR]</code></dt><dd>Show only one attribute</dd>
+<dt><code>-r</code>, <code>--run-list </code></dt><dd>Show only the run list</dd>
+<dt><code>-F</code>, <code>--format FORMAT</code></dt><dd>Display the node in a different format.</dd>
+<dt><code>-m</code>, <code>--medium</code></dt><dd>Display more, but not all, of the node's data when using the default
+<em>summary</em> format</dd>
+</dl>
+
+
+<p>Displays the node identified by <em>node name</em> on stdout. The amount of
+content displayed and the output format are modified by the --format
+option. Valid formats are:</p>
+
+<ul>
+<li>summary:
+displays the node in a custom, summarized format</li>
+<li>text
+displays the node data in its entirety using the colorized tree
+display</li>
+<li>json:
+displays the node in JSON format</li>
+<li>yaml:
+displays the node in YAML format</li>
+<li>pp
+displays the node using Ruby's pretty printer.</li>
+</ul>
+
+
+<p>For brevity, only the first character of the format is required, for
+example, -Fj will produce JSON format output.</p>
+
+<h2 id="RUN-LIST-ITEM-FORMAT">RUN LIST ITEM FORMAT</h2>
+
+<p>Run list items may be either roles or recipes. When adding a role to a
+run list, the correct syntax is "role[ROLE_NAME]"</p>
+
+<p>When adding a recipe to a run list, there are several valid formats:</p>
+
+<dl>
+<dt>Fully Qualified Format</dt><dd>"recipe[COOKBOOK::RECIPE_NAME]", for example, "recipe[chef::client]"</dd>
+<dt>Cookbook Recipe Format</dt><dd>For brevity, the recipe part of the fully qualified format may be omitted, and recipes specified as "COOKBOOK::RECIPE_NAME", e.g., "chef::client"</dd>
+<dt>Default Recipe Format</dt><dd>When adding the default recipe of a cookbook to a run list, the recipe name may be omitted as well, e.g., "chef::default" may be written as just "chef"</dd>
+</dl>
+
+
+<h2 id="SEE-ALSO">SEE ALSO</h2>
+
+<p> <strong>knife-client</strong>(1) <strong>knife-search</strong>(1) <strong>knife-role</strong>(1)</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>
+
+<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>.
+ 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='tc'>April 2011</li>
+ <li class='tr'>knife-node(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-recipe.1.html b/chef/distro/common/html/knife-recipe.1.html
new file mode 100644
index 0000000000..47b711b00a
--- /dev/null
+++ b/chef/distro/common/html/knife-recipe.1.html
@@ -0,0 +1,92 @@
+<!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>knife-recipe(1) - List the recipes available on a Chef Server</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>
+ </div>
+
+ <ol class='man-decor man-head man head'>
+ <li class='tl'>knife-recipe(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-recipe(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-recipe</code> - <span class="man-whatis">List the recipes available on a Chef Server</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <strong>recipe list [PATTERN]</strong></p>
+
+<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.</p>
+
+
+ <ol class='man-decor man-foot man foot'>
+ <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tc'>April 2011</li>
+ <li class='tr'>knife-recipe(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-role.1.html b/chef/distro/common/html/knife-role.1.html
new file mode 100644
index 0000000000..fb584356ce
--- /dev/null
+++ b/chef/distro/common/html/knife-role.1.html
@@ -0,0 +1,136 @@
+<!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>knife-role(1) - Group common configuration settings</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="#ROLE-SUB-COMMANDS">ROLE SUB-COMMANDS</a>
+ </div>
+
+ <ol class='man-decor man-head man head'>
+ <li class='tl'>knife-role(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-role(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-role</code> - <span class="man-whatis">Group common configuration settings</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <strong>role</strong> <em>sub-command</em> <em>(options)</em></p>
+
+<h2 id="ROLE-SUB-COMMANDS">ROLE SUB-COMMANDS</h2>
+
+<p><strong>role bulk delete REGEX</strong> <em>(options)</em></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>
+
+<p><strong>role create ROLE</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-d</code>, <code>--description</code></dt><dd>The role description</dd>
+</dl>
+
+
+<p>Create a new role.</p>
+
+<p><strong>role delete ROLE</strong> <em>(options)</em></p>
+
+<p>Delete a role.</p>
+
+<p><strong>role edit ROLE</strong> <em>(options)</em></p>
+
+<p>Edit a role.</p>
+
+<p><strong>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>
+
+<dl>
+<dt><code>-w</code>, <code>--with-uri</code></dt><dd>Show corresponding URIs</dd>
+</dl>
+
+
+<p>List roles.</p>
+
+<p><strong>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>
+
+
+ <ol class='man-decor man-foot man foot'>
+ <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tc'>April 2011</li>
+ <li class='tr'>knife-role(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-search.1.html b/chef/distro/common/html/knife-search.1.html
new file mode 100644
index 0000000000..63ca5975bd
--- /dev/null
+++ b/chef/distro/common/html/knife-search.1.html
@@ -0,0 +1,102 @@
+<!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>knife-search(1) - Find objects on a Chef Server by query</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>
+ </div>
+
+ <ol class='man-decor man-head man head'>
+ <li class='tl'>knife-search(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-search(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-search</code> - <span class="man-whatis">Find objects on a Chef Server by query</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <strong>search INDEX QUERY</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-a</code>, <code>--attribute ATTR</code></dt><dd>Show only one attribute</dd>
+<dt><code>-i</code>, <code>--id-only</code></dt><dd>Show only the ID of matching objects</dd>
+<dt><code>-R</code>, <code>--rows INT</code></dt><dd>The number of rows to return</dd>
+<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>
+</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>
+
+
+ <ol class='man-decor man-foot man foot'>
+ <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tc'>April 2011</li>
+ <li class='tr'>knife-search(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-ssh.1.html b/chef/distro/common/html/knife-ssh.1.html
new file mode 100644
index 0000000000..70b09060d0
--- /dev/null
+++ b/chef/distro/common/html/knife-ssh.1.html
@@ -0,0 +1,101 @@
+<!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>knife-ssh(1) - Run a command or interactive session on multiple remote hosts</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>
+ </div>
+
+ <ol class='man-decor man-head man head'>
+ <li class='tl'>knife-ssh(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-ssh(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-ssh</code> - <span class="man-whatis">Run a command or interactive session on multiple remote hosts</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <strong>ssh QUERY COMMAND</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-a</code>, <code>--attribute ATTR </code></dt><dd>The attribute to use for opening the connection - default is fqdn</dd>
+<dt><code>-C</code>, <code>--concurrency NUM </code></dt><dd>The number of concurrent connections</dd>
+<dt><code>-m</code>, <code>--manual-list </code></dt><dd>QUERY is a space separated list of servers</dd>
+<dt><code>-P</code>, <code>--ssh-password PASSWORD</code></dt><dd>The ssh password</dd>
+<dt><code>-x</code>, <code>--ssh-user USERNAME </code></dt><dd>The ssh username</dd>
+</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>
+
+
+ <ol class='man-decor man-foot man foot'>
+ <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tc'>April 2011</li>
+ <li class='tr'>knife-ssh(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-status.1.html b/chef/distro/common/html/knife-status.1.html
new file mode 100644
index 0000000000..ecbf78ec97
--- /dev/null
+++ b/chef/distro/common/html/knife-status.1.html
@@ -0,0 +1,97 @@
+<!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>knife-status(1) - Display status information for the nodes in your infrastructure</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>
+ </div>
+
+ <ol class='man-decor man-head man head'>
+ <li class='tl'>knife-status(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-status(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-status</code> - <span class="man-whatis">Display status information for the nodes in your infrastructure</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <strong>status</strong> <em>(options)</em></p>
+
+<dl>
+<dt><code>-r</code>, <code>--run-list RUN_LIST</code></dt><dd>Show the run list</dd>
+</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>
+
+
+ <ol class='man-decor man-foot man foot'>
+ <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tc'>April 2011</li>
+ <li class='tr'>knife-status(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife-tag.1.html b/chef/distro/common/html/knife-tag.1.html
new file mode 100644
index 0000000000..0c790e1c8a
--- /dev/null
+++ b/chef/distro/common/html/knife-tag.1.html
@@ -0,0 +1,93 @@
+<!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>knife-tag(1) - Apply tags to nodes on a Chef Server</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="#TAG-SUBCOMMANDS">TAG SUBCOMMANDS</a>
+ </div>
+
+ <ol class='man-decor man-head man head'>
+ <li class='tl'>knife-tag(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife-tag(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife-tag</code> - <span class="man-whatis">Apply tags to nodes on a Chef Server</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <strong>tag</strong> <em>subcommand</em> <em>(options)</em></p>
+
+<h2 id="TAG-SUBCOMMANDS">TAG SUBCOMMANDS</h2>
+
+
+ <ol class='man-decor man-foot man foot'>
+ <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tc'>April 2011</li>
+ <li class='tr'>knife-tag(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/html/knife.1.html b/chef/distro/common/html/knife.1.html
new file mode 100644
index 0000000000..1c9b985b07
--- /dev/null
+++ b/chef/distro/common/html/knife.1.html
@@ -0,0 +1,362 @@
+<!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>knife(1) - Chef Server REST API utility</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="#GENERAL-OPTIONS">GENERAL 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>
+ <a href="#EXAMPLES">EXAMPLES</a>
+ <a href="#ENVIRONMENT">ENVIRONMENT</a>
+ <a href="#SEE-ALSO">SEE ALSO</a>
+ <a href="#AUTHOR">AUTHOR</a>
+ </div>
+
+ <ol class='man-decor man-head man head'>
+ <li class='tl'>knife(1)</li>
+ <li class='tc'>Chef Manual</li>
+ <li class='tr'>knife(1)</li>
+ </ol>
+
+ <h2 id="NAME">NAME</h2>
+<p class="man-name">
+ <code>knife</code> - <span class="man-whatis">Chef Server REST API utility</span>
+</p>
+
+<h2 id="SYNOPSIS">SYNOPSIS</h2>
+
+<p><strong>knife</strong> <em>sub-command</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>Unless otherwise specified, output is in JSON format, and input files
+are also JSON format.</p>
+
+<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>
+
+<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>
+<dt><code>-k</code>, <code>--key</code> KEY</dt><dd>API Client Key, corresponds to <code>Chef::Config</code> <code>client_key</code>.</dd>
+<dt><code>-c</code>, <code>--config</code> CONFIG</dt><dd>The configuration file to use</dd>
+<dt><code>-e</code>, <code>--editor</code> EDITOR</dt><dd>Set the editor to use for interactive commands</dd>
+<dt><code>-F</code>, <code>--format</code> FORMAT</dt><dd>Which format to use for output</dd>
+<dt><code>-l</code>, <code>--log_level</code> LEVEL</dt><dd>Set the log level (debug, info, warn, error, fatal), corresponds to <code>Chef::Config</code> <code>log_level</code>.</dd>
+<dt><code>-L</code>, <code>--logfile</code> LOGLOCATION</dt><dd>Set the log file location, defaults to STDOUT, corresponds to <code>Chef::Config</code> <code>log_location</code>.</dd>
+<dt><code>-n</code>, <code>--no-editor</code></dt><dd>Do not open EDITOR, just accept the data as is</dd>
+<dt><code>-u</code>, <code>--user</code> USER</dt><dd>API Client Username, corresponds to <code>Chef::Config</code> <code>node_name</code>.</dd>
+<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>
+</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>
+
+<ul>
+<li>create (create)</li>
+<li>list and show (read)</li>
+<li>edit (update)</li>
+<li>delete (destroy)</li>
+</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>
+
+<h2 id="CONFIGURATION">CONFIGURATION</h2>
+
+<p>The knife configuration file is a Ruby DSL to set configuration
+parameters for Knife's <strong>GENERAL OPTIONS</strong>. The default location for the
+config file is <code>~/.chef/knife.rb</code>. If managing multiple Chef
+repositories, per-repository config files can be created. The file must
+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
+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
+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>
+
+<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>
+
+<p>Specifies the Slicehost password to use when running the slicdehost sub-commands.</p>
+
+<h2 id="FILES">FILES</h2>
+
+<p><em>~/.chef/knife.rb</em></p>
+
+<p>Ruby DSL configuration file for knife. See <strong>CONFIGURATION</strong>.</p>
+
+<h2 id="CHEF-WORKFLOW">CHEF WORKFLOW</h2>
+
+<p>When working with Chef and Knife in the local repository, the recommended workflow outline looks like:</p>
+
+<ul>
+<li>Create repository. A skeleton sample is provided at <em>http://github.com/opscode/chef-repo/</em>.</li>
+<li>Configure knife, see <strong>CONFIGURATION</strong>.</li>
+<li>Download cookbooks from the Opscode cookbooks site, see <strong>COOKBOOK SITE SUB-COMMANDS</strong>.</li>
+<li>Or, create new cookbooks, see <code>cookbook create</code> sub-command.</li>
+<li>Commit changes to the version control system. See your tool's documentation.</li>
+<li>Upload cookbooks to the Chef Server, see <strong>COOKBOOK SUB-COMMANDS</strong>.</li>
+<li>Launch instances in the Cloud, OR provision new hosts; see <strong>CLOUD COMPUTING SUB-COMMANDS</strong> and <strong>BOOTSTRAP SUB-COMMANDS</strong>.</li>
+<li>Watch Chef configure systems!</li>
+</ul>
+
+
+<p>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 <code>cookbook site vendor</code>
+sub-command, as it uses git directly. Version control is strongly
+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>
+<dt class="flush"><code>EDITOR</code></dt><dd>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.</dd>
+</dl>
+
+
+<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>JSON is JavaScript Object Notation and more information can be found at http://json.org/.</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>Git is a version control system and documented at http://git-scm.com/.</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>
+
+<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>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>
+
+
+ <ol class='man-decor man-foot man foot'>
+ <li class='tl'>Chef 0.10.0.beta.8</li>
+ <li class='tc'>April 2011</li>
+ <li class='tr'>knife(1)</li>
+ </ol>
+
+ </div>
+</body>
+</html>
diff --git a/chef/distro/common/man/man1/chef-indexer.1 b/chef/distro/common/man/man1/chef-indexer.1
deleted file mode 100644
index e6dea91883..0000000000
--- a/chef/distro/common/man/man1/chef-indexer.1
+++ /dev/null
@@ -1,42 +0,0 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
-.TH CHEF-INDEXER: "1" "August 2009" "chef-indexer 0.7.8" "User Commands"
-.SH NAME
-chef-indexer: \- Runs the search index process.
-.SH SYNOPSIS
-.B chef-indexer
-\fI(options)\fR
-.SH DESCRIPTION
-.TP
-chef-indexer requires that the stompserver be started but at this time the stompserver package does not install a startup script, let alone start the daemon. I am working with the package maintainer for stompserver to include a startup script.
-\fB\-c\fR, \fB\-\-config\fR CONFIG
-The configuration file to use
-.TP
-\fB\-d\fR, \fB\-\-daemonize\fR
-Daemonize the process
-.TP
-\fB\-g\fR, \fB\-\-group\fR GROUP
-Group to change gid to before daemonizing
-.TP
-\fB\-l\fR, \fB\-\-log_level\fR LEVEL
-Set the log level (debug, info, warn, error, fatal)
-.TP
-\fB\-L\fR, \fB\-\-logfile\fR LOGLOCATION
-Set the log file location, defaults to STDOUT \- recommended for daemonizing
-.TP
-\fB\-u\fR, \fB\-\-user\fR USER
-User to change uid to before daemonizing
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Show chef version
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-Show this message
-.SH "SEE ALSO"
-Full documentation for Chef and chef-indexer is located on the Chef wiki, http://wiki.opscode.com/display/chef/Home.
-.SH AUTHOR
-Chef was written by Adam Jacob <adam@ospcode.com> of Opscode (http://www.opscode.com), with contributions from the community.
-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.
-
-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/man/man1/chef-solr-indexer.1 b/chef/distro/common/man/man1/chef-solr-indexer.1
deleted file mode 100644
index 3f5b37555d..0000000000
--- a/chef/distro/common/man/man1/chef-solr-indexer.1
+++ /dev/null
@@ -1,55 +0,0 @@
-.TH CHEF-SOLR-INDEXER: "1" "March 2010" "chef-solr-indexer" "User Commands"
-.SH NAME
-chef-solr-indexer: \- manual page for chef-solr-indexer
-.SH SYNOPSIS
-.B chef-solr-indexer
-\fI(options)\fR
-.SH DESCRIPTION
-.TP
-\fB\-\-amqp\-host\fR HOST
-The amqp host
-.TP
-\fB\-\-amqp\-pass\fR PASS
-The amqp password
-.TP
-\fB\-\-amqp\-port\fR PORT
-The amqp port
-.TP
-\fB\-\-amqp\-user\fR USER
-The amqp user
-.TP
-\fB\-\-amqp\-vhost\fR VHOST
-The amqp vhost
-.TP
-\fB\-c\fR, \fB\-\-config\fR CONFIG
-The configuration file to use
-.TP
-\fB\-d\fR, \fB\-\-daemonize\fR
-Daemonize the process
-.TP
-\fB\-g\fR, \fB\-\-group\fR GROUP
-Group to set privilege to
-.TP
-\fB\-l\fR, \fB\-\-log_level\fR LEVEL
-Set the log level (debug, info, warn, error, fatal)
-.TP
-\fB\-L\fR, \fB\-\-logfile\fR LOGLOCATION
-Set the log file location, defaults to STDOUT \- recommended for daemonizing
-.TP
-\fB\-u\fR, \fB\-\-user\fR USER
-User to set privilege to
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Show chef\-solr\-indexer version
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-Show this message
-.SH "SEE ALSO"
-Full documentation for Chef and chef-solr is located on the Chef wiki, http://wiki.opscode.com/display/chef/Home.
-.SH AUTHOR
-chef-solr-indexer was written by Adam Jacob <adam@ospcode.com> of Opscode (http://www.opscode.com), with contributions from the community.
-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.
-
-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/man/man1/knife-bootstrap.1 b/chef/distro/common/man/man1/knife-bootstrap.1
new file mode 100644
index 0000000000..753ae8bfa7
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-bootstrap.1
@@ -0,0 +1,137 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\-bootrap\fR \- Install Chef Client on a remote host
+.
+.SH "SYNOPSIS"
+\fBknife\fR \fBbootstrap\fR \fI(options)\fR
+.
+.TP
+\fB\-i\fR, \fB\-\-identity\-file IDENTITY_FILE\fR
+The SSH identity file used for authentication
+.
+.TP
+\fB\-N\fR, \fB\-\-node\-name NAME\fR
+The Chef node name for your new node
+.
+.TP
+\fB\-P\fR, \fB\-\-ssh\-password PASSWORD\fR
+The ssh password
+.
+.TP
+\fB\-x\fR, \fB\-\-ssh\-user USERNAME\fR
+The ssh username
+.
+.TP
+\fB\-\-prerelease\fR
+Install pre\-release Chef gems
+.
+.TP
+\fB\-r\fR, \fB\-\-run\-list RUN_LIST\fR
+Comma separated list of roles/recipes to apply
+.
+.TP
+\fB\-P\fR, \fB\-\-ssh\-password PASSWORD\fR
+The ssh password
+.
+.TP
+\fB\-x\fR, \fB\-\-ssh\-user USERNAME\fR
+The ssh username
+.
+.TP
+\fB\-\-template\-file TEMPLATE\fR
+Full path to location of template to use
+.
+.TP
+\fB\-\-sudo\fR
+Execute the bootstrap via sudo
+.
+.TP
+\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\.
+.
+.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:
+.
+.IP "\(bu" 4
+\fBbootstrap\fR directory in the installed Chef Knife library\.
+.
+.IP "\(bu" 4
+\fBbootstrap\fR directory in the \fB$PWD/\.chef\fR\.
+.
+.IP "\(bu" 4
+\fBbootstrap\fR directory in the users \fB$HOME/\.chef\fR\.
+.
+.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:
+.
+.IP "\(bu" 4
+centos5\-gems
+.
+.IP "\(bu" 4
+fedora13\-gems
+.
+.IP "\(bu" 4
+ubuntu10\.04\-gems
+.
+.IP "\(bu" 4
+ubuntu10\.04\-apt
+.
+.IP "" 0
+.
+.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
+In addition to handling the software installation, these bootstrap templates do the following:
+.
+.IP "\(bu" 4
+Write the validation\.pem per the local knife configuration\.
+.
+.IP "\(bu" 4
+Write a default config file for Chef (\fB/etc/chef/client\.rb\fR) using values from the \fBknife\.rb\fR\.
+.
+.IP "\(bu" 4
+Create a JSON attributes file containing the specified run list and run Chef\.
+.
+.IP "" 0
+.
+.P
+In the case of the RubyGems, the \fBclient\.rb\fR will be written from scratch with a minimal set of values; see \fBEXAMPLES\fR\. In the case of APT Package installation, \fBclient\.rb\fR will have the \fBvalidation_client_name\fR appended if it is not set to \fBchef\-validator\fR (default config value), and the \fBnode_name\fR will be added if \fBchef_node_name\fR option is specified\.
+.
+.P
+When this is complete, the bootstrapped node will have:
+.
+.IP "\(bu" 4
+Latest Chef version installed from RubyGems or APT Packages from Opscode\. This may be a later version than the local system\.
+.
+.IP "\(bu" 4
+Be validated with the configured Chef Server\.
+.
+.IP "\(bu" 4
+Have run Chef with its default run list if one is specfied\.
+.
+.IP "" 0
+.
+.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 "SEE ALSO"
+\fBknife\-ssh\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-client.1 b/chef/distro/common/man/man1/knife-client.1
new file mode 100644
index 0000000000..d217ec3312
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-client.1
@@ -0,0 +1,98 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\-client\fR \- Manage Chef API Clients
+.
+.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 "BULK DELETE"
+\fBknife client bulk delete\fR \fIregex\fR \fI(options)\fR
+.
+.P
+Delete clients where the client name matches the regular expression \fIregex\fR on the Chef Server\. The regular expression should be given as a quoted string, and not surrounded by forward slashes\.
+.
+.SH "CREATE"
+\fBknife client create\fR \fIclient name\fR \fI(options)\fR
+.
+.TP
+\fB\-a\fR, \fB\-\-admin\fR
+Create the client as an admin
+.
+.TP
+\fB\-f\fR, \fB\-\-file FILE\fR
+Write the key to a file
+.
+.P
+Create a new client\. This generates an RSA keypair\. The private key will be displayed on \fISTDOUT\fR or written to the named file\. The public half will be stored on the Server\. For \fIchef\-client\fR systems, the private key should be copied to the system as \fB/etc/chef/client\.pem\fR\.
+.
+.P
+Admin clients should be created for users that will use \fIknife\fR to access the API as an administrator\. The private key will generally be copied to \fB~/\.chef/client\e_name\.pem\fR and referenced in the \fBknife\.rb\fR configuration file\.
+.
+.SH "DELETE"
+\fBknife client delete\fR \fIclient name\fR \fI(options)\fR
+.
+.P
+Deletes a registered client\.
+.
+.SH "EDIT"
+\fBclient edit\fR \fIclient name\fR \fI(options)\fR
+.
+.P
+Edit a registered client\.
+.
+.SH "LIST"
+\fBclient list\fR \fI(options)\fR
+.
+.TP
+\fB\-w\fR, \fB\-\-with\-uri\fR
+Show corresponding URIs
+.
+.P
+List all registered clients\.
+.
+.SH "REREGISTER"
+\fBclient reregister\fR \fIclient name\fR \fI(options)\fR
+.
+.TP
+\fB\-f\fR, \fB\-\-file FILE\fR
+Write the key to a file
+.
+.P
+Regenerate the RSA keypair for a client\. The public half will be stored on the server and the private key displayed on \fISTDOUT\fR or written to the named file\. This operation will invalidate the previous keypair used by the client, preventing it from authenticating with the Chef Server\. Use care when reregistering the validator client\.
+.
+.SH "SHOW"
+\fBclient show\fR \fIclient name\fR \fI(options)\fR
+.
+.TP
+\fB\-a\fR, \fB\-\-attribute ATTR\fR
+Show only one attribute
+.
+.P
+Show a client\. Output format is determined by the \-\-format option\.
+.
+.SH "SEE ALSO"
+\fBknife\-node\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-configure.1 b/chef/distro/common/man/man1/knife-configure.1
new file mode 100644
index 0000000000..202ca02c23
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-configure.1
@@ -0,0 +1,88 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\-configure\fR \- Generate configuration files for knife or Chef Client
+.
+.SH "SYNOPSIS"
+\fBknife\fR \fBconfigure\fR [client] \fI(options)\fR
+.
+.SH "DESCRIPTION"
+Generates a knife\.rb configuration file interactively\. When given the \-\-initial option, also creates a new administrative user\.
+.
+.SH "CONFIGURE SUBCOMMANDS"
+\fBknife configure\fR \fI(options)\fR
+.
+.TP
+\fB\-i\fR, \fB\-\-initial\fR
+Create an initial API Client
+.
+.TP
+\fB\-r\fR, \fB\-\-repository REPO\fR
+The path to your chef\-repo
+.
+.P
+Create a configuration file for knife\. This will prompt for values to enter into the file\. Default values are listed in square brackets if no other entry is typed\. See \fBknife\fR(1) for a description of configuration options\.
+.
+.P
+\fBknife configure client\fR \fIdirectory\fR
+.
+.P
+Read the \fIknife\.rb\fR config file and generate a config file suitable for use in \fI/etc/chef/client\.rb\fR and copy the validation certificate into the specified \fIdirectory\fR\.
+.
+.SH "EXAMPLES"
+.
+.IP "\(bu" 4
+On a freshly installed Chef Server, use \fIknife configure \-i\fR to create an administrator and knife configuration file\. Leave the field blank to accept the default value\. On most systems, the default values are acceptable\.
+.
+.IP
+user@host$ knife configure \-i
+.
+.br
+Please enter the chef server URL: [http://localhost:4000]
+.
+.br
+Please enter a clientname for the new client: [username]
+.
+.br
+Please enter the existing admin clientname: [chef\-webui]
+.
+.br
+Please enter the location of the existing admin client\'s private key: [/etc/chef/webui\.pem]
+.
+.br
+Please enter the validation clientname: [chef\-validator]
+.
+.br
+Please enter the location of the validation key: [/etc/chef/validation\.pem]
+.
+.br
+Please enter the path to a chef repository (or leave blank):
+.
+.br
+Creating initial API user\.\.\.
+.
+.br
+Created (or updated) client[username]
+.
+.br
+Configuration file written to /home/username/\.chef/knife\.rb
+.
+.IP
+This creates a new administrator client named \fIusername\fR, writes a configuration file to \fI/home/username/\.chef/knife\.rb\fR, and the private key to \fI/home/username/\.chef/username\.pem\fR\. The configuration file and private key may be copied to another system to facilitate administration of the Chef Server from a remote system\. Depending on the value given for the Chef Server URL, you may need to modify that setting after copying to a remote host\.
+.
+.IP "" 0
+.
+.SH "SEE ALSO"
+\fBknife\fR(1) \fBknife\-client\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-cookbook-site.1 b/chef/distro/common/man/man1/knife-cookbook-site.1
new file mode 100644
index 0000000000..c3c5fd34ab
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-cookbook-site.1
@@ -0,0 +1,91 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\-cookbook\-site\fR \- Install and update open source cookbooks
+.
+.SH "SYNOPSIS"
+\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\.
+.
+.P
+\fBcookbook site download COOKBOOK [VERSION]\fR \fI(options)\fR
+.
+.TP
+\fB\-f\fR, \fB\-\-file FILE\fR
+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
+.
+.TP
+\fB\-w\fR, \fB\-\-with\-uri\fR
+Show corresponding URIs
+.
+.P
+Lists available cookbooks from the Community site\.
+.
+.P
+\fBcookbook site search QUERY\fR \fI(options)\fR
+.
+.P
+Searches the Community site with the specified query\.
+.
+.P
+\fBcookbook site share COOKBOOK CATEGORY\fR \fI(options)\fR
+.
+.TP
+\fB\-k\fR, \fB\-\-key KEY\fR
+API Client Key
+.
+.TP
+\fB\-u\fR, \fB\-\-user USER\fR
+API Client Username
+.
+.TP
+\fB\-o\fR, \fB\-\-cookbook\-path PATH:PATH\fR
+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\.
+.
+.P
+\fBcookbook 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
+.
+.P
+Shows information from the site about a particular cookbook\.
+.
+.P
+\fBcookbook site vendor COOKBOOK [VERSION]\fR \fI(options)\fR
+.
+.TP
+\fB\-d\fR, \fB\-\-dependencies\fR
+Grab dependencies automatically
+.
+.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\.
+.
+.SH "SEE ALSO"
+\fBknife\-environment\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-cookbook.1 b/chef/distro/common/man/man1/knife-cookbook.1
new file mode 100644
index 0000000000..08c1dd35da
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-cookbook.1
@@ -0,0 +1,242 @@
+.\" 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"
+.
+.SH "NAME"
+\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\.
+.
+.P
+\fBcookbook bulk delete REGEX\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\.
+.
+.P
+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 create COOKBOOK\fR \fI(options)\fR
+.
+.TP
+\fB\-o\fR, \fB\-\-cookbook\-path PATH\fR
+The directory where the cookbook will be created
+.
+.TP
+\fB\-r\fR, \fB\-\-readme\-format FORMAT\fR
+Format of the README file
+.
+.TP
+\fB\-C\fR, \fB\-\-copyright COPYRIGHT\fR
+Name of Copyright holder
+.
+.TP
+\fB\-I\fR, \fB\-\-license LICENSE\fR
+License for cookbook, apachev2 or none
+.
+.TP
+\fB\-E\fR, \fB\-\-email EMAIL\fR
+Email address of cookbook maintainer
+.
+.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
+.
+.IP "\(bu" 4
+COOKBOOK/definitions
+.
+.IP "\(bu" 4
+COOKBOOK/files/default
+.
+.IP "\(bu" 4
+COOKBOOK/libraries
+.
+.IP "\(bu" 4
+COOKBOOK/metadata\.rb
+.
+.IP "\(bu" 4
+COOKBOOK/providers
+.
+.IP "\(bu" 4
+COOKBOOK/README\.rdoc
+.
+.IP "\(bu" 4
+COOKBOOK/recipes/default\.rb
+.
+.IP "\(bu" 4
+COOKBOOK/resources
+.
+.IP "\(bu" 4
+COOKBOOK/templates/default
+.
+.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:
+.
+.IP "" 4
+.
+.nf
+
+cookbook_copyright "YOUR_COMPANY_NAME"
+cookbook_license "none"
+cookbook_email "YOUR_EMAIL"
+.
+.fi
+.
+.IP "" 0
+.
+.P
+\fBcookbook delete COOKBOOK [VERSION]\fR \fI(options)\fR
+.
+.TP
+\fB\-a\fR, \fB\-\-all\fR
+Delete all versions
+.
+.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
+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\.
+.
+.P
+\fBcookbook download COOKBOOK [VERSION]\fR \fI(options)\fR
+.
+.TP
+\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
+.
+.TP
+\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\.
+.
+.P
+\fBcookbook list\fR \fI(options)\fR
+.
+.TP
+\fB\-w\fR, \fB\-\-with\-uri\fR
+Show corresponding URIs
+.
+.P
+List all the cookbooks\.
+.
+.P
+\fBcookbook metadata COOKBOOK\fR \fI(options)\fR
+.
+.TP
+\fB\-a\fR, \fB\-\-all\fR
+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
+.
+.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\.
+.
+.P
+\fBcookbook metadata from FILE\fR \fI(options)\fR
+.
+.P
+Load the cookbook metadata from a specified file\.
+.
+.P
+\fBcookbook show COOKBOOK [VERSION] [PART] [FILENAME]\fR \fI(options)\fR
+.
+.TP
+\fB\-f\fR, \fB\-\-fqdn FQDN\fR
+The FQDN of the host to see the file for
+.
+.TP
+\fB\-p\fR, \fB\-\-platform PLATFORM\fR
+The platform to see the file for
+.
+.TP
+\fB\-V\fR, \fB\-\-platform\-version VERSION\fR
+The platform version to see the file for
+.
+.P
+Show a particular part of a \fICOOKBOOK\fR for the specified \fIVERSION\fR\. \fIPART\fR can be one of:
+.
+.IP "\(bu" 4
+\fIattributes\fR
+.
+.IP "\(bu" 4
+\fIdefinitions\fR
+.
+.IP "\(bu" 4
+\fIfiles\fR
+.
+.IP "\(bu" 4
+\fIlibraries\fR
+.
+.IP "\(bu" 4
+\fIproviders\fR
+.
+.IP "\(bu" 4
+\fIrecipes\fR
+.
+.IP "\(bu" 4
+\fIresources\fR
+.
+.IP "\(bu" 4
+\fItemplates\fR
+.
+.IP "" 0
+.
+.P
+\fBcookbook test [COOKBOOKS\.\.\.]\fR \fI(options)\fR
+.
+.TP
+\fB\-a\fR, \fB\-\-all\fR
+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
+.
+.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)\.
+.
+.P
+\fBcookbook upload [COOKBOOKS\.\.\.]\fR \fI(options)\fR
+.
+.TP
+\fB\-a\fR, \fB\-\-all\fR
+Upload 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
+.
+.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\.
diff --git a/chef/distro/common/man/man1/knife-data-bag.1 b/chef/distro/common/man/man1/knife-data-bag.1
new file mode 100644
index 0000000000..2b662cbfad
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-data-bag.1
@@ -0,0 +1,130 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\-data\-bag\fR \- Store arbitrary data on a Chef Server
+.
+.SH "SYNOPSIS"
+\fBknife\fR \fBdata bag\fR \fIsub\-command\fR \fI(options)\fR
+.
+.SH "DESCRIPTION"
+Data bags are stores of arbitrary JSON data\. Each data bag is a collection that may contain many items\. Data Bag Items are indexed by the Chef Server and can be searched via \fBknife\-search\fR(1)\.
+.
+.P
+Data bags are available to all nodes configured by \fBchef\-client\fR(8), and are therefore a convenient mechanism to store global information, such as lists of administrative accounts that should be configured on all hosts\.
+.
+.SH "DATA BAG SUB\-COMMANDS"
+.
+.SH "CREATE"
+\fBknife data bag create\fR \fIbag name\fR [item id] \fI(options)\fR
+.
+.TP
+\fB\-s\fR, \fB\-\-secret SECRET\fR
+A secret key used to encrypt the data bag item\. See \fBencryption support\fR below\.
+.
+.TP
+\fB\-\-secret\-file SECRET_FILE\fR
+The path to a file containing the secret key to be used to encrypt the data bag item\.
+.
+.P
+If \fIitem id\fR is given, creates a new, empty data bag item and opens it for editing in your editor\. The data bag will be created if it does not exist\.
+.
+.P
+If \fIitem id\fR is not given, the data bag will be created\.
+.
+.SH "DELETE"
+\fBknife data bag delete\fR \fIbag name\fR [item id] \fI(options)\fR
+.
+.P
+Delete a data bag, or an item from a data bag\.
+.
+.SH "EDIT"
+\fBknife data bag edit\fR \fIbag name\fR \fIitem id\fR \fI(options)\fR
+.
+.TP
+\fB\-s\fR, \fB\-\-secret SECRET\fR
+A secret key used to encrypt the data bag item\. See \fBencryption support\fR below\.
+.
+.TP
+\fB\-\-secret\-file SECRET_FILE\fR
+The path to a file containing the secret key to be used to encrypt the data bag item\.
+.
+.P
+Edit an item in a data bag\.
+.
+.SH "FROM FILE"
+\fBknife data bag from file\fR \fIbag name\fR \fIfile\fR \fI(options)\fR
+.
+.TP
+\fB\-s\fR, \fB\-\-secret SECRET\fR
+A secret key used to encrypt the data bag item\. See \fBencryption support\fR below\.
+.
+.TP
+\fB\-\-secret\-file SECRET_FILE\fR
+The path to a file containing the secret key to be used to encrypt the data bag item\.
+.
+.P
+Load a data bag item from a JSON file\. If \fIfile\fR is a relative or absolute path to the file, that file will be used\. Otherwise, the \fIfile\fR parameter is treated as the base name of a data bag file in a Chef repository, and \fBknife\fR will search for the file in \fB\./data_bags/bag_name/file\fR\. For example \fBknife data bag from file users dan\.json\fR would attempt to load the file \fB\./data_bags/users/dan\.json\fR\.
+.
+.SH "LIST"
+\fBknife data bag list\fR \fI(options)\fR
+.
+.TP
+\fB\-w\fR, \fB\-\-with\-uri\fR
+Show corresponding URIs
+.
+.P
+Lists the data bags that exist on the Chef Server\.
+.
+.SH "SHOW"
+\fBknife data bag show BAG [ITEM]\fR \fI(options)\fR
+.
+.TP
+\fB\-s\fR, \fB\-\-secret SECRET\fR
+A secret key used to encrypt the data bag item\. See \fBencryption support\fR below\.
+.
+.TP
+\fB\-\-secret\-file SECRET_FILE\fR
+The path to a file containing the secret key to be used to encrypt the data bag item\.
+.
+.P
+Show a specific data bag or an item in a data bag\. The output will be formatted according to the \-\-format option\.
+.
+.SH "ENCRYPTION SUPPORT"
+Data Bag Items may be encrypted to keep their contents secret\. This may be desireable when storing sensitive information such as database passwords, API keys, etc\.
+.
+.P
+Data Bag Item encryption uses the AES\-256 CBC symmetric key algorithm\.
+.
+.P
+\fBCAVEATS:\fR Keys are not encrypted; only values are encrypted\. The "id" of a Data Bag Item is not encrypted, since it is used by Chef Server to store the item in its database\. For example, given the following data bag item:
+.
+.IP "" 4
+.
+.nf
+
+{"id": "important_passwords", "secret_password": "opensesame"}
+.
+.fi
+.
+.IP "" 0
+.
+.P
+The key "secret_password" will be visible to an evesdropper, but the value "opensesame" will be protected\. Both the key "id" and its value "important_passwords" will be visible to an evesdropper\.
+.
+.P
+Chef Server does not provide a secure mechanism for distributing encryption keys\.
+.
+.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\. http://wiki\.opscode\.com/display/chef/Home
diff --git a/chef/distro/common/man/man1/knife-environment.1 b/chef/distro/common/man/man1/knife-environment.1
new file mode 100644
index 0000000000..33f42c367e
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-environment.1
@@ -0,0 +1,13 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\-environment\fR \- Define cookbook policies for the environments in your infrastructure
+.
+.SH "SYNOPSIS"
+\fBknife\fR \fBenvironment\fR \fIsub\-command\fR \fI(options)\fR
+.
+.SH "ENVIRONMENT SUBCOMMANDS"
+
diff --git a/chef/distro/common/man/man1/knife-exec.1 b/chef/distro/common/man/man1/knife-exec.1
new file mode 100644
index 0000000000..6c61086a94
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-exec.1
@@ -0,0 +1,13 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\-exec\fR \- Run user scripts using the Chef API DSL
+.
+.SH "SYNOPSIS"
+\fBknife\fR \fBexec\fR \fI(options)\fR
+.
+.SH "EXEC SUBCOMMAND"
+
diff --git a/chef/distro/common/man/man1/knife-index.1 b/chef/distro/common/man/man1/knife-index.1
new file mode 100644
index 0000000000..a2467b5272
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-index.1
@@ -0,0 +1,29 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\-index\fR \- Rebuild the search index on a Chef Server
+.
+.SH "SYNOPSIS"
+\fBknife\fR \fBindex rebuild\fR \fI(options)\fR
+.
+.TP
+\fB\-y\fR, \fB\-\-yes\fR
+don\'t bother to ask if I\'m sure
+.
+.SH "DESCRIPTION"
+Rebuilds all the search indexes on the server\. This is accomplished by deleting all objects from the search index, and then forwarding each item in the database to \fBchef\-expander\fR(8) via \fBrabbitmq\-server\fR(1)\. Depending on the number of objects in the database, it may take some time for all objects to be indexed and available for search\.
+.
+.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-node.1 b/chef/distro/common/man/man1/knife-node.1
new file mode 100644
index 0000000000..51c7413233
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-node.1
@@ -0,0 +1,153 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\-node\fR \- Manage the hosts in your infrastructure
+.
+.SH "SYNOPSIS"
+\fBknife\fR \fBnode\fR \fIsub\-command\fR \fI(options)\fR
+.
+.SH "DESCRIPTION"
+Nodes are data structures that represent hosts configured with Chef\. Nodes have a \fBname\fR, a String that uniquely identifies the node, \fBattributes\fR, a nested Hash of properties that describe how the host should be configured, a \fBchef_environment\fR, a String representing the environment to which the node belongs, and a \fBrun_list\fR, an ordered list of \fBrecipes\fR or \fBroles\fR that chef\-client should apply when configuring a host\.
+.
+.P
+When a host communicates with a Chef Server, it authenticates using its \fBnode_name\fR for identification and signs its reqests with a private key\. The Server validates the request by looking up a \fBclient\fR object with a name identical to the \fBnode_name\fR submitted with the request and verifes the signature using the public key for that \fBclient\fR object\. \fBNOTE\fR that the \fBclient\fR is a different object in the system\. It is associated with a node by virtue of having a matching name\.
+.
+.P
+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"
+.
+.SH "BULK DELETE"
+\fBknife node bulk delete\fR \fIregex\fR \fI(options)\fR
+.
+.P
+Deletes nodes for which the name matches the regular expression \fIregex\fR on the Chef Server\. The regular expression should be given in quotes, and should not be surrounded with forward slashes (as is typical of regular expression literals in scripting languages)\.
+.
+.SH "CREATE"
+\fBknife node create\fR \fIname\fR \fI(options)\fR
+.
+.P
+Create a new node\. Unless the \-\-no\-editor option is given, an empty node object will be created and displayed in your text editor\. If the editor exits with a successful exit status, the node data will be posted to the Chef Server to create the node\.
+.
+.SH "DELETE"
+\fBknife node delete\fR \fIname\fR \fI(options)\fR
+.
+.P
+Deletes the node identified by \fIname\fR on the Chef Server\.
+.
+.SH "EDIT"
+\fBknife node edit\fR \fIname\fR \fI(options)\fR
+.
+.TP
+\fB\-a\fR, \fB\-\-all\fR
+Display all node data in the editor\. By default, default, override, and automatic attributes are not shown\.
+.
+.P
+Edit the node identified by \fIname\fR\. Like \fBknife node create\fR, the node will be displayed in your text editor unless the \-n option is present\.
+.
+.SH "FROM FILE"
+\fBknife node from file\fR \fIfile\fR \fI(options)\fR
+.
+.P
+Create a node from a JSON format \fIfile\fR\.
+.
+.SH "LIST"
+\fBknife node list\fR \fI(options)\fR
+.
+.TP
+\fB\-w\fR, \fB\-\-with\-uri\fR
+Show corresponding URIs
+.
+.P
+List all nodes\.
+.
+.SH "RUN_LIST ADD"
+\fBknife node run_list add\fR \fIname\fR \fIrun list item\fR \fI(options)\fR
+.
+.TP
+\fB\-a\fR, \fB\-\-after ITEM\fR
+Place the ENTRY in the run list after ITEM
+.
+.P
+Add the \fIrun list item\fR to the node\'s \fBrun_list\fR\. See Run list
+.
+.SH "RUN_LIST REMOVE"
+\fBknife node run_list remove\fR \fInode name\fR \fIrun list item\fR \fI(options)\fR
+.
+.P
+Remove the \fIrun list item\fR from the node\'s \fBrun_list\fR\.
+.
+.SH "SHOW"
+\fBknife node show\fR \fInode name\fR \fI(options)\fR
+.
+.TP
+\fB\-a\fR, \fB\-\-attribute [ATTR]\fR
+Show only one attribute
+.
+.TP
+\fB\-r\fR, \fB\-\-run\-list\fR
+Show only the run list
+.
+.TP
+\fB\-F\fR, \fB\-\-format FORMAT\fR
+Display the node in a different format\.
+.
+.TP
+\fB\-m\fR, \fB\-\-medium\fR
+Display more, but not all, of the node\'s data when using the default \fIsummary\fR format
+.
+.P
+Displays the node identified by \fInode name\fR on stdout\. The amount of content displayed and the output format are modified by the \-\-format option\. Valid formats are:
+.
+.IP "\(bu" 4
+summary: displays the node in a custom, summarized format
+.
+.IP "\(bu" 4
+text displays the node data in its entirety using the colorized tree display
+.
+.IP "\(bu" 4
+json: displays the node in JSON format
+.
+.IP "\(bu" 4
+yaml: displays the node in YAML format
+.
+.IP "\(bu" 4
+pp displays the node using Ruby\'s pretty printer\.
+.
+.IP "" 0
+.
+.P
+For brevity, only the first character of the format is required, for example, \-Fj will produce JSON format output\.
+.
+.SH "RUN LIST ITEM FORMAT"
+Run list items may be either roles or recipes\. When adding a role to a run list, the correct syntax is "role[ROLE_NAME]"
+.
+.P
+When adding a recipe to a run list, there are several valid formats:
+.
+.TP
+Fully Qualified Format
+"recipe[COOKBOOK::RECIPE_NAME]", for example, "recipe[chef::client]"
+.
+.TP
+Cookbook Recipe Format
+For brevity, the recipe part of the fully qualified format may be omitted, and recipes specified as "COOKBOOK::RECIPE_NAME", e\.g\., "chef::client"
+.
+.TP
+Default Recipe Format
+When adding the default recipe of a cookbook to a run list, the recipe name may be omitted as well, e\.g\., "chef::default" may be written as just "chef"
+.
+.SH "SEE ALSO"
+\fBknife\-client\fR(1) \fBknife\-search\fR(1) \fBknife\-role\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-recipe.1 b/chef/distro/common/man/man1/knife-recipe.1
new file mode 100644
index 0000000000..a89c570072
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-recipe.1
@@ -0,0 +1,13 @@
+.\" 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
new file mode 100644
index 0000000000..c3b9d1716c
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-role.1
@@ -0,0 +1,64 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\-role\fR \- Group common configuration settings
+.
+.SH "SYNOPSIS"
+\fBknife\fR \fBrole\fR \fIsub\-command\fR \fI(options)\fR
+.
+.SH "ROLE SUB\-COMMANDS"
+\fBrole bulk delete REGEX\fR \fI(options)\fR
+.
+.P
+Delete roles on the Chef Server based on a regular expression\. The regular expression (\fIREGEX\fR) should be in quotes, not in //\'s\.
+.
+.P
+\fBrole create ROLE\fR \fI(options)\fR
+.
+.TP
+\fB\-d\fR, \fB\-\-description\fR
+The role description
+.
+.P
+Create a new role\.
+.
+.P
+\fBrole delete ROLE\fR \fI(options)\fR
+.
+.P
+Delete a role\.
+.
+.P
+\fBrole edit ROLE\fR \fI(options)\fR
+.
+.P
+Edit a role\.
+.
+.P
+\fBrole from file FILE\fR \fI(options)\fR
+.
+.P
+Create or update a role from a role Ruby DSL (\fB\.rb\fR) or JSON file\.
+.
+.P
+\fBrole list\fR \fI(options)\fR
+.
+.TP
+\fB\-w\fR, \fB\-\-with\-uri\fR
+Show corresponding URIs
+.
+.P
+List roles\.
+.
+.P
+\fBrole show ROLE\fR \fI(options)\fR
+.
+.TP
+\fB\-a\fR, \fB\-\-attribute ATTR\fR
+Show only one attribute
+.
+.P
+Show a specific role\.
diff --git a/chef/distro/common/man/man1/knife-search.1 b/chef/distro/common/man/man1/knife-search.1
new file mode 100644
index 0000000000..3b9c518b2c
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-search.1
@@ -0,0 +1,37 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\-search\fR \- Find objects on a Chef Server by query
+.
+.SH "SYNOPSIS"
+\fBknife\fR \fBsearch INDEX QUERY\fR \fI(options)\fR
+.
+.TP
+\fB\-a\fR, \fB\-\-attribute ATTR\fR
+Show only one attribute
+.
+.TP
+\fB\-i\fR, \fB\-\-id\-only\fR
+Show only the ID of matching objects
+.
+.TP
+\fB\-R\fR, \fB\-\-rows INT\fR
+The number of rows to return
+.
+.TP
+\fB\-r\fR, \fB\-\-run\-list\fR
+Show only the run list
+.
+.TP
+\fB\-o\fR, \fB\-\-sort SORT\fR
+The order to sort the results in
+.
+.TP
+\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\.
diff --git a/chef/distro/common/man/man1/knife-ssh.1 b/chef/distro/common/man/man1/knife-ssh.1
new file mode 100644
index 0000000000..2361280720
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-ssh.1
@@ -0,0 +1,33 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\-ssh\fR \- Run a command or interactive session on multiple remote hosts
+.
+.SH "SYNOPSIS"
+\fBknife\fR \fBssh QUERY COMMAND\fR \fI(options)\fR
+.
+.TP
+\fB\-a\fR, \fB\-\-attribute ATTR\fR
+The attribute to use for opening the connection \- default is fqdn
+.
+.TP
+\fB\-C\fR, \fB\-\-concurrency NUM\fR
+The number of concurrent connections
+.
+.TP
+\fB\-m\fR, \fB\-\-manual\-list\fR
+QUERY is a space separated list of servers
+.
+.TP
+\fB\-P\fR, \fB\-\-ssh\-password PASSWORD\fR
+The ssh password
+.
+.TP
+\fB\-x\fR, \fB\-\-ssh\-user USERNAME\fR
+The ssh username
+.
+.P
+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)\.
diff --git a/chef/distro/common/man/man1/knife-status.1 b/chef/distro/common/man/man1/knife-status.1
new file mode 100644
index 0000000000..45280bec1b
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-status.1
@@ -0,0 +1,17 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\-status\fR \- Display status information for the nodes in your infrastructure
+.
+.SH "SYNOPSIS"
+\fBknife\fR \fBstatus\fR \fI(options)\fR
+.
+.TP
+\fB\-r\fR, \fB\-\-run\-list RUN_LIST\fR
+Show the run list
+.
+.P
+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\.
diff --git a/chef/distro/common/man/man1/knife-tag.1 b/chef/distro/common/man/man1/knife-tag.1
new file mode 100644
index 0000000000..85de474f4e
--- /dev/null
+++ b/chef/distro/common/man/man1/knife-tag.1
@@ -0,0 +1,13 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\-tag\fR \- Apply tags to nodes on a Chef Server
+.
+.SH "SYNOPSIS"
+\fBknife\fR \fBtag\fR \fIsubcommand\fR \fI(options)\fR
+.
+.SH "TAG SUBCOMMANDS"
+
diff --git a/chef/distro/common/man/man1/knife.1 b/chef/distro/common/man/man1/knife.1
new file mode 100644
index 0000000000..d019e20320
--- /dev/null
+++ b/chef/distro/common/man/man1/knife.1
@@ -0,0 +1,346 @@
+.\" 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"
+.
+.SH "NAME"
+\fBknife\fR \- Chef Server REST API utility
+.
+.SH "SYNOPSIS"
+\fBknife\fR \fIsub\-command\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\.
+.
+.P
+Unless otherwise specified, output is in JSON format, and input files are also JSON format\.
+.
+.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\.
+.
+.SH "GENERAL OPTIONS"
+.
+.TP
+\fB\-s\fR, \fB\-\-server\-url\fR URL
+Chef Server URL, corresponds to \fBChef::Config\fR \fBchef_server_url\fR\.
+.
+.TP
+\fB\-k\fR, \fB\-\-key\fR KEY
+API Client Key, corresponds to \fBChef::Config\fR \fBclient_key\fR\.
+.
+.TP
+\fB\-c\fR, \fB\-\-config\fR CONFIG
+The configuration file to use
+.
+.TP
+\fB\-e\fR, \fB\-\-editor\fR EDITOR
+Set the editor to use for interactive commands
+.
+.TP
+\fB\-F\fR, \fB\-\-format\fR FORMAT
+Which format to use for output
+.
+.TP
+\fB\-l\fR, \fB\-\-log_level\fR LEVEL
+Set the log level (debug, info, warn, error, fatal), corresponds to \fBChef::Config\fR \fBlog_level\fR\.
+.
+.TP
+\fB\-L\fR, \fB\-\-logfile\fR LOGLOCATION
+Set the log file location, defaults to STDOUT, corresponds to \fBChef::Config\fR \fBlog_location\fR\.
+.
+.TP
+\fB\-n\fR, \fB\-\-no\-editor\fR
+Do not open EDITOR, just accept the data as is
+.
+.TP
+\fB\-u\fR, \fB\-\-user\fR USER
+API Client Username, corresponds to \fBChef::Config\fR \fBnode_name\fR\.
+.
+.TP
+\fB\-p\fR, \fB\-\-print\-after\fR
+Show the data after a destructive operation
+.
+.TP
+\fB\-v\fR, \fB\-\-version\fR
+Show chef version
+.
+.TP
+\fB\-y\fR, \fB\-\-yes\fR
+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\.
+.
+.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\.
+.
+.IP "\(bu" 4
+create (create)
+.
+.IP "\(bu" 4
+list and show (read)
+.
+.IP "\(bu" 4
+edit (update)
+.
+.IP "\(bu" 4
+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\.
+.
+.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\.
+.
+.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
+.
+.IP "\(bu" 4
+:debug
+.
+.IP "\(bu" 4
+:warn
+.
+.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
+.
+.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\.
+.
+.P
+\fBknife[:terremark_username]\fR \fBknife[:terremark_password]\fR \fBknife[:terremark_service]\fR
+.
+.P
+Specifies the Terremark vCloud credentials to use when running the terremark sub\-commands\.
+.
+.P
+\fBknife[:slicehost_password]\fR
+.
+.P
+Specifies the Slicehost password to use when running the slicdehost sub\-commands\.
+.
+.SH "FILES"
+\fI~/\.chef/knife\.rb\fR
+.
+.P
+Ruby DSL configuration file for knife\. See \fBCONFIGURATION\fR\.
+.
+.SH "CHEF WORKFLOW"
+When working with Chef and Knife in the local repository, the recommended workflow outline looks like:
+.
+.IP "\(bu" 4
+Create repository\. A skeleton sample is provided at \fIhttp://github\.com/opscode/chef\-repo/\fR\.
+.
+.IP "\(bu" 4
+Configure knife, see \fBCONFIGURATION\fR\.
+.
+.IP "\(bu" 4
+Download cookbooks from the Opscode cookbooks site, see \fBCOOKBOOK SITE SUB\-COMMANDS\fR\.
+.
+.IP "\(bu" 4
+Or, create new cookbooks, see \fBcookbook create\fR sub\-command\.
+.
+.IP "\(bu" 4
+Commit changes to the version control system\. See your tool\'s documentation\.
+.
+.IP "\(bu" 4
+Upload cookbooks to the Chef Server, see \fBCOOKBOOK SUB\-COMMANDS\fR\.
+.
+.IP "\(bu" 4
+Launch instances in the Cloud, OR provision new hosts; see \fBCLOUD COMPUTING SUB\-COMMANDS\fR and \fBBOOTSTRAP SUB\-COMMANDS\fR\.
+.
+.IP "\(bu" 4
+Watch Chef configure systems!
+.
+.IP "" 0
+.
+.P
+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"
+.
+.TP
+\fBEDITOR\fR
+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/\.
+.
+.P
+JSON is JavaScript Object Notation and more information can be found at http://json\.org/\.
+.
+.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
+Git is a version control system and documented at http://git\-scm\.com/\.
+.
+.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\.
+.
+.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
+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\.
diff --git a/chef/distro/common/man/man8/shef.8 b/chef/distro/common/man/man1/shef.1
index 318d345ec0..318d345ec0 100644
--- a/chef/distro/common/man/man8/shef.8
+++ b/chef/distro/common/man/man1/shef.1
diff --git a/chef/distro/common/man/man1/chef-server-webui.1 b/chef/distro/common/man/man8/chef-server-webui.8
index 94c6dae98a..94c6dae98a 100644
--- a/chef/distro/common/man/man1/chef-server-webui.1
+++ b/chef/distro/common/man/man8/chef-server-webui.8
diff --git a/chef/distro/common/man/man1/chef-server.1 b/chef/distro/common/man/man8/chef-server.8
index 4d4501f355..4d4501f355 100644
--- a/chef/distro/common/man/man1/chef-server.1
+++ b/chef/distro/common/man/man8/chef-server.8
diff --git a/chef/distro/common/man/man8/chef-solr-rebuild.8 b/chef/distro/common/man/man8/chef-solr-rebuild.8
deleted file mode 100644
index 0359a91b16..0000000000
--- a/chef/distro/common/man/man8/chef-solr-rebuild.8
+++ /dev/null
@@ -1,37 +0,0 @@
-.TH CHEF-SOLR-REBUILD: "1" "March 2010" "chef-solr-rebuild" "User Commands"
-.SH NAME
-chef-solr-rebuild: \- manual page for chef-solr-rebuild
-.SH SYNOPSIS
-.B chef-solr-rebuild
-\fI(options)\fR
-.SH DESCRIPTION
-.TP
-\fB\-c\fR, \fB\-\-config\fR CONFIG
-The configuration file to use
-.TP
-\fB\-d\fR, \fB\-\-couchdb\-database\fR DB
-The CouchDB Database to re\-index
-.TP
-\fB\-u\fR, \fB\-\-couchdb\-url\fR URL
-The CouchDB URL
-.TP
-\fB\-l\fR, \fB\-\-log_level\fR LEVEL
-Set the log level (debug, info, warn, error, fatal)
-.TP
-\fB\-L\fR, \fB\-\-logfile\fR LOGLOCATION
-Set the log file location, defaults to STDOUT \- recommended for daemonizing
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Show chef\-solr\-rebuild version
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-Show this message
-.SH "SEE ALSO"
-Full documentation for Chef and chef-solr is located on the Chef wiki, http://wiki.opscode.com/display/chef/Home.
-.SH AUTHOR
-chef-solr-rebuild was written by Adam Jacob <adam@ospcode.com> of Opscode (http://www.opscode.com), with contributions from the community.
-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.
-
-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/man/man1/chef-solr.1 b/chef/distro/common/man/man8/chef-solr.8
index a2b415b330..a2b415b330 100644
--- a/chef/distro/common/man/man1/chef-solr.1
+++ b/chef/distro/common/man/man8/chef-solr.8
diff --git a/chef/distro/common/man/man8/knife.8 b/chef/distro/common/man/man8/knife.8
deleted file mode 100644
index 4662b69f1f..0000000000
--- a/chef/distro/common/man/man8/knife.8
+++ /dev/null
@@ -1,1349 +0,0 @@
-.\" generated with Ronn/v0.7.3
-.\" http://github.com/rtomayko/ronn/tree/0.7.3
-.
-.TH "KNIFE" "8" "September 2010" "" ""
-.
-.SH "NAME"
-\fBknife\fR \- Chef Server REST API utility
-.
-.SH "SYNOPSIS"
-\fBknife\fR \fIsub\-command\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\.
-.
-.P
-Unless otherwise specified, output is in JSON format, and input files are also JSON format\.
-.
-.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\.
-.
-.SH "GENERAL OPTIONS"
-.
-.TP
-\fB\-s\fR, \fB\-\-server\-url\fR URL
-Chef Server URL, corresponds to \fBChef::Config\fR \fBchef_server_url\fR\.
-.
-.TP
-\fB\-k\fR, \fB\-\-key\fR KEY
-API Client Key, corresponds to \fBChef::Config\fR \fBclient_key\fR\.
-.
-.TP
-\fB\-c\fR, \fB\-\-config\fR CONFIG
-The configuration file to use
-.
-.TP
-\fB\-e\fR, \fB\-\-editor\fR EDITOR
-Set the editor to use for interactive commands
-.
-.TP
-\fB\-F\fR, \fB\-\-format\fR FORMAT
-Which format to use for output
-.
-.TP
-\fB\-l\fR, \fB\-\-log_level\fR LEVEL
-Set the log level (debug, info, warn, error, fatal), corresponds to \fBChef::Config\fR \fBlog_level\fR\.
-.
-.TP
-\fB\-L\fR, \fB\-\-logfile\fR LOGLOCATION
-Set the log file location, defaults to STDOUT, corresponds to \fBChef::Config\fR \fBlog_location\fR\.
-.
-.TP
-\fB\-n\fR, \fB\-\-no\-editor\fR
-Do not open EDITOR, just accept the data as is
-.
-.TP
-\fB\-u\fR, \fB\-\-user\fR USER
-API Client Username, corresponds to \fBChef::Config\fR \fBnode_name\fR\.
-.
-.TP
-\fB\-p\fR, \fB\-\-print\-after\fR
-Show the data after a destructive operation
-.
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-Show chef version
-.
-.TP
-\fB\-y\fR, \fB\-\-yes\fR
-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\.
-.
-.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\.
-.
-.IP "\(bu" 4
-create (create)
-.
-.IP "\(bu" 4
-list and show (read)
-.
-.IP "\(bu" 4
-edit (update)
-.
-.IP "\(bu" 4
-delete (destroy)
-.
-.IP "" 0
-.
-.P
-Objects stored on the server support these, as described below\.
-.
-.SH "GENERAL SUB\-COMMANDS"
-The following are general sub\-commands that do not fit within the other object types utilized in the Chef Server API\.
-.
-.P
-\fBconfigure\fR \fI(options)\fR
-.
-.TP
-\fB\-i\fR, \fB\-\-initial\fR
-Create an initial API Client
-.
-.TP
-\fB\-r\fR, \fB\-\-repository REPO\fR
-The path to your chef\-repo
-.
-.P
-Create a configuration file for knife\. This will prompt for values to enter into the file\. Default values are listed in square brackets if no other entry is typed\. See \fBCONFIGURATION\fR below for available options\.
-.
-.P
-\fBconfigure client DIRECTORY\fR
-.
-.P
-Read the \fBknife\.rb\fR config file and generate a config file suitable for use in \fB/etc/chef/client\.rb\fR and copy the validation certificate into the specified \fIDIRECTORY\fR\.
-.
-.P
-\fBindex rebuild\fR \fI(options)\fR
-.
-.TP
-\fB\-y\fR, \fB\-\-yes\fR
-don\'t bother to ask if I\'m sure
-.
-.P
-Rebuilds all the search indexes on the server\.
-.
-.P
-\fBrecipe list [PATTERN]\fR
-.
-.P
-List available recipes from the server\. Specify \fIPATTERN\fR as a regular expression to limit the results\.
-.
-.P
-\fBsearch INDEX QUERY\fR \fI(options)\fR
-.
-.TP
-\fB\-a\fR, \fB\-\-attribute ATTR\fR
-Show only one attribute
-.
-.TP
-\fB\-i\fR, \fB\-\-id\-only\fR
-Show only the ID of matching objects
-.
-.TP
-\fB\-R\fR, \fB\-\-rows INT\fR
-The number of rows to return
-.
-.TP
-\fB\-r\fR, \fB\-\-run\-list\fR
-Show only the run list
-.
-.TP
-\fB\-o\fR, \fB\-\-sort SORT\fR
-The order to sort the results in
-.
-.TP
-\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\.
-.
-.P
-\fBssh QUERY COMMAND\fR \fI(options)\fR
-.
-.TP
-\fB\-a\fR, \fB\-\-attribute ATTR\fR
-The attribute to use for opening the connection \- default is fqdn
-.
-.TP
-\fB\-C\fR, \fB\-\-concurrency NUM\fR
-The number of concurrent connections
-.
-.TP
-\fB\-m\fR, \fB\-\-manual\-list\fR
-QUERY is a space separated list of servers
-.
-.TP
-\fB\-P\fR, \fB\-\-ssh\-password PASSWORD\fR
-The ssh password
-.
-.TP
-\fB\-x\fR, \fB\-\-ssh\-user USERNAME\fR
-The ssh username
-.
-.P
-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)\.
-.
-.P
-\fBstatus\fR \fI(options)\fR
-.
-.TP
-\fB\-r\fR, \fB\-\-run\-list RUN_LIST\fR
-Show the run list
-.
-.P
-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 "BOOTSTRAP SUB\-COMMANDS"
-\fBbootstrap FQDN\fR \fI(options)\fR
-.
-.TP
-\fB\-i\fR, \fB\-\-identity\-file IDENTITY_FILE\fR
-The SSH identity file used for authentication
-.
-.TP
-\fB\-N\fR, \fB\-\-node\-name NAME\fR
-The Chef node name for your new node
-.
-.TP
-\fB\-P\fR, \fB\-\-ssh\-password PASSWORD\fR
-The ssh password
-.
-.TP
-\fB\-x\fR, \fB\-\-ssh\-user USERNAME\fR
-The ssh username
-.
-.TP
-\fB\-\-prerelease\fR
-Install pre\-release Chef gems
-.
-.TP
-\fB\-r\fR, \fB\-\-run\-list RUN_LIST\fR
-Comma separated list of roles/recipes to apply
-.
-.TP
-\fB\-P\fR, \fB\-\-ssh\-password PASSWORD\fR
-The ssh password
-.
-.TP
-\fB\-x\fR, \fB\-\-ssh\-user USERNAME\fR
-The ssh username
-.
-.TP
-\fB\-\-template\-file TEMPLATE\fR
-Full path to location of template to use
-.
-.TP
-\fB\-\-sudo\fR
-Execute the bootstrap via sudo
-.
-.TP
-\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\.
-.
-.P
-As of Chef 0\.9\.8, 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 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:
-.
-.IP "\(bu" 4
-\fBbootstrap\fR directory in the installed Chef Knife library\.
-.
-.IP "\(bu" 4
-\fBbootstrap\fR directory in the \fB$PWD/\.chef\fR\.
-.
-.IP "\(bu" 4
-\fBbootstrap\fR directory in the users \fB$HOME/\.chef\fR\.
-.
-.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:
-.
-.IP "\(bu" 4
-centos5\-gems
-.
-.IP "\(bu" 4
-fedora13\-gems
-.
-.IP "\(bu" 4
-ubuntu10\.04\-gems
-.
-.IP "\(bu" 4
-ubuntu10\.04\-apt
-.
-.IP "" 0
-.
-.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
-In addition to handling the software installation, these bootstrap templates do the following:
-.
-.IP "\(bu" 4
-Write the validation\.pem per the local knife configuration\.
-.
-.IP "\(bu" 4
-Write a default config file for Chef (\fB/etc/chef/client\.rb\fR) using values from the \fBknife\.rb\fR\.
-.
-.IP "\(bu" 4
-Create a JSON attributes file containing the specified run list and run Chef\.
-.
-.IP "" 0
-.
-.P
-In the case of the RubyGems, the \fBclient\.rb\fR will be written from scratch with a minimal set of values; see \fBEXAMPLES\fR\. In the case of APT Package installation, \fBclient\.rb\fR will have the \fBvalidation_client_name\fR appended if it is not set to \fBchef\-validator\fR (default config value), and the \fBnode_name\fR will be added if \fBchef_node_name\fR option is specified\.
-.
-.P
-When this is complete, the bootstrapped node will have:
-.
-.IP "\(bu" 4
-Latest Chef version installed from RubyGems or APT Packages from Opscode\. This may be a later version than the local system\.
-.
-.IP "\(bu" 4
-Be validated with the configured Chef Server\.
-.
-.IP "\(bu" 4
-Have run Chef with its default run list if one is specfied\.
-.
-.IP "" 0
-.
-.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 "CLIENT SUB\-COMMANDS"
-Clients are entities that communicate with the Chef Server API\.
-.
-.P
-\fBclient bulk delete REGEX\fR \fI(options)\fR
-.
-.P
-Delete clients on the Chef Server based on a regular expression\. The regular expression (\fIREGEX\fR) should be in quotes, not in //\'s\.
-.
-.P
-\fBclient create CLIENT\fR \fI(options)\fR
-.
-.TP
-\fB\-a\fR, \fB\-\-admin\fR
-Create the client as an admin
-.
-.TP
-\fB\-f\fR, \fB\-\-file FILE\fR
-Write the key to a file
-.
-.P
-Create a new client\. This generates an RSA keypair\. The private key will be displayed on \fISTDOUT\fR or written to the named file\. The public half will be stored on the Server\. For \fIchef\-client\fR systems, the private key should be copied to the system as \fB/etc/chef/client\.pem\fR\.
-.
-.P
-Admin clients should be created for users that will use \fIknife\fR to access the API as an administrator\. The private key will generally be copied to \fB~/\.chef/CLIENT\.pem\fR and referenced in the \fBknife\.rb\fR configuration file\.
-.
-.P
-\fBclient delete CLIENT\fR \fI(options)\fR
-.
-.P
-Deletes a registered client\.
-.
-.P
-\fBclient edit CLIENT\fR \fI(options)\fR
-.
-.P
-Edit a registered client\.
-.
-.P
-\fBclient list\fR \fI(options)\fR
-.
-.TP
-\fB\-w\fR, \fB\-\-with\-uri\fR
-Show corresponding URIs
-.
-.P
-List all registered clients\.
-.
-.P
-\fBclient reregister CLIENT\fR \fI(options)\fR
-.
-.TP
-\fB\-f\fR, \fB\-\-file FILE\fR
-Write the key to a file
-.
-.P
-Regenerate the RSA keypair for a client\. The public half will be stored on the server and the private key displayed on \fISTDOUT\fR or written to the named file\.
-.
-.P
-\fBclient show CLIENT\fR \fI(options)\fR
-.
-.TP
-\fB\-a\fR, \fB\-\-attribute ATTR\fR
-Show only one attribute
-.
-.P
-Show a client\.
-.
-.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\.
-.
-.P
-\fBcookbook bulk delete REGEX\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\.
-.
-.P
-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 create COOKBOOK\fR \fI(options)\fR
-.
-.TP
-\fB\-o\fR, \fB\-\-cookbook\-path PATH\fR
-The directory where the cookbook will be created
-.
-.TP
-\fB\-r\fR, \fB\-\-readme\-format FORMAT\fR
-Format of the README file
-.
-.TP
-\fB\-C\fR, \fB\-\-copyright COPYRIGHT\fR
-Name of Copyright holder
-.
-.TP
-\fB\-I\fR, \fB\-\-license LICENSE\fR
-License for cookbook, apachev2 or none
-.
-.TP
-\fB\-E\fR, \fB\-\-email EMAIL\fR
-Email address of cookbook maintainer
-.
-.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
-.
-.IP "\(bu" 4
-COOKBOOK/definitions
-.
-.IP "\(bu" 4
-COOKBOOK/files/default
-.
-.IP "\(bu" 4
-COOKBOOK/libraries
-.
-.IP "\(bu" 4
-COOKBOOK/metadata\.rb
-.
-.IP "\(bu" 4
-COOKBOOK/providers
-.
-.IP "\(bu" 4
-COOKBOOK/README\.rdoc
-.
-.IP "\(bu" 4
-COOKBOOK/recipes/default\.rb
-.
-.IP "\(bu" 4
-COOKBOOK/resources
-.
-.IP "\(bu" 4
-COOKBOOK/templates/default
-.
-.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:
-.
-.IP "" 4
-.
-.nf
-
-cookbook_copyright "YOUR_COMPANY_NAME"
-cookbook_license "none"
-cookbook_email "YOUR_EMAIL"
-.
-.fi
-.
-.IP "" 0
-.
-.P
-\fBcookbook delete COOKBOOK [VERSION]\fR \fI(options)\fR
-.
-.TP
-\fB\-a\fR, \fB\-\-all\fR
-Delete all versions
-.
-.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
-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\.
-.
-.P
-\fBcookbook download COOKBOOK [VERSION]\fR \fI(options)\fR
-.
-.TP
-\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
-.
-.TP
-\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\.
-.
-.P
-\fBcookbook list\fR \fI(options)\fR
-.
-.TP
-\fB\-w\fR, \fB\-\-with\-uri\fR
-Show corresponding URIs
-.
-.P
-List all the cookbooks\.
-.
-.P
-\fBcookbook metadata COOKBOOK\fR \fI(options)\fR
-.
-.TP
-\fB\-a\fR, \fB\-\-all\fR
-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
-.
-.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\.
-.
-.P
-\fBcookbook metadata from FILE\fR \fI(options)\fR
-.
-.P
-Load the cookbook metadata from a specified file\.
-.
-.P
-\fBcookbook show COOKBOOK [VERSION] [PART] [FILENAME]\fR \fI(options)\fR
-.
-.TP
-\fB\-f\fR, \fB\-\-fqdn FQDN\fR
-The FQDN of the host to see the file for
-.
-.TP
-\fB\-p\fR, \fB\-\-platform PLATFORM\fR
-The platform to see the file for
-.
-.TP
-\fB\-V\fR, \fB\-\-platform\-version VERSION\fR
-The platform version to see the file for
-.
-.P
-Show a particular part of a \fICOOKBOOK\fR for the specified \fIVERSION\fR\. \fIPART\fR can be one of:
-.
-.IP "\(bu" 4
-\fIattributes\fR
-.
-.IP "\(bu" 4
-\fIdefinitions\fR
-.
-.IP "\(bu" 4
-\fIfiles\fR
-.
-.IP "\(bu" 4
-\fIlibraries\fR
-.
-.IP "\(bu" 4
-\fIproviders\fR
-.
-.IP "\(bu" 4
-\fIrecipes\fR
-.
-.IP "\(bu" 4
-\fIresources\fR
-.
-.IP "\(bu" 4
-\fItemplates\fR
-.
-.IP "" 0
-.
-.P
-\fBcookbook test [COOKBOOKS\.\.\.]\fR \fI(options)\fR
-.
-.TP
-\fB\-a\fR, \fB\-\-all\fR
-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
-.
-.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)\.
-.
-.P
-\fBcookbook upload [COOKBOOKS\.\.\.]\fR \fI(options)\fR
-.
-.TP
-\fB\-a\fR, \fB\-\-all\fR
-Upload 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
-.
-.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\.
-.
-.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\.
-.
-.P
-\fBcookbook site download COOKBOOK [VERSION]\fR \fI(options)\fR
-.
-.TP
-\fB\-f\fR, \fB\-\-file FILE\fR
-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
-.
-.TP
-\fB\-w\fR, \fB\-\-with\-uri\fR
-Show corresponding URIs
-.
-.P
-Lists available cookbooks from the Community site\.
-.
-.P
-\fBcookbook site search QUERY\fR \fI(options)\fR
-.
-.P
-Searches the Community site with the specified query\.
-.
-.P
-\fBcookbook site share COOKBOOK CATEGORY\fR \fI(options)\fR
-.
-.TP
-\fB\-k\fR, \fB\-\-key KEY\fR
-API Client Key
-.
-.TP
-\fB\-u\fR, \fB\-\-user USER\fR
-API Client Username
-.
-.TP
-\fB\-o\fR, \fB\-\-cookbook\-path PATH:PATH\fR
-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\.
-.
-.P
-\fBcookbook 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
-.
-.P
-Shows information from the site about a particular cookbook\.
-.
-.P
-\fBcookbook site vendor COOKBOOK [VERSION]\fR \fI(options)\fR
-.
-.TP
-\fB\-d\fR, \fB\-\-dependencies\fR
-Grab dependencies automatically
-.
-.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\.
-.
-.SH "DATA BAG SUB\-COMMANDS"
-Data bags are stores of JSON blobs\. These blobs are called items\. They are free form JSON and indexed by the Chef Server\.
-.
-.P
-\fBdata bag create BAG [ITEM]\fR \fI(options)\fR
-.
-.P
-Create a new data bag, or an item in a data bag\.
-.
-.P
-\fBdata bag delete BAG [ITEM]\fR \fI(options)\fR
-.
-.P
-Delete a data bag, or an item from a data bag\.
-.
-.P
-\fBdata bag edit BAG ITEM\fR \fI(options)\fR
-.
-.P
-Edit an item in a data bag\.
-.
-.P
-\fBdata bag from file BAG FILE\fR \fI(options)\fR
-.
-.P
-Load a data bag item from a JSON file\. Looks in the directory \fBdata_bags/BAG/ITEM\.json\fR unless a relative path is specified\.
-.
-.P
-\fBdata bag list\fR \fI(options)\fR
-.
-.TP
-\fB\-w\fR, \fB\-\-with\-uri\fR
-Show corresponding URIs
-.
-.P
-List the available data bags\.
-.
-.P
-\fBdata bag show BAG [ITEM]\fR \fI(options)\fR
-.
-.P
-Show a specific data bag or an item in a data bag\.
-.
-.SH "NODE SUB\-COMMANDS"
-Nodes are the entities which are configured with Chef\. Typically these are servers or workstations\. Nodes are registered as a client, by default by the fully qualified domain name (fqdn)\. A single client may configure more than one node\.
-.
-.P
-\fBnode bulk delete REGEX\fR \fI(options)\fR
-.
-.P
-Delete nodes on the Chef Server based on a regular expression\. The regular expression (\fIREGEX\fR) should be in quotes, not in //\'s\.
-.
-.P
-\fBnode create NODE\fR \fI(options)\fR
-.
-.P
-Create a new node\.
-.
-.P
-\fBnode delete NODE\fR \fI(options)\fR
-.
-.P
-Delete a single node\.
-.
-.P
-\fBnode edit NODE\fR \fI(options)\fR
-.
-.P
-Edit a node\.
-.
-.P
-\fBnode from file FILE\fR \fI(options)\fR
-.
-.P
-Create a node from a JSON file\.
-.
-.P
-\fBnode list\fR \fI(options)\fR
-.
-.TP
-\fB\-w\fR, \fB\-\-with\-uri\fR
-Show corresponding URIs
-.
-.P
-List all nodes\.
-.
-.P
-\fBnode run_list add [NODE] [ENTRY]\fR \fI(options)\fR
-.
-.TP
-\fB\-a\fR, \fB\-\-after ITEM\fR
-Place the ENTRY in the run list after ITEM
-.
-.P
-Add a recipe or role to the node\'s \fBrun_list\fR\.
-.
-.P
-\fBnode run_list remove [NODE] [ENTRY]\fR \fI(options)\fR
-.
-.P
-Remove a recipe or role from the node\'s \fBrun_list\fR\.
-.
-.P
-\fBnode show NODE\fR \fI(options)\fR
-.
-.TP
-\fB\-a\fR, \fB\-\-attribute [ATTR]\fR
-Show only one attribute
-.
-.TP
-\fB\-r\fR, \fB\-\-run\-list\fR
-Show only the run list
-.
-.P
-Show a node\.
-.
-.SH "RECIPE SUB\-COMMANDS"
-\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\.
-.
-.SH "ROLE SUB\-COMMANDS"
-\fBrole bulk delete REGEX\fR \fI(options)\fR
-.
-.P
-Delete roles on the Chef Server based on a regular expression\. The regular expression (\fIREGEX\fR) should be in quotes, not in //\'s\.
-.
-.P
-\fBrole create ROLE\fR \fI(options)\fR
-.
-.TP
-\fB\-d\fR, \fB\-\-description\fR
-The role description
-.
-.P
-Create a new role\.
-.
-.P
-\fBrole delete ROLE\fR \fI(options)\fR
-.
-.P
-Delete a role\.
-.
-.P
-\fBrole edit ROLE\fR \fI(options)\fR
-.
-.P
-Edit a role\.
-.
-.P
-\fBrole from file FILE\fR \fI(options)\fR
-.
-.P
-Create or update a role from a role Ruby DSL (\fB\.rb\fR) or JSON file\.
-.
-.P
-\fBrole list\fR \fI(options)\fR
-.
-.TP
-\fB\-w\fR, \fB\-\-with\-uri\fR
-Show corresponding URIs
-.
-.P
-List roles\.
-.
-.P
-\fBrole show ROLE\fR \fI(options)\fR
-.
-.TP
-\fB\-a\fR, \fB\-\-attribute ATTR\fR
-Show only one attribute
-.
-.P
-Show a specific role\.
-.
-.SH "CLOUD COMPUTING SUB\-COMMANDS"
-The next sections describe sub\-commands to work with various Cloud Computing APIs to launch server instances with validation and run\-time configuration that Chef knows about\. These sub\-commands require the fog Ruby library\. On Debian and Ubuntu systems with Opscode\'s apt repository (apt\.opscode\.com), this is the package \fBlibfog\-ruby\fR\. It is also available as a RubyGem, \fBfog\fR\.
-.
-.P
-The Rackspace and Terremark server creation sub\-commands are at an early stage of development\. They do not yet use the \fBbootstrap\fR sub\-command to install Chef, and make a few assumptions to be aware\. Right now when creating instances of these types, knife will assume an Ubuntu image, install Ruby from packages, RubyGems from source and Chef as a RubyGem\. As these commands are developed further, they will utilize the \fBbootstrap\fR sub\-command\.
-.
-.P
-In order to use knife with the various \fBCLOUD COMPUTING SUB\-COMMANDS\fR, credentials need to be added to the configuration file\. See \fBCONFIGURATION\fR\.
-.
-.SH "EC2 SUB\-COMMANDS"
-Chef is commonly used with Amazon AWS EC2 nodes\. This sub\-command will generate instance metadata that can be used to automatically configure an EC2 instance with Chef\. This requires an AMI that has Chef preinstalled with a configuration file that can parse the metadata at run\-time\. At this time this is the only sub\-command for EC2, but more may be added later similar to \fBRACKSPACE\fR and \fBTERREMARK\fR below\.
-.
-.P
-\fBec2 instance data [RUN LIST\.\.\.]\fR \fI(options)\fR
-.
-.TP
-\fB\-e\fR, \fB\-\-edit\fR
-Edit the instance data
-.
-.P
-The \fIRUN LIST\fR should be specified as a space separated list of roles or recipes that will be used by the instance to configure the server\.
-.
-.P
-\fBec2 server create [RUN LIST\.\.\.]\fR \fI(options)\fR
-.
-.TP
-\fB\-Z\fR, \fB\-\-availability\-zone ZONE\fR
-The Availability Zone
-.
-.TP
-\fB\-\-region\fR
-Your AWS region
-.
-.TP
-\fB\-A\fR, \fB\-\-aws\-access\-key\-id KEY\fR
-Your AWS Access Key ID
-.
-.TP
-\fB\-K SECRET\fR, \fB\-\-aws\-secret\-access\-key\fR
-Your AWS API Secret Access Key
-.
-.TP
-\fB\-f\fR, \fB\-\-flavor FLAVOR\fR
-The flavor of server (m1\.small, m1\.medium, etc)
-.
-.TP
-\fB\-i\fR, \fB\-\-image IMAGE\fR
-The AMI for the server
-.
-.TP
-\fB\-G\fR, \fB\-\-groups X,Y,Z\fR
-The security groups for this server
-.
-.TP
-\fB\-S\fR, \fB\-\-ssh\-key KEY\fR
-The SSH root key, corresponds to an Amazon Keypair\.
-.
-.TP
-\fB\-I\fR, \fB\-\-identity\-file IDENTITY_FILE\fR
-The SSH identity file used for authentication, passed to \fBbootstrap\fR\.
-.
-.TP
-\fB\-P\fR, \fB\-\-ssh\-password PASSWORD\fR
-The ssh password, passed to \fBbootstrap\fR\.
-.
-.TP
-\fB\-x\fR, \fB\-\-ssh\-user USERNAME\fR
-The ssh username, passed to \fBbootstrap\fR\.
-.
-.TP
-\fB\-\-prerelease\fR
-Install pre\-release Chef gems, passed to \fBbootstrap\fR\.
-.
-.TP
-\fB\-\-template\-file TEMPLATE\fR
-Full path to location of template to use, passed to \fBbootstrap\fR\.
-.
-.TP
-\fB\-d\fR, \fB\-\-distro DISTRO\fR
-Bootstrap a distro using a template, passed to \fBbootstrap\fR\.
-.
-.P
-Creates a new Amazon AWS EC2 instance and bootstraps it by calling the \fBbootstrap\fR sub\-command\. The \fB[RUN LIST\.\.\.]\fR items are passed to the bootstrap\'s \fBrun_list\fR config parameter/option\. See the \fBBOOTSTRAP SUB\-COMMANDS\fR section above for more information\.
-.
-.P
-\fBec2 server delete SERVER [SERVER]\fR \fI(options)\fR
-.
-.TP
-\fB\-A\fR, \fB\-\-aws\-access\-key\-id KEY\fR
-Your AWS Access Key ID
-.
-.TP
-\fB\-K SECRET\fR, \fB\-\-aws\-secret\-access\-key\fR
-Your AWS API Secret Access Key
-.
-.P
-Terminates a running Amazon AWS EC2 instance\.
-.
-.P
-\fBec2 server list [RUN LIST\.\.\.]\fR \fI(options)\fR
-.
-.TP
-\fB\-A\fR, \fB\-\-aws\-access\-key\-id KEY\fR
-Your AWS Access Key ID
-.
-.TP
-\fB\-K SECRET\fR, \fB\-\-aws\-secret\-access\-key\fR
-Your AWS API Secret Access Key
-.
-.P
-List running Amazon AWS EC2 instances\.
-.
-.SH "RACKSPACE SUB\-COMMANDS"
-In addition to EC2 nodes, Chef can be used on Rackspace Cloud nodes\. The following sub\-commands allow manipulating Rackspace Cloud nodes via the \fBfog\fR library\.
-.
-.P
-\fBrackspace server create [RUN LIST\.\.\.]\fR \fI(options)\fR
-.
-.TP
-\fB\-K\fR, \fB\-\-rackspace\-api\-key KEY\fR
-Your rackspace API key
-.
-.TP
-\fB\-A USERNAME\fR, \fB\-\-rackspace\-api\-username\fR
-Your rackspace API username
-.
-.TP
-\fB\-f\fR, \fB\-\-flavor FLAVOR\fR
-The flavor of server
-.
-.TP
-\fB\-i\fR, \fB\-\-image IMAGE\fR
-The image of the server
-.
-.TP
-\fB\-N\fR, \fB\-\-server\-name NAME\fR
-The server name
-.
-.P
-Creates a new Rackspace Cloud server\.
-.
-.P
-\fBrackspace server delete SERVER\fR \fI(options)\fR
-.
-.P
-Deletes a running Rackspace Cloud server\.
-.
-.P
-\fBrackspace server list\fR \fI(options)\fR
-.
-.P
-Lists running Rackspace Cloud servers\.
-.
-.SH "SLICEHOST SUB\-COMMANDS"
-As above, Chef can also be used on Slicehost nodes\. The following sub\-commands allow manipulating Slicehost nodes via the \fBfog\fR library\.
-.
-.P
-\fBslicehost server create [RUN LIST\.\.\.]\fR \fI(options)\fR * \fB\-f\fR, \fB\-\-flavor FLAVOR\fR:
-.
-.IP "" 4
-.
-.nf
-
-The flavor of server
-.
-.fi
-.
-.IP "" 0
-.
-.TP
-\fB\-i\fR, \fB\-\-image IMAGE\fR
-The image of the server
-.
-.TP
-\fB\-N\fR, \fB\-\-server\-name NAME\fR
-The server name
-.
-.TP
-\fB\-K\fR, \fB\-\-slicehost\-password PASSWORD\fR
-Your slicehost API password
-.
-.P
-Creates a new slicehost server\.
-.
-.P
-\fBslicehost server list\fR \fI(options)\fR
-.
-.P
-Lists running Slicehost servers\.
-.
-.P
-\fBslicehost server delete SLICENAME\fR
-.
-.P
-Deletes a running Slicehost server\.
-.
-.P
-\fBslicehost images list\fR
-.
-.P
-Lists the available Slicehost server images to boot\.
-.
-.SH "TERREMARK SUB\-COMMANDS"
-As above, Chef can also be used on Terremark vCloud nodes\. The following sub\-commands allow manipulating Terremark vCloud nodes via the \fBfog\fR library\.
-.
-.P
-\fBterremark server create NAME [RUN LIST\.\.\.]\fR \fI(options)\fR
-.
-.TP
-\fB\-K PASSWORD\fR, \fB\-\-terremark\-password\fR
-Your terremark password
-.
-.TP
-\fB\-S\fR, \fB\-\-terremark\-service SERVICE\fR
-Your terremark service name
-.
-.TP
-\fB\-A USERNAME\fR, \fB\-\-terremark\-username\fR
-Your terremark username
-.
-.P
-Creates a new Terremark vCloud server\.
-.
-.P
-\fBterremark server delete SERVER\fR \fI(options)\fR
-.
-.P
-Deletes a running Terremark vCloud server\.
-.
-.P
-\fBterremark server list\fR \fI(options)\fR
-.
-.TP
-\fB\-K PASSWORD\fR, \fB\-\-terremark\-password\fR
-Your terremark password
-.
-.TP
-\fB\-S\fR, \fB\-\-terremark\-service SERVICE\fR
-Your terremark service name
-.
-.TP
-\fB\-A USERNAME\fR, \fB\-\-terremark\-username\fR
-Your terremark username
-.
-.P
-Lists running Terremark vCloud servers\.
-.
-.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\.
-.
-.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
-.
-.IP "\(bu" 4
-:debug
-.
-.IP "\(bu" 4
-:warn
-.
-.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
-.
-.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\.
-.
-.P
-\fBknife[:terremark_username]\fR \fBknife[:terremark_password]\fR \fBknife[:terremark_service]\fR
-.
-.P
-Specifies the Terremark vCloud credentials to use when running the terremark sub\-commands\.
-.
-.P
-\fBknife[:slicehost_password]\fR
-.
-.P
-Specifies the Slicehost password to use when running the slicdehost sub\-commands\.
-.
-.SH "FILES"
-\fI~/\.chef/knife\.rb\fR
-.
-.P
-Ruby DSL configuration file for knife\. See \fBCONFIGURATION\fR\.
-.
-.SH "CHEF WORKFLOW"
-When working with Chef and Knife in the local repository, the recommended workflow outline looks like:
-.
-.IP "\(bu" 4
-Create repository\. A skeleton sample is provided at \fIhttp://github\.com/opscode/chef\-repo/\fR\.
-.
-.IP "\(bu" 4
-Configure knife, see \fBCONFIGURATION\fR\.
-.
-.IP "\(bu" 4
-Download cookbooks from the Opscode cookbooks site, see \fBCOOKBOOK SITE SUB\-COMMANDS\fR\.
-.
-.IP "\(bu" 4
-Or, create new cookbooks, see \fBcookbook create\fR sub\-command\.
-.
-.IP "\(bu" 4
-Commit changes to the version control system\. See your tool\'s documentation\.
-.
-.IP "\(bu" 4
-Upload cookbooks to the Chef Server, see \fBCOOKBOOK SUB\-COMMANDS\fR\.
-.
-.IP "\(bu" 4
-Launch instances in the Cloud, OR provision new hosts; see \fBCLOUD COMPUTING SUB\-COMMANDS\fR and \fBBOOTSTRAP SUB\-COMMANDS\fR\.
-.
-.IP "\(bu" 4
-Watch Chef configure systems!
-.
-.IP "" 0
-.
-.P
-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 "SEE ALSO"
-Full documentation for Chef is located on the Chef wiki, http://wiki\.opscode\.com/display/chef/Home/\.
-.
-.P
-JSON is JavaScript Object Notation and more information can be found at http://json\.org/\.
-.
-.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
-Git is a version control system and documented at http://git\-scm\.com/\.
-.
-.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\.
-.
-.SH "AUTHOR"
-Chef was written by Adam Jacob \fIadam@opscode\.com\fR of Opscode (http://www\.opscode\.com), 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
-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\.
diff --git a/chef/distro/common/markdown/knife.mkd b/chef/distro/common/markdown/knife.mkd
deleted file mode 100644
index 801c04da06..0000000000
--- a/chef/distro/common/markdown/knife.mkd
+++ /dev/null
@@ -1,865 +0,0 @@
-knife(8) -- Chef Server REST API utility
-========================================
-
-## SYNOPSIS
-
-__knife__ _sub-command_ _(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
-
- * `-s`, `--server-url` URL:
- Chef Server URL, corresponds to `Chef::Config` `chef_server_url`.
- * `-k`, `--key` KEY:
- API Client Key, corresponds to `Chef::Config` `client_key`.
- * `-c`, `--config` CONFIG:
- The configuration file to use
- * `-e`, `--editor` EDITOR:
- Set the editor to use for interactive commands
- * `-F`, `--format` FORMAT:
- Which format to use for output
- * `-l`, `--log_level` LEVEL:
- Set the log level (debug, info, warn, error, fatal), corresponds to `Chef::Config` `log_level`.
- * `-L`, `--logfile` LOGLOCATION:
- Set the log file location, defaults to STDOUT, corresponds to `Chef::Config` `log_location`.
- * `-n`, `--no-editor`:
- Do not open EDITOR, just accept the data as is
- * `-u`, `--user` USER:
- API Client Username, corresponds to `Chef::Config` `node_name`.
- * `-p`, `--print-after`:
- Show the data after a destructive operation
- * `-v`, `--version`:
- Show chef version
- * `-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`.
-
-## 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.
-
-* create (create)
-* list and show (read)
-* edit (update)
-* delete (destroy)
-
-Objects stored on the server support these, as described below.
-
-## GENERAL SUB-COMMANDS
-
-The following are general sub-commands that do not fit within the other object types utilized in the Chef Server API.
-
-__configure__ _(options)_
-
- * `-i`, `--initial`:
- Create an initial API Client
- * `-r`, `--repository REPO`:
- The path to your chef-repo
-
-Create a configuration file for knife. This will prompt for values to enter into the file. Default values are listed in square brackets if no other entry is typed. See __CONFIGURATION__ below for available options.
-
-__configure client DIRECTORY__
-
-Read the `knife.rb` config file and generate a config file suitable for use in `/etc/chef/client.rb` and copy the validation certificate into the specified _DIRECTORY_.
-
-__index rebuild__ _(options)_
-
- * `-y`, `--yes`:
- don't bother to ask if I'm sure
-
-Rebuilds all the search indexes on the server.
-
-__recipe list [PATTERN]__
-
-List available recipes from the server. Specify _PATTERN_ as a regular expression to limit the results.
-
-__search INDEX QUERY__ _(options)_
-
- * `-a`, `--attribute ATTR`:
- Show only one attribute
- * `-i`, `--id-only`:
- Show only the ID of matching objects
- * `-R`, `--rows INT`:
- The number of rows to return
- * `-r`, `--run-list`:
- Show only the run list
- * `-o`, `--sort SORT`:
- The order to sort the results in
- * `-b`, `--start ROW`:
- The row to start returning results at
-
-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: _node_, _role_, _client_, _data bag_.
-
-__ssh QUERY COMMAND__ _(options)_
-
- * `-a`, `--attribute ATTR `:
- The attribute to use for opening the connection - default is fqdn
- * `-C`, `--concurrency NUM `:
- The number of concurrent connections
- * `-m`, `--manual-list `:
- QUERY is a space separated list of servers
- * `-P`, `--ssh-password PASSWORD`:
- The ssh password
- * `-x`, `--ssh-user USERNAME `:
- The ssh username
-
-The _ssh_ sub-command opens an ssh session to each of the nodes in the search results of the _QUERY_. 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).
-
-__status__ _(options)_
-
- * `-r`, `--run-list RUN_LIST`:
- Show the run list
-
-The _status_ 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 `node.save`. 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 `-r` 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.
-
-## BOOTSTRAP SUB-COMMANDS
-
-__bootstrap FQDN__ _(options)_
-
- * `-i`, `--identity-file IDENTITY_FILE`:
- The SSH identity file used for authentication
- * `-N`, `--node-name NAME`:
- The Chef node name for your new node
- * `-P`, `--ssh-password PASSWORD`:
- The ssh password
- * `-x`, `--ssh-user USERNAME`:
- The ssh username
- * `--prerelease`:
- Install pre-release Chef gems
- * `-r`, `--run-list RUN_LIST`:
- Comma separated list of roles/recipes to apply
- * `-P`, `--ssh-password PASSWORD`:
- The ssh password
- * `-x`, `--ssh-user USERNAME`:
- The ssh username
- * `--template-file TEMPLATE`:
- Full path to location of template to use
- * `--sudo`:
- Execute the bootstrap via sudo
- * `-d`, `--distro DISTRO`:
- Bootstrap a distro using a template
-
-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.
-
-As of Chef 0.9.8, the bootstrap sub-command supports supplying a template to perform the bootstrap steps. If the distro is not specified (via `-d` or `--distro` option), an Ubuntu 10.04 with RubyGems is assumed. The __DISTRO__ value corresponds to the base filename of the template, in other words `DISTRO`.erb. A template file can be specified with the `--template-file` option in which case the __DISTRO__ is not used. The sub-command looks in the following locations for the template to use:
-
-* `bootstrap` directory in the installed Chef Knife library.
-* `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:
-
-* 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.
-
-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.
-
-When this is complete, the bootstrapped node will have:
-
- - Latest Chef version installed from RubyGems or APT Packages from Opscode. This may be a later version than the local system.
- - 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.
-
-## CLIENT SUB-COMMANDS
-
-Clients are entities that communicate with the Chef Server API.
-
-__client bulk delete REGEX__ _(options)_
-
-Delete clients on the Chef Server based on a regular expression. The regular expression (_REGEX_) should be in quotes, not in //'s.
-
-__client create CLIENT__ _(options)_
-
- * `-a`, `--admin `:
- Create the client as an admin
- * `-f`, `--file FILE`:
- Write the key to a file
-
-Create a new client. This generates an RSA keypair. The private key will be displayed on _STDOUT_ or written to the named file. The public half will be stored on the Server. For _chef-client_ systems, the private key should be copied to the system as `/etc/chef/client.pem`.
-
-Admin clients should be created for users that will use _knife_ to access the API as an administrator. The private key will generally be copied to `~/.chef/CLIENT.pem` and referenced in the `knife.rb` configuration file.
-
-__client delete CLIENT__ _(options)_
-
-Deletes a registered client.
-
-__client edit CLIENT__ _(options)_
-
-Edit a registered client.
-
-__client list__ _(options)_
-
- * `-w`, `--with-uri`:
- Show corresponding URIs
-
-List all registered clients.
-
-__client reregister CLIENT__ _(options)_
-
- * `-f`, `--file FILE`:
- Write the key to a file
-
-Regenerate the RSA keypair for a client. The public half will be stored on the server and the private key displayed on _STDOUT_ or written to the named file.
-
-__client show CLIENT__ _(options)_
-
- * `-a`, `--attribute ATTR`:
- Show only one attribute
-
-Show a client.
-
-## 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.
-
-__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.
-
-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"
-
-__cookbook delete COOKBOOK [VERSION]__ _(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
- * `-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)_
-
- * `-w`, `--with-uri`:
- Show corresponding URIs
-
-List all the cookbooks.
-
-__cookbook metadata COOKBOOK__ _(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.
-
-__cookbook metadata from FILE__ _(options)_
-
-Load the cookbook metadata from a specified file.
-
-__cookbook show COOKBOOK [VERSION] [PART] [FILENAME]__ _(options)_
-
- * `-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)_
-
- * `-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).
-
-__cookbook upload [COOKBOOKS...]__ _(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
-
-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.
-
-## 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, _http://cookbooks.opscode.com/_. That site has an API, and these sub-commands utilize that API, rather than the Chef Server API.
-
-__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.
-
-__cookbook site list__ _(options)_
-
- * `-w`, `--with-uri`:
- Show corresponding URIs
-
-Lists available cookbooks from the Community site.
-
-__cookbook site search QUERY__ _(options)_
-
-Searches the Community site with the specified query.
-
-__cookbook site share COOKBOOK CATEGORY__ _(options)_
-
- * `-k`, `--key KEY`:
- API Client Key
- * `-u`, `--user USER`:
- API Client Username
- * `-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.
-
-__cookbook site unshare COOKBOOK__
-
-Stops sharing the specified cookbook on the Opscode cookbooks site.
-
-__cookbook site show COOKBOOK [VERSION]__ _(options)_
-
-Shows information from the site about a particular cookbook.
-
-__cookbook site vendor COOKBOOK [VERSION]__ _(options)_
-
- * `-d`, `--dependencies`:
- Grab dependencies automatically
-
-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.
-
-## DATA BAG SUB-COMMANDS
-
-Data bags are stores of JSON blobs. These blobs are called items. They are free form JSON and indexed by the Chef Server.
-
-__data bag create BAG [ITEM]__ _(options)_
-
-Create a new data bag, or an item in a data bag.
-
-__data bag delete BAG [ITEM]__ _(options)_
-
-Delete a data bag, or an item from a data bag.
-
-__data bag edit BAG ITEM__ _(options)_
-
-Edit an item in a data bag.
-
-__data bag from file BAG FILE__ _(options)_
-
-Load a data bag item from a JSON file. Looks in the directory `data_bags/BAG/ITEM.json` unless a relative path is specified.
-
-__data bag list__ _(options)_
-
- * `-w`, `--with-uri`:
- Show corresponding URIs
-
-List the available data bags.
-
-__data bag show BAG [ITEM]__ _(options)_
-
-Show a specific data bag or an item in a data bag.
-
-## NODE SUB-COMMANDS
-
-Nodes are the entities which are configured with Chef. Typically these are servers or workstations. Nodes are registered as a client, by default by the fully qualified domain name (fqdn). A single client may configure more than one node.
-
-__node bulk delete REGEX__ _(options)_
-
-Delete nodes on the Chef Server based on a regular expression. The regular expression (_REGEX_) should be in quotes, not in //'s.
-
-__node create NODE__ _(options)_
-
-Create a new node.
-
-__node delete NODE__ _(options)_
-
-Delete a single node.
-
-__node edit NODE__ _(options)_
-
-Edit a node.
-
-__node from file FILE__ _(options)_
-
-Create a node from a JSON file.
-
-__node list__ _(options)_
-
- * `-w`, `--with-uri`:
- Show corresponding URIs
-
-List all nodes.
-
-`node run_list add [NODE] [ENTRY]` _(options)_
-
- * `-a`, `--after ITEM`:
- Place the ENTRY in the run list after ITEM
-
-Add a recipe or role to the node's `run_list`.
-
-`node run_list remove [NODE] [ENTRY]` _(options)_
-
-Remove a recipe or role from the node's `run_list`.
-
-__node show NODE__ _(options)_
-
- * `-a`, `--attribute [ATTR]`:
- Show only one attribute
- * `-r`, `--run-list `:
- Show only the run list
-
-Show a node.
-
-## RECIPE SUB-COMMANDS
-
-__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.
-
-## ROLE SUB-COMMANDS
-
-__role bulk delete REGEX__ _(options)_
-
-Delete roles on the Chef Server based on a regular expression. The regular expression (_REGEX_) should be in quotes, not in //'s.
-
-__role create ROLE__ _(options)_
-
- * `-d`, `--description`:
- The role description
-
-Create a new role.
-
-__role delete ROLE__ _(options)_
-
-Delete a role.
-
-__role edit ROLE__ _(options)_
-
-Edit a role.
-
-__role from file FILE__ _(options)_
-
-Create or update a role from a role Ruby DSL (`.rb`) or JSON file.
-
-__role list__ _(options)_
-
- * `-w`, `--with-uri`:
- Show corresponding URIs
-
-List roles.
-
-__role show ROLE__ _(options)_
-
- * `-a`, `--attribute ATTR`:
- Show only one attribute
-
-Show a specific role.
-
-## CLOUD COMPUTING SUB-COMMANDS
-
-The next sections describe sub-commands to work with various Cloud Computing APIs to launch server instances with validation and run-time configuration that Chef knows about. These sub-commands require the fog Ruby library. On Debian and Ubuntu systems with Opscode's apt repository (apt.opscode.com), this is the package `libfog-ruby`. It is also available as a RubyGem, `fog`.
-
-The Blue Box, Rackspace and Terremark server creation sub-commands are at an early stage of development. They do not yet use the `bootstrap` sub-command to install Chef, and make a few assumptions to be aware. Right now when creating instances of these types, knife will assume an Ubuntu image, install Ruby from packages, RubyGems from source and Chef as a RubyGem. As these commands are developed further, they will utilize the `bootstrap` sub-command.
-
-In order to use knife with the various __CLOUD COMPUTING SUB-COMMANDS__, credentials need to be added to the configuration file. See __CONFIGURATION__.
-
-## BLUE BOX SUB-COMMANDS
-
-__bluebox server create [RUN LIST...]__ _(options)_
-
- * `-f`, `--flavor FLAVOR`:
- This is the product type (Block size) you're requesting to deploy. Requires the UUID of the image.
-
- * `-i`, `--image IMAGE`:
- The image (or OS distribution) to deploy. This can be a pre-built Blue Box template, or this can be a template you've archived previously. Requires the UUID of the image.
-
- * `-U`, `--username USERNAME`:
- Username created on the deployed server. Defaults to "deploy".
-
- * `-P`, `--password PASSWORD`:
- Password installed for the created user on the deployed server. Can be bypassed by defining a SSH key in your knife configuration ( Chef::Config[:knife][:ssh_key] ).
-
- * `--bootstrap true/false`:
- Allows you to enable or disable the bootstrap process.
-
-Creates a new Blue Box Group Blocks instance and bootstraps it by checking out a github repo and installs a bare minimum installation of chef on the instance; it then executes the specified run list.
-
-__bluebox server delete BLOCK-HOSTNAME__
-
-Deletes a running Blue Box Group Blocks server.
-
-__bluebox server list__
-
-Lists running Blue Box Group Blocks servers.
-
-__bluebox images list__
-
-Lists the available Blue Box Group Blocks server images to boot.
-
-## EC2 SUB-COMMANDS
-
-Chef is commonly used with Amazon AWS EC2 nodes. This sub-command will generate instance metadata that can be used to automatically configure an EC2 instance with Chef. This requires an AMI that has Chef preinstalled with a configuration file that can parse the metadata at run-time. At this time this is the only sub-command for EC2, but more may be added later similar to __RACKSPACE__ and __TERREMARK__ below.
-
-__ec2 instance data [RUN LIST...]__ _(options)_
-
- * `-e`, `--edit`:
- Edit the instance data
-
-The _RUN LIST_ should be specified as a space separated list of roles or recipes that will be used by the instance to configure the server.
-
-__ec2 server create [RUN LIST...]__ _(options)_
-
- * `-Z`, `--availability-zone ZONE`:
- The Availability Zone
- * `--region`:
- Your AWS region
- * `-A`, `--aws-access-key-id KEY `:
- Your AWS Access Key ID
- * `-K SECRET`, `--aws-secret-access-key`:
- Your AWS API Secret Access Key
- * `-f`, `--flavor FLAVOR`:
- The flavor of server (m1.small, m1.medium, etc)
- * `-i`, `--image IMAGE`:
- The AMI for the server
- * `-G`, `--groups X,Y,Z `:
- The security groups for this server
- * `-S`, `--ssh-key KEY `:
- The SSH root key, corresponds to an Amazon Keypair.
- * `-I`, `--identity-file IDENTITY_FILE`:
- The SSH identity file used for authentication, passed to `bootstrap`.
- * `-P`, `--ssh-password PASSWORD`:
- The ssh password, passed to `bootstrap`.
- * `-x`, `--ssh-user USERNAME`:
- The ssh username, passed to `bootstrap`.
- * `--prerelease`:
- Install pre-release Chef gems, passed to `bootstrap`.
- * `--template-file TEMPLATE`:
- Full path to location of template to use, passed to `bootstrap`.
- * `-d`, `--distro DISTRO`:
- Bootstrap a distro using a template, passed to `bootstrap`.
-
-Creates a new Amazon AWS EC2 instance and bootstraps it by calling the `bootstrap` sub-command. The `[RUN LIST...]` items are passed to the bootstrap's `run_list` config parameter/option. See the __BOOTSTRAP SUB-COMMANDS__ section above for more information.
-
-__ec2 server delete SERVER [SERVER]__ _(options)_
-
- * `-A`, `--aws-access-key-id KEY`:
- Your AWS Access Key ID
- * `-K SECRET`, `--aws-secret-access-key`:
- Your AWS API Secret Access Key
-
-Terminates a running Amazon AWS EC2 instance.
-
-__ec2 server list [RUN LIST...]__ _(options)_
-
- * `-A`, `--aws-access-key-id KEY`:
- Your AWS Access Key ID
- * `-K SECRET`, `--aws-secret-access-key`:
- Your AWS API Secret Access Key
-
-List running Amazon AWS EC2 instances.
-
-## RACKSPACE SUB-COMMANDS
-
-In addition to EC2 nodes, Chef can be used on Rackspace Cloud nodes. The following sub-commands allow manipulating Rackspace Cloud nodes via the `fog` library.
-
-__rackspace server create [RUN LIST...]__ _(options)_
-
- * `-K`, `--rackspace-api-key KEY`:
- Your rackspace API key
- * `-A USERNAME`, `--rackspace-api-username`:
- Your rackspace API username
- * `-f`, `--flavor FLAVOR `:
- The flavor of server
- * `-i`, `--image IMAGE `:
- The image of the server
- * `-N`, `--server-name NAME`:
- The server name
-
-Creates a new Rackspace Cloud server.
-
-__rackspace server delete SERVER__ _(options)_
-
-Deletes a running Rackspace Cloud server.
-
-__rackspace server list__ _(options)_
-
-Lists running Rackspace Cloud servers.
-
-## SLICEHOST SUB-COMMANDS
-
-As above, Chef can also be used on Slicehost nodes. The following sub-commands allow manipulating Slicehost nodes via the `fog` library.
-
-__slicehost server create [RUN LIST...]__ _(options)_
- * `-f`, `--flavor FLAVOR`:
- The flavor of server
- * `-i`, `--image IMAGE`:
- The image of the server
- * `-N`, `--server-name NAME`:
- The server name
- * `-K`, `--slicehost-password PASSWORD`:
- Your slicehost API password
-
-Creates a new slicehost server.
-
-__slicehost server list__ _(options)_
-
-Lists running Slicehost servers.
-
-__slicehost server delete SLICENAME__
-
-Deletes a running Slicehost server.
-
-__slicehost images list__
-
-Lists the available Slicehost server images to boot.
-
-## TERREMARK SUB-COMMANDS
-
-As above, Chef can also be used on Terremark vCloud nodes. The following sub-commands allow manipulating Terremark vCloud nodes via the `fog` library.
-
-__terremark server create NAME [RUN LIST...]__ _(options)_
-
- * `-K PASSWORD`, `--terremark-password`:
- Your terremark password
- * `-S`, `--terremark-service SERVICE`:
- Your terremark service name
- * `-A USERNAME`, `--terremark-username`:
- Your terremark username
-
-Creates a new Terremark vCloud server.
-
-__terremark server delete SERVER__ _(options)_
-
-Deletes a running Terremark vCloud server.
-
-__terremark server list__ _(options)_
-
- * `-K PASSWORD`, `--terremark-password`:
- Your terremark password
- * `-S`, `--terremark-service SERVICE`:
- Your terremark service name
- * `-A USERNAME`, `--terremark-username`:
- Your terremark username
-
-Lists running Terremark vCloud servers.
-
-## CONFIGURATION
-
-The knife configuration file is a Ruby DSL to set configuration parameters for Knife's __GENERAL OPTIONS__. The default location for the config file is `~/.chef/knife.rb`. If managing multiple Chef repositories, per-repository config files can be created. The file must 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.
-
-## FILES
-
-_~/.chef/knife.rb_
-
-Ruby DSL configuration file for knife. See __CONFIGURATION__.
-
-## CHEF WORKFLOW
-
-When working with Chef and Knife in the local repository, the recommended workflow outline looks like:
-
-* Create repository. A skeleton sample is provided at _http://github.com/opscode/chef-repo/_.
-* Configure knife, see __CONFIGURATION__.
-* Download cookbooks from the Opscode cookbooks site, see __COOKBOOK SITE SUB-COMMANDS__.
-* Or, create new cookbooks, see `cookbook create` sub-command.
-* Commit changes to the version control system. See your tool's documentation.
-* Upload cookbooks to the Chef Server, see __COOKBOOK SUB-COMMANDS__.
-* Launch instances in the Cloud, OR provision new hosts; see __CLOUD COMPUTING SUB-COMMANDS__ and __BOOTSTRAP SUB-COMMANDS__.
-* 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 `cookbook site vendor` sub-command, as it uses git directly. Version control is strongly 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
-
-## SEE ALSO
-
-Full documentation for Chef is located on the Chef wiki, http://wiki.opscode.com/display/chef/Home/.
-
-JSON is JavaScript Object Notation and more information can be found at http://json.org/.
-
-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/.
-
-Git is a version control system and documented at http://git-scm.com/.
-
-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.
-
-## AUTHOR
-
-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.
-
-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/knife-bootstrap.mkd b/chef/distro/common/markdown/man1/knife-bootstrap.mkd
new file mode 100644
index 0000000000..dd70f529d0
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-bootstrap.mkd
@@ -0,0 +1,88 @@
+knife-bootrap(1) -- Install Chef Client on a remote host
+========================================
+
+## SYNOPSIS
+
+__knife__ __bootstrap__ _(options)_
+
+ * `-i`, `--identity-file IDENTITY_FILE`:
+ The SSH identity file used for authentication
+ * `-N`, `--node-name NAME`:
+ The Chef node name for your new node
+ * `-P`, `--ssh-password PASSWORD`:
+ The ssh password
+ * `-x`, `--ssh-user USERNAME`:
+ The ssh username
+ * `--prerelease`:
+ Install pre-release Chef gems
+ * `-r`, `--run-list RUN_LIST`:
+ Comma separated list of roles/recipes to apply
+ * `-P`, `--ssh-password PASSWORD`:
+ The ssh password
+ * `-x`, `--ssh-user USERNAME`:
+ The ssh username
+ * `--template-file TEMPLATE`:
+ Full path to location of template to use
+ * `--sudo`:
+ Execute the bootstrap via sudo
+ * `-d`, `--distro DISTRO`:
+ Bootstrap a distro using a template
+
+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.
+
+The bootstrap sub-command supports supplying a template to perform the
+bootstrap steps. If the distro is not specified (via `-d` or `--distro`
+option), an Ubuntu 10.04 host bootstrapped with RubyGems is assumed. The
+__DISTRO__ value corresponds to the base filename of the template, in
+other words `DISTRO`.erb. A template file can be specified with the
+`--template-file` option in which case the __DISTRO__ is not used. The
+sub-command looks in the following locations for the template to use:
+
+* `bootstrap` directory in the installed Chef Knife library.
+* `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:
+
+* 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.
+
+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.
+
+When this is complete, the bootstrapped node will have:
+
+ - Latest Chef version installed from RubyGems or APT Packages from Opscode. This may be a later version than the local system.
+ - 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.
+
+
+## SEE ALSO
+ __knife-ssh__(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-client.mkd b/chef/distro/common/markdown/man1/knife-client.mkd
new file mode 100644
index 0000000000..8764d7d71c
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-client.mkd
@@ -0,0 +1,101 @@
+knife-client(1) -- Manage Chef API Clients
+========================================
+
+## SYNOPSIS
+
+__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
+
+## BULK DELETE
+__knife client bulk delete__ _regex_ _(options)_
+
+Delete clients where the client name matches the regular expression
+_regex_ on the Chef Server. The regular expression should be given as a
+quoted string, and not surrounded by forward slashes.
+
+## CREATE
+__knife client create__ _client name_ _(options)_
+
+ * `-a`, `--admin `:
+ Create the client as an admin
+ * `-f`, `--file FILE`:
+ Write the key to a file
+
+Create a new client. This generates an RSA keypair. The private key will
+be displayed on _STDOUT_ or written to the named file. The public half
+will be stored on the Server. For _chef-client_ systems, the private key
+should be copied to the system as `/etc/chef/client.pem`.
+
+Admin clients should be created for users that will use _knife_ to
+access the API as an administrator. The private key will generally be
+copied to `~/.chef/client\_name.pem` and referenced in the `knife.rb`
+configuration file.
+
+## DELETE
+__knife client delete__ _client name_ _(options)_
+
+Deletes a registered client.
+
+## EDIT
+__client edit__ _client name_ _(options)_
+
+Edit a registered client.
+
+## LIST
+__client list__ _(options)_
+
+ * `-w`, `--with-uri`:
+ Show corresponding URIs
+
+List all registered clients.
+
+## REREGISTER
+__client reregister__ _client name_ _(options)_
+
+ * `-f`, `--file FILE`:
+ Write the key to a file
+
+Regenerate the RSA keypair for a client. The public half will be stored
+on the server and the private key displayed on _STDOUT_ or written to
+the named file. This operation will invalidate the previous keypair used
+by the client, preventing it from authenticating with the Chef Server.
+Use care when reregistering the validator client.
+
+## SHOW
+__client show__ _client name_ _(options)_
+
+ * `-a`, `--attribute ATTR`:
+ Show only one attribute
+
+Show a client. Output format is determined by the --format option.
+
+## 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 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-configure.mkd b/chef/distro/common/markdown/man1/knife-configure.mkd
new file mode 100644
index 0000000000..cc7dd1d96e
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-configure.mkd
@@ -0,0 +1,70 @@
+knife-configure(1) -- Generate configuration files for knife or Chef Client
+========================================
+
+## SYNOPSIS
+
+__knife__ __configure__ [client] _(options)_
+
+## DESCRIPTION
+Generates a knife.rb configuration file interactively. When given the
+--initial option, also creates a new administrative user.
+
+## CONFIGURE SUBCOMMANDS ##
+
+__knife configure__ _(options)_
+
+ * `-i`, `--initial`:
+ Create an initial API Client
+ * `-r`, `--repository REPO`:
+ The path to your chef-repo
+
+Create a configuration file for knife. This will prompt for values to
+enter into the file. Default values are listed in square brackets if no
+other entry is typed. See __knife__(1) for a description of
+configuration options.
+
+__knife configure client__ _directory_
+
+Read the _knife.rb_ config file and generate a config file suitable for
+use in _/etc/chef/client.rb_ and copy the validation certificate into
+the specified _directory_.
+
+## EXAMPLES
+ * On a freshly installed Chef Server, use _knife configure -i_ to
+ create an administrator and knife configuration file. Leave the
+ field blank to accept the default value. On most systems, the
+ default values are acceptable.
+
+ user@host$ knife configure -i
+ Please enter the chef server URL: [http://localhost:4000]
+ Please enter a clientname for the new client: [username]
+ Please enter the existing admin clientname: [chef-webui]
+ Please enter the location of the existing admin client's private key: [/etc/chef/webui.pem]
+ Please enter the validation clientname: [chef-validator]
+ Please enter the location of the validation key: [/etc/chef/validation.pem]
+ Please enter the path to a chef repository (or leave blank):
+ Creating initial API user...
+ Created (or updated) client[username]
+ Configuration file written to /home/username/.chef/knife.rb
+
+ This creates a new administrator client named _username_, writes
+ a configuration file to _/home/username/.chef/knife.rb_, and the
+ private key to _/home/username/.chef/username.pem_. The
+ configuration file and private key may be copied to another system
+ to facilitate administration of the Chef Server from a remote
+ system. Depending on the value given for the Chef Server URL, you
+ may need to modify that setting after copying to a remote host.
+
+## SEE ALSO
+ __knife__(1) __knife-client__(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-cookbook-site.mkd b/chef/distro/common/markdown/man1/knife-cookbook-site.mkd
new file mode 100644
index 0000000000..81adf0c54f
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-cookbook-site.mkd
@@ -0,0 +1,69 @@
+knife-cookbook-site(1) -- Install and update open source cookbooks
+========================================
+
+## SYNOPSIS
+
+__knife__ __cookbook site__ _sub-command_ _(options)_
+
+## 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, _http://cookbooks.opscode.com/_. That site has an API, and these sub-commands utilize that API, rather than the Chef Server API.
+
+__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.
+
+__cookbook site list__ _(options)_
+
+ * `-w`, `--with-uri`:
+ Show corresponding URIs
+
+Lists available cookbooks from the Community site.
+
+__cookbook site search QUERY__ _(options)_
+
+Searches the Community site with the specified query.
+
+__cookbook site share COOKBOOK CATEGORY__ _(options)_
+
+ * `-k`, `--key KEY`:
+ API Client Key
+ * `-u`, `--user USER`:
+ API Client Username
+ * `-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.
+
+__cookbook site unshare COOKBOOK__
+
+Stops sharing the specified cookbook on the Opscode cookbooks site.
+
+__cookbook site show COOKBOOK [VERSION]__ _(options)_
+
+Shows information from the site about a particular cookbook.
+
+__cookbook site vendor COOKBOOK [VERSION]__ _(options)_
+
+ * `-d`, `--dependencies`:
+ Grab dependencies automatically
+
+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.
+
+
+## SEE ALSO
+ __knife-environment__(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-cookbook.mkd b/chef/distro/common/markdown/man1/knife-cookbook.mkd
new file mode 100644
index 0000000000..02ae6f3f90
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-cookbook.mkd
@@ -0,0 +1,136 @@
+knife-cookbook(1) -- Upload and manage Chef cookbooks
+========================================
+
+## SYNOPSIS
+
+__knife__ __cookbook__ _sub-command_ _(options)_
+
+## 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.
+
+__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.
+
+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"
+
+__cookbook delete COOKBOOK [VERSION]__ _(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
+ * `-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)_
+
+ * `-w`, `--with-uri`:
+ Show corresponding URIs
+
+List all the cookbooks.
+
+__cookbook metadata COOKBOOK__ _(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.
+
+__cookbook metadata from FILE__ _(options)_
+
+Load the cookbook metadata from a specified file.
+
+__cookbook show COOKBOOK [VERSION] [PART] [FILENAME]__ _(options)_
+
+ * `-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)_
+
+ * `-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).
+
+__cookbook upload [COOKBOOKS...]__ _(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
+
+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.
+
diff --git a/chef/distro/common/markdown/man1/knife-data-bag.mkd b/chef/distro/common/markdown/man1/knife-data-bag.mkd
new file mode 100644
index 0000000000..f31802751f
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-data-bag.mkd
@@ -0,0 +1,117 @@
+knife-data-bag(1) -- Store arbitrary data on a Chef Server
+========================================
+
+## SYNOPSIS
+
+__knife__ __data bag__ _sub-command_ _(options)_
+
+## DESCRIPTION
+Data bags are stores of arbitrary JSON data. Each data bag is a
+collection that may contain many items. Data Bag Items are indexed by
+the Chef Server and can be searched via __knife-search__(1).
+
+Data bags are available to all nodes configured by __chef-client__(8),
+and are therefore a convenient mechanism to store global information,
+such as lists of administrative accounts that should be configured on
+all hosts.
+
+## DATA BAG SUB-COMMANDS
+
+## CREATE
+__knife data bag create__ _bag name_ [item id] _(options)_
+
+ * `-s`, `--secret SECRET`:
+ A secret key used to encrypt the data bag item. See __encryption support__ below.
+ * `--secret-file SECRET_FILE`:
+ The path to a file containing the secret key to be used to encrypt
+ the data bag item.
+
+If _item id_ is given, creates a new, empty data bag item and opens it for
+editing in your editor. The data bag will be created if it does not
+exist.
+
+If _item id_ is not given, the data bag will be created.
+
+## DELETE
+__knife data bag delete__ _bag name_ [item id] _(options)_
+
+Delete a data bag, or an item from a data bag.
+
+## EDIT
+__knife data bag edit__ _bag name_ _item id_ _(options)_
+
+ * `-s`, `--secret SECRET`:
+ A secret key used to encrypt the data bag item. See __encryption support__ below.
+ * `--secret-file SECRET_FILE`:
+ The path to a file containing the secret key to be used to encrypt
+ the data bag item.
+
+Edit an item in a data bag.
+
+## FROM FILE
+__knife data bag from file__ _bag name_ _file_ _(options)_
+
+ * `-s`, `--secret SECRET`:
+ A secret key used to encrypt the data bag item. See __encryption support__ below.
+ * `--secret-file SECRET_FILE`:
+ The path to a file containing the secret key to be used to encrypt
+ the data bag item.
+
+Load a data bag item from a JSON file. If _file_ is a relative or
+absolute path to the file, that file will be used. Otherwise, the _file_
+parameter is treated as the base name of a data bag file in a Chef
+repository, and `knife` will search for the file in
+`./data_bags/bag_name/file`. For example `knife data bag from file users
+dan.json` would attempt to load the file `./data_bags/users/dan.json`.
+
+## LIST
+__knife data bag list__ _(options)_
+
+ * `-w`, `--with-uri`:
+ Show corresponding URIs
+
+Lists the data bags that exist on the Chef Server.
+
+## SHOW
+__knife data bag show BAG [ITEM]__ _(options)_
+
+ * `-s`, `--secret SECRET`:
+ A secret key used to encrypt the data bag item. See __encryption support__ below.
+ * `--secret-file SECRET_FILE`:
+ The path to a file containing the secret key to be used to encrypt
+ the data bag item.
+
+Show a specific data bag or an item in a data bag. The output will be
+formatted according to the --format option.
+
+## ENCRYPTION SUPPORT
+Data Bag Items may be encrypted to keep their contents secret. This may
+be desireable when storing sensitive information such as database
+passwords, API keys, etc.
+
+Data Bag Item encryption uses the AES-256 CBC symmetric key algorithm.
+
+__CAVEATS:__ Keys are not encrypted; only values are encrypted. The "id"
+of a Data Bag Item is not encrypted, since it is used by Chef Server to
+store the item in its database. For example, given the following data bag item:
+ {"id": "important_passwords", "secret_password": "opensesame"}
+The key "secret\_password" will be visible to an evesdropper, but the
+value "opensesame" will be protected. Both the key "id" and its value
+"important\_passwords" will be visible to an evesdropper.
+
+Chef Server does not provide a secure mechanism for distributing
+encryption keys.
+
+## SEE ALSO
+ __knife-search__(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-environment.mkd b/chef/distro/common/markdown/man1/knife-environment.mkd
new file mode 100644
index 0000000000..9c17dd3465
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-environment.mkd
@@ -0,0 +1,8 @@
+knife-environment(1) -- Define cookbook policies for the environments in your infrastructure
+========================================
+
+## SYNOPSIS
+
+__knife__ __environment__ _sub-command_ _(options)_
+
+## ENVIRONMENT SUBCOMMANDS
diff --git a/chef/distro/common/markdown/man1/knife-exec.mkd b/chef/distro/common/markdown/man1/knife-exec.mkd
new file mode 100644
index 0000000000..b0edfa0cb6
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-exec.mkd
@@ -0,0 +1,9 @@
+knife-exec(1) -- Run user scripts using the Chef API DSL
+========================================
+
+## SYNOPSIS
+
+__knife__ __exec__ _(options)_
+
+## EXEC SUBCOMMAND
+
diff --git a/chef/distro/common/markdown/man1/knife-index.mkd b/chef/distro/common/markdown/man1/knife-index.mkd
new file mode 100644
index 0000000000..812f3fe7dd
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-index.mkd
@@ -0,0 +1,30 @@
+knife-index(1) -- Rebuild the search index on a Chef Server
+========================================
+
+## SYNOPSIS
+
+__knife__ __index rebuild__ _(options)_
+
+ * `-y`, `--yes`:
+ don't bother to ask if I'm sure
+
+## DESCRIPTION
+Rebuilds all the search indexes on the server. This is accomplished by
+deleting all objects from the search index, and then forwarding each
+item in the database to __chef-expander__(8) via __rabbitmq-server__(1).
+Depending on the number of objects in the database, it may take some
+time for all objects to be indexed and available for search.
+
+## SEE ALSO
+ __knife-search__(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
new file mode 100644
index 0000000000..4b5d1cf4f8
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-node.mkd
@@ -0,0 +1,147 @@
+knife-node(1) -- Manage the hosts in your infrastructure
+========================================
+
+## SYNOPSIS
+
+__knife__ __node__ _sub-command_ _(options)_
+
+## DESCRIPTION
+Nodes are data structures that represent hosts configured with Chef.
+Nodes have a __name__, a String that uniquely identifies the node,
+__attributes__, a nested Hash of properties that describe how the host
+should be configured, a __chef\_environment__, a String representing the
+environment to which the node belongs, and a __run\_list__, an ordered
+list of __recipes__ or __roles__ that chef-client should apply when
+configuring a host.
+
+When a host communicates with a Chef Server, it authenticates using its
+__node\_name__ for identification and signs its reqests with a private
+key. The Server validates the request by looking up a __client__ object
+with a name identical to the __node\_name__ submitted with the request
+and verifes the signature using the public key for that __client__
+object. __NOTE__ that the __client__ is a different object in the
+system. It is associated with a node by virtue of having a matching
+name.
+
+By default __chef-client__(8) will create a node using the FQDN of the
+host for the node name, though this may be overridden by configuration
+settings.
+
+## NODE SUB-COMMANDS
+
+
+## BULK DELETE
+__knife node bulk delete__ _regex_ _(options)_
+
+Deletes nodes for which the name matches the regular expression _regex_
+on the Chef Server. The regular expression should be given in quotes,
+and should not be surrounded with forward slashes (as is typical of
+regular expression literals in scripting languages).
+
+## CREATE
+__knife node create__ _name_ _(options)_
+
+Create a new node. Unless the --no-editor option is given, an empty node
+object will be created and displayed in your text editor. If the editor
+exits with a successful exit status, the node data will be posted to the
+Chef Server to create the node.
+
+## DELETE
+__knife node delete__ _name_ _(options)_
+
+Deletes the node identified by _name_ on the Chef Server.
+
+## EDIT
+__knife node edit__ _name_ _(options)_
+
+ * `-a`, `--all`:
+ Display all node data in the editor. By default, default, override,
+ and automatic attributes are not shown.
+
+Edit the node identified by _name_. Like __knife node create__, the node
+will be displayed in your text editor unless the -n option is present.
+
+## FROM FILE
+__knife node from file__ _file_ _(options)_
+
+Create a node from a JSON format _file_.
+
+## LIST
+__knife node list__ _(options)_
+
+ * `-w`, `--with-uri`:
+ Show corresponding URIs
+
+List all nodes.
+
+## RUN\_LIST ADD
+__knife node run_list add__ _name_ _run list item_ _(options)_
+
+ * `-a`, `--after ITEM`:
+ Place the ENTRY in the run list after ITEM
+
+Add the _run list item_ to the node's `run_list`. See Run list
+
+## RUN\_LIST REMOVE
+__knife node run_list remove__ _node name_ _run list item_ _(options)_
+
+Remove the _run list item_ from the node's `run_list`.
+
+## SHOW
+__knife node show__ _node name_ _(options)_
+
+ * `-a`, `--attribute [ATTR]`:
+ Show only one attribute
+ * `-r`, `--run-list `:
+ Show only the run list
+ * `-F`, `--format FORMAT`:
+ Display the node in a different format.
+ * `-m`, `--medium`:
+ Display more, but not all, of the node's data when using the default
+ _summary_ format
+
+Displays the node identified by _node name_ on stdout. The amount of
+content displayed and the output format are modified by the --format
+option. Valid formats are:
+
+ * summary:
+ displays the node in a custom, summarized format
+ * text
+ displays the node data in its entirety using the colorized tree
+display
+ * json:
+ displays the node in JSON format
+ * yaml:
+ displays the node in YAML format
+ * pp
+ displays the node using Ruby's pretty printer.
+
+For brevity, only the first character of the format is required, for
+example, -Fj will produce JSON format output.
+
+## RUN LIST ITEM FORMAT
+Run list items may be either roles or recipes. When adding a role to a
+run list, the correct syntax is "role[ROLE\_NAME]"
+
+When adding a recipe to a run list, there are several valid formats:
+
+ * Fully Qualified Format:
+ "recipe[COOKBOOK::RECIPE\_NAME]", for example, "recipe[chef::client]"
+ * Cookbook Recipe Format:
+ For brevity, the recipe part of the fully qualified format may be omitted, and recipes specified as "COOKBOOK::RECIPE\_NAME", e.g., "chef::client"
+ * Default Recipe Format:
+ When adding the default recipe of a cookbook to a run list, the recipe name may be omitted as well, e.g., "chef::default" may be written as just "chef"
+
+## SEE ALSO
+ __knife-client__(1) __knife-search__(1) __knife-role__(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-recipe.mkd b/chef/distro/common/markdown/man1/knife-recipe.mkd
new file mode 100644
index 0000000000..c795f13e92
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-recipe.mkd
@@ -0,0 +1,24 @@
+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
new file mode 100644
index 0000000000..ac7b42f27e
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-role.mkd
@@ -0,0 +1,79 @@
+knife-role(1) -- Group common configuration settings
+========================================
+
+## SYNOPSIS
+
+__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.
+
+__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.
+
+
+## ROLE SUB-COMMANDS
+
+__knife role bulk delete REGEX__ _(options)_
+
+Delete roles on the Chef Server based on a regular expression. The regular expression (_REGEX_) should be in quotes, not in //'s.
+
+__knife role create ROLE__ _(options)_
+
+ * `-d`, `--description`:
+ The role description
+
+Create a new role.
+
+__knife role delete ROLE__ _(options)_
+
+Delete a role.
+
+__knife role edit ROLE__ _(options)_
+
+Edit a role.
+
+__knife role from file FILE__ _(options)_
+
+Create or update a role from a role Ruby DSL (`.rb`) or JSON file.
+
+__knife role list__ _(options)_
+
+ * `-w`, `--with-uri`:
+ Show corresponding URIs
+
+List roles.
+
+__knife role show ROLE__ _(options)_
+
+ * `-a`, `--attribute ATTR`:
+ Show only one attribute
+
+Show a specific role.
+
+
+## SEE ALSO
+ __knife-node__(1)
+
+ <http://wiki.opscode.com/display/chef/Attributes>
+
+## 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-search.mkd b/chef/distro/common/markdown/man1/knife-search.mkd
new file mode 100644
index 0000000000..50ec98592d
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-search.mkd
@@ -0,0 +1,56 @@
+knife-search(1) -- Find objects on a Chef Server by query
+========================================
+
+## SYNOPSIS
+
+__knife__ __search INDEX QUERY__ _(options)_
+
+ * `-a`, `--attribute ATTR`:
+ Show only one attribute
+ * `-i`, `--id-only`:
+ Show only the ID of matching objects
+ * `-R`, `--rows INT`:
+ The number of rows to return
+ * `-r`, `--run-list`:
+ Show only the run list
+ * `-o`, `--sort SORT`:
+ The order to sort the results in
+ * `-b`, `--start ROW`:
+ The row to start returning results at
+ * `-m`, `--medium`:
+ Display medium sized output when searching nodes using the default
+ summary format
+ * `-l`, `--long`:
+ Display long output when searching nodes using the default summary
+ format
+
+## 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:
+* _node_
+* _role_
+* _environment_
+* _data bag_
+
+## SYNTAX
+
+## EXAMPLES
+
+## SEE ALSO
+ __knife-ssh__(1)
+
+ <http://wiki.opscode.com/display/chef/Attributes>
+
+## 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-ssh.mkd b/chef/distro/common/markdown/man1/knife-ssh.mkd
new file mode 100644
index 0000000000..c8da64d306
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-ssh.mkd
@@ -0,0 +1,64 @@
+knife-ssh(1) -- Run a command or interactive session on multiple remote hosts
+========================================
+
+## SYNOPSIS
+
+__knife__ __ssh QUERY COMMAND__ _(options)_
+
+ * `-a`, `--attribute ATTR `:
+ The attribute to use for opening the connection - default is fqdn
+ * `-C`, `--concurrency NUM `:
+ The number of concurrent connections
+ * `-m`, `--manual-list `:
+ QUERY is a space separated list of servers
+ * `-P`, `--ssh-password PASSWORD`:
+ The ssh password
+ * `-x`, `--ssh-user USERNAME `:
+ The ssh username
+
+## DESCRIPTION
+
+The _ssh_ sub-command opens an ssh session to each of the nodes in the
+search results of the _QUERY_. 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).
+
+## TERMINAL MULTIPLEXING AND TERMINAL TAB SUPPORT
+`knife ssh` integrates with several terminal multiplexer programs to
+provide a more convenient means of managing multiple ssh sessions. When
+the _COMMAND_ option matches one of these, `knife ssh` will create
+multiple interactive ssh sessions running locally in the terminal
+multiplexer instead of invoking the command on the remote host.
+
+The available multiplexers are:
+ * `interactive`:
+ A built-in multiplexer. `interactive` supports running commands on a
+ subset of the connected hosts in parallel
+ * __screen__(1):
+ Runs ssh interactively inside `screen`. ~/.screenrc will be sourced
+ if it exists.
+ * __tmux__(1):
+ Runs ssh interactively inside tmux.
+ * `macterm` (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.
+
+## 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.
+
+## 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-status.mkd b/chef/distro/common/markdown/man1/knife-status.mkd
new file mode 100644
index 0000000000..f333f53fb5
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-status.mkd
@@ -0,0 +1,38 @@
+knife-status(1) -- Display status information for the nodes in your infrastructure
+========================================
+
+## SYNOPSIS
+
+__knife__ __status__ _(options)_
+
+ * `-r`, `--run-list RUN_LIST`:
+ Show the run list
+
+## DESCRIPTION
+
+The _status_ 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 `node.save`. 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 `-r`
+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.
+
+
+## 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.
+
+## 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-tag.mkd b/chef/distro/common/markdown/man1/knife-tag.mkd
new file mode 100644
index 0000000000..c43c0631dd
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife-tag.mkd
@@ -0,0 +1,8 @@
+knife-tag(1) -- Apply tags to nodes on a Chef Server
+========================================
+
+## SYNOPSIS
+
+__knife__ __tag__ _subcommand_ _(options)_
+
+## TAG SUBCOMMANDS
diff --git a/chef/distro/common/markdown/man1/knife.mkd b/chef/distro/common/markdown/man1/knife.mkd
new file mode 100644
index 0000000000..ebd056c920
--- /dev/null
+++ b/chef/distro/common/markdown/man1/knife.mkd
@@ -0,0 +1,261 @@
+knife(1) -- Chef Server REST API utility
+========================================
+
+## SYNOPSIS
+
+__knife__ _sub-command_ _(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
+
+ * `-s`, `--server-url` URL:
+ Chef Server URL, corresponds to `Chef::Config` `chef_server_url`.
+ * `-k`, `--key` KEY:
+ API Client Key, corresponds to `Chef::Config` `client_key`.
+ * `-c`, `--config` CONFIG:
+ The configuration file to use
+ * `-e`, `--editor` EDITOR:
+ Set the editor to use for interactive commands
+ * `-F`, `--format` FORMAT:
+ Which format to use for output
+ * `-l`, `--log_level` LEVEL:
+ Set the log level (debug, info, warn, error, fatal), corresponds to `Chef::Config` `log_level`.
+ * `-L`, `--logfile` LOGLOCATION:
+ Set the log file location, defaults to STDOUT, corresponds to `Chef::Config` `log_location`.
+ * `-n`, `--no-editor`:
+ Do not open EDITOR, just accept the data as is
+ * `-u`, `--user` USER:
+ API Client Username, corresponds to `Chef::Config` `node_name`.
+ * `-p`, `--print-after`:
+ Show the data after a destructive operation
+ * `-v`, `--version`:
+ Show chef version
+ * `-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`.
+
+## 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.
+
+* 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.
+
+
+## CONFIGURATION
+
+The knife configuration file is a Ruby DSL to set configuration
+parameters for Knife's __GENERAL OPTIONS__. The default location for the
+config file is `~/.chef/knife.rb`. If managing multiple Chef
+repositories, per-repository config files can be created. The file must
+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.
+
+## FILES
+
+_~/.chef/knife.rb_
+
+Ruby DSL configuration file for knife. See __CONFIGURATION__.
+
+## CHEF WORKFLOW
+
+When working with Chef and Knife in the local repository, the recommended workflow outline looks like:
+
+* Create repository. A skeleton sample is provided at _http://github.com/opscode/chef-repo/_.
+* Configure knife, see __CONFIGURATION__.
+* Download cookbooks from the Opscode cookbooks site, see __COOKBOOK SITE SUB-COMMANDS__.
+* Or, create new cookbooks, see `cookbook create` sub-command.
+* Commit changes to the version control system. See your tool's documentation.
+* Upload cookbooks to the Chef Server, see __COOKBOOK SUB-COMMANDS__.
+* Launch instances in the Cloud, OR provision new hosts; see __CLOUD COMPUTING SUB-COMMANDS__ and __BOOTSTRAP SUB-COMMANDS__.
+* 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 `cookbook site vendor`
+sub-command, as it uses git directly. Version control is strongly
+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`:
+ 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.
+
+## SEE ALSO
+
+Full documentation for Chef is located on the Chef wiki, http://wiki.opscode.com/display/chef/Home/.
+
+JSON is JavaScript Object Notation and more information can be found at http://json.org/.
+
+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/.
+
+Git is a version control system and documented at http://git-scm.com/.
+
+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.
+
+## AUTHOR
+
+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.
+
+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/lib/chef/application.rb b/chef/lib/chef/application.rb
index 87b8b298f8..c7a3ea0217 100644
--- a/chef/lib/chef/application.rb
+++ b/chef/lib/chef/application.rb
@@ -24,6 +24,9 @@ require 'tmpdir'
class Chef::Application
include Mixlib::CLI
+ class Wakeup < Exception
+ end
+
def initialize
super
diff --git a/chef/lib/chef/application/client.rb b/chef/lib/chef/application/client.rb
index e736cfb0e6..c9efc17c9a 100644
--- a/chef/lib/chef/application/client.rb
+++ b/chef/lib/chef/application/client.rb
@@ -26,6 +26,9 @@ require 'chef/rest'
class Chef::Application::Client < Chef::Application
+ # Mimic self_pipe sleep from Unicorn to capture signals safely
+ SELF_PIPE = []
+
option :config_file,
:short => "-c CONFIG",
:long => "--config CONFIG",
@@ -197,6 +200,15 @@ class Chef::Application::Client < Chef::Application
# Run the chef client, optionally daemonizing or looping at intervals.
def run_application
+ unless RUBY_PLATFORM =~ /mswin|mingw32|windows/
+ SELF_PIPE.replace IO.pipe
+
+ trap("USR1") do
+ Chef::Log.info("SIGUSR1 received, waking up")
+ SELF_PIPE[1].putc('.') # wakeup master process from select
+ end
+ end
+
if Chef::Config[:version]
puts "Chef version: #{::Chef::VERSION}"
end
@@ -219,10 +231,18 @@ class Chef::Application::Client < Chef::Application
@chef_client = nil
if Chef::Config[:interval]
Chef::Log.debug("Sleeping for #{Chef::Config[:interval]} seconds")
- sleep Chef::Config[:interval]
+ unless SELF_PIPE.empty?
+ client_sleep Chef::Config[:interval]
+ else
+ # Windows
+ sleep Chef::Config[:interval]
+ end
else
Chef::Application.exit! "Exiting", 0
end
+ rescue Chef::Application::Wakeup => e
+ Chef::Log.debug("Received Wakeup signal. Starting run.")
+ next
rescue SystemExit => e
raise
rescue Exception => e
@@ -230,7 +250,12 @@ class Chef::Application::Client < Chef::Application
Chef::Log.error("#{e.class}: #{e}")
Chef::Application.debug_stacktrace(e)
Chef::Log.error("Sleeping for #{Chef::Config[:interval]} seconds before trying again")
- sleep Chef::Config[:interval]
+ unless SELF_PIPE.empty?
+ client_sleep Chef::Config[:interval]
+ else
+ # Windows
+ sleep Chef::Config[:interval]
+ end
retry
else
Chef::Application.debug_stacktrace(e)
@@ -241,4 +266,11 @@ class Chef::Application::Client < Chef::Application
end
end
end
+
+ private
+
+ def client_sleep(sec)
+ IO.select([ SELF_PIPE[0] ], nil, nil, sec) or return
+ SELF_PIPE[0].getc
+ end
end
diff --git a/chef/lib/chef/checksum.rb b/chef/lib/chef/checksum.rb
index 3f9a29b3e8..5a45e76007 100644
--- a/chef/lib/chef/checksum.rb
+++ b/chef/lib/chef/checksum.rb
@@ -106,7 +106,7 @@ class Chef
# given by +file_location+ and saves the Checksum to the database
def commit_sandbox_file(sandbox_file)
@original_committed_file_location = sandbox_file
- Chef::Log.info("commiting sandbox file: move #{sandbox_file} to #{file_location}")
+ Chef::Log.info("Commiting sandbox file: move #{sandbox_file} to #{file_location}")
FileUtils.mkdir_p(checksum_repo_directory)
File.rename(sandbox_file, file_location)
cdb_save
@@ -122,7 +122,7 @@ class Chef
raise Chef::Exceptions::IllegalChecksumRevert, "Checksum #{self.inspect} cannot be reverted because the original sandbox file location is not known"
end
- Chef::Log.warn("reverting sandbox file commit: moving #{file_location} back to #{original_committed_file_location}")
+ Chef::Log.warn("Reverting sandbox file commit: moving #{file_location} back to #{original_committed_file_location}")
File.rename(file_location, original_committed_file_location)
cdb_destroy
end
diff --git a/chef/lib/chef/checksum_cache.rb b/chef/lib/chef/checksum_cache.rb
index 61a69f589a..0f7f07742e 100644
--- a/chef/lib/chef/checksum_cache.rb
+++ b/chef/lib/chef/checksum_cache.rb
@@ -78,7 +78,7 @@ class Chef
end
def self.cleanup_checksum_cache
- Chef::Log.info("cleaning the checksum cache")
+ Chef::Log.debug("Cleaning the checksum cache")
if (Chef::Config[:cache_type].to_s == "BasicFile")
all_cached_checksums.each do |cache_key, cksum_cache_file|
unless valid_cached_checksums.include?(cache_key)
@@ -93,7 +93,7 @@ class Chef
end
def self.remove_unused_checksum(checksum_file)
- Chef::Log.debug("removing unused checksum cache file #{checksum_file}")
+ Chef::Log.debug("Removing unused checksum cache file #{checksum_file}")
FileUtils.rm(checksum_file)
end
diff --git a/chef/lib/chef/client.rb b/chef/lib/chef/client.rb
index a02ed46e9d..8384d41c22 100644
--- a/chef/lib/chef/client.rb
+++ b/chef/lib/chef/client.rb
@@ -152,7 +152,7 @@ class Chef
begin
run_status.start_clock
- Chef::Log.info("Starting Run for #{node.name}")
+ Chef::Log.info("Starting Chef Run for #{node.name}")
run_started
run_context = setup_run_context
@@ -261,7 +261,7 @@ class Chef
@expanded_run_list_with_versions = @run_list_expansion.recipes.with_version_constraints_strings
Chef::Log.info("Run List is [#{@node.run_list}]")
- Chef::Log.info("Run List expands (with versions) to [#{@expanded_run_list_with_versions.join(', ')}]")
+ Chef::Log.info("Run List expands to [#{@expanded_run_list_with_versions.join(', ')}]")
@run_status = Chef::RunStatus.new(@node)
@@ -341,7 +341,7 @@ class Chef
# Check for cookbooks in the path given
# Chef::Config[:cookbook_path] can be a string or an array
# if it's an array, go through it and check each one, raise error at the last one if no files are found
- Chef::Log.debug "loading from cookbook_path: #{Array(Chef::Config[:cookbook_path]).map { |path| File.expand_path(path) }.join(', ')}"
+ Chef::Log.debug "Loading from cookbook_path: #{Array(Chef::Config[:cookbook_path]).map { |path| File.expand_path(path) }.join(', ')}"
Array(Chef::Config[:cookbook_path]).each_with_index do |cookbook_path, index|
if directory_not_empty?(cookbook_path)
break
diff --git a/chef/lib/chef/cookbook/metadata.rb b/chef/lib/chef/cookbook/metadata.rb
index 9e5e3b4dc1..407a29ddaa 100644
--- a/chef/lib/chef/cookbook/metadata.rb
+++ b/chef/lib/chef/cookbook/metadata.rb
@@ -27,22 +27,41 @@ require 'chef/version_constraint'
class Chef
class Cookbook
+
# == Chef::Cookbook::Metadata
# Chef::Cookbook::Metadata provides a convenient DSL for declaring metadata
# about Chef Cookbooks.
class Metadata
+ NAME = 'name'.freeze
+ DESCRIPTION = 'description'.freeze
+ LONG_DESCRIPTION = 'long_description'.freeze
+ MAINTAINER = 'maintainer'.freeze
+ MAINTAINER_EMAIL = 'maintainer_email'.freeze
+ LICENSE = 'license'.freeze
+ PLATFORMS = 'platforms'.freeze
+ DEPENDENCIES = 'dependencies'.freeze
+ RECOMMENDATIONS = 'recommendations'.freeze
+ SUGGESTIONS = 'suggestions'.freeze
+ CONFLICTING = 'conflicting'.freeze
+ PROVIDING = 'providing'.freeze
+ REPLACING = 'replacing'.freeze
+ ATTRIBUTES = 'attributes'.freeze
+ GROUPINGS = 'groupings'.freeze
+ RECIPES = 'recipes'.freeze
+ VERSION = 'version'.freeze
+
COMPARISON_FIELDS = [ :name, :description, :long_description, :maintainer,
:maintainer_email, :license, :platforms, :dependencies,
:recommendations, :suggestions, :conflicting, :providing,
:replacing, :attributes, :groupings, :recipes, :version]
- VERSION_CONSTRAINTS = {:depends => "dependencies",
- :recommends => "recommendations",
- :suggests => "suggestions",
- :conflicts => "conflicting",
- :provides => "providing",
- :replaces => "replacing" }
+ VERSION_CONSTRAINTS = {:depends => DEPENDENCIES,
+ :recommends => RECOMMENDATIONS,
+ :suggests => SUGGESTIONS,
+ :conflicts => CONFLICTING,
+ :provides => PROVIDING,
+ :replaces => REPLACING }
include Chef::Mixin::CheckHelper
include Chef::Mixin::ParamsValidate
@@ -402,23 +421,23 @@ class Chef
def to_hash
{
- 'name' => self.name,
- 'description' => self.description,
- 'long_description' => self.long_description,
- 'maintainer' => self.maintainer,
- 'maintainer_email' => self.maintainer_email,
- 'license' => self.license,
- 'platforms' => self.platforms,
- 'dependencies' => self.dependencies,
- 'recommendations' => self.recommendations,
- 'suggestions' => self.suggestions,
- 'conflicting' => self.conflicting,
- 'providing' => self.providing,
- 'replacing' => self.replacing,
- 'attributes' => self.attributes,
- 'groupings' => self.groupings,
- 'recipes' => self.recipes,
- 'version' => self.version
+ NAME => self.name,
+ DESCRIPTION => self.description,
+ LONG_DESCRIPTION => self.long_description,
+ MAINTAINER => self.maintainer,
+ MAINTAINER_EMAIL => self.maintainer_email,
+ LICENSE => self.license,
+ PLATFORMS => self.platforms,
+ DEPENDENCIES => self.dependencies,
+ RECOMMENDATIONS => self.recommendations,
+ SUGGESTIONS => self.suggestions,
+ CONFLICTING => self.conflicting,
+ PROVIDING => self.providing,
+ REPLACING => self.replacing,
+ ATTRIBUTES => self.attributes,
+ GROUPINGS => self.groupings,
+ RECIPES => self.recipes,
+ VERSION => self.version
}
end
@@ -433,23 +452,23 @@ class Chef
end
def from_hash(o)
- @name = o['name'] if o.has_key?('name')
- @description = o['description'] if o.has_key?('description')
- @long_description = o['long_description'] if o.has_key?('long_description')
- @maintainer = o['maintainer'] if o.has_key?('maintainer')
- @maintainer_email = o['maintainer_email'] if o.has_key?('maintainer_email')
- @license = o['license'] if o.has_key?('license')
- @platforms = o['platforms'] if o.has_key?('platforms')
- @dependencies = handle_deprecated_constraints(o['dependencies']) if o.has_key?('dependencies')
- @recommendations = handle_deprecated_constraints(o['recommendations']) if o.has_key?('recommendations')
- @suggestions = handle_deprecated_constraints(o['suggestions']) if o.has_key?('suggestions')
- @conflicting = handle_deprecated_constraints(o['conflicting']) if o.has_key?('conflicting')
- @providing = o['providing'] if o.has_key?('providing')
- @replacing = handle_deprecated_constraints(o['replacing']) if o.has_key?('replacing')
- @attributes = o['attributes'] if o.has_key?('attributes')
- @groupings = o['groupings'] if o.has_key?('groupings')
- @recipes = o['recipes'] if o.has_key?('recipes')
- @version = o['version'] if o.has_key?('version')
+ @name = o[NAME] if o.has_key?(NAME)
+ @description = o[DESCRIPTION] if o.has_key?(DESCRIPTION)
+ @long_description = o[LONG_DESCRIPTION] if o.has_key?(LONG_DESCRIPTION)
+ @maintainer = o[MAINTAINER] if o.has_key?(MAINTAINER)
+ @maintainer_email = o[MAINTAINER_EMAIL] if o.has_key?(MAINTAINER_EMAIL)
+ @license = o[LICENSE] if o.has_key?(LICENSE)
+ @platforms = o[PLATFORMS] if o.has_key?(PLATFORMS)
+ @dependencies = handle_deprecated_constraints(o[DEPENDENCIES]) if o.has_key?(DEPENDENCIES)
+ @recommendations = handle_deprecated_constraints(o[RECOMMENDATIONS]) if o.has_key?(RECOMMENDATIONS)
+ @suggestions = handle_deprecated_constraints(o[SUGGESTIONS]) if o.has_key?(SUGGESTIONS)
+ @conflicting = handle_deprecated_constraints(o[CONFLICTING]) if o.has_key?(CONFLICTING)
+ @providing = o[PROVIDING] if o.has_key?(PROVIDING)
+ @replacing = handle_deprecated_constraints(o[REPLACING]) if o.has_key?(REPLACING)
+ @attributes = o[ATTRIBUTES] if o.has_key?(ATTRIBUTES)
+ @groupings = o[GROUPINGS] if o.has_key?(GROUPINGS)
+ @recipes = o[RECIPES] if o.has_key?(RECIPES)
+ @version = o[VERSION] if o.has_key?(VERSION)
self
end
@@ -588,5 +607,22 @@ INVALID
end
end
+
+ #== Chef::Cookbook::MinimalMetadata
+ # MinimalMetadata is a duck type of Cookbook::Metadata, used
+ # internally by Chef Server when determining the optimal set of
+ # cookbooks for a node.
+ #
+ # MinimalMetadata objects typically contain only enough information
+ # to solve the cookbook collection for a run list, but not enough to
+ # generate the proper response
+ class MinimalMetadata < Metadata
+ def initialize(name, params)
+ @name = name
+ from_hash(params)
+ end
+ end
+
+
end
end
diff --git a/chef/lib/chef/cookbook/remote_file_vendor.rb b/chef/lib/chef/cookbook/remote_file_vendor.rb
index 4f0b1385c6..8def2298a1 100644
--- a/chef/lib/chef/cookbook/remote_file_vendor.rb
+++ b/chef/lib/chef/cookbook/remote_file_vendor.rb
@@ -62,7 +62,7 @@ class Chef
if current_checksum != found_manifest_record['checksum']
raw_file = @rest.get_rest(found_manifest_record[:url], true)
- Chef::Log.info("Storing updated #{cache_filename} in the cache.")
+ Chef::Log.debug("Storing updated #{cache_filename} in the cache.")
Chef::FileCache.move_to(raw_file.path, cache_filename)
else
Chef::Log.debug("Not storing #{cache_filename}, as the cache is up to date.")
diff --git a/chef/lib/chef/cookbook/syntax_check.rb b/chef/lib/chef/cookbook/syntax_check.rb
index 8631e3e689..31d23cac54 100644
--- a/chef/lib/chef/cookbook/syntax_check.rb
+++ b/chef/lib/chef/cookbook/syntax_check.rb
@@ -57,7 +57,7 @@ class Chef
def untested_ruby_files
ruby_files.reject do |file|
if validated?(file)
- Chef::Log.debug("ruby file #{file} is unchanged, skipping syntax check")
+ Chef::Log.debug("Ruby file #{file} is unchanged, skipping syntax check")
true
else
false
@@ -72,7 +72,7 @@ class Chef
def untested_template_files
template_files.reject do |file|
if validated?(file)
- Chef::Log.debug("template #{file} is unchanged, skipping syntax check")
+ Chef::Log.debug("Template #{file} is unchanged, skipping syntax check")
true
else
false
diff --git a/chef/lib/chef/cookbook_version.rb b/chef/lib/chef/cookbook_version.rb
index bb3dd548df..45ac21c6ef 100644
--- a/chef/lib/chef/cookbook_version.rb
+++ b/chef/lib/chef/cookbook_version.rb
@@ -3,7 +3,8 @@
# Author:: Christopher Walters (<cw@opscode.com>)
# Author:: Tim Hinderliter (<tim@opscode.com>)
# Author:: Seth Falcon (<seth@opscode.com>)
-# Copyright:: Copyright 2008-2010 Opscode, Inc.
+# Author:: Daniel DeLeo (<dan@opscode.com>)
+# Copyright:: Copyright 2008-2011 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -29,6 +30,80 @@ require 'chef/cookbook/metadata'
require 'chef/version_class'
class Chef
+
+ #== Chef::MinimalCookbookVersion
+ # MinimalCookbookVersion is a duck type of CookbookVersion, used
+ # internally by Chef Server as an optimization when determining the
+ # optimal cookbook set for a chef-client.
+ #
+ # MinimalCookbookVersion objects contain only enough information to
+ # solve the cookbook collection for a given run list. They *do not*
+ # contain enough information to generate the response.
+ #
+ # See also: Chef::CookbookVersionSelector
+ class MinimalCookbookVersion
+
+ include Comparable
+
+ ID = "id".freeze
+ NAME = 'name'.freeze
+ KEY = 'key'.freeze
+ VERSION = 'version'.freeze
+ VALUE = 'value'.freeze
+ DEPS = 'deps'.freeze
+
+ DEPENDENCIES = 'dependencies'.freeze
+
+ # Loads the full list of cookbooks, using a couchdb view to fetch
+ # only the id, name, version, and dependency constraints. This is
+ # enough information to solve for the cookbook collection for a
+ # given run list. After solving for the cookbook collection, you
+ # need to call +load_full_versions_of+ to convert
+ # MinimalCookbookVersion objects to their non-minimal counterparts
+ def self.load_all(couchdb)
+ # Example:
+ # {"id"=>"1a806f1c-b409-4d8e-abab-fa414ff5b96d", "key"=>"activemq", "value"=>{"version"=>"0.3.3", "deps"=>{"java"=>">= 0.0.0", "runit"=>">= 0.0.0"}}}
+ couchdb ||= Chef::CouchDB.new
+ couchdb.get_view("cookbooks", "all_with_version_and_deps")["rows"].map {|params| self.new(params) }
+ end
+
+ # Loads the non-minimal CookbookVersion objects corresponding to
+ # +minimal_cookbook_versions+ from couchdb using a bulk GET.
+ def self.load_full_versions_of(minimal_cookbook_versions, couchdb)
+ database_ids = Array(minimal_cookbook_versions).map {|mcv| mcv.couchdb_id }
+ couchdb ||= Chef::CouchDB.new
+ couchdb.bulk_get(*database_ids)
+ end
+
+ attr_reader :couchdb_id
+ attr_reader :name
+ attr_reader :version
+ attr_reader :deps
+
+ def initialize(params)
+ @couchdb_id = params[ID]
+ @name = params[KEY]
+ @version = params[VALUE][VERSION]
+ @deps = params[VALUE][DEPS]
+ end
+
+ # Returns the Cookbook::MinimalMetadata object for this cookbook
+ # version.
+ def metadata
+ @metadata ||= Cookbook::MinimalMetadata.new(@name, DEPENDENCIES => @deps)
+ end
+
+ def legit_version
+ @legit_version ||= Chef::Version.new(@version)
+ end
+
+ def <=>(o)
+ raise Chef::Exceptions::CookbookVersionNameMismatch if self.name != o.name
+ raise "Unexpected comparison to #{o}" unless o.respond_to?(:legit_version)
+ legit_version <=> o.legit_version
+ end
+ end
+
# == Chef::CookbookVersion
# CookbookVersion is a model object encapsulating the data about a Chef
# cookbook. Chef supports maintaining multiple versions of a cookbook on a
@@ -44,7 +119,7 @@ class Chef
COOKBOOK_SEGMENTS = [ :resources, :providers, :recipes, :definitions, :libraries, :attributes, :files, :templates, :root_files ]
DESIGN_DOCUMENT = {
- "version" => 7,
+ "version" => 8,
"language" => "javascript",
"views" => {
"all" => {
@@ -74,6 +149,15 @@ class Chef
}
EOJS
},
+ "all_with_version_and_deps" => {
+ "map" => <<-JS
+ function(doc) {
+ if (doc.chef_type == "cookbook_version") {
+ emit(doc.cookbook_name, {version: doc.version, deps: doc.metadata.dependencies});
+ }
+ }
+ JS
+ },
"all_latest_version" => {
"map" => %q@
function(doc) {
@@ -439,6 +523,11 @@ class Chef
@checksums
end
+ def manifest_records_by_path
+ @manifest_records_by_path || generate_manifest
+ @manifest_records_by_path
+ end
+
def full_name
"#{name}-#{version}"
end
diff --git a/chef/lib/chef/cookbook_version_selector.rb b/chef/lib/chef/cookbook_version_selector.rb
index cd00e08a92..9e60f85639 100644
--- a/chef/lib/chef/cookbook_version_selector.rb
+++ b/chef/lib/chef/cookbook_version_selector.rb
@@ -156,8 +156,13 @@ class Chef
# expand any roles in this run_list.
expanded_run_list = run_list.expand(environment, 'couchdb', :couchdb => couchdb).recipes.with_version_constraints
- cookbooks_for_environment = Chef::Environment.cdb_load_filtered_cookbook_versions(environment, couchdb)
- constrain(cookbooks_for_environment, expanded_run_list)
+ cookbooks_for_environment = Chef::Environment.cdb_minimal_filtered_versions(environment, couchdb)
+ cookbook_collection = constrain(cookbooks_for_environment, expanded_run_list)
+ full_cookbooks = Chef::MinimalCookbookVersion.load_full_versions_of(cookbook_collection.values, couchdb)
+ full_cookbooks.inject({}) do |cb_map, cookbook_version|
+ cb_map[cookbook_version.name] = cookbook_version
+ cb_map
+ end
end
end
end
diff --git a/chef/lib/chef/data_bag_item.rb b/chef/lib/chef/data_bag_item.rb
index 9fc7afec7d..962c408656 100644
--- a/chef/lib/chef/data_bag_item.rb
+++ b/chef/lib/chef/data_bag_item.rb
@@ -201,7 +201,7 @@ class Chef
# Remove this Data Bag Item from CouchDB
def cdb_destroy
- Chef::Log.debug "destroying data bag item: #{self.inspect}"
+ Chef::Log.debug "Destroying data bag item: #{self.inspect}"
@couchdb.delete("data_bag_item", object_name, @couchdb_rev)
end
diff --git a/chef/lib/chef/environment.rb b/chef/lib/chef/environment.rb
index 24be7b6c3d..6ae81c796d 100644
--- a/chef/lib/chef/environment.rb
+++ b/chef/lib/chef/environment.rb
@@ -19,6 +19,7 @@
#
require 'chef/config'
+require 'chef/mash'
require 'chef/mixin/params_validate'
require 'chef/mixin/from_file'
require 'chef/couchdb'
@@ -361,6 +362,47 @@ class Chef
sorted_list
end
+ # Like +cdb_load_filtered_cookbook_versions+, loads the set of
+ # cookbooks available in a given environment. The difference is that
+ # this method will load Chef::MinimalCookbookVersion objects that
+ # contain only the information necessary for solving a cookbook
+ # collection for a given run list. The user of this method must call
+ # Chef::MinimalCookbookVersion.load_full_versions_of() after solving
+ # the cookbook collection to get the full objects.
+ # === Returns
+ # Hash
+ # i.e.
+ # {
+ # "cookbook_name" => [ Chef::CookbookVersion ... ] ## the array of CookbookVersions is sorted highest to lowest
+ # }
+ #
+ # There will be a key for every cookbook. If no CookbookVersions
+ # are available for the specified environment the value will be an
+ # empty list.
+ def self.cdb_minimal_filtered_versions(name, couchdb=nil)
+ version_constraints = cdb_load(name, couchdb).cookbook_versions.inject({}) {|res, (k,v)| res[k] = Chef::VersionConstraint.new(v); res}
+
+ # inject all cookbooks into the hash while filtering out restricted versions, then sort the individual arrays
+ cookbook_list = Chef::MinimalCookbookVersion.load_all(couchdb)
+
+ filtered_list = cookbook_list.inject({}) do |res, cookbook|
+ # FIXME: should cookbook.version return a Chef::Version?
+ version = Chef::Version.new(cookbook.version)
+ requirement_satisfied = version_constraints.has_key?(cookbook.name) ? version_constraints[cookbook.name].include?(version) : true
+ # we want a key for every cookbook, even if no versions are available
+ res[cookbook.name] ||= []
+ res[cookbook.name] << cookbook if requirement_satisfied
+ res
+ end
+
+ sorted_list = filtered_list.inject({}) do |res, (cookbook_name, versions)|
+ res[cookbook_name] = versions.sort.reverse
+ res
+ end
+
+ sorted_list
+ end
+
def self.cdb_load_filtered_recipe_list(name, couchdb=nil)
cdb_load_filtered_cookbook_versions(name, couchdb).map do |cb_name, cb|
cb.first.recipe_filenames_by_name.keys.map do |recipe|
diff --git a/chef/lib/chef/file_access_control.rb b/chef/lib/chef/file_access_control.rb
index ed5fd02060..1f38821d34 100644
--- a/chef/lib/chef/file_access_control.rb
+++ b/chef/lib/chef/file_access_control.rb
@@ -84,8 +84,8 @@ class Chef
def set_owner
if (uid = target_uid) && (uid != stat.uid)
- Chef::Log.debug("setting owner on #{file} to #{uid}")
File.chown(uid, nil, file)
+ Chef::Log.info("#{log_string} owner changed to #{uid}")
modified
end
end
@@ -106,8 +106,8 @@ class Chef
def set_group
if (gid = target_gid) && (gid != stat.gid)
- Chef::Log.debug("setting group on #{file} to #{gid}")
File.chown(nil, gid, file)
+ Chef::Log.info("#{log_string} owner changed to #{gid}")
modified
end
end
@@ -119,8 +119,8 @@ class Chef
def set_mode
if (mode = target_mode) && (mode != (stat.mode & 007777))
- Chef::Log.debug("setting mode on #{file} to #{mode.to_s(8)}")
File.chmod(target_mode, file)
+ Chef::Log.info("#{log_string} mode changed to #{mode.to_s(8)}")
modified
end
end
@@ -135,6 +135,10 @@ class Chef
def modified
@modified = true
end
+
+ def log_string
+ @resource || @file
+ end
end
end
diff --git a/chef/lib/chef/index_queue/indexable.rb b/chef/lib/chef/index_queue/indexable.rb
index aa7e75e8c5..73fd08bbb5 100644
--- a/chef/lib/chef/index_queue/indexable.rb
+++ b/chef/lib/chef/index_queue/indexable.rb
@@ -66,7 +66,7 @@ class Chef
end
def add_to_index(metadata={})
- Chef::Log.debug("pushing item to index queue for addition: #{self.with_indexer_metadata(metadata)}")
+ Chef::Log.debug("Pushing item to index queue for addition: #{self.with_indexer_metadata(metadata)}")
object_with_metadata = with_indexer_metadata(metadata)
obj_id = object_with_metadata["id"]
obj = {:action => :add, :payload => self.with_indexer_metadata(metadata)}
@@ -75,7 +75,7 @@ class Chef
end
def delete_from_index(metadata={})
- Chef::Log.debug("pushing item to index queue for deletion: #{self.with_indexer_metadata(metadata)}")
+ Chef::Log.debug("Pushing item to index queue for deletion: #{self.with_indexer_metadata(metadata)}")
object_with_metadata = with_indexer_metadata(metadata)
obj_id = object_with_metadata["id"]
obj = {:action => :delete, :payload => self.with_indexer_metadata(metadata)}
diff --git a/chef/lib/chef/knife.rb b/chef/lib/chef/knife.rb
index 147fc776a3..83c0a74ab9 100644
--- a/chef/lib/chef/knife.rb
+++ b/chef/lib/chef/knife.rb
@@ -291,7 +291,7 @@ class Chef
self.msg("No knife configuration file found")
end
- config[:color] = config[:color] && !config[:no_color]
+ Chef::Config[:color] = config[:color] && !config[:no_color]
case config[:verbosity]
when 0
diff --git a/chef/lib/chef/knife/configure.rb b/chef/lib/chef/knife/configure.rb
index e1efdfbb65..b6f3a5b843 100644
--- a/chef/lib/chef/knife/configure.rb
+++ b/chef/lib/chef/knife/configure.rb
@@ -24,6 +24,10 @@ class Chef
attr_reader :chef_server, :new_client_name, :admin_client_name, :admin_client_key
attr_reader :chef_repo, :new_client_key, :validation_client_name, :validation_key
+ deps do
+ Chef::Knife::ClientCreate.load_deps
+ end
+
banner "knife configure (options)"
option :repository,
diff --git a/chef/lib/chef/knife/cookbook_site_share.rb b/chef/lib/chef/knife/cookbook_site_share.rb
index b862841d07..61177fa3dc 100644
--- a/chef/lib/chef/knife/cookbook_site_share.rb
+++ b/chef/lib/chef/knife/cookbook_site_share.rb
@@ -53,7 +53,7 @@ class Chef
Chef::CookbookUploader.new(cookbook,config[:cookbook_path]).validate_cookbook
tmp_cookbook_dir = Chef::CookbookSiteStreamingUploader.create_build_dir(cookbook)
begin
- Chef::Log.debug("temp cookbook directory is #{tmp_cookbook_dir.inspect}")
+ Chef::Log.debug("Temp cookbook directory is #{tmp_cookbook_dir.inspect}")
ui.info("Making tarball #{cookbook_name}.tgz")
Chef::Mixin::Command.run_command(:command => "tar -czf #{cookbook_name}.tgz #{cookbook_name}", :cwd => tmp_cookbook_dir)
rescue => e
diff --git a/chef/lib/chef/knife/cookbook_upload.rb b/chef/lib/chef/knife/cookbook_upload.rb
index ce56d52c87..bafe3cc2c8 100644
--- a/chef/lib/chef/knife/cookbook_upload.rb
+++ b/chef/lib/chef/knife/cookbook_upload.rb
@@ -23,6 +23,9 @@ class Chef
class Knife
class CookbookUpload < Knife
+ CHECKSUM = "checksum"
+ MATCH_CHECKSUM = /[0-9a-f]{32,}/
+
deps do
require 'chef/exceptions'
require 'chef/cookbook_loader'
@@ -55,7 +58,8 @@ class Chef
option :environment,
:short => '-E',
:long => '--environment ENVIRONMENT',
- :description => "Set ENVIRONMENT's version dependency match the version you're uploading."
+ :description => "Set ENVIRONMENT's version dependency match the version you're uploading.",
+ :default => nil
def run
config[:cookbook_path] ||= Chef::Config[:cookbook_path]
@@ -72,7 +76,7 @@ class Chef
else
if @name_args.empty?
show_usage
- Chef::Log.fatal("You must specify the --all flag or at least one cookbook name")
+ ui.error("You must specify the --all flag or at least one cookbook name")
exit 1
end
@name_args.each do |cookbook_name|
@@ -82,12 +86,13 @@ class Chef
upload(cookbook)
version_constraints_to_update[cookbook_name] = cookbook.version
rescue Exceptions::CookbookNotFoundInRepo => e
- Log.error("Could not find cookbook #{cookbook_name} in your cookbook path, skipping it")
+ ui.error("Could not find cookbook #{cookbook_name} in your cookbook path, skipping it")
Log.debug(e)
end
end
end
+ ui.info "upload complete"
update_version_constraints(version_constraints_to_update) if config[:environment]
end
@@ -107,7 +112,7 @@ class Chef
def environment
- @environment ||= Environment.load(config[:environment])
+ @environment ||= config[:environment] ? Environment.load(config[:environment]) : nil
end
private
@@ -116,7 +121,7 @@ class Chef
environment
rescue Net::HTTPServerException => e
if e.response.code.to_s == "404"
- Log.error "The environment #{config[:environment]} does not exist on the server"
+ ui.error "The environment #{config[:environment]} does not exist on the server, aborting."
Log.debug(e)
exit 1
else
@@ -125,22 +130,41 @@ class Chef
end
def upload(cookbook)
- Chef::Log.info("** #{cookbook.name} **")
+ if config[:all]
+ ui.info("** #{cookbook.name} **")
+ else
+ ui.info "Uploading #{cookbook.name}..."
+ end
+ check_for_broken_links(cookbook)
Chef::CookbookUploader.new(cookbook, config[:cookbook_path], :force => config[:force]).upload_cookbook
rescue Net::HTTPServerException => e
case e.response.code
- when "401"
- Log.error "Request failed due to authentication (#{e}), check your client configuration (username, key)"
- Log.debug(e)
- exit 18
when "409"
- Log.error "Version #{cookbook.version} of cookbook #{cookbook.name} is frozen. Use --force to override."
+ ui.error "Version #{cookbook.version} of cookbook #{cookbook.name} is frozen. Use --force to override."
Log.debug(e)
else
raise
end
end
+ # if only you people wouldn't put broken symlinks in your cookbooks in
+ # the first place. ;)
+ def check_for_broken_links(cookbook)
+ # MUST!! dup the cookbook version object--it memoizes its
+ # manifest object, but the manifest becomes invalid when you
+ # regenerate the metadata
+ broken_files = cookbook.dup.manifest_records_by_path.select do |path, info|
+ info[CHECKSUM].nil? || info[CHECKSUM] !~ MATCH_CHECKSUM
+ end
+ unless broken_files.empty?
+ broken_filenames = Array(broken_files).map {|path, info| path}
+ ui.error "The cookbook #{cookbook.name} has one or more broken files"
+ ui.info "This is probably caused by broken symlinks in the cookbook directory"
+ ui.info "The broken file(s) are: #{broken_filenames.join(' ')}"
+ exit 1
+ end
+ end
+
end
end
end
diff --git a/chef/lib/chef/knife/core/text_formatter.rb b/chef/lib/chef/knife/core/text_formatter.rb
index 67dcdee803..21142cec4e 100644
--- a/chef/lib/chef/knife/core/text_formatter.rb
+++ b/chef/lib/chef/knife/core/text_formatter.rb
@@ -72,7 +72,7 @@ class Chef
# Ruby 1.8 Strings include enumberable, which is not what we want. So
# we have this heuristic to detect hashes and arrays instead.
def should_enumerate?(value)
- ((value.respond_to?(:keys) && !value.empty? ) || ( value.kind_of?(Array) && value.size > 1 ))
+ ((value.respond_to?(:keys) && !value.empty? ) || ( value.kind_of?(Array) && (value.size > 1 || should_enumerate?(value.first) )))
end
def indent_line(string, indent)
@@ -90,7 +90,7 @@ class Chef
end
def stringify_value(data)
- data.kind_of?(String) ? data : data.inspect
+ data.kind_of?(String) ? data : data.to_s
end
end
diff --git a/chef/lib/chef/knife/core/ui.rb b/chef/lib/chef/knife/core/ui.rb
index a68edcde0c..d402d60f58 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?
- config[:color] && stdout.tty?
+ Chef::Config[:color] && stdout.tty?
end
def ask(*args, &block)
diff --git a/chef/lib/chef/knife/help.rb b/chef/lib/chef/knife/help.rb
new file mode 100644
index 0000000000..f0e5f155a3
--- /dev/null
+++ b/chef/lib/chef/knife/help.rb
@@ -0,0 +1,98 @@
+#
+# Author:: Daniel DeLeo (<dan@opscode.com>)
+# Copyright:: Copyright (c) 2011 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.
+#
+
+class Chef
+ class Knife
+ class Help < Chef::Knife
+
+ banner "knife help [list|TOPIC]"
+
+ def run
+ if name_args.empty?
+ ui.info "Usage: knife SUBCOMMAND (options)"
+ show_usage
+ 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
+MOAR_HELP
+ exit 1
+ else
+ @query = name_args.join('-')
+ end
+
+
+
+ case @query
+ when 'topics', 'list'
+ print_help_topics
+ exit 1
+ when 'intro', 'knife'
+ @topic = 'knife'
+ else
+ @topic = find_manpages_for_query(@query)
+ end
+
+ manpage_path = available_manpages_by_basename[@topic]
+ exec "man #{manpage_path}"
+ end
+
+ def help_topics
+ available_manpages_by_basename.keys.map {|c| c.sub(/^knife\-/, '')}.sort
+ end
+
+ def print_help_topics
+ ui.info "Available help topics are: "
+ help_topics.each do |topic|
+ ui.msg " #{topic}"
+ end
+ end
+
+ def find_manpages_for_query(query)
+ possibilities = available_manpages_by_basename.keys.select do |manpage|
+ ::File.fnmatch("knife-#{query}*", manpage) || ::File.fnmatch("#{query}*", manpage)
+ end
+ if possibilities.empty?
+ ui.error "No help found for '#{query}'"
+ ui.msg ""
+ print_help_topics
+ exit 1
+ elsif possibilities.size == 1
+ possibilities.first
+ else
+ ui.info "Multiple help topics match your query. Pick one:"
+ ui.highline.choose(*possibilities)
+ end
+ end
+
+ def available_manpages_by_basename
+ @available_manpages_by_basename ||= begin
+ available_manpages = Dir[File.expand_path("../distro/common/man/man1/*1", CHEF_ROOT)]
+ available_manpages.inject({}) do |map, manpath|
+ map[::File.basename(manpath, '.1')] = manpath
+ map
+ end
+ end
+ end
+
+ end
+ end
+end
diff --git a/chef/lib/chef/mixin/shell_out.rb b/chef/lib/chef/mixin/shell_out.rb
index 7acea42f3f..147bdb0d0a 100644
--- a/chef/lib/chef/mixin/shell_out.rb
+++ b/chef/lib/chef/mixin/shell_out.rb
@@ -24,8 +24,8 @@ class Chef
def shell_out(*command_args)
cmd = Chef::ShellOut.new(*command_args)
- if STDOUT.tty? && !Chef::Config[:daemon] && Chef::Log.info?
- cmd.live_stream ||= STDOUT
+ if STDOUT.tty? && !Chef::Config[:daemon] && Chef::Log.debug?
+ cmd.live_stream = STDOUT
end
cmd.run_command
cmd
diff --git a/chef/lib/chef/node.rb b/chef/lib/chef/node.rb
index 1cc7f9cf5c..4399e97616 100644
--- a/chef/lib/chef/node.rb
+++ b/chef/lib/chef/node.rb
@@ -650,7 +650,7 @@ class Chef
def load_attributes
cookbook_collection.values.each do |cookbook|
cookbook.segment_filenames(:attributes).each do |segment_filename|
- Chef::Log.debug("node #{name} loading cookbook #{cookbook.name}'s attribute file #{segment_filename}")
+ Chef::Log.debug("Node #{name} loading cookbook #{cookbook.name}'s attribute file #{segment_filename}")
self.from_file(segment_filename)
end
end
diff --git a/chef/lib/chef/provider/cookbook_file.rb b/chef/lib/chef/provider/cookbook_file.rb
index 082d2140f9..1eb47c34c2 100644
--- a/chef/lib/chef/provider/cookbook_file.rb
+++ b/chef/lib/chef/provider/cookbook_file.rb
@@ -31,18 +31,18 @@ class Chef
@current_resource
end
-
def action_create
assert_enclosing_directory_exists!
if file_cache_location && content_stale?
- Chef::Log.debug("content of file #{@new_resource.path} requires update")
+ Chef::Log.debug("#{@new_resource} has new contents")
backup_new_resource
Tempfile.open(::File.basename(@new_resource.name)) do |staging_file|
- Chef::Log.debug("staging #{file_cache_location} to #{staging_file.path}")
+ Chef::Log.debug("#{@new_resource} staging #{file_cache_location} to #{staging_file.path}")
staging_file.close
stage_file_to_tmpdir(staging_file.path)
FileUtils.mv(staging_file.path, @new_resource.path)
end
+ Chef::Log.info("#{@new_resource} created file #{@new_resource.path}")
@new_resource.updated_by_last_action(true)
else
set_all_access_controls(@new_resource.path)
@@ -52,7 +52,7 @@ class Chef
def action_create_if_missing
if ::File.exists?(@new_resource.path)
- Chef::Log.debug("File #{@new_resource.path} exists, taking no action.")
+ Chef::Log.debug("#{@new_resource} exists at #{@new_resource.path} taking no action.")
else
action_create
end
@@ -87,7 +87,6 @@ class Chef
def backup_new_resource
if ::File.exists?(@new_resource.path)
- Chef::Log.info "Backing up current file at #{@new_resource.path}"
backup @new_resource.path
end
end
diff --git a/chef/lib/chef/provider/cron.rb b/chef/lib/chef/provider/cron.rb
index f84eb2d33c..08c214b768 100644
--- a/chef/lib/chef/provider/cron.rb
+++ b/chef/lib/chef/provider/cron.rb
@@ -132,7 +132,7 @@ class Chef
status = popen4("crontab -u #{@new_resource.user} -", :waitlast => true) do |pid, stdin, stdout, stderr|
crontab.each_line { |line| stdin.puts "#{line}" }
end
- Chef::Log.info("Updated cron '#{@new_resource.name}'")
+ Chef::Log.info("#{@new_resource} updated crontab entry")
@new_resource.updated_by_last_action(true)
else
unless @cron_empty
@@ -146,7 +146,7 @@ class Chef
status = popen4("crontab -u #{@new_resource.user} -", :waitlast => true) do |pid, stdin, stdout, stderr|
crontab.each_line { |line| stdin.puts "#{line}" }
end
- Chef::Log.info("Added cron '#{@new_resource.name}'")
+ Chef::Log.info("#{@new_resource} added crontab entry")
@new_resource.updated_by_last_action(true)
end
end
@@ -176,7 +176,7 @@ class Chef
status = popen4("crontab -u #{@new_resource.user} -", :waitlast => true) do |pid, stdin, stdout, stderr|
crontab.each_line { |line| stdin.puts "#{line}" }
end
- Chef::Log.debug("Deleted cron '#{@new_resource.name}'")
+ Chef::Log.info("#{@new_resource} deleted crontab entry")
@new_resource.updated_by_last_action(true)
end
end
diff --git a/chef/lib/chef/provider/cron/solaris.rb b/chef/lib/chef/provider/cron/solaris.rb
index 84827661e3..54e361a159 100644
--- a/chef/lib/chef/provider/cron/solaris.rb
+++ b/chef/lib/chef/provider/cron/solaris.rb
@@ -51,7 +51,7 @@ class Chef
crontab_lines.each do |line|
case line.chomp
when "# Chef Name: #{@new_resource.name}"
- Chef::Log.debug("Found cron '#{@new_resource.name}'")
+ Chef::Log.debug("#{@new_resource} found cron '#{@new_resource.name}'")
cron_found = true
@cron_exists = true
next
@@ -82,9 +82,9 @@ class Chef
next
end
end
- Chef::Log.debug("Cron '#{@new_resource.name}' not found") unless @cron_exists
+ Chef::Log.debug("#{@new_resource} cron '#{@new_resource.name}' not found") unless @cron_exists
elsif status.exitstatus == 1
- Chef::Log.debug("Cron empty for '#{@new_resource.user}'")
+ Chef::Log.debug("#{@new_resource} cron empty for '#{@new_resource.user}'")
@cron_empty = true
end
@@ -125,7 +125,7 @@ class Chef
if @cron_exists
unless compare_cron
- Chef::Log.debug("Skipping existing cron entry '#{@new_resource.name}'")
+ Chef::Log.debug("#{@new_resource} skipping existing cron entry '#{@new_resource.name}'")
return
end
status = popen4("crontab -l #{@new_resource.user}") do |pid, stdin, stdout, stderr|
@@ -148,7 +148,7 @@ class Chef
end
status = write_crontab(crontab)
- Chef::Log.info("Updated cron '#{@new_resource.name}'")
+ Chef::Log.info("#{@new_resource} updated crontab entry")
else
unless @cron_empty
status = popen4("crontab -l #{@new_resource.user}") do |pid, stdin, stdout, stderr|
@@ -158,7 +158,7 @@ class Chef
crontab << newcron
status = write_crontab(crontab)
- Chef::Log.info("Added cron '#{@new_resource.name}'")
+ Chef::Log.info("#{@new_resource} added crontab entry")
end
end
@@ -185,7 +185,7 @@ class Chef
end
status = write_crontab(crontab)
- Chef::Log.info("Deleted cron '#{@new_resource.name}'")
+ Chef::Log.info("#{@new_resource} deleted crontab entry")
end
end
diff --git a/chef/lib/chef/provider/deploy.rb b/chef/lib/chef/provider/deploy.rb
index 3bcb46bbc0..93d1dc4507 100644
--- a/chef/lib/chef/provider/deploy.rb
+++ b/chef/lib/chef/provider/deploy.rb
@@ -61,9 +61,8 @@ class Chef
def action_deploy
if all_releases.include?(release_path)
if all_releases[-1] == release_path
- Chef::Log.debug("Already deployed app at #{release_path}, and it is the latest revision. Use action :force_deploy to re-deploy this revision.")
+ Chef::Log.debug("#{@new_resource} is the latest version")
else
- Chef::Log.info("Already deployed app at #{release_path}. Rolling back to it - use action :force_deploy to re-checkout this revision.")
action_rollback
end
else
@@ -74,8 +73,8 @@ class Chef
def action_force_deploy
if all_releases.include?(release_path)
- Chef::Log.info("Already deployed app at #{release_path}, forcing.")
FileUtils.rm_rf(release_path)
+ Chef::Log.info("#{@new_resource} forcing deploy of already deployed app at #{release_path}")
end
deploy
@new_resource.updated_by_last_action(true)
@@ -93,12 +92,12 @@ class Chef
releases_to_nuke = [ all_releases.last ]
end
- Chef::Log.info "rolling back to previous release: #{release_path}"
+ Chef::Log.info "#{@new_resource} rolling back to previous release #{release_path}"
symlink
- Chef::Log.info "restarting with previous release"
+ Chef::Log.info "#{@new_resource} restarting with previous release"
restart
releases_to_nuke.each do |i|
- Chef::Log.info "Removing release: #{i}"
+ Chef::Log.info "#{@new_resource} removing release: #{i}"
FileUtils.rm_rf i
release_deleted(i)
end
@@ -106,7 +105,6 @@ class Chef
end
def deploy
- Chef::Log.info "deploying branch: #{@new_resource.branch}"
enforce_ownership
update_cached_repo
copy_cached_repo
@@ -120,13 +118,14 @@ class Chef
restart
callback(:after_restart, @new_resource.after_restart)
cleanup!
+ Chef::Log.info "#{@new_resource} deployed to #{@new_resource.deploy_to}"
end
def callback(what, callback_code=nil)
@collection = Chef::ResourceCollection.new
case callback_code
when Proc
- Chef::Log.info "Running callback #{what} code block"
+ Chef::Log.info "#{@new_resource} running callback #{what}"
recipe_eval(&callback_code)
when String
callback_file = "#{release_path}/#{callback_code}"
@@ -152,26 +151,25 @@ class Chef
"#{key_and_val.first}='#{key_and_val.last}'"
end.join(" ")
- Chef::Log.info "Migrating: running #{@new_resource.migration_command} as #{@new_resource.user} " +
- "with environment #{env_info}"
- run_command(run_options(:command => @new_resource.migration_command, :cwd=>release_path))
+ Chef::Log.info "#{@new_resource} migrating #{@new_resource.user} with environment #{env_info}"
+ run_command(run_options(:command => @new_resource.migration_command, :cwd=>release_path, :command_log_level => :info))
end
end
def symlink
- Chef::Log.info "Symlinking"
purge_tempfiles_from_current_release
link_tempfiles_to_current_release
link_current_release_to_production
+ Chef::Log.info "#{@new_resource} updated symlinks"
end
def restart
if restart_cmd = @new_resource.restart_command
if restart_cmd.kind_of?(Proc)
- Chef::Log.info("Restarting app with embedded recipe")
+ Chef::Log.info("#{@new_resource} restarting app with embedded recipe")
recipe_eval(&restart_cmd)
else
- Chef::Log.info("Restarting app with #{@new_resource.restart_command} in #{@new_resource.current_path}")
+ Chef::Log.info("#{@new_resource} restarting app")
run_command(run_options(:command => @new_resource.restart_command, :cwd => @new_resource.current_path))
end
end
@@ -179,7 +177,7 @@ class Chef
def cleanup!
all_releases[0..-6].each do |old_release|
- Chef::Log.info "Removing old release #{old_release}"
+ Chef::Log.info "#{@new_resource} removing old release #{old_release}"
FileUtils.rm_rf(old_release)
release_deleted(old_release)
end
@@ -199,52 +197,70 @@ class Chef
end
def run_scm_sync
- Chef::Log.info "updating the cached checkout"
@scm_provider.action_sync
end
def svn_force_export
- Chef::Log.info "exporting source repository to #{@new_resource.destination}"
+ Chef::Log.info "#{@new_resource} exporting source repository"
@scm_provider.action_force_export
end
def copy_cached_repo
- Chef::Log.info "copying the cached checkout to #{release_path}"
FileUtils.mkdir_p(@new_resource.deploy_to + "/releases")
run_command(:command => "cp -RPp #{::File.join(@new_resource.destination, ".")} #{release_path}")
+ Chef::Log.info "#{@new_resource} copied the cached checkout to #{release_path}"
release_created(release_path)
end
def enforce_ownership
- Chef::Log.info "ensuring proper ownership"
FileUtils.chown_R(@new_resource.user, @new_resource.group, @new_resource.deploy_to)
+ Chef::Log.info("#{@new_resource} set user to #{@new_resource.user}") if @new_resource.user
+ Chef::Log.info("#{@new_resource} set group to #{@new_resource.group}") if @new_resource.group
end
def link_current_release_to_production
- Chef::Log.info "Linking release #{release_path} into production at #{@new_resource.current_path}"
FileUtils.rm_f(@new_resource.current_path)
- FileUtils.ln_sf(release_path, @new_resource.current_path)
+ begin
+ FileUtils.ln_sf(release_path, @new_resource.current_path)
+ rescue => e
+ raise Chef::Exceptions::FileNotFound.new("Cannot symlink current release to production: #{e.message}")
+ end
+ Chef::Log.info "#{@new_resource} linked release #{release_path} into production at #{@new_resource.current_path}"
enforce_ownership
end
def run_symlinks_before_migrate
links_info = @new_resource.symlink_before_migrate.map { |src, dst| "#{src} => #{dst}" }.join(", ")
- Chef::Log.info "Making pre-migration symlinks: #{links_info}"
@new_resource.symlink_before_migrate.each do |src, dest|
- FileUtils.ln_sf(@new_resource.shared_path + "/#{src}", release_path + "/#{dest}")
+ begin
+ FileUtils.ln_sf(@new_resource.shared_path + "/#{src}", release_path + "/#{dest}")
+ rescue => e
+ raise Chef::Exceptions::FileNotFound.new("Cannot symlink #{@new_resource.shared_path}/#{src} to #{release_path}/#{dest} before migrate: #{e.message}")
+ end
end
+ Chef::Log.info "#{@new_resource} made pre-migration symlinks"
end
def link_tempfiles_to_current_release
dirs_info = @new_resource.create_dirs_before_symlink.join(",")
- Chef::Log.info("creating directories before symlink: #{dirs_info}")
- @new_resource.create_dirs_before_symlink.each { |dir| FileUtils.mkdir_p(release_path + "/#{dir}") }
+ @new_resource.create_dirs_before_symlink.each do |dir|
+ begin
+ FileUtils.mkdir_p(release_path + "/#{dir}")
+ rescue => e
+ raise Chef::Exceptions::FileNotFound.new("Cannot create directory #{dir}: #{e.message}")
+ end
+ end
+ Chef::Log.info("#{@new_resource} created directories before symlinking #{dirs_info}")
links_info = @new_resource.symlinks.map { |src, dst| "#{src} => #{dst}" }.join(", ")
- Chef::Log.info("Linking shared paths into current release: #{links_info}")
@new_resource.symlinks.each do |src, dest|
- FileUtils.ln_sf(@new_resource.shared_path + "/#{src}", release_path + "/#{dest}")
+ begin
+ FileUtils.ln_sf(@new_resource.shared_path + "/#{src}", release_path + "/#{dest}")
+ rescue => e
+ raise Chef::Exceptions::FileNotFound.new("Cannot symlink shared data #{@new_resource.shared_path}/#{src} to #{release_path}/#{dest}: #{e.message}")
+ end
end
+ Chef::Log.info("#{@new_resource} linked shared paths into current release: #{links_info}")
run_symlinks_before_migrate
enforce_ownership
end
@@ -254,8 +270,8 @@ class Chef
def purge_tempfiles_from_current_release
log_info = @new_resource.purge_before_symlink.join(", ")
- Chef::Log.info("Purging directories in checkout #{log_info}")
@new_resource.purge_before_symlink.each { |dir| FileUtils.rm_rf(release_path + "/#{dir}") }
+ Chef::Log.info("#{@new_resource} purged directories in checkout #{log_info}")
end
protected
@@ -303,13 +319,20 @@ class Chef
run_opts[:user] = @new_resource.user if @new_resource.user
run_opts[:group] = @new_resource.group if @new_resource.group
run_opts[:environment] = @new_resource.environment if @new_resource.environment
+ run_opts[:command_log_prepend] = @new_resource.to_s
+ run_opts[:command_log_level] ||= :debug
+ if run_opts[:command_log_level] == :info
+ if STDOUT.tty? && !Chef::Config[:daemon] && Chef::Log.info?
+ run_opts[:live_stream] = STDOUT
+ end
+ end
run_opts
end
def run_callback_from_file(callback_file)
if ::File.exist?(callback_file)
Dir.chdir(release_path) do
- Chef::Log.info "running deploy hook: #{callback_file}"
+ Chef::Log.info "#{@new_resource} running deploy hook #{callback_file}"
recipe_eval { from_file(callback_file) }
end
end
diff --git a/chef/lib/chef/provider/directory.rb b/chef/lib/chef/provider/directory.rb
index e15bfa2af2..884a2ae185 100644
--- a/chef/lib/chef/provider/directory.rb
+++ b/chef/lib/chef/provider/directory.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.
@@ -36,31 +36,31 @@ class Chef
@current_resource.mode("%o" % (cstats.mode & 007777))
end
@current_resource
- end
-
+ end
+
def action_create
unless ::File.exists?(@new_resource.path)
- Chef::Log.info("Creating #{@new_resource} at #{@new_resource.path}")
if @new_resource.recursive == true
::FileUtils.mkdir_p(@new_resource.path)
else
::Dir.mkdir(@new_resource.path)
end
@new_resource.updated_by_last_action(true)
+ Chef::Log.info("#{@new_resource} created directory #{@new_resource.path}")
end
set_owner if @new_resource.owner != nil
set_group if @new_resource.group != nil
set_mode if @new_resource.mode != nil
end
-
+
def action_delete
if ::File.directory?(@new_resource.path) && ::File.writable?(@new_resource.path)
if @new_resource.recursive == true
- Chef::Log.info("Deleting #{@new_resource} recursively at #{@new_resource.path}")
FileUtils.rm_rf(@new_resource.path)
+ Chef::Log.info("#{@new_resource} deleted #{@new_resource.path} recursively")
else
- Chef::Log.info("Deleting #{@new_resource} at #{@new_resource.path}")
::Dir.delete(@new_resource.path)
+ Chef::Log.info("#{@new_resource} deleted #{@new_resource.path}")
end
@new_resource.updated_by_last_action(true)
else
diff --git a/chef/lib/chef/provider/env.rb b/chef/lib/chef/provider/env.rb
index a6796bfeed..e857d74d68 100644
--- a/chef/lib/chef/provider/env.rb
+++ b/chef/lib/chef/provider/env.rb
@@ -39,14 +39,14 @@ class Chef
@current_resource.value(env_value(@new_resource.key_name))
else
@key_exists = false
- Chef::Log.debug("#{@new_resource}: key does not exist")
+ Chef::Log.debug("#{@new_resource} key does not exist")
end
@current_resource
end
def env_value(key_name)
- raise Chef::Exceptions::Env, "#{@new_resource} - #{self.to_s} provider does not implement env_value!"
+ raise Chef::Exceptions::Env, "#{self.to_s} provider does not implement env_value!"
end
def env_key_exists(key_name)
@@ -73,12 +73,12 @@ class Chef
if @key_exists
if compare_value
modify_env
- Chef::Log.info("Altered #{@new_resource}")
+ Chef::Log.info("#{@new_resource} altered")
@new_resource.updated_by_last_action(true)
end
else
create_env
- Chef::Log.debug("Created #{@new_resource}")
+ Chef::Log.info("#{@new_resource} created")
@new_resource.updated_by_last_action(true)
end
end
@@ -92,7 +92,7 @@ class Chef
def delete_element
return false unless @new_resource.delim #no delim: delete the key
if compare_value
- Chef::Log.debug("#{@new_resource}: element '#{@new_resource.value}' does not exist")
+ Chef::Log.debug("#{@new_resource} element '#{@new_resource.value}' does not exist")
return true #do not delete the key
else
new_value =
@@ -105,7 +105,7 @@ class Chef
else
old_value = @new_resource.value(new_value)
create_env
- Chef::Log.debug("Deleted #{old_value} element")
+ Chef::Log.debug("#{@new_resource} deleted #{old_value} element")
@new_resource.updated_by_last_action(true)
return true #we removed the element and updated; do not delete the key
end
@@ -115,7 +115,7 @@ class Chef
def action_delete
if @key_exists && !delete_element
delete_env
- Chef::Log.debug("Deleted #{@new_resource}")
+ Chef::Log.info("#{@new_resource} deleted")
@new_resource.updated_by_last_action(true)
end
end
@@ -124,8 +124,8 @@ class Chef
if @key_exists
if compare_value
modify_env
+ Chef::Log.info("#{@new_resource} modified")
@new_resource.updated_by_last_action(true)
- Chef::Log.info("Modified #{@new_resource}")
end
else
raise Chef::Exceptions::Env, "Cannot modify #{@new_resource} - key does not exist!"
diff --git a/chef/lib/chef/provider/erl_call.rb b/chef/lib/chef/provider/erl_call.rb
index 10fc8c3c27..d3ac253bc4 100644
--- a/chef/lib/chef/provider/erl_call.rb
+++ b/chef/lib/chef/provider/erl_call.rb
@@ -58,15 +58,15 @@ class Chef
begin
pid, stdin, stdout, stderr = popen4(command, :waitlast => true)
- Chef::Log.debug("Running erl_call[#{@new_resource.name}]")
- Chef::Log.debug("erl_call[#{@new_resource.name}] command: #{command}")
- Chef::Log.debug("erl_call[#{@new_resource.name}] code: #{@new_resource.code}")
+ Chef::Log.debug("#{@new_resource} running")
+ Chef::Log.debug("#{@new_resource} command: #{command}")
+ Chef::Log.debug("#{@new_resource} code: #{@new_resource.code}")
@new_resource.code.each_line { |line| stdin.puts(line.chomp) }
stdin.close
- Chef::Log.debug("erl_call[#{@new_resource.name}] output: ")
+ Chef::Log.debug("#{@new_resource} output: ")
stdout_output = ""
stdout.each_line { |line| stdout_output << line }
@@ -86,9 +86,10 @@ class Chef
raise Chef::Exceptions::ErlCall, stdout_output
end
- Chef::Log.debug("#{stdout_output}")
- Chef::Log.info("Ran erl_call[#{@new_resource.name}] successfully")
+ @new_resource.updated_by_last_action(true)
+ Chef::Log.debug("#{@new_resource} #{stdout_output}")
+ Chef::Log.info("#{@new_resouce} ran successfully")
ensure
Process.wait(pid) if pid
end
diff --git a/chef/lib/chef/provider/execute.rb b/chef/lib/chef/provider/execute.rb
index 8349c732b8..fde4f965e5 100644
--- a/chef/lib/chef/provider/execute.rb
+++ b/chef/lib/chef/provider/execute.rb
@@ -35,7 +35,7 @@ class Chef
if sentinel_file = @new_resource.creates
if ::File.exists?(sentinel_file)
- Chef::Log.info("Skipping #{self} - sentinel file #{sentinel_file} exists.")
+ Chef::Log.debug("#{@new_resource} sentinel file #{sentinel_file} exists - nothing to do")
return false
end
end
@@ -49,10 +49,15 @@ class Chef
opts[:group] = @new_resource.group if @new_resource.group
opts[:cwd] = @new_resource.cwd if @new_resource.cwd
opts[:umask] = @new_resource.umask if @new_resource.umask
+ opts[:command_log_level] = :info
+ opts[:command_log_prepend] = @new_resource.to_s
+ if STDOUT.tty? && !Chef::Config[:daemon] && Chef::Log.info?
+ opts[:live_stream] = STDOUT
+ end
result = shell_out!(@new_resource.command, opts)
@new_resource.updated_by_last_action(true)
- Chef::Log.info("Ran #{@new_resource} successfully")
+ Chef::Log.info("#{@new_resource} ran successfully")
end
end
diff --git a/chef/lib/chef/provider/file.rb b/chef/lib/chef/provider/file.rb
index b516cc47c8..fca6b292e6 100644
--- a/chef/lib/chef/provider/file.rb
+++ b/chef/lib/chef/provider/file.rb
@@ -63,9 +63,9 @@ class Chef
# Set the content of the file, assuming it is not set correctly already.
def set_content
unless compare_content
- Chef::Log.info("Setting content for #{@new_resource}")
backup @new_resource.path if ::File.exists?(@new_resource.path)
::File.open(@new_resource.path, "w") {|f| f.write @new_resource.content }
+ Chef::Log.info("#{@new_resource} contents updated")
@new_resource.updated_by_last_action(true)
end
end
@@ -88,9 +88,9 @@ class Chef
# Set the ownership on the file, assuming it is not set correctly already.
def set_owner
unless compare_owner
- Chef::Log.info("Setting owner to #{@set_user_id} for #{@new_resource}")
@set_user_id = negative_complement(@set_user_id)
::File.chown(@set_user_id, nil, @new_resource.path)
+ Chef::Log.info("#{@new_resource} owner changed to #{@set_user_id}")
@new_resource.updated_by_last_action(true)
end
end
@@ -111,9 +111,9 @@ class Chef
def set_group
unless compare_group
- Chef::Log.info("Setting group to #{@set_group_id} for #{@new_resource}")
@set_group_id = negative_complement(@set_group_id)
::File.chown(nil, @set_group_id, @new_resource.path)
+ Chef::Log.info("#{@new_resource} group changed to #{@set_group_id}")
@new_resource.updated_by_last_action(true)
end
end
@@ -129,9 +129,9 @@ class Chef
def set_mode
unless compare_mode && @new_resource.mode != nil
- Chef::Log.info("Setting mode to #{sprintf("%o" % octal_mode(@new_resource.mode))} for #{@new_resource}")
# CHEF-174, bad mojo around treating integers as octal. If a string is passed, we try to do the "right" thing
::File.chmod(octal_mode(@new_resource.mode), @new_resource.path)
+ Chef::Log.info("#{@new_resource} mode changed to #{sprintf("%o" % octal_mode(@new_resource.mode))}")
@new_resource.updated_by_last_action(true)
end
end
@@ -139,9 +139,9 @@ class Chef
def action_create
assert_enclosing_directory_exists!
unless ::File.exists?(@new_resource.path)
- Chef::Log.info("Creating #{@new_resource} at #{@new_resource.path}")
::File.open(@new_resource.path, "w+") {|f| f.write @new_resource.content }
@new_resource.updated_by_last_action(true)
+ Chef::Log.info("#{@new_resource} created file #{@new_resource.path}")
else
set_content unless @new_resource.content.nil?
end
@@ -158,8 +158,8 @@ class Chef
if ::File.exists?(@new_resource.path)
if ::File.writable?(@new_resource.path)
backup unless ::File.symlink?(@new_resource.path)
- Chef::Log.info("Deleting #{@new_resource} at #{@new_resource.path}")
::File.delete(@new_resource.path)
+ Chef::Log.info("#{@new_resource} deleted file at #{@new_resource.path}")
@new_resource.updated_by_last_action(true)
else
raise "Cannot delete #{@new_resource} at #{@new_resource_path}!"
@@ -170,8 +170,8 @@ class Chef
def action_touch
action_create
time = Time.now
- Chef::Log.info("Updating #{@new_resource} with new atime/mtime of #{time}")
::File.utime(time, time, @new_resource.path)
+ Chef::Log.info("#{@new_resource} updated atime and mtime to #{time}")
@new_resource.updated_by_last_action(true)
end
@@ -188,8 +188,8 @@ class Chef
prefix = Chef::Config[:file_backup_path].to_s
backup_path = ::File.join(prefix, backup_filename)
FileUtils.mkdir_p(::File.dirname(backup_path)) if Chef::Config[:file_backup_path]
- Chef::Log.info("Backing up #{@new_resource} to #{backup_path}")
FileUtils.cp(file, backup_path, :preserve => true)
+ Chef::Log.info("#{@new_resource} backed up to #{backup_path}")
# Clean up after the number of backups
slice_number = @new_resource.backup
@@ -197,8 +197,8 @@ class Chef
if backup_files.length >= @new_resource.backup
remainder = backup_files.slice(slice_number..-1)
remainder.each do |backup_to_delete|
- Chef::Log.info("Removing backup of #{@new_resource} at #{backup_to_delete}")
FileUtils.rm(backup_to_delete)
+ Chef::Log.info("#{@new_resource} removed backup at #{backup_to_delete}")
end
end
end
diff --git a/chef/lib/chef/provider/git.rb b/chef/lib/chef/provider/git.rb
index 24f4b08ba6..025ba68e2d 100644
--- a/chef/lib/chef/provider/git.rb
+++ b/chef/lib/chef/provider/git.rb
@@ -44,7 +44,7 @@ class Chef
enable_submodules
@new_resource.updated_by_last_action(true)
else
- Chef::Log.info "Taking no action, checkout destination #{@new_resource.destination} already exists or is a non-empty directory"
+ Chef::Log.debug "#{@new_resource} checkout destination #{@new_resource.destination} already exists or is a non-empty directory"
end
end
@@ -63,7 +63,7 @@ class Chef
unless current_revision_matches_target_revision?
fetch_updates
enable_submodules
- Chef::Log.info "#{@new_resource} updated to revision: #{target_revision}"
+ Chef::Log.info "#{@new_resource} updated to revision #{target_revision}"
@new_resource.updated_by_last_action(true)
end
@@ -90,6 +90,7 @@ class Chef
end
def find_current_revision
+ Chef::Log.debug("#{@new_resource} finding current git revision")
if ::File.exist?(::File.join(cwd, ".git"))
# 128 is returned when we're not in a git repo. this is fine
result = shell_out!('git rev-parse HEAD', :cwd => cwd, :returns => [0,128]).stdout.strip
@@ -104,24 +105,24 @@ class Chef
args << "-o #{remote}" unless remote == 'origin'
args << "--depth #{@new_resource.depth}" if @new_resource.depth
- Chef::Log.info "Cloning repo #{@new_resource.repository} to #{@new_resource.destination}"
+ Chef::Log.info "#{@new_resource} cloning repo #{@new_resource.repository} to #{@new_resource.destination}"
clone_cmd = "git clone #{args.join(' ')} #{@new_resource.repository} #{@new_resource.destination}"
- shell_out!(clone_cmd, run_options)
+ shell_out!(clone_cmd, run_options(:command_log_level => :info))
end
def checkout
sha_ref = target_revision
- Chef::Log.info "Checking out branch: #{@new_resource.revision} reference: #{sha_ref}"
# checkout into a local branch rather than a detached HEAD
shell_out!("git checkout -b deploy #{sha_ref}", run_options(:cwd => @new_resource.destination))
+ Chef::Log.info "#{@new_resource} checked out branch: #{@new_resource.revision} reference: #{sha_ref}"
end
def enable_submodules
if @new_resource.enable_submodules
- Chef::Log.info "Enabling git submodules"
+ Chef::Log.info "#{@new_resource} enabling git submodules"
command = "git submodule init && git submodule update"
- shell_out!(command, run_options(:cwd => @new_resource.destination))
+ shell_out!(command, run_options(:cwd => @new_resource.destination, :command_log_level => :info))
end
end
@@ -143,7 +144,7 @@ class Chef
def setup_remote_tracking_branches
command = []
- Chef::Log.info "Configuring remote tracking branches for repository #{@new_resource.repository} "+
+ Chef::Log.debug "#{@new_resource} configuring remote tracking branches for repository #{@new_resource.repository} "+
"at remote #{@new_resource.remote}"
command << "git config remote.#{@new_resource.remote}.url #{@new_resource.repository}"
command << "git config remote.#{@new_resource.remote}.fetch +refs/heads/*:refs/remotes/#{@new_resource.remote}/*"
@@ -170,6 +171,7 @@ class Chef
alias :revision_slug :target_revision
def remote_resolve_reference
+ Chef::Log.debug("#{@new_resource} resolving remote reference")
command = git('ls-remote', @new_resource.repository, @new_resource.revision)
shell_out!(command, run_options).stdout
end
@@ -180,6 +182,13 @@ class Chef
run_opts[:user] = @new_resource.user if @new_resource.user
run_opts[:group] = @new_resource.group if @new_resource.group
run_opts[:environment] = {"GIT_SSH" => @new_resource.ssh_wrapper} if @new_resource.ssh_wrapper
+ run_opts[:command_log_prepend] = @new_resource.to_s
+ run_opts[:command_log_level] ||= :debug
+ if run_opts[:command_log_level] == :info
+ if STDOUT.tty? && !Chef::Config[:daemon] && Chef::Log.info?
+ run_opts[:live_stream] = STDOUT
+ end
+ end
run_opts
end
diff --git a/chef/lib/chef/provider/group.rb b/chef/lib/chef/provider/group.rb
index 72fb518553..a9cea02107 100644
--- a/chef/lib/chef/provider/group.rb
+++ b/chef/lib/chef/provider/group.rb
@@ -41,7 +41,7 @@ class Chef
group_info = Etc.getgrnam(@new_resource.group_name)
rescue ArgumentError => e
@group_exists = false
- Chef::Log.debug("#{@new_resource}: group does not exist")
+ Chef::Log.debug("#{@new_resource} group does not exist")
end
if group_info
@@ -77,12 +77,12 @@ class Chef
case @group_exists
when false
create_group
- Chef::Log.info("Created #{@new_resource}")
+ Chef::Log.info("#{@new_resource} created")
@new_resource.updated_by_last_action(true)
else
if compare_group
manage_group
- Chef::Log.info("Altered #{@new_resource}")
+ Chef::Log.info("#{@new_resource} altered")
@new_resource.updated_by_last_action(true)
end
end
@@ -92,7 +92,7 @@ class Chef
if @group_exists
remove_group
@new_resource.updated_by_last_action(true)
- Chef::Log.info("Removed #{@new_resource}")
+ Chef::Log.info("#{@new_resource} removed")
end
end
@@ -100,7 +100,7 @@ class Chef
if @group_exists && compare_group
manage_group
@new_resource.updated_by_last_action(true)
- Chef::Log.info("Managed #{@new_resource}")
+ Chef::Log.info("#{@new_resource} managed")
end
end
@@ -109,7 +109,7 @@ class Chef
if compare_group
manage_group
@new_resource.updated_by_last_action(true)
- Chef::Log.info("Modified #{@new_resource}")
+ Chef::Log.info("#{@new_resource} modified")
end
else
raise Chef::Exceptions::Group, "Cannot modify #{@new_resource} - group does not exist!"
diff --git a/chef/lib/chef/provider/group/aix.rb b/chef/lib/chef/provider/group/aix.rb
index 14318671b4..9dedef351a 100644
--- a/chef/lib/chef/provider/group/aix.rb
+++ b/chef/lib/chef/provider/group/aix.rb
@@ -56,7 +56,7 @@ class Chef
{ :gid => "id" }.sort { |a,b| a[0] <=> b[0] }.each do |field, option|
if @current_resource.send(field) != @new_resource.send(field)
if @new_resource.send(field)
- Chef::Log.debug("#{@new_resource}: setting #{field.to_s} to #{@new_resource.send(field)}")
+ Chef::Log.debug("#{@new_resource} setting #{field.to_s} to #{@new_resource.send(field)}")
opts << " '#{option}=#{@new_resource.send(field)}'"
end
end
diff --git a/chef/lib/chef/provider/group/dscl.rb b/chef/lib/chef/provider/group/dscl.rb
index 566e73addb..0f739c6de2 100644
--- a/chef/lib/chef/provider/group/dscl.rb
+++ b/chef/lib/chef/provider/group/dscl.rb
@@ -74,12 +74,12 @@ class Chef
def set_members
unless @new_resource.append
- Chef::Log.debug("#{@new_resource}: removing group members #{@current_resource.members.join(' ')}") unless @current_resource.members.empty?
+ Chef::Log.debug("#{@new_resource} removing group members #{@current_resource.members.join(' ')}") unless @current_resource.members.empty?
safe_dscl("create /Groups/#{@new_resource.group_name} GroupMembers ''") # clear guid list
safe_dscl("create /Groups/#{@new_resource.group_name} GroupMembership ''") # clear user list
end
unless @new_resource.members.empty?
- Chef::Log.debug("#{@new_resource}: setting group members #{@new_resource.members.join(', ')}")
+ Chef::Log.debug("#{@new_resource} setting group members #{@new_resource.members.join(', ')}")
safe_dscl("append /Groups/#{@new_resource.group_name} GroupMembership #{@new_resource.members.join(' ')}")
end
end
diff --git a/chef/lib/chef/provider/group/gpasswd.rb b/chef/lib/chef/provider/group/gpasswd.rb
index d97864d583..6dfe597179 100644
--- a/chef/lib/chef/provider/group/gpasswd.rb
+++ b/chef/lib/chef/provider/group/gpasswd.rb
@@ -36,15 +36,15 @@ class Chef
unless @new_resource.members.empty?
if(@new_resource.append)
@new_resource.members.each do |member|
- Chef::Log.debug("#{@new_resource}: appending member #{member} to group #{@new_resource.group_name}")
+ Chef::Log.debug("#{@new_resource} appending member #{member} to group #{@new_resource.group_name}")
shell_out!("gpasswd -a #{member} #{@new_resource.group_name}")
end
else
- Chef::Log.debug("#{@new_resource}: setting group members to #{@new_resource.members.join(', ')}")
+ Chef::Log.debug("#{@new_resource} setting group members to #{@new_resource.members.join(', ')}")
shell_out!("gpasswd -M #{@new_resource.members.join(',')} #{@new_resource.group_name}")
end
else
- Chef::Log.debug("#{@new_resource}: not changing group members, the group has no members")
+ Chef::Log.debug("#{@new_resource} not changing group members, the group has no members")
end
end
end
diff --git a/chef/lib/chef/provider/group/groupadd.rb b/chef/lib/chef/provider/group/groupadd.rb
index 79b8b85523..339e86ecfc 100644
--- a/chef/lib/chef/provider/group/groupadd.rb
+++ b/chef/lib/chef/provider/group/groupadd.rb
@@ -67,8 +67,8 @@ class Chef
{ :gid => "-g" }.sort { |a,b| a[0] <=> b[0] }.each do |field, option|
if @current_resource.send(field) != @new_resource.send(field)
if @new_resource.send(field)
- Chef::Log.debug("#{@new_resource}: setting #{field.to_s} to #{@new_resource.send(field)}")
opts << " #{option} '#{@new_resource.send(field)}'"
+ Chef::Log.debug("#{@new_resource} set #{field.to_s} to #{@new_resource.send(field)}")
end
end
end
diff --git a/chef/lib/chef/provider/group/pw.rb b/chef/lib/chef/provider/group/pw.rb
index d7eec00b27..19ef1a95a1 100644
--- a/chef/lib/chef/provider/group/pw.rb
+++ b/chef/lib/chef/provider/group/pw.rb
@@ -65,14 +65,14 @@ class Chef
opt = ""
unless @new_resource.members.empty?
opt << " -M #{@new_resource.members.join(',')}"
- Chef::Log.debug("#{@new_resource}: setting group members to #{@new_resource.members.join(', ')}")
+ Chef::Log.debug("#{@new_resource} setting group members to #{@new_resource.members.join(', ')}")
else
# New member list is empty so we should delete any old group members
unless @current_resource.members.empty?
opt << " -d #{@current_resource.members.join(',')}"
- Chef::Log.debug("#{@new_resource}: removing group members #{@current_resource.members.join(', ')}")
+ Chef::Log.debug("#{@new_resource} removing group members #{@current_resource.members.join(', ')}")
else
- Chef::Log.debug("#{@new_resource}: not changing group members, the group has no members")
+ Chef::Log.debug("#{@new_resource} not changing group members, the group has no members")
end
end
opt
diff --git a/chef/lib/chef/provider/group/usermod.rb b/chef/lib/chef/provider/group/usermod.rb
index 21010e2b43..ffc494c2e2 100644
--- a/chef/lib/chef/provider/group/usermod.rb
+++ b/chef/lib/chef/provider/group/usermod.rb
@@ -40,7 +40,7 @@ class Chef
unless @new_resource.members.empty?
if(@new_resource.append)
@new_resource.members.each do |member|
- Chef::Log.debug("#{@new_resource}: appending member #{member} to group #{@new_resource.group_name}")
+ Chef::Log.debug("#{@new_resource} appending member #{member} to group #{@new_resource.group_name}")
run_command(:command => "usermod #{append_flags} #{@new_resource.group_name} #{member}" )
end
@@ -48,7 +48,7 @@ class Chef
raise Chef::Exceptions::Group, "setting group members directly is not supported by #{self.to_s}"
end
else
- Chef::Log.debug("#{@new_resource}: not changing group members, the group has no members")
+ Chef::Log.debug("#{@new_resource} not changing group members, the group has no members")
end
end
end
diff --git a/chef/lib/chef/provider/group/windows.rb b/chef/lib/chef/provider/group/windows.rb
index 3c3b713631..88280408cd 100644
--- a/chef/lib/chef/provider/group/windows.rb
+++ b/chef/lib/chef/provider/group/windows.rb
@@ -40,7 +40,7 @@ class Chef
members = @net_group.local_get_members
rescue => e
@group_exists = false
- Chef::Log.debug("#{@new_resource}: group does not exist")
+ Chef::Log.debug("#{@new_resource} group does not exist")
end
if members
diff --git a/chef/lib/chef/provider/ifconfig.rb b/chef/lib/chef/provider/ifconfig.rb
index d323085537..98159c8d90 100644
--- a/chef/lib/chef/provider/ifconfig.rb
+++ b/chef/lib/chef/provider/ifconfig.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.
@@ -76,12 +76,12 @@ class Chef
command << " metric #{@new_resource.metric}" if @new_resource.metric
command << " mtu #{@new_resource.mtu}" if @new_resource.mtu
end
-
+
run_command(
:command => command
)
+ Chef::Log.info("#{@new_resource} added")
@new_resource.updated_by_last_action(true)
-
end
# Write out the config files
@@ -92,13 +92,14 @@ class Chef
# check to see if load_current_resource found the interface
if @current_resource.device
command = "ifconfig #{@new_resource.device} down"
-
+
run_command(
:command => command
)
+ Chef::Log.info("#{@new_resource} deleted")
@new_resource.updated_by_last_action(true)
else
- Chef::Log.debug("Ifconfig #{@current_resource} does not exist")
+ Chef::Log.debug("#{@new_resource} does not exist - nothing to do")
end
end
@@ -121,12 +122,13 @@ class Chef
network_file = ::File.new("/etc/sysconfig/network-scripts/ifcfg-#{@new_resource.device}", "w")
network_file.puts(template.result(b))
network_file.close
+ Chef::Log.info("#{@new_resource} created configuration file")
when "debian","ubuntu"
# template
when "slackware"
# template
end
- end
+ end
end
end
end
diff --git a/chef/lib/chef/provider/link.rb b/chef/lib/chef/provider/link.rb
index 330ebd29e3..f5ba0d67f4 100644
--- a/chef/lib/chef/provider/link.rb
+++ b/chef/lib/chef/provider/link.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.
@@ -36,12 +36,12 @@ class Chef
end
private :negative_complement
-
+
def load_current_resource
@current_resource = Chef::Resource::Link.new(@new_resource.name)
@current_resource.target_file(@new_resource.target_file)
@current_resource.link_type(@new_resource.link_type)
- if @new_resource.link_type == :symbolic
+ if @new_resource.link_type == :symbolic
if ::File.exists?(@current_resource.target_file) && ::File.symlink?(@current_resource.target_file)
@current_resource.to(
::File.expand_path(::File.readlink(@current_resource.target_file))
@@ -64,68 +64,71 @@ class Chef
end
end
@current_resource
- end
-
+ end
+
# Compare the ownership of a symlink. Returns true if they are the same, false if they are not.
def compare_owner
return false if @new_resource.owner.nil?
-
+
@set_user_id = case @new_resource.owner
when /^\d+$/, Integer
@new_resource.owner.to_i
else
- # This raises an ArgumentError if you can't find the user
+ # This raises an ArgumentError if you can't find the user
Etc.getpwnam(@new_resource.owner).uid
end
-
+
@set_user_id == @current_resource.owner
end
-
+
# Set the ownership on the symlink, assuming it is not set correctly already.
def set_owner
unless compare_owner
- Chef::Log.info("Setting owner to #{@set_user_id} for #{@new_resource}")
@set_user_id = negative_complement(@set_user_id)
::File.lchown(@set_user_id, nil, @new_resource.target_file)
+ Chef::Log.info("#{@new_resource} owner changed to #{@set_user_id}")
@new_resource.updated_by_last_action(true)
end
end
-
+
# Compares the group of a symlink. Returns true if they are the same, false if they are not.
def compare_group
return false if @new_resource.group.nil?
-
+
@set_group_id = case @new_resource.group
when /^\d+$/, Integer
@new_resource.group.to_i
else
Etc.getgrnam(@new_resource.group).gid
end
-
+
@set_group_id == @current_resource.group
end
-
+
def set_group
unless compare_group
- Chef::Log.info("Setting group to #{@set_group_id} for #{@new_resource}")
@set_group_id = negative_complement(@set_group_id)
::File.lchown(nil, @set_group_id, @new_resource.target_file)
+ Chef::Log.info("#{@new_resource} group changed to #{@set_group_id}")
@new_resource.updated_by_last_action(true)
end
end
-
+
def action_create
if @current_resource.to != ::File.expand_path(@new_resource.to, @new_resource.target_file)
- Chef::Log.info("Creating a #{@new_resource.link_type} link from #{@new_resource.to} -> #{@new_resource.target_file} for #{@new_resource}")
if @new_resource.link_type == :symbolic
unless (::File.symlink?(@new_resource.target_file) && ::File.readlink(@new_resource.target_file) == @new_resource.to)
if ::File.symlink?(@new_resource.target_file) || ::File.exist?(@new_resource.target_file)
::File.unlink(@new_resource.target_file)
end
::File.symlink(@new_resource.to,@new_resource.target_file)
- end
+ Chef::Log.debug("#{@new_resource} created #{@new_resource.link_type} link from #{@new_resource.to} -> #{@new_resource.target_file}")
+ Chef::Log.info("#{@new_resource} created")
+ end
elsif @new_resource.link_type == :hard
::File.link(@new_resource.to, @new_resource.target_file)
+ Chef::Log.debug("#{@new_resource} created #{@new_resource.link_type} link from #{@new_resource.to} -> #{@new_resource.target_file}")
+ Chef::Log.info("#{@new_resource} created")
end
@new_resource.updated_by_last_action(true)
end
@@ -134,21 +137,21 @@ class Chef
set_group unless @new_resource.group.nil?
end
end
-
+
def action_delete
- if @new_resource.link_type == :symbolic
+ if @new_resource.link_type == :symbolic
if ::File.symlink?(@new_resource.target_file)
- Chef::Log.info("Deleting #{@new_resource} at #{@new_resource.target_file}")
::File.delete(@new_resource.target_file)
+ Chef::Log.info("#{@new_resource} deleted")
@new_resource.updated_by_last_action(true)
elsif ::File.exists?(@new_resource.target_file)
raise Chef::Exceptions::Link, "Cannot delete #{@new_resource} at #{@new_resource.target_file}! Not a symbolic link."
end
- elsif @new_resource.link_type == :hard
+ elsif @new_resource.link_type == :hard
if ::File.exists?(@new_resource.target_file)
if ::File.exists?(@new_resource.to) && ::File.stat(@current_resource.target_file).ino == ::File.stat(@new_resource.to).ino
- Chef::Log.info("Deleting #{@new_resource} at #{@new_resource.target_file}")
::File.delete(@new_resource.target_file)
+ Chef::Log.info("#{@new_resource} deleted")
@new_resource.updated_by_last_action(true)
else
raise Chef::Exceptions::Link, "Cannot delete #{@new_resource} at #{@new_resource.target_file}! Not a hard link."
diff --git a/chef/lib/chef/provider/mdadm.rb b/chef/lib/chef/provider/mdadm.rb
index 22cbfb5391..4c1905f6fc 100644
--- a/chef/lib/chef/provider/mdadm.rb
+++ b/chef/lib/chef/provider/mdadm.rb
@@ -34,7 +34,7 @@ class Chef
def load_current_resource
@current_resource = Chef::Resource::Mdadm.new(@new_resource.name)
@current_resource.raid_device(@new_resource.raid_device)
- Chef::Log.debug("Checking for software raid device #{@current_resource.raid_device}")
+ Chef::Log.debug("#{@new_resource} checking for software raid device #{@current_resource.raid_device}")
mdadm = shell_out!("mdadm --detail --scan")
exists = mdadm.stdout.include?(@new_resource.raid_device)
@@ -52,37 +52,37 @@ class Chef
def action_create
unless @current_resource.exists
command = "yes | mdadm --create #{@new_resource.raid_device} --chunk=#{@new_resource.chunk} --level #{@new_resource.level} --raid-devices #{@new_resource.devices.length} #{@new_resource.devices.join(" ")}"
- Chef::Log.debug("mdadm command: #{command}")
+ Chef::Log.debug("#{@new_resource} mdadm command: #{command}")
#pid, stdin, stdout, stderr = popen4(command)
shell_out!(command)
- Chef::Log.info("Created mdadm raid device (#{@new_resource.raid_device})")
+ Chef::Log.info("#{@new_resource} created raid device (#{@new_resource.raid_device})")
@new_resource.updated_by_last_action(true)
else
- Chef::Log.debug("mdadm raid device already exists, skipping create (#{@new_resource.raid_device})")
+ Chef::Log.debug("#{@new_resource} raid device already exists, skipping create (#{@new_resource.raid_device})")
end
end
def action_assemble
unless @current_resource.exists
command = "yes | mdadm --assemble #{@new_resource.raid_device} #{@new_resource.devices.join(" ")}"
- Chef::Log.debug("mdadm command: #{command}")
+ Chef::Log.debug("#{@new_resource} mdadm command: #{command}")
shell_out!(command)
- Chef::Log.info("Assembled mdadm raid device (#{@new_resource.raid_device})")
+ Chef::Log.info("#{@new_resource} assembled raid device (#{@new_resource.raid_device})")
@new_resource.updated_by_last_action(true)
else
- Chef::Log.debug("mdadm raid device already exists, skipping assemble (#{@new_resource.raid_device})")
+ Chef::Log.debug("#{@new_resource} raid device already exists, skipping assemble (#{@new_resource.raid_device})")
end
end
def action_stop
if @current_resource.exists
command = "yes | mdadm --stop #{@new_resource.raid_device}"
- Chef::Log.debug("mdadm command: #{command}")
+ Chef::Log.debug("#{@new_resource} mdadm command: #{command}")
shell_out!(command)
- Chef::Log.info("Stopped mdadm raid device (#{@new_resource.raid_device})")
+ Chef::Log.info("#{@new_resource} stopped raid device (#{@new_resource.raid_device})")
@new_resource.updated_by_last_action(true)
else
- Chef::Log.debug("mdadm raid device doesn't exist (#{@new_resource.raid_device})")
+ Chef::Log.debug("#{@new_resource} raid device doesn't exist (#{@new_resource.raid_device}) - not stopping")
end
end
diff --git a/chef/lib/chef/provider/mount.rb b/chef/lib/chef/provider/mount.rb
index af5813c8b1..c9004d20ea 100644
--- a/chef/lib/chef/provider/mount.rb
+++ b/chef/lib/chef/provider/mount.rb
@@ -28,27 +28,25 @@ class Chef
def action_mount
unless @current_resource.mounted
- Chef::Log.debug("#{@new_resource}: attempting to mount")
status = mount_fs()
if status
@new_resource.updated_by_last_action(true)
- Chef::Log.info("#{@new_resource}: mounted successfully")
+ Chef::Log.info("#{@new_resource} mounted")
end
else
- Chef::Log.debug("#{@new_resource}: not mounting, already mounted")
+ Chef::Log.debug("#{@new_resource} is already mounted")
end
end
def action_umount
if @current_resource.mounted
- Chef::Log.debug("#{@new_resource}: attempting to unmount")
status = umount_fs()
if status
@new_resource.updated_by_last_action(true)
- Chef::Log.info("#{@new_resource}: unmounted successfully")
+ Chef::Log.info("#{@new_resource} unmounted")
end
else
- Chef::Log.debug("#{@new_resource}: not unmounting, already unmounted")
+ Chef::Log.debug("#{@new_resource} is already unmounted")
end
end
@@ -57,14 +55,13 @@ class Chef
raise Chef::Exceptions::UnsupportedAction, "#{self.to_s} does not support :remount"
else
if @current_resource.mounted
- Chef::Log.debug("#{@new_resource}: attempting to remount")
status = remount_fs()
if status
@new_resource.updated_by_last_action(true)
- Chef::Log.info("#{@new_resource}: remounted successfully")
+ Chef::Log.info("#{@new_resource} remounted")
end
else
- Chef::Log.debug("#{@new_resource}: not mounted, not remounting")
+ Chef::Log.debug("#{@new_resource} not mounted, nothing to remount")
end
end
end
@@ -74,9 +71,9 @@ class Chef
status = enable_fs
if status
@new_resource.updated_by_last_action(true)
- Chef::Log.info("#{@new_resource}: enabled successfully")
+ Chef::Log.info("#{@new_resource} enabled")
else
- Chef::Log.debug("#{@new_resource}: not enabling, already enabled")
+ Chef::Log.debug("#{@new_resource} already enabled")
end
end
end
@@ -86,9 +83,9 @@ class Chef
status = disable_fs
if status
@new_resource.updated_by_last_action(true)
- Chef::Log.info("#{@new_resource}: disabled successfully")
+ Chef::Log.info("#{@new_resource} disabled")
else
- Chef::Log.debug("#{@new_resource}: not disabling, already disabled")
+ Chef::Log.debug("#{@new_resource} already disabled")
end
end
end
diff --git a/chef/lib/chef/provider/mount/mount.rb b/chef/lib/chef/provider/mount/mount.rb
index 8c5c3480f2..c0b370b02c 100644
--- a/chef/lib/chef/provider/mount/mount.rb
+++ b/chef/lib/chef/provider/mount/mount.rb
@@ -94,18 +94,18 @@ class Chef
end
command << " #{@new_resource.mount_point}"
shell_out!(command)
- Chef::Log.info("Mounted #{@new_resource.mount_point}")
+ Chef::Log.debug("#{@new_resource} is mounted at #{@new_resource.mount_point}")
else
- Chef::Log.debug("#{@new_resource.mount_point} is already mounted.")
+ Chef::Log.debug("#{@new_resource} is already mounted at #{@new_resource.mount_point}")
end
end
def umount_fs
if @current_resource.mounted
shell_out!("umount #{@new_resource.mount_point}")
- Chef::Log.info("Unmounted #{@new_resource.mount_point}")
+ Chef::Log.debug("#{@new_resource} is no longer mounted at #{@new_resource.mount_point}")
else
- Chef::Log.debug("#{@new_resource.mount_point} is not mounted.")
+ Chef::Log.debug("#{@new_resource} is not mounted at #{@new_resource.mount_point}")
end
end
@@ -114,19 +114,19 @@ class Chef
shell_out!("mount -o remount #{@new_resource.mount_point}")
@new_resource.updated_by_last_action(true)
- Chef::Log.info("Remounted #{@new_resource.mount_point}")
+ Chef::Log.debug("#{@new_resource} is remounted at #{@new_resource.mount_point}")
elsif @current_resource.mounted
umount_fs
sleep 1
mount_fs
else
- Chef::Log.debug("#{@new_resource.mount_point} is not mounted.")
+ Chef::Log.debug("#{@new_resource} is not mounted at #{@new_resource.mount_point} - nothing to do")
end
end
def enable_fs
if @current_resource.enabled && mount_options_unchanged?
- Chef::Log.debug("#{@new_resource.mount_point} is already enabled.")
+ Chef::Log.debug("#{@new_resource} is already enabled - nothing to do")
return nil
end
@@ -137,7 +137,7 @@ class Chef
end
::File.open("/etc/fstab", "a") do |fstab|
fstab.puts("#{device_fstab} #{@new_resource.mount_point} #{@new_resource.fstype} #{@new_resource.options.nil? ? "defaults" : @new_resource.options.join(",")} #{@new_resource.dump} #{@new_resource.pass}")
- Chef::Log.info("Enabled #{@new_resource.mount_point}")
+ Chef::Log.debug("#{@new_resource} is enabled at #{@new_resource.mount_point}")
end
end
@@ -149,7 +149,7 @@ class Chef
::File.readlines("/etc/fstab").reverse_each do |line|
if !found && line =~ /^#{device_fstab_regex}\s+#{Regexp.escape(@new_resource.mount_point)}/
found = true
- Chef::Log.debug("Removing #{@new_resource.mount_point} from fstab")
+ Chef::Log.debug("#{@new_resource} is removed from fstab")
next
else
contents << line
@@ -160,7 +160,7 @@ class Chef
contents.reverse_each { |line| fstab.puts line}
end
else
- Chef::Log.debug("#{@new_resource.mount_point} is not enabled")
+ Chef::Log.debug("#{@new_resource} is not enabled - nothing to do")
end
end
diff --git a/chef/lib/chef/provider/mount/windows.rb b/chef/lib/chef/provider/mount/windows.rb
index 7c57624572..dced0d3596 100644
--- a/chef/lib/chef/provider/mount/windows.rb
+++ b/chef/lib/chef/provider/mount/windows.rb
@@ -60,17 +60,18 @@ class Chef
def mount_fs
unless @current_resource.mounted
@mount.add(@new_resource.device)
+ Chef::Log.debug("#{@new_resource} is mounted at #{@new_resource.mount_point}")
else
- Chef::Log.debug("#{@new_resource.mount_point} is already mounted.")
+ Chef::Log.debug("#{@new_resource} is already mounted at #{@new_resource.mount_point}")
end
end
def umount_fs
if @current_resource.mounted
@mount.delete
- Chef::Log.info("Unmounted #{@new_resource.mount_point}")
+ Chef::Log.debug("#{@new_resource} is no longer mounted at #{@new_resource.mount_point}")
else
- Chef::Log.debug("#{@new_resource.mount_point} is not mounted.")
+ Chef::Log.debug("#{@new_resource} is not mounted at #{@new_resource.mount_point}")
end
end
diff --git a/chef/lib/chef/provider/ohai.rb b/chef/lib/chef/provider/ohai.rb
index 33d2bd12d6..c34ba7dc8d 100644
--- a/chef/lib/chef/provider/ohai.rb
+++ b/chef/lib/chef/provider/ohai.rb
@@ -33,8 +33,9 @@ class Chef
else
ohai.all_plugins
end
-
node.automatic_attrs.merge! ohai.data
+ Chef::Log.info("#{@new_resource} reloaded")
+ @new_resource.updated_by_last_action(true)
end
end
end
diff --git a/chef/lib/chef/provider/package.rb b/chef/lib/chef/provider/package.rb
index 1cee587164..0526a6083d 100644
--- a/chef/lib/chef/provider/package.rb
+++ b/chef/lib/chef/provider/package.rb
@@ -43,6 +43,7 @@ class Chef
elsif @current_resource.version == nil
install_version = candidate_version
else
+ Chef::Log.debug("#{@new_resource} is already installed - nothing to do")
return
end
@@ -50,7 +51,6 @@ class Chef
raise(Chef::Exceptions::Package, "No version specified, and no candidate version available for #{@new_resource.package_name}")
end
- Chef::Log.info("Installing #{@new_resource} version #{install_version}")
# We need to make sure we handle the preseed file
if @new_resource.response_file
@@ -61,25 +61,29 @@ class Chef
if status
@new_resource.updated_by_last_action(true)
end
+ Chef::Log.info("#{@new_resource} installed version #{install_version}")
end
def action_upgrade
if @current_resource.version != candidate_version
orig_version = @current_resource.version || "uninstalled"
- Chef::Log.info("Upgrading #{@new_resource} version from #{orig_version} to #{candidate_version}")
status = upgrade_package(@new_resource.package_name, candidate_version)
if status
@new_resource.updated_by_last_action(true)
end
+ Chef::Log.info("#{@new_resource} upgraded from #{orig_version} to #{candidate_version}")
+ else
+ Chef::Log.debug("#{@new_resource} is at the latest version - nothing to do")
end
end
def action_remove
if removing_package?
- Chef::Log.info("Removing #{@new_resource}")
remove_package(@current_resource.package_name, @new_resource.version)
@new_resource.updated_by_last_action(true)
+ Chef::Log.info("#{@new_resource} removed")
else
+ Chef::Log.debug("#{@new_resource} package does not exist - nothing to do")
end
end
@@ -97,9 +101,9 @@ class Chef
def action_purge
if removing_package?
- Chef::Log.info("Purging #{@new_resource}")
purge_package(@current_resource.package_name, @new_resource.version)
@new_resource.updated_by_last_action(true)
+ Chef::Log.info("#{@new_resource} purged")
end
end
@@ -125,8 +129,8 @@ class Chef
def get_preseed_file(name, version)
resource = preseed_resource(name, version)
- Chef::Log.debug("Fetching preseed file to #{resource.path}")
resource.run_action('create')
+ Chef::Log.debug("#{@new_resource} fetched preseed file to #{resource.path}")
if resource.updated_by_last_action?
resource.path
@@ -141,7 +145,7 @@ class Chef
# The full path where the preseed file will be stored
cache_seed_to = "#{file_cache_dir}/#{name}-#{version}.seed"
- Chef::Log.debug("Fetching preseed file to #{cache_seed_to}")
+ Chef::Log.debug("#{@new_resource} fetching preseed file to #{cache_seed_to}")
remote_file = Chef::Resource::CookbookFile.new(cache_seed_to, run_context)
remote_file.cookbook_name = @new_resource.cookbook_name
diff --git a/chef/lib/chef/provider/package/apt.rb b/chef/lib/chef/provider/package/apt.rb
index 0a01c5ae66..5f7ff0d204 100644
--- a/chef/lib/chef/provider/package/apt.rb
+++ b/chef/lib/chef/provider/package/apt.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.
@@ -23,27 +23,27 @@ require 'chef/resource/package'
class Chef
class Provider
class Package
- class Apt < Chef::Provider::Package
-
+ class Apt < Chef::Provider::Package
+
def load_current_resource
@current_resource = Chef::Resource::Package.new(@new_resource.name)
@current_resource.package_name(@new_resource.package_name)
-
- Chef::Log.debug("Checking apt-cache policy for #{@new_resource.package_name}")
+
+ Chef::Log.debug("#{@new_resource} checking apt-cache policy")
status = popen4("apt-cache policy #{@new_resource.package_name}") do |pid, stdin, stdout, stderr|
stdout.each do |line|
case line
when /^\s{2}Installed: (.+)$/
installed_version = $1
if installed_version == '(none)'
- Chef::Log.debug("Current version is nil")
+ Chef::Log.debug("#{@new_resource} current version is nil")
@current_resource.version(nil)
else
- Chef::Log.debug("Current version is #{installed_version}")
+ Chef::Log.debug("#{@new_resource} current version is #{installed_version}")
@current_resource.version(installed_version)
end
when /^\s{2}Candidate: (.+)$/
- Chef::Log.debug("Candidate version is #{$1}")
+ Chef::Log.debug("#{@new_resource} candidate version is #{$1}")
@candidate_version = $1
end
end
@@ -52,14 +52,14 @@ class Chef
unless status.exitstatus == 0
raise Chef::Exceptions::Package, "apt-cache failed - #{status.inspect}!"
end
-
+
if @candidate_version == "(none)"
raise Chef::Exceptions::Package, "apt does not have a version of package #{@new_resource.package_name}"
end
-
+
@current_resource
end
-
+
def install_package(name, version)
run_command_with_systems_locale(
:command => "apt-get -q -y#{expand_options(@new_resource.options)} install #{name}=#{version}",
@@ -68,11 +68,11 @@ class Chef
}
)
end
-
+
def upgrade_package(name, version)
install_package(name, version)
end
-
+
def remove_package(name, version)
run_command_with_systems_locale(
:command => "apt-get -q -y#{expand_options(@new_resource.options)} remove #{@new_resource.package_name}",
@@ -81,7 +81,7 @@ class Chef
}
)
end
-
+
def purge_package(name, version)
run_command_with_systems_locale(
:command => "apt-get -q -y#{expand_options(@new_resource.options)} purge #{@new_resource.package_name}",
@@ -90,11 +90,11 @@ class Chef
}
)
end
-
+
def preseed_package(name, version)
preseed_file = get_preseed_file(name, version)
if preseed_file
- Chef::Log.info("Pre-seeding #{@new_resource} with package installation instructions.")
+ Chef::Log.info("#{@new_resource} pre-seeding package installation instructions")
run_command_with_systems_locale(
:command => "debconf-set-selections #{preseed_file}",
:environment => {
@@ -103,7 +103,7 @@ class Chef
)
end
end
-
+
end
end
end
diff --git a/chef/lib/chef/provider/package/dpkg.rb b/chef/lib/chef/provider/package/dpkg.rb
index 52aa4b39d8..8beb14af29 100644
--- a/chef/lib/chef/provider/package/dpkg.rb
+++ b/chef/lib/chef/provider/package/dpkg.rb
@@ -45,7 +45,7 @@ class Chef
end
# Get information from the package if supplied
- Chef::Log.debug("Checking dpkg status for #{@new_resource.package_name}")
+ Chef::Log.debug("#{@new_resource} checking dpkg status")
status = popen4("dpkg-deb -W #{@new_resource.source}") do |pid, stdin, stdout, stderr|
stdout.each_line do |line|
if pkginfo = DPKG_INFO.match(line)
@@ -58,7 +58,7 @@ class Chef
# Check to see if it is installed
package_installed = nil
- Chef::Log.debug("Checking install state for #{@current_resource.package_name}")
+ Chef::Log.debug("#{@new_resource} checking install state")
status = popen4("dpkg -s #{@current_resource.package_name}") do |pid, stdin, stdout, stderr|
stdout.each_line do |line|
case line
@@ -66,7 +66,7 @@ class Chef
package_installed = true
when DPKG_VERSION
if package_installed
- Chef::Log.debug("Current version is #{$1}")
+ Chef::Log.debug("#{@new_resource} current version is #{$1}")
@current_resource.version($1)
end
end
diff --git a/chef/lib/chef/provider/package/easy_install.rb b/chef/lib/chef/provider/package/easy_install.rb
index a2f24942c6..64723db938 100644
--- a/chef/lib/chef/provider/package/easy_install.rb
+++ b/chef/lib/chef/provider/package/easy_install.rb
@@ -95,10 +95,10 @@ class Chef
end
if package_version == @new_resource.version
- Chef::Log.debug("#{@new_resource.package_name} at version #{@new_resource.version}")
+ Chef::Log.debug("#{@new_resource} at version #{@new_resource.version}")
@current_resource.version(@new_resource.version)
else
- Chef::Log.debug("#{@new_resource.package_name} at version #{package_version}")
+ Chef::Log.debug("#{@new_resource} at version #{package_version}")
@current_resource.version(package_version)
end
diff --git a/chef/lib/chef/provider/package/freebsd.rb b/chef/lib/chef/provider/package/freebsd.rb
index 4205bb2006..ed45e73d72 100644
--- a/chef/lib/chef/provider/package/freebsd.rb
+++ b/chef/lib/chef/provider/package/freebsd.rb
@@ -69,10 +69,10 @@ class Chef
@current_resource.package_name(@new_resource.package_name)
@current_resource.version(current_installed_version)
- Chef::Log.debug("Current version is #{@current_resource.version}") if @current_resource.version
+ Chef::Log.debug("#{@new_resource} current version is #{@current_resource.version}") if @current_resource.version
@candidate_version = ports_candidate_version
- Chef::Log.debug("Ports candidate version is #{@candidate_version}") if @candidate_version
+ Chef::Log.debug("#{@new_resource} ports candidate version is #{@candidate_version}") if @candidate_version
@current_resource
end
@@ -97,13 +97,12 @@ class Chef
shell_out!("make -DBATCH install", :cwd => port_path, :env => nil).status
when /^http/, /^ftp/
shell_out!("pkg_add -r #{package_name}", :env => { "PACKAGESITE" => @new_resource.source, 'LC_ALL' => nil }).status
- Chef::Log.info("Installed package #{package_name} from: #{@new_resource.source}")
+ Chef::Log.debug("#{@new_resource} installed from: #{@new_resource.source}")
when /^\//
shell_out!("pkg_add #{@new_resource.name}", :env => { "PKG_PATH" => @new_resource.source , 'LC_ALL'=>nil}).status
- Chef::Log.info("Installed package #{@new_resource.name} from: #{@new_resource.source}")
+ Chef::Log.debug("#{@new_resource} installed from: #{@new_resource.source}")
else
shell_out!("pkg_add -r #{latest_link_name}", :env => nil).status
- Chef::Log.info("Installed package #{package_name}")
end
end
end
diff --git a/chef/lib/chef/provider/package/macports.rb b/chef/lib/chef/provider/package/macports.rb
index ca720d4b12..ceee848f54 100644
--- a/chef/lib/chef/provider/package/macports.rb
+++ b/chef/lib/chef/provider/package/macports.rb
@@ -7,7 +7,7 @@ class Chef
@current_resource.package_name(@new_resource.package_name)
@current_resource.version(current_installed_version)
- Chef::Log.debug("Current version is #{@current_resource.version}") if @current_resource.version
+ Chef::Log.debug("#{@new_resource} current version is #{@current_resource.version}") if @current_resource.version
@candidate_version = macports_candidate_version
@@ -15,7 +15,7 @@ class Chef
raise Chef::Exceptions::Package, "Could not get a candidate version for this package -- #{@new_resource.name} does not seem to be a valid package!"
end
- Chef::Log.debug("MacPorts candidate version is #{@candidate_version}") if @candidate_version
+ Chef::Log.debug("#{@new_resource} candidate version is #{@candidate_version}") if @candidate_version
@current_resource
end
diff --git a/chef/lib/chef/provider/package/pacman.rb b/chef/lib/chef/provider/package/pacman.rb
index b4320eb7da..5885254ff0 100644
--- a/chef/lib/chef/provider/package/pacman.rb
+++ b/chef/lib/chef/provider/package/pacman.rb
@@ -31,12 +31,12 @@ class Chef
@current_resource.version(nil)
- Chef::Log.debug("Checking pacman for #{@new_resource.package_name}")
+ Chef::Log.debug("#{@new_resource} checking pacman for #{@new_resource.package_name}")
status = popen4("pacman -Qi #{@new_resource.package_name}") do |pid, stdin, stdout, stderr|
stdout.each do |line|
case line
when /^Version(\s?)*: (.+)$/
- Chef::Log.debug("Current version is #{$2}")
+ Chef::Log.debug("#{@new_resource} current version is #{$2}")
@current_resource.version($2)
end
end
diff --git a/chef/lib/chef/provider/package/portage.rb b/chef/lib/chef/provider/package/portage.rb
index 6a5bba3a5e..3fba975106 100644
--- a/chef/lib/chef/provider/package/portage.rb
+++ b/chef/lib/chef/provider/package/portage.rb
@@ -46,7 +46,7 @@ class Chef
raise Chef::Exceptions::Package, "Multiple packages found for #{@new_resource.package_name}: #{atoms.join(" ")}. Specify a category."
elsif versions.size == 1
@current_resource.version(versions.first.last)
- Chef::Log.debug("Got current version #{$1}")
+ Chef::Log.debug("#{@new_resource} current version #{$1}")
end
@current_resource
diff --git a/chef/lib/chef/provider/package/rpm.rb b/chef/lib/chef/provider/package/rpm.rb
index 2421461c8d..0de3fd138d 100644
--- a/chef/lib/chef/provider/package/rpm.rb
+++ b/chef/lib/chef/provider/package/rpm.rb
@@ -34,7 +34,7 @@ class Chef
raise Chef::Exceptions::Package, "Package #{@new_resource.name} not found: #{@new_resource.source}"
end
- Chef::Log.debug("Checking rpm status for #{@new_resource.package_name}")
+ Chef::Log.debug("#{@new_resource} checking rpm status")
status = popen4("rpm -qp --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' #{@new_resource.source}") do |pid, stdin, stdout, stderr|
stdout.each do |line|
case line
@@ -50,12 +50,12 @@ class Chef
end
end
- Chef::Log.debug("Checking install state for #{@current_resource.package_name}")
+ Chef::Log.debug("#{@new_resource} checking install state")
status = popen4("rpm -q --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' #{@current_resource.package_name}") do |pid, stdin, stdout, stderr|
stdout.each do |line|
case line
when /([\w\d_.-]+)\s([\w\d_.-]+)/
- Chef::Log.debug("Current version is #{$2}")
+ Chef::Log.debug("#{@new_resource} current version is #{$2}")
@current_resource.version($2)
end
end
diff --git a/chef/lib/chef/provider/package/rubygems.rb b/chef/lib/chef/provider/package/rubygems.rb
index 33eb11166a..1a9c700aba 100644
--- a/chef/lib/chef/provider/package/rubygems.rb
+++ b/chef/lib/chef/provider/package/rubygems.rb
@@ -100,11 +100,11 @@ class Chef
def candidate_version_from_file(gem_dependency, source)
spec = Gem::Format.from_file_by_path(source).spec
if spec.satisfies_requirement?(gem_dependency)
- logger.debug {"found candidate gem version #{spec.version} from local gem package #{source}"}
+ logger.debug {"#{@new_resource} found candidate gem version #{spec.version} from local gem package #{source}"}
spec.version
else
# This is probably going to end badly...
- logger.warn { "The gem package #{source} does not satisfy the requirements #{gem_dependency.to_s}" }
+ logger.warn { "#{@new_resource} gem package #{source} does not satisfy the requirements #{gem_dependency.to_s}" }
nil
end
end
@@ -133,11 +133,11 @@ class Chef
spec = spec_with_source && spec_with_source[0]
version = spec && spec_with_source[0].version
if version
- logger.debug { "Found gem #{spec.name} version #{version} for platform #{spec.platform} from #{spec_with_source[1]}" }
+ logger.debug { "#{@new_resource} found gem #{spec.name} version #{version} for platform #{spec.platform} from #{spec_with_source[1]}" }
version
else
source_list = sources.compact.empty? ? "[#{Gem.sources.join(', ')}]" : "[#{sources.join(', ')}]"
- logger.warn { "Failed to find gem #{gem_dependency} from #{source_list}" }
+ logger.warn { "#{@new_resource} failed to find gem #{gem_dependency} from #{source_list}" }
nil
end
end
@@ -328,16 +328,16 @@ class Chef
# is the current version
if !matching_installed_versions.empty?
gemspec = matching_installed_versions.last
- logger.debug { "Found installed gem #{gemspec.name} version #{gemspec.version} matching #{gem_dependency}"}
+ logger.debug { "#{@new_resource} found installed gem #{gemspec.name} version #{gemspec.version} matching #{gem_dependency}"}
gemspec
# If no version matching the requirements exists, the latest installed
# version is the current version.
elsif !all_installed_versions.empty?
gemspec = all_installed_versions.last
- logger.debug { "Newest installed version of gem #{gemspec.name} is #{gemspec.version}" }
+ logger.debug { "#{@new_resource} newest installed version of gem #{gemspec.name} is #{gemspec.version}" }
gemspec
else
- logger.debug { "No installed version found for #{gem_dependency.to_s}"}
+ logger.debug { "#{@new_resource} no installed version found for #{gem_dependency.to_s}"}
nil
end
end
diff --git a/chef/lib/chef/provider/package/solaris.rb b/chef/lib/chef/provider/package/solaris.rb
index 11dc1b484b..20b813f844 100644
--- a/chef/lib/chef/provider/package/solaris.rb
+++ b/chef/lib/chef/provider/package/solaris.rb
@@ -39,7 +39,7 @@ class Chef
raise Chef::Exceptions::Package, "Package #{@new_resource.name} not found: #{@new_resource.source}"
end
- Chef::Log.debug("Checking pkg status for #{@new_resource.package_name}")
+ Chef::Log.debug("#{@new_resource} checking pkg status")
status = popen4("pkginfo -l -d #{@new_resource.source} #{@new_resource.package_name}") do |pid, stdin, stdout, stderr|
stdout.each do |line|
case line
@@ -52,12 +52,12 @@ class Chef
raise Chef::Exceptions::Package, "Source for package #{@new_resource.name} required for action install"
end
- Chef::Log.debug("Checking install state for #{@current_resource.package_name}")
+ Chef::Log.debug("#{@new_resource} checking install state")
status = popen4("pkginfo -l #{@current_resource.package_name}") do |pid, stdin, stdout, stderr|
stdout.each do |line|
case line
when /VERSION:\s+(.+)/
- Chef::Log.debug("Package #{@current_resource.package_name} #{$1} is already installed")
+ Chef::Log.debug("#{@new_resource} version #{$1} is already installed")
@current_resource.version($1)
end
end
@@ -82,7 +82,7 @@ class Chef
when /VERSION:\s+(.+)/
@candidate_version = $1
@new_resource.version($1)
- Chef::Log.debug("candidate_version: setting install candidate version to #{@candidate_version}")
+ Chef::Log.debug("#{@new_resource} setting install candidate version to #{@candidate_version}")
end
end
end
@@ -93,17 +93,17 @@ class Chef
end
def install_package(name, version)
- Chef::Log.debug("Options: #{@new_resource.options}")
+ Chef::Log.debug("#{@new_resource} package install options: #{@new_resource.options}")
if @new_resource.options.nil?
run_command_with_systems_locale(
:command => "pkgadd -n -d #{@new_resource.source} all"
)
- Chef::Log.debug("Installed package: #{@new_resource.package_name} #{@new_resource.version} from: #{@new_resource.source}")
+ Chef::Log.debug("#{@new_resource} installed version #{@new_resource.version} from: #{@new_resource.source}")
else
run_command_with_systems_locale(
:command => "pkgadd -n#{expand_options(@new_resource.options)} -d #{@new_resource.source} all"
)
- Chef::Log.debug("Installed package: #{@new_resource.package_name} #{@new_resource.version} from: #{@new_resource.source}")
+ Chef::Log.debug("#{@new_resource} installed version #{@new_resource.version} from: #{@new_resource.source}")
end
end
@@ -112,12 +112,12 @@ class Chef
run_command_with_systems_locale(
:command => "pkgrm -n #{name}"
)
- Chef::Log.debug("Removed package #{@new_resource.package_name} #{@new_resource.version}")
+ Chef::Log.debug("#{@new_resource} removed version #{@new_resource.version}")
else
run_command_with_systems_locale(
:command => "pkgrm -n#{expand_options(@new_resource.options)} #{name}"
)
- Chef::Log.debug("Removed package #{@new_resource.package_name} #{@new_resource.version}")
+ Chef::Log.debug("#{@new_resource} removed version #{@new_resource.version}")
end
end
diff --git a/chef/lib/chef/provider/package/yum.rb b/chef/lib/chef/provider/package/yum.rb
index 615dcb194e..f57243321f 100644
--- a/chef/lib/chef/provider/package/yum.rb
+++ b/chef/lib/chef/provider/package/yum.rb
@@ -126,7 +126,7 @@ class Chef
# Expect [ { :version => "ver", :release => "rel" }, { :version => "ver", :release => "rel" }, { :version => "ver", :release => "rel" } ] ???
matching_versions.each do |ver|
- Chef::Log.debug("#{package_name}: trying to match #{desired_version} to version #{ver[:version]} and release #{ver[:release]}")
+ Chef::Log.debug("#{@new_resource} trying to match #{desired_version} to version #{ver[:version]} and release #{ver[:release]}")
if (desired_version == "#{ver[:version]}-#{ver[:release]}")
return true
end
@@ -176,7 +176,7 @@ class Chef
raise Chef::Exceptions::Package, "Package #{@new_resource.name} not found: #{@new_resource.source}"
end
- Chef::Log.debug("Checking rpm status for #{@new_resource.package_name}")
+ Chef::Log.debug("#{@new_resource} checking rpm status")
status = popen4("rpm -qp --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' #{@new_resource.source}") do |pid, stdin, stdout, stderr|
stdout.each do |line|
case line
@@ -188,7 +188,7 @@ class Chef
end
end
- Chef::Log.debug("Checking yum info for #{@new_resource.package_name}#{yum_arch}")
+ Chef::Log.debug("#{@new_resource} checking yum info for #{@new_resource.package_name}#{yum_arch}")
@yum.refresh
@@ -201,7 +201,7 @@ class Chef
else
@candidate_version = installed_version
end
- Chef::Log.debug("#{@current_resource.name}: Installed version: #{installed_version} Candidate version: #{candidate_version}")
+ Chef::Log.debug("#{@new_resource} installed version: #{installed_version} candidate version: #{candidate_version}")
@current_resource
end
diff --git a/chef/lib/chef/provider/package/zypper.rb b/chef/lib/chef/provider/package/zypper.rb
index 2a10acba73..e309abf1e3 100644
--- a/chef/lib/chef/provider/package/zypper.rb
+++ b/chef/lib/chef/provider/package/zypper.rb
@@ -35,24 +35,24 @@ class Chef
is_out_of_date=false
version=''
oud_version=''
- Chef::Log.debug("Checking zypper for #{@new_resource.package_name}")
+ Chef::Log.debug("#{@new_resource} checking zypper")
status = popen4("zypper info #{@new_resource.package_name}") do |pid, stdin, stdout, stderr|
stdout.each do |line|
case line
when /^Version: (.+)$/
version = $1
- Chef::Log.debug("zypper version=#{$1}")
+ Chef::Log.debug("#{@new_resource} version #{$1}")
when /^Installed: Yes$/
is_installed=true
- Chef::Log.debug("zypper installed true")
+ Chef::Log.debug("#{@new_resource} is installed")
when /^Installed: No$/
is_installed=false
- Chef::Log.debug("zypper installed false")
+ Chef::Log.debug("#{@new_resource} is not installed")
when /^Status: out-of-date \(version (.+) installed\)$/
is_out_of_date=true
oud_version=$1
- Chef::Log.debug("zypper out of date version=#{$1}")
+ Chef::Log.debug("#{@new_resource} out of date version #{$1}")
end
end
end
@@ -60,28 +60,22 @@ class Chef
if is_installed==false
@candidate_version=version
@current_resource.version(nil)
- Chef::Log.debug("dentro installed false");
end
if is_installed==true
if is_out_of_date==true
@current_resource.version(oud_version)
@candidate_version=version
- Chef::Log.debug("dentro installed outofdate");
else
@current_resource.version(version)
@candidate_version=version
- Chef::Log.debug("dentro installed");
end
end
-
unless status.exitstatus == 0
raise Chef::Exceptions::Package, "zypper failed - #{status.inspect}!"
end
-
- Chef::Log.debug("zypper current resource #{@current_resource}")
@current_resource
end
diff --git a/chef/lib/chef/provider/remote_directory.rb b/chef/lib/chef/provider/remote_directory.rb
index 55382981c1..2fb25ca063 100644
--- a/chef/lib/chef/provider/remote_directory.rb
+++ b/chef/lib/chef/provider/remote_directory.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.
@@ -32,8 +32,7 @@ class Chef
def action_create
super
- Chef::Log.debug("Doing a remote recursive directory transfer for #{@new_resource}")
-
+
files_to_purge = Set.new(
Dir.glob(::File.join(@new_resource.path, '**', '*'), ::File::FNM_DOTMATCH).select do |name|
name !~ /(?:^|#{Regexp.escape(::File::SEPARATOR)})\.\.?$/
@@ -45,6 +44,8 @@ class Chef
files_to_purge.delete(::File.join(@new_resource.path, cookbook_file_relative_path))
end
purge_unmanaged_files(files_to_purge)
+ Chef::Log.info("#{@new_resource} created")
+ @new_resource.updated_by_last_action(true)
end
def action_create_if_missing
@@ -59,11 +60,11 @@ class Chef
if @new_resource.purge
unmanaged_files.sort.reverse.each do |f|
if ::File.directory?(f)
- Chef::Log.debug("Removing directory #{f}")
Dir::rmdir(f)
+ Chef::Log.debug("#{@new_resource} removed directory #{f}")
else
- Chef::Log.debug("Deleting file #{f}")
::File.delete(f)
+ Chef::Log.debug("#{@new_resource} deleted file #{f}")
end
end
end
@@ -74,15 +75,15 @@ class Chef
files = cookbook.relative_filenames_in_preferred_directory(node, :files, @new_resource.source)
files.sort.reverse
end
-
+
def directory_root_in_cookbook_cache
@directory_root_in_cookbook_cache ||= begin
cookbook = run_context.cookbook_collection[resource_cookbook]
cookbook.preferred_filename_on_disk_location(node, :files, @new_resource.source, @new_resource.path)
end
end
-
- # Determine the cookbook to get the file from. If new resource sets an
+
+ # Determine the cookbook to get the file from. If new resource sets an
# explicit cookbook, use it, otherwise fall back to the implicit cookbook
# i.e., the cookbook the resource was declared in.
def resource_cookbook
@@ -91,9 +92,9 @@ class Chef
def create_cookbook_file(cookbook_file_relative_path)
full_path = ::File.join(@new_resource.path, cookbook_file_relative_path)
-
+
ensure_directory_exists(::File.dirname(full_path))
-
+
file_to_fetch = cookbook_file_resource(full_path, cookbook_file_relative_path)
if @new_resource.overwrite
file_to_fetch.run_action(:create)
@@ -102,7 +103,7 @@ class Chef
end
@new_resource.updated_by_last_action(true) if file_to_fetch.updated?
end
-
+
def cookbook_file_resource(target_path, relative_source_path)
cookbook_file = Chef::Resource::CookbookFile.new(target_path, run_context)
cookbook_file.cookbook_name = @new_resource.cookbook || @new_resource.cookbook_name
@@ -111,10 +112,10 @@ class Chef
cookbook_file.group(@new_resource.files_group) if @new_resource.files_group
cookbook_file.owner(@new_resource.files_owner) if @new_resource.files_owner
cookbook_file.backup(@new_resource.files_backup) if @new_resource.files_backup
-
+
cookbook_file
end
-
+
def ensure_directory_exists(path)
unless ::File.directory?(path)
directory_to_create = resource_for_directory(path)
diff --git a/chef/lib/chef/provider/remote_file.rb b/chef/lib/chef/provider/remote_file.rb
index 01b57c6662..8f0e78a6a9 100644
--- a/chef/lib/chef/provider/remote_file.rb
+++ b/chef/lib/chef/provider/remote_file.rb
@@ -34,18 +34,18 @@ class Chef
def action_create
assert_enclosing_directory_exists!
- Chef::Log.debug("Checking #{@new_resource} for changes")
+ Chef::Log.debug("#{@new_resource} checking for changes")
if current_resource_matches_target_checksum?
- Chef::Log.debug("File #{@new_resource} checksum matches target checksum (#{@new_resource.checksum}), not updating")
+ Chef::Log.debug("#{@new_resource} checksum matches target checksum (#{@new_resource.checksum}) - not updating")
else
Chef::REST.new(@new_resource.source, nil, nil).fetch(@new_resource.source) do |raw_file|
if matches_current_checksum?(raw_file)
- Chef::Log.debug "#{@new_resource}: Target and Source checksums are the same, taking no action"
+ Chef::Log.debug "#{@new_resource} target and source checksums are the same - not updating"
else
backup_new_resource
- Chef::Log.debug "copying remote file from origin #{raw_file.path} to destination #{@new_resource.path}"
FileUtils.cp raw_file.path, @new_resource.path
+ Chef::Log.info "#{@new_resource} updated"
@new_resource.updated_by_last_action(true)
end
end
@@ -57,7 +57,7 @@ class Chef
def action_create_if_missing
if ::File.exists?(@new_resource.path)
- Chef::Log.debug("File #{@new_resource.path} exists, taking no action.")
+ Chef::Log.debug("#{@new_resource} exists, taking no action.")
else
action_create
end
@@ -74,24 +74,23 @@ class Chef
end
def matches_current_checksum?(candidate_file)
- Chef::Log.debug "#{@new_resource}: Checking for file existence of #{@new_resource.path}"
+ Chef::Log.debug "#{@new_resource} checking for file existence of #{@new_resource.path}"
if ::File.exists?(@new_resource.path)
- Chef::Log.debug "#{@new_resource}: File exists at #{@new_resource.path}"
+ Chef::Log.debug "#{@new_resource} file exists at #{@new_resource.path}"
@new_resource.checksum(checksum(candidate_file.path))
- Chef::Log.debug "#{@new_resource}: Target checksum: #{@current_resource.checksum}"
- Chef::Log.debug "#{@new_resource}: Source checksum: #{@new_resource.checksum}"
+ Chef::Log.debug "#{@new_resource} target checksum: #{@current_resource.checksum}"
+ Chef::Log.debug "#{@new_resource} source checksum: #{@new_resource.checksum}"
@new_resource.checksum == @current_resource.checksum
else
- Chef::Log.info "#{@new_resource}: Creating #{@new_resource.path}"
+ Chef::Log.debug "#{@new_resource} creating #{@new_resource.path}"
false
end
end
def backup_new_resource
if ::File.exists?(@new_resource.path)
- Chef::Log.debug "#{@new_resource}: checksum changed from #{@current_resource.checksum} to #{@new_resource.checksum}"
- Chef::Log.info "#{@new_resource}: Updating #{@new_resource.path}"
+ Chef::Log.debug "#{@new_resource} checksum changed from #{@current_resource.checksum} to #{@new_resource.checksum}"
backup @new_resource.path
end
end
diff --git a/chef/lib/chef/provider/route.rb b/chef/lib/chef/provider/route.rb
index 8211704322..b1676f0f75 100644
--- a/chef/lib/chef/provider/route.rb
+++ b/chef/lib/chef/provider/route.rb
@@ -63,8 +63,6 @@ class Chef::Provider::Route < Chef::Provider
def load_current_resource
is_running = nil
- Chef::Log.debug("Configuring Route #{@new_resource.name}")
-
# cidr or quad dot mask
if @new_resource.netmask
new_ip = IPAddr.new("#{@new_resource.target}/#{@new_resource.netmask}")
@@ -86,7 +84,7 @@ class Chef::Provider::Route < Chef::Provider
destination = IPAddr.new(destination.scan(/../).reverse.to_s.hex, Socket::AF_INET).to_s
gateway = IPAddr.new(gateway.scan(/../).reverse.to_s.hex, Socket::AF_INET).to_s
mask = IPAddr.new(mask.scan(/../).reverse.to_s.hex, Socket::AF_INET).to_s
- Chef::Log.debug( "System has route: dest=#{destination} mask=#{mask} gw=#{gateway}")
+ Chef::Log.debug("#{@new_resource} system has route: dest=#{destination} mask=#{mask} gw=#{gateway}")
# check if what were trying to configure is already there
# use an ipaddr object with ip/mask this way we can have
@@ -94,7 +92,7 @@ class Chef::Provider::Route < Chef::Provider
# expanding bitmask by hand.
#
running_ip = IPAddr.new("#{destination}/#{mask}")
- Chef::Log.debug( "new ip: #{new_ip.inspect} running ip: #{running_ip.inspect} ")
+ Chef::Log.debug("#{@new_resource} new ip: #{new_ip.inspect} running ip: #{running_ip.inspect}")
is_running = true if running_ip == new_ip
end
route_file.close
@@ -103,13 +101,13 @@ class Chef::Provider::Route < Chef::Provider
def action_add
# check to see if load_current_resource found the route
- if is_running
- Chef::Log.debug("Route #{@new_resource.name} already active ")
+ if is_running
+ Chef::Log.debug("#{@new_resource} route already active - nothing to do")
else
command = generate_command(:add)
- Chef::Log.info("Adding route: #{command} ")
run_command( :command => command )
+ Chef::Log.info("#{@new_resource} added")
@new_resource.updated_by_last_action(true)
end
@@ -121,11 +119,11 @@ class Chef::Provider::Route < Chef::Provider
if is_running
command = generate_command(:delete)
- Chef::Log.info("Removing route: #{command}")
run_command( :command => command )
+ Chef::Log.info("#{@new_resource} removed")
@new_resource.updated_by_last_action(true)
else
- Chef::Log.debug("Route #{@new_resource.name} does not exist")
+ Chef::Log.debug("#{@new_resource} route does not exist - nothing to do")
end
end
@@ -156,7 +154,7 @@ class Chef::Provider::Route < Chef::Provider
conf.each do |k, v|
network_file = ::File.new("/etc/sysconfig/network-scripts/route-#{k}", "w")
network_file.puts(conf[k])
- Chef::Log.debug("writing route.#{k}\n#{conf[k]}")
+ Chef::Log.debug("#{@new_resource} writing route.#{k}\n#{conf[k]}")
network_file.close
end
end
diff --git a/chef/lib/chef/provider/ruby_block.rb b/chef/lib/chef/provider/ruby_block.rb
index 8b2954b34c..1e7fa7245b 100644
--- a/chef/lib/chef/provider/ruby_block.rb
+++ b/chef/lib/chef/provider/ruby_block.rb
@@ -26,6 +26,7 @@ class Chef
def action_create
@new_resource.block.call
+ Chef::Log.info("#{@new_resource} called")
@new_resource.updated_by_last_action(true)
end
end
diff --git a/chef/lib/chef/provider/service.rb b/chef/lib/chef/provider/service.rb
index 40581f07fe..678159ea55 100644
--- a/chef/lib/chef/provider/service.rb
+++ b/chef/lib/chef/provider/service.rb
@@ -32,57 +32,52 @@ class Chef
def action_enable
if @current_resource.enabled
- Chef::Log.debug("#{@new_resource}: not enabling, already enabled")
+ Chef::Log.debug("#{@new_resource} already enabled - nothing to do")
else
- Chef::Log.debug("#{@new_resource}: attempting to enable")
if enable_service
@new_resource.updated_by_last_action(true)
- Chef::Log.info("#{@new_resource}: enabled successfully")
+ Chef::Log.info("#{@new_resource} enabled")
end
end
end
def action_disable
if @current_resource.enabled
- Chef::Log.debug("#{@new_resource}: attempting to disable")
if disable_service
@new_resource.updated_by_last_action(true)
- Chef::Log.info("#{@new_resource}: disabled successfully")
+ Chef::Log.info("#{@new_resource} disabled")
end
else
- Chef::Log.debug("#{@new_resource}: not disabling, already disabled")
+ Chef::Log.debug("#{@new_resource} already disabled - nothing to do")
end
end
def action_start
unless @current_resource.running
- Chef::Log.debug("#{@new_resource}: attempting to start")
if start_service
@new_resource.updated_by_last_action(true)
- Chef::Log.info("Started service #{@new_resource} successfully")
+ Chef::Log.info("#{@new_resource} started")
end
else
- Chef::Log.debug("#{@new_resource}: not starting, already running")
+ Chef::Log.debug("#{@new_resource} already running - nothing to do")
end
end
def action_stop
if @current_resource.running
- Chef::Log.debug("#{@new_resource}: attempting to stop")
if stop_service
@new_resource.updated_by_last_action(true)
- Chef::Log.info("#{@new_resource}: stopped successfully")
+ Chef::Log.info("#{@new_resource} stopped")
end
else
- Chef::Log.debug("#{@new_resource}: not stopping, already stopped")
+ Chef::Log.debug("#{@new_resource} already stopped - nothing to do")
end
end
def action_restart
- Chef::Log.debug("#{@new_resource}: attempting to restart")
if restart_service
@new_resource.updated_by_last_action(true)
- Chef::Log.info("#{@new_resource}: restarted successfully")
+ Chef::Log.info("#{@new_resource} restarted")
end
end
@@ -91,10 +86,9 @@ class Chef
raise Chef::Exceptions::UnsupportedAction, "#{self.to_s} does not support :reload"
end
if @current_resource.running
- Chef::Log.debug("#{@new_resource}: attempting to reload")
if reload_service
@new_resource.updated_by_last_action(true)
- Chef::Log.info("#{@new_resource}: reloaded successfully")
+ Chef::Log.info("#{@new_resource} reloaded")
end
end
end
diff --git a/chef/lib/chef/provider/service/debian.rb b/chef/lib/chef/provider/service/debian.rb
index 1f5e05435e..9cdf973248 100644
--- a/chef/lib/chef/provider/service/debian.rb
+++ b/chef/lib/chef/provider/service/debian.rb
@@ -72,7 +72,7 @@ class Chef
enabled = false
priority.each { |runlevel, arguments|
- Chef::Log.debug("service[#{@current_resource.name}]: runlevel #{runlevel}, action #{arguments[0]}, priority #{arguments[1]}")
+ Chef::Log.debug("#{@new_resource} runlevel #{runlevel}, action #{arguments[0]}, priority #{arguments[1]}")
# if we are in a update-rc.d default startup runlevel && we start in this runlevel
if (2..5).include?(runlevel.to_i) && arguments[0] == :start
diff --git a/chef/lib/chef/provider/service/freebsd.rb b/chef/lib/chef/provider/service/freebsd.rb
index cdb27ce9ad..1a4aadc658 100644
--- a/chef/lib/chef/provider/service/freebsd.rb
+++ b/chef/lib/chef/provider/service/freebsd.rb
@@ -30,20 +30,19 @@ class Chef
# Determine if we're talking about /etc/rc.d or /usr/local/etc/rc.d
if ::File.exists?("/etc/rc.d/#{current_resource.service_name}")
- @init_command = "/etc/rc.d/#{current_resource.service_name}"
+ @init_command = "/etc/rc.d/#{current_resource.service_name}"
elsif ::File.exists?("/usr/local/etc/rc.d/#{current_resource.service_name}")
- @init_command = "/usr/local/etc/rc.d/#{current_resource.service_name}"
+ @init_command = "/usr/local/etc/rc.d/#{current_resource.service_name}"
else
raise Chef::Exceptions::Service, "#{@new_resource}: unable to locate the rc.d script"
end
- Chef::Log.debug("#{@current_resource.name} found at #{@init_command}")
-
- if @new_resource.supports[:status]
- Chef::Log.debug("#{@new_resource} supports status, checking state")
+ Chef::Log.debug("#{@current_resource} found at #{@init_command}")
+ if @new_resource.supports[:status]
begin
if run_command(:command => "#{@init_command} status") == 0
@current_resource.running true
+ Chef::Log.debug("#{@new_resource} is running")
end
rescue Chef::Exceptions::Exec
@current_resource.running false
@@ -51,11 +50,10 @@ class Chef
end
elsif @new_resource.status_command
- Chef::Log.debug("#{@new_resource} doesn't support status but you have specified a status command, running..")
-
begin
if run_command(:command => @new_resource.status_command) == 0
@current_resource.running true
+ Chef::Log.debug("#{@new_resource} is running")
end
rescue Chef::Exceptions::Exec
@current_resource.running false
@@ -66,12 +64,12 @@ class Chef
Chef::Log.debug("#{@new_resource} does not support status and you have not specified a status command, falling back to process table inspection")
if node[:command][:ps].nil? or node[:command][:ps].empty?
- raise Chef::Exceptions::Service, "#{@new_resource}: could not determine how to inspect the process table, please set this nodes 'ps' attribute"
+ raise Chef::Exceptions::Service, "#{@new_resource} could not determine how to inspect the process table, please set this nodes 'ps' attribute"
end
status = popen4(node[:command][:ps]) do |pid, stdin, stdout, stderr|
r = Regexp.new(@new_resource.pattern)
- Chef::Log.debug("#{@new_resource}: attempting to match #{@new_resource.pattern} (#{r}) against process table")
+ Chef::Log.debug("#{@new_resource} attempting to match #{@new_resource.pattern} (#{r}) against process table")
stdout.each_line do |line|
if r.match(line)
@current_resource.running true
@@ -83,7 +81,7 @@ class Chef
unless status.exitstatus == 0
raise Chef::Exceptions::Service, "Command #{node[:command][:ps]} failed"
else
- Chef::Log.debug("#{@new_resource}: #{node[:command][:ps]} exited and parsed successfully, process running: #{@current_resource.running}")
+ Chef::Log.debug("#{@new_resource} #{node[:command][:ps]} exited and parsed successfully, process running: #{@current_resource.running}")
end
end
@@ -102,21 +100,21 @@ class Chef
unless @current_resource.enabled
Chef::Log.debug("#{@new_resource.name} enable/disable state unknown")
end
-
+
@current_resource
end
def read_rc_conf
::File.open("/etc/rc.conf", 'r') { |file| file.readlines }
end
-
+
def write_rc_conf(lines)
::File.open("/etc/rc.conf", 'w') do |file|
lines.each { |line| file.puts(line) }
end
end
-
-
+
+
# The variable name used in /etc/rc.conf for enabling this service
def service_enable_variable_name
# Look for name="foo" in the shell script @init_command. Use this for determining the variable name in /etc/rc.conf
@@ -132,7 +130,7 @@ class Chef
end
raise Chef::Exceptions::Service, "Could not find name=\"service\" line in #{@init_command}"
end
-
+
def set_service_enable(value)
lines = read_rc_conf
# Remove line that set the old value
@@ -141,7 +139,7 @@ class Chef
lines << "#{service_enable_variable_name}=\"#{value}\""
write_rc_conf(lines)
end
-
+
def enable_service()
set_service_enable("YES") unless @current_resource.enabled
end
@@ -149,7 +147,7 @@ class Chef
def disable_service()
set_service_enable("NO") if @current_resource.enabled
end
-
+
end
end
end
diff --git a/chef/lib/chef/provider/service/gentoo.rb b/chef/lib/chef/provider/service/gentoo.rb
index 3765331b7d..2a72f75e1d 100644
--- a/chef/lib/chef/provider/service/gentoo.rb
+++ b/chef/lib/chef/provider/service/gentoo.rb
@@ -30,16 +30,15 @@ class Chef::Provider::Service::Gentoo < Chef::Provider::Service::Init
raise Chef::Exceptions::Service unless ::File.exists?("/sbin/rc-update")
- Chef::Log.debug "#{@new_resource}: checking service enable state"
@current_resource.enabled(
Dir.glob("/etc/runlevels/**/#{@current_resource.service_name}").any? do |file|
exists = ::File.exists? file
readable = ::File.readable? file
- Chef::Log.debug "#{@new_resource}: exists: #{exists}, readable: #{readable}"
+ Chef::Log.debug "#{@new_resource} exists: #{exists}, readable: #{readable}"
exists and readable
end
)
- Chef::Log.debug "#{@new_resource}: enabled: #{@current_resource.enabled}"
+ Chef::Log.debug "#{@new_resource} enabled: #{@current_resource.enabled}"
@current_resource
end
diff --git a/chef/lib/chef/provider/service/simple.rb b/chef/lib/chef/provider/service/simple.rb
index 41e7e28551..6316b50444 100644
--- a/chef/lib/chef/provider/service/simple.rb
+++ b/chef/lib/chef/provider/service/simple.rb
@@ -32,6 +32,7 @@ class Chef
begin
if run_command(:command => @new_resource.status_command) == 0
@current_resource.running true
+ Chef::Log.debug("#{@new_resource} is running")
end
rescue Chef::Exceptions::Exec
@current_resource.running false
@@ -44,19 +45,20 @@ class Chef
begin
if run_command(:command => "#{@init_command} status") == 0
@current_resource.running true
+ Chef::Log.debug("#{@new_resource} is running")
end
rescue Chef::Exceptions::Exec
@current_resource.running false
nil
end
elsif
- Chef::Log.debug "#{@new_resource}: falling back to process table inspection"
+ Chef::Log.debug "#{@new_resource} falling back to process table inspection"
if ps_cmd.nil? or ps_cmd.empty?
- raise Chef::Exceptions::Service, "#{@new_resource}: could not determine how to inspect the process table, please set this nodes 'command.ps' attribute"
+ raise Chef::Exceptions::Service, "#{@new_resource} could not determine how to inspect the process table, please set this nodes 'command.ps' attribute"
end
status = popen4(ps_cmd) do |pid, stdin, stdout, stderr|
r = Regexp.new(@new_resource.pattern)
- Chef::Log.debug "#{@new_resource}: attempting to match '#{@new_resource.pattern}' (#{r.inspect}) against process list"
+ Chef::Log.debug "#{@new_resource} attempting to match '#{@new_resource.pattern}' (#{r.inspect}) against process list"
stdout.each_line do |line|
if r.match(line)
@current_resource.running true
@@ -68,7 +70,7 @@ class Chef
unless status.exitstatus == 0
raise Chef::Exceptions::Service, "Command #{ps_cmd} failed"
else
- Chef::Log.debug "#{@new_resource}: running: #{@current_resource.running}"
+ Chef::Log.debug "#{@new_resource} running: #{@current_resource.running}"
end
end
@@ -108,7 +110,7 @@ class Chef
raise Chef::Exceptions::Service, "#{self.to_s} requires that reload_command to be set"
end
end
-
+
def ps_cmd
@run_context.node[:command] && @run_context.node[:command][:ps]
end
diff --git a/chef/lib/chef/provider/service/upstart.rb b/chef/lib/chef/provider/service/upstart.rb
index 57b72a4c41..447e72633e 100644
--- a/chef/lib/chef/provider/service/upstart.rb
+++ b/chef/lib/chef/provider/service/upstart.rb
@@ -86,23 +86,23 @@ class Chef
# Get enabled/disabled state by reading job configuration file
if ::File.exists?("#{@upstart_job_dir}/#{@new_resource.service_name}#{@upstart_conf_suffix}")
- Chef::Log.debug("#{@new_resource}: found #{@upstart_job_dir}/#{@new_resource.service_name}#{@upstart_conf_suffix}")
+ Chef::Log.debug("#{@new_resource} found #{@upstart_job_dir}/#{@new_resource.service_name}#{@upstart_conf_suffix}")
::File.open("#{@upstart_job_dir}/#{@new_resource.service_name}#{@upstart_conf_suffix}",'r') do |file|
while line = file.gets
case line
when /^start on/
- Chef::Log.debug("#{@new_resource}: enabled: #{line.chomp}")
+ Chef::Log.debug("#{@new_resource} enabled: #{line.chomp}")
@current_resource.enabled true
break
when /^#start on/
- Chef::Log.debug("#{@new_resource}: disabled: #{line.chomp}")
+ Chef::Log.debug("#{@new_resource} disabled: #{line.chomp}")
@current_resource.enabled false
break
end
end
end
else
- Chef::Log.debug("#{@new_resource}: did not find #{@upstart_job_dir}/#{@new_resource.service_name}#{@upstart_conf_suffix}")
+ Chef::Log.debug("#{@new_resource} did not find #{@upstart_job_dir}/#{@new_resource.service_name}#{@upstart_conf_suffix}")
@current_resource.enabled false
end
@@ -113,7 +113,7 @@ class Chef
# Calling start on a service that is already started will return 1
# Our 'goal' when we call start is to ensure the service is started
if @current_resource.running
- Chef::Log.debug("#{@new_resource}: Already running, not starting")
+ Chef::Log.debug("#{@new_resource} already running, not starting")
else
if @new_resource.start_command
super
@@ -127,7 +127,7 @@ class Chef
# Calling stop on a service that is already stopped will return 1
# Our 'goal' when we call stop is to ensure the service is stopped
unless @current_resource.running
- Chef::Log.debug("#{@new_resource}: Not running, not stopping")
+ Chef::Log.debug("#{@new_resource} not running, not stopping")
else
if @new_resource.stop_command
super
@@ -157,14 +157,14 @@ class Chef
# https://bugs.launchpad.net/upstart/+bug/94065
def enable_service
- Chef::Log.warn("#{@new_resource}: upstart lacks inherent support for enabling services, editing job config file")
+ Chef::Log.debug("#{@new_resource} upstart lacks inherent support for enabling services, editing job config file")
conf = Chef::Util::FileEdit.new("#{@upstart_job_dir}/#{@new_resource.service_name}#{@upstart_conf_suffix}")
conf.search_file_replace(/^#start on/, "start on")
conf.write_file
end
def disable_service
- Chef::Log.warn("#{@new_resource}: upstart lacks inherent support for disabling services, editing job config file")
+ Chef::Log.debug("#{@new_resource} upstart lacks inherent support for disabling services, editing job config file")
conf = Chef::Util::FileEdit.new("#{@upstart_job_dir}/#{@new_resource.service_name}#{@upstart_conf_suffix}")
conf.search_file_replace(/^start on/, "#start on")
conf.write_file
diff --git a/chef/lib/chef/provider/service/windows.rb b/chef/lib/chef/provider/service/windows.rb
index 78cd656402..97bcd019ae 100644
--- a/chef/lib/chef/provider/service/windows.rb
+++ b/chef/lib/chef/provider/service/windows.rb
@@ -55,7 +55,7 @@ class Chef::Provider::Service::Windows < Chef::Provider::Service::Simple
end
end
- Chef::Log.debug "#{@new_resource}: running: #{@current_resource.running}"
+ Chef::Log.debug "#{@new_resource} running: #{@current_resource.running}"
rescue Exception => e
raise Chef::Exceptions::Service, "Exception determining state of service #{@new_resource.service_name}: #{e.message}"
end
@@ -83,7 +83,7 @@ class Chef::Provider::Service::Windows < Chef::Provider::Service::Simple
def stop_service
begin
if @new_resource.stop_command
- Chef::Log.debug "stopping service using the given stop_command"
+ Chef::Log.debug "#{@new_resource} stopping service using the given stop_command"
popen4(@new_resource.stop_command) do |pid, stdin, stdout, stderr|
Chef::Log.debug stdout.readlines
end
@@ -103,7 +103,7 @@ class Chef::Provider::Service::Windows < Chef::Provider::Service::Simple
def restart_service
begin
if @new_resource.restart_command
- Chef::Log.debug "restarting service using the given restart_command"
+ Chef::Log.debug "#{@new_resource} restarting service using the given restart_command"
popen4(@new_resource.restart_command) do |pid, stdin, stdout, stderr|
Chef::Log.debug stdout.readlines
end
diff --git a/chef/lib/chef/provider/subversion.rb b/chef/lib/chef/provider/subversion.rb
index 8ea2120100..63fb548a50 100644
--- a/chef/lib/chef/provider/subversion.rb
+++ b/chef/lib/chef/provider/subversion.rb
@@ -44,7 +44,7 @@ class Chef
run_command(run_options(:command => checkout_command))
@new_resource.updated_by_last_action(true)
else
- Chef::Log.info "Taking no action, checkout destination #{@new_resource.destination} already exists or is a non-empty directory"
+ Chef::Log.debug "#{@new_resource} checkout destination #{@new_resource.destination} already exists or is a non-empty directory - nothing to do"
end
end
@@ -54,7 +54,7 @@ class Chef
run_command(run_options(:command => export_command))
@new_resource.updated_by_last_action(true)
else
- Chef::Log.info "Taking no action, export destination #{@new_resource.destination} already exists or is a non-empty directory"
+ Chef::Log.debug "#{@new_resource} export destination #{@new_resource.destination} already exists or is a non-empty directory - nothing to do"
end
end
@@ -81,22 +81,25 @@ class Chef
end
def sync_command
- Chef::Log.info "Updating working copy #{@new_resource.destination} to revision #{@new_resource.revision}"
- scm :update, @new_resource.svn_arguments, verbose, authentication, "-r#{revision_int}", @new_resource.destination
+ c = scm :update, @new_resource.svn_arguments, verbose, authentication, "-r#{revision_int}", @new_resource.destination
+ Chef::Log.debug "#{@new_resource} updated working copy #{@new_resource.destination} to revision #{@new_resource.revision}"
+ c
end
def checkout_command
- Chef::Log.info "checking out #{@new_resource.repository} at revision #{@new_resource.revision} to #{@new_resource.destination}"
- scm :checkout, @new_resource.svn_arguments, verbose, authentication,
+ c = scm :checkout, @new_resource.svn_arguments, verbose, authentication,
"-r#{revision_int}", @new_resource.repository, @new_resource.destination
+ Chef::Log.info "#{@new_resource} checked out #{@new_resource.repository} at revision #{@new_resource.revision} to #{@new_resource.destination}"
+ c
end
def export_command
- Chef::Log.info "exporting #{@new_resource.repository} at revision #{@new_resource.revision} to #{@new_resource.destination}"
args = ["--force"]
args << @new_resource.svn_arguments << verbose << authentication <<
"-r#{revision_int}" << @new_resource.repository << @new_resource.destination
- scm :export, *args
+ c = scm :export, *args
+ Chef::Log.info "#{@new_resource} exported #{@new_resource.repository} at revision #{@new_resource.revision} to #{@new_resource.destination}"
+ c
end
# If the specified revision isn't an integer ("HEAD" for example), look
@@ -157,7 +160,7 @@ class Chef
end
raise "Could not parse `svn info` data: #{svn_info}" unless repo_attrs.kind_of?(Hash)
rev = (repo_attrs['Last Changed Rev'] || repo_attrs['Revision']).to_s
- Chef::Log.debug "Resolved revision #{@new_resource.revision} to #{rev}"
+ Chef::Log.debug "#{@new_resource} resolved revision #{@new_resource.revision} to #{rev}"
rev
end
diff --git a/chef/lib/chef/provider/template.rb b/chef/lib/chef/provider/template.rb
index 0ae1b9c45e..b2f3f4899e 100644
--- a/chef/lib/chef/provider/template.rb
+++ b/chef/lib/chef/provider/template.rb
@@ -42,10 +42,10 @@ class Chef
Chef::Log.debug("#{@new_resource} content has not changed.")
set_all_access_controls(@new_resource.path)
else
- Chef::Log.info("Writing updated content for #{@new_resource} to #{@new_resource.path}")
backup
set_all_access_controls(rendered_template.path)
FileUtils.mv(rendered_template.path, @new_resource.path)
+ Chef::Log.info("#{@new_resource} updated content")
@new_resource.updated_by_last_action(true)
end
end
@@ -53,14 +53,13 @@ class Chef
def action_create_if_missing
if ::File.exists?(@new_resource.path)
- Chef::Log.debug("Template #{@new_resource} exists, taking no action.")
+ Chef::Log.debug("#{@new_resource} exists - taking no action")
else
action_create
end
end
def template_location
- Chef::Log.debug("looking for template #{@new_resource.source} in cookbook #{cookbook_name.inspect}")
@template_file_cache_location ||= begin
if @new_resource.local
@new_resource.source
diff --git a/chef/lib/chef/provider/user.rb b/chef/lib/chef/provider/user.rb
index 2d2705440b..2c0471f556 100644
--- a/chef/lib/chef/provider/user.rb
+++ b/chef/lib/chef/provider/user.rb
@@ -51,7 +51,7 @@ class Chef
user_info = Etc.getpwnam(@new_resource.username)
rescue ArgumentError => e
@user_exists = false
- Chef::Log.debug("User #{@new_resource.username} does not exist")
+ Chef::Log.debug("#{@new_resource} user does not exist")
user_info = nil
end
@@ -67,7 +67,6 @@ class Chef
begin
require 'shadow'
rescue LoadError
- Chef::Log.error("You must have ruby-shadow installed for password support!")
raise Chef::Exceptions::MissingLibrary, "You must have ruby-shadow installed for password support!"
else
shadow_info = Shadow::Passwd.getspnam(@new_resource.username)
@@ -97,11 +96,11 @@ class Chef
def action_create
if !@user_exists
create_user
- Chef::Log.info("Created #{@new_resource}")
+ Chef::Log.info("#{@new_resource} created")
@new_resource.updated_by_last_action(true)
elsif compare_user
manage_user
- Chef::Log.info("Altered #{@new_resource}")
+ Chef::Log.info("#{@new_resource} altered")
@new_resource.updated_by_last_action(true)
end
end
@@ -110,7 +109,7 @@ class Chef
if @user_exists
remove_user
@new_resource.updated_by_last_action(true)
- Chef::Log.info("Removed #{@new_resource}")
+ Chef::Log.info("#{@new_resource} removed")
end
end
@@ -122,7 +121,7 @@ class Chef
if @user_exists && compare_user
manage_user
@new_resource.updated_by_last_action(true)
- Chef::Log.info("Managed #{@new_resource}")
+ Chef::Log.info("#{@new_resource} managed")
end
end
@@ -135,10 +134,10 @@ class Chef
if compare_user
manage_user
@new_resource.updated_by_last_action(true)
- Chef::Log.info("Modified #{@new_resource}")
+ Chef::Log.info("#{@new_resource} modified")
end
else
- raise Chef::Exceptions::User, "Cannot modify #{@new_resource} - user does not exist!"
+ raise Chef::Exceptions::User, "Cannot modify user - does not exist!"
end
end
@@ -147,12 +146,12 @@ class Chef
if check_lock() == false
lock_user
@new_resource.updated_by_last_action(true)
- Chef::Log.info("Locked #{@new_resource}")
+ Chef::Log.info("#{@new_resource} locked")
else
- Chef::Log.debug("No need to lock #{@new_resource}")
+ Chef::Log.debug("#{@new_resource} already locked - nothing to do")
end
else
- raise Chef::Exceptions::User, "Cannot lock #{@new_resource} - user does not exist!"
+ raise Chef::Exceptions::User, "Cannot lock user - does not exist!"
end
end
@@ -169,12 +168,12 @@ class Chef
if check_lock() == true
unlock_user
@new_resource.updated_by_last_action(true)
- Chef::Log.info("Unlocked #{@new_resource}")
+ Chef::Log.info("#{@new_resource} unlocked")
else
- Chef::Log.debug("No need to unlock #{@new_resource}")
+ Chef::Log.debug("#{@new_resource} already unlocked - nothing to do")
end
else
- raise Chef::Exceptions::User, "Cannot unlock #{@new_resource} - user does not exist!"
+ raise Chef::Exceptions::User, "Cannot unlock user - does not exist!"
end
end
diff --git a/chef/lib/chef/provider/user/dscl.rb b/chef/lib/chef/provider/user/dscl.rb
index 95608bc36e..19a755ad0f 100644
--- a/chef/lib/chef/provider/user/dscl.rb
+++ b/chef/lib/chef/provider/user/dscl.rb
@@ -117,7 +117,7 @@ class Chef
if @new_resource.password
shadow_hash = nil
- Chef::Log.debug("#{new_resource}: updating password")
+ Chef::Log.debug("#{new_resource} updating password")
if osx_shadow_hash?(@new_resource.password)
shadow_hash = @new_resource.password.upcase
else
@@ -257,7 +257,7 @@ class Chef
end
def move_home
- Chef::Log.debug("moving #{self} home from #{@current_resource.home} to #{@new_resource.home}")
+ Chef::Log.debug("#{@new_resource} moving #{self} home from #{@current_resource.home} to #{@new_resource.home}")
src = @current_resource.home
FileUtils.mkdir_p(@new_resource.home)
diff --git a/chef/lib/chef/provider/user/pw.rb b/chef/lib/chef/provider/user/pw.rb
index 9004291bc1..4f6393da89 100644
--- a/chef/lib/chef/provider/user/pw.rb
+++ b/chef/lib/chef/provider/user/pw.rb
@@ -80,13 +80,13 @@ class Chef
field_symbol = field.to_sym
if @current_resource.send(field_symbol) != @new_resource.send(field_symbol)
if @new_resource.send(field_symbol)
- Chef::Log.debug("Setting #{@new_resource} #{field} to #{@new_resource.send(field_symbol)}")
+ Chef::Log.debug("#{@new_resource} setting #{field} to #{@new_resource.send(field_symbol)}")
opts << " #{option} '#{@new_resource.send(field_symbol)}'"
end
end
end
if @new_resource.supports[:manage_home]
- Chef::Log.debug("Managing the home directory for #{@new_resource}")
+ Chef::Log.debug("#{@new_resource} is managing the users home directory")
opts << " -m"
end
opts
@@ -94,7 +94,7 @@ class Chef
def modify_password
if @current_resource.password != @new_resource.password
- Chef::Log.debug("#{new_resource}: updating password")
+ Chef::Log.debug("#{new_resource} updating password")
command = "pw usermod #{@new_resource.username} -H 0"
status = popen4(command, :waitlast => true) do |pid, stdin, stdout, stderr|
stdin.puts "#{@new_resource.password}"
@@ -104,7 +104,7 @@ class Chef
raise Chef::Exceptions::User, "pw failed - #{status.inspect}!"
end
else
- Chef::Log.debug("#{new_resource}: no change needed to password")
+ Chef::Log.debug("#{new_resource} no change needed to password")
end
end
end
diff --git a/chef/lib/chef/provider/user/useradd.rb b/chef/lib/chef/provider/user/useradd.rb
index 3603537d02..fc5abf862e 100644
--- a/chef/lib/chef/provider/user/useradd.rb
+++ b/chef/lib/chef/provider/user/useradd.rb
@@ -98,17 +98,17 @@ class Chef
UNIVERSAL_OPTIONS.each do |field, option|
if @current_resource.send(field) != @new_resource.send(field)
if @new_resource.send(field)
- Chef::Log.debug("Setting #{@new_resource} #{field} to #{@new_resource.send(field)}")
+ Chef::Log.debug("#{@new_resource} setting #{field} to #{@new_resource.send(field)}")
opts << " #{option} '#{@new_resource.send(field)}'"
end
end
end
if updating_home?
if managing_home_dir?
- Chef::Log.debug("Managing the home directory for #{@new_resource}")
+ Chef::Log.debug("#{@new_resource} managing the users home directory")
opts << " -d '#{@new_resource.home}'"
else
- Chef::Log.debug("Setting #{@new_resource} home to #{@new_resource.home}")
+ Chef::Log.debug("#{@new_resource} setting home to #{@new_resource.home}")
opts << " -d '#{@new_resource.home}'"
end
end
diff --git a/chef/lib/chef/provider/user/windows.rb b/chef/lib/chef/provider/user/windows.rb
index c65a17f949..6bbb2a088c 100644
--- a/chef/lib/chef/provider/user/windows.rb
+++ b/chef/lib/chef/provider/user/windows.rb
@@ -39,7 +39,7 @@ class Chef
user_info = @net_user.get_info
rescue
@user_exists = false
- Chef::Log.debug("User #{@new_resource.username} does not exist")
+ Chef::Log.debug("#{@new_resource} does not exist")
end
if user_info
@@ -60,7 +60,7 @@ class Chef
# <false>:: If the users are identical
def compare_user
unless @net_user.validate_credentials(@new_resource.password)
- Chef::Log.debug("User #{@new_resource.username} password has changed")
+ Chef::Log.debug("#{@new_resource} password has changed")
return true
end
[ :uid, :gid, :comment, :home, :shell ].any? do |user_attrib|
@@ -109,7 +109,7 @@ class Chef
if @current_resource.send(field_symbol) != @new_resource.send(field_symbol)
if @new_resource.send(field_symbol)
unless field_symbol == :password
- Chef::Log.debug("Setting #{@new_resource} #{field} to #{@new_resource.send(field_symbol)}")
+ Chef::Log.debug("#{@new_resource} setting #{field} to #{@new_resource.send(field_symbol)}")
end
opts[option.to_sym] = @new_resource.send(field_symbol)
end
diff --git a/chef/lib/chef/resource.rb b/chef/lib/chef/resource.rb
index d58930332a..6dbbdec29e 100644
--- a/chef/lib/chef/resource.rb
+++ b/chef/lib/chef/resource.rb
@@ -240,7 +240,7 @@ F
notifications.each do |resources_notifications|
resources_notifications.each do |resource, notification|
action, timing = notification[0], notification[1]
- Chef::Log.debug "adding notification from resource #{self} to `#{resource.inspect}' => `#{notification.inspect}'"
+ Chef::Log.debug "Adding notification from resource #{self} to `#{resource.inspect}' => `#{notification.inspect}'"
add_notification(action, resource, timing)
end
end
@@ -419,8 +419,9 @@ F
Chef::Log.error("#{self} (#{defined_at}) had an error: #{e.message}")
else
Chef::Log.error("#{self} (#{defined_at}) has had an error")
- msg = e.message
- raise e.exception("#{self} (#{defined_at}) had an error: #{e.message}")
+ new_exception = e.exception("#{self} (#{defined_at}) had an error: #{e.message}")
+ new_exception.set_backtrace(e.backtrace)
+ raise new_exception
end
end
end
diff --git a/chef/lib/chef/resource/deploy.rb b/chef/lib/chef/resource/deploy.rb
index d22c9bee3a..d34542e9be 100644
--- a/chef/lib/chef/resource/deploy.rb
+++ b/chef/lib/chef/resource/deploy.rb
@@ -274,7 +274,7 @@ class Chef
def environment(arg=nil)
if arg.is_a?(String)
- Chef::Log.info "Setting RAILS_ENV, RACK_ENV, and MERB_ENV to `#{arg}'"
+ Chef::Log.debug "Setting RAILS_ENV, RACK_ENV, and MERB_ENV to `#{arg}'"
Chef::Log.warn "[DEPRECATED] please modify your deploy recipe or attributes to set the environment using a hash"
arg = {"RAILS_ENV"=>arg,"MERB_ENV"=>arg,"RACK_ENV"=>arg}
end
diff --git a/chef/lib/chef/rest.rb b/chef/lib/chef/rest.rb
index 2cf701c9e3..adf180a645 100644
--- a/chef/lib/chef/rest.rb
+++ b/chef/lib/chef/rest.rb
@@ -367,6 +367,7 @@ class Chef
headers["Content-Type"] = 'application/json' if json_body
headers['Content-Length'] = json_body.bytesize.to_s if json_body
headers.merge!(authentication_headers(method, url, json_body)) if sign_requests?
+ headers.merge!(Chef::Config[:custom_http_headers]) if Chef::Config[:custom_http_headers]
headers
end
diff --git a/chef/lib/chef/rest/rest_request.rb b/chef/lib/chef/rest/rest_request.rb
index 17fe588bec..543c700e5d 100644
--- a/chef/lib/chef/rest/rest_request.rb
+++ b/chef/lib/chef/rest/rest_request.rb
@@ -101,7 +101,7 @@ class Chef
# http://redmine.ruby-lang.org/issues/show/2708
# http://redmine.ruby-lang.org/issues/show/2758
if e.to_s =~ /#{Regexp.escape(%q|undefined method `closed?' for nil:NilClass|)}/
- Chef::Log.debug("rescued error in http connect, re-raising as Errno::ECONNREFUSED to hide bug in net/http")
+ Chef::Log.debug("Rescued error in http connect, re-raising as Errno::ECONNREFUSED to hide bug in net/http")
Chef::Log.debug("#{e.class.name}: #{e.to_s}")
Chef::Log.debug(e.backtrace.join("\n"))
raise Errno::ECONNREFUSED, "Connection refused attempting to contact #{url.scheme}://#{host}:#{port}"
@@ -141,7 +141,7 @@ class Chef
if http_proxy.nil?
@http_client = Net::HTTP.new(host, port)
else
- Chef::Log.debug("using #{http_proxy.host}:#{http_proxy.port} for proxy")
+ Chef::Log.debug("Using #{http_proxy.host}:#{http_proxy.port} for proxy")
user = Chef::Config["#{url.scheme}_proxy_user"]
pass = Chef::Config["#{url.scheme}_proxy_pass"]
@http_client = Net::HTTP.Proxy(http_proxy.host, http_proxy.port, user, pass).new(host, port)
diff --git a/chef/lib/chef/run_context.rb b/chef/lib/chef/run_context.rb
index 0f96c6e487..9919888ac2 100644
--- a/chef/lib/chef/run_context.rb
+++ b/chef/lib/chef/run_context.rb
@@ -107,7 +107,7 @@ class Chef
resourcelist = Chef::ResourceDefinitionList.new
resourcelist.from_file(filename)
definitions.merge!(resourcelist.defines) do |key, oldval, newval|
- Chef::Log.info("Overriding duplicate definition #{key}, new found in #{filename}")
+ Chef::Log.info("Overriding duplicate definition #{key}, new definition found in #{filename}")
newval
end
end
diff --git a/chef/lib/chef/shell_out.rb b/chef/lib/chef/shell_out.rb
index 1056f7c465..00a3ed2609 100644
--- a/chef/lib/chef/shell_out.rb
+++ b/chef/lib/chef/shell_out.rb
@@ -56,6 +56,8 @@ class Chef
attr_accessor :cwd
attr_accessor :valid_exit_codes
attr_accessor :live_stream
+ attr_accessor :command_log_level
+ attr_accessor :command_log_prepend
attr_reader :command, :umask, :environment
attr_writer :timeout
@@ -111,6 +113,8 @@ class Chef
def initialize(*command_args)
@stdout, @stderr = '', ''
@live_stream = nil
+ @command_log_level = :debug
+ @command_log_prepend = nil
@environment = DEFAULT_ENVIRONMENT
@cwd = nil
@valid_exit_codes = [0]
@@ -169,7 +173,11 @@ class Chef
# * Chef::Exceptions::CommandTimeout when the command does not complete
# within +timeout+ seconds (default: 60s)
def run_command
- Chef::Log.info("sh(#{@command})")
+ if command_log_prepend
+ Chef::Log.send(command_log_level, "#{command_log_prepend} sh(#{@command})")
+ else
+ Chef::Log.send(command_log_level, "sh(#{@command})")
+ end
super
end
@@ -224,6 +232,10 @@ class Chef
self.valid_exit_codes = Array(setting)
when 'live_stream'
self.live_stream = setting
+ when 'command_log_level'
+ self.command_log_level = setting
+ when 'command_log_prepend'
+ self.command_log_prepend = setting
when 'environment', 'env'
# passing :environment => nil means don't set any new ENV vars
@environment = setting.nil? ? {} : @environment.dup.merge!(setting)
diff --git a/chef/lib/chef/solr_query.rb b/chef/lib/chef/solr_query.rb
index 9830befbb3..8c14e6d93f 100644
--- a/chef/lib/chef/solr_query.rb
+++ b/chef/lib/chef/solr_query.rb
@@ -104,7 +104,7 @@ class Chef
def objects
if !object_ids.empty?
@bulk_objects ||= @couchdb.bulk_get(object_ids)
- Chef::Log.debug { "bulk get of objects: #{@bulk_objects.inspect}" }
+ Chef::Log.debug { "Bulk get of objects: #{@bulk_objects.inspect}" }
@bulk_objects
else
[]
diff --git a/chef/lib/chef/solr_query/solr_http_request.rb b/chef/lib/chef/solr_query/solr_http_request.rb
index 8a2e3aeacb..6f1dc8d72f 100644
--- a/chef/lib/chef/solr_query/solr_http_request.rb
+++ b/chef/lib/chef/solr_query/solr_http_request.rb
@@ -97,7 +97,7 @@ class Chef
# http://redmine.ruby-lang.org/issues/show/2758
if e.to_s =~ /#{Regexp.escape(%q|undefined method 'closed?' for nil:NilClass|)}/
Chef::Log.fatal("#{description} failed. Chef::Exceptions::SolrConnectionError exception: Errno::ECONNREFUSED (net/http undefined method closed?) attempting to contact #{solr_url}")
- Chef::Log.debug("rescued error in http connect, treating it as Errno::ECONNREFUSED to hide bug in net/http")
+ Chef::Log.debug("Rescued error in http connect, treating it as Errno::ECONNREFUSED to hide bug in net/http")
Chef::Log.debug(e.backtrace.join("\n"))
raise Chef::Exceptions::SolrConnectionError, "Errno::ECONNREFUSED: Connection refused attempting to contact #{solr_url}"
else
diff --git a/chef/lib/chef/tasks/chef_repo.rake b/chef/lib/chef/tasks/chef_repo.rake
index 22361e06e4..afda706738 100644
--- a/chef/lib/chef/tasks/chef_repo.rake
+++ b/chef/lib/chef/tasks/chef_repo.rake
@@ -254,3 +254,77 @@ task :test_cookbook, :cookbook do |t, args|
system("knife cookbook test #{args.cookbook}")
end
+namespace :databag do
+ path = "data_bags"
+
+ desc "Upload a single databag"
+ task :upload, :databag do |t, args|
+ input_databag = args[:databag] || 'none_specified'
+ databag = File.join(path, input_databag)
+
+ if File.exists?(databag) && File.directory?(databag)
+ system "knife data bag create #{input_databag}"
+ Dir.foreach(databag) do |item|
+ name, type = item.split('.')
+ if type == 'json' && name.length > 0
+ system "knife data bag from file #{input_databag} " + File.join(databag, item)
+ end
+ end
+ else
+ puts "ERROR: Could not find the databag in your databag path (" + File.join(path, input_databag) + "), skipping it"
+ end
+ end
+
+ desc "Upload all databags"
+ task :upload_all do
+ if File.exists?(path) && File.directory?(path)
+ Dir.foreach(path) do |databag|
+ if databag == databag[/^[\-[:alnum:]_]+$/]
+ Rake::Task['databag:upload'].execute( { :databag => databag } )
+ end
+ end
+ else
+ puts "ERROR: Could not find any databags, skipping it"
+ end
+ end
+
+ desc "Create a databag"
+ task :create, :databag do |t, args|
+ input_databag = args[:databag] || 'none_specified'
+
+ FileUtils.mkdir(path) unless File.exists?(path)
+ databag = File.join(path, input_databag)
+ FileUtils.mkdir(databag) unless File.exists?(databag)
+ end
+
+ desc "Create a databag item stub"
+ task :create_item, :databag, :item do |t, args|
+ input_databag = args[:databag] || 'none_specified'
+ input_item = args[:item] || false
+
+ databag = File.join(path, input_databag)
+ if File.exists?(databag) && File.directory?(databag)
+ if input_item
+ json_filename = File.join(databag, "#{input_item}.json")
+ if !File.exists?(json_filename)
+ stub = <<EOH
+{
+ "id" : "#{input_item}"
+}
+EOH
+ json_file = File.new(json_filename, "w")
+ json_file.write(stub)
+ json_file.close
+ else
+ puts "ERROR: databag item already exists (#{json_filename}), skipping it"
+ end
+ else
+ puts "ERROR: No item id specified, skipping it"
+ end
+ else
+ puts "ERROR: Could not find your databag (#{databag}), skipping it"
+ end
+ end
+
+end
+
diff --git a/chef/lib/chef/version.rb b/chef/lib/chef/version.rb
index 3531fe2cf2..3f0301d6c8 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.6'
+ VERSION = '0.10.0.beta.8'
end
# NOTE: the Chef::Version class is defined in version_class.rb
diff --git a/chef/spec/unit/application_spec.rb b/chef/spec/unit/application_spec.rb
index 76a2b4dbd0..2b082fde1e 100644
--- a/chef/spec/unit/application_spec.rb
+++ b/chef/spec/unit/application_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.
@@ -20,20 +20,11 @@ require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper"))
describe Chef::Application do
before do
Chef::Log.logger = Logger.new(StringIO.new)
+ @app = Chef::Application.new
+ Dir.stub!(:chdir).and_return(0)
+ @app.stub!(:reconfigure)
end
- describe "initialize" do
- before do
- @app = Chef::Application.new
- Dir.stub!(:chdir).and_return(0)
- end
-
- it "should create an instance of Chef::Application" do
- @app.should be_kind_of(Chef::Application)
- end
- end
-
-
describe "reconfigure" do
before do
@app = Chef::Application.new
@@ -48,7 +39,7 @@ describe Chef::Application do
it "should configure logging" do
@app.should_receive(:configure_logging).and_return(true)
- @app.reconfigure
+ @app.reconfigure
end
end
@@ -232,5 +223,4 @@ describe Chef::Application do
lambda { @app.run_application }.should raise_error(Chef::Exceptions::Application)
end
end
-
end
diff --git a/chef/spec/unit/cookbook_version_spec.rb b/chef/spec/unit/cookbook_version_spec.rb
index 0f37c66566..ec6fa35f06 100644
--- a/chef/spec/unit/cookbook_version_spec.rb
+++ b/chef/spec/unit/cookbook_version_spec.rb
@@ -17,6 +17,51 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
+describe Chef::MinimalCookbookVersion do
+ describe "when first created" do
+ before do
+ @params = { "id"=>"1a806f1c-b409-4d8e-abab-fa414ff5b96d",
+ "key"=>"activemq",
+ "value"=>{"version"=>"0.3.3", "deps"=>{"java"=>">= 0.0.0", "runit"=>">= 0.0.0"}}}
+ @minimal_cookbook_version = Chef::MinimalCookbookVersion.new(@params)
+ end
+
+ it "has a name" do
+ @minimal_cookbook_version.name.should == 'activemq'
+ end
+
+ it "has a version" do
+ @minimal_cookbook_version.version.should == '0.3.3'
+ end
+
+ it "has a list of dependencies" do
+ @minimal_cookbook_version.deps.should == {"java" => ">= 0.0.0", "runit" => ">= 0.0.0"}
+ end
+
+ it "has cookbook metadata" do
+ metadata = @minimal_cookbook_version.metadata
+
+ metadata.name.should == 'activemq'
+ metadata.dependencies['java'].should == '>= 0.0.0'
+ metadata.dependencies['runit'].should == '>= 0.0.0'
+ end
+ end
+
+ describe "when created from cookbooks with old style version contraints" do
+ before do
+ @params = { "id"=>"1a806f1c-b409-4d8e-abab-fa414ff5b96d",
+ "key"=>"activemq",
+ "value"=>{"version"=>"0.3.3", "deps"=>{"apt" => ">> 1.0.0"}}}
+ @minimal_cookbook_version = Chef::MinimalCookbookVersion.new(@params)
+ end
+
+ it "translates the version constraints" do
+ metadata = @minimal_cookbook_version.metadata
+ metadata.dependencies['apt'].should == '> 1.0.0'
+ end
+ end
+end
+
describe Chef::CookbookVersion do
describe "when first created" do
before do
diff --git a/chef/spec/unit/handler/json_file_spec.rb b/chef/spec/unit/handler/json_file_spec.rb
index 6c76bbee36..e437e9cff0 100644
--- a/chef/spec/unit/handler/json_file_spec.rb
+++ b/chef/spec/unit/handler/json_file_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.
@@ -33,7 +33,7 @@ describe Chef::Handler::JsonFile do
@handler.build_report_dir
end
- describe "when reporting a succ" do
+ describe "when reporting success" do
before(:each) do
@node = Chef::Node.new
@run_status = Chef::RunStatus.new(@node)
@@ -54,8 +54,8 @@ describe Chef::Handler::JsonFile do
@handler.run_report_unsafe(@run_status)
reported_data = Chef::JSONCompat.from_json(@file_mock.string)
reported_data['exception'].should == "Exception: Boy howdy!"
- reported_data['start_time'].should == @expected_time.iso8601
- reported_data['end_time'].should == (@expected_time + 5).iso8601
+ reported_data['start_time'].should == @expected_time.to_s
+ reported_data['end_time'].should == (@expected_time + 5).to_s
reported_data['elapsed_time'].should == 5
end
diff --git a/chef/spec/unit/knife/client_create_spec.rb b/chef/spec/unit/knife/client_create_spec.rb
index ce8fecdde1..f09ef73d0e 100644
--- a/chef/spec/unit/knife/client_create_spec.rb
+++ b/chef/spec/unit/knife/client_create_spec.rb
@@ -18,6 +18,8 @@
require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper"))
+Chef::Knife::ClientCreate.load_deps
+
describe Chef::Knife::ClientCreate do
before(:each) do
Chef::Config[:node_name] = "webmonkey.example.com"
diff --git a/chef/spec/unit/knife_spec.rb b/chef/spec/unit/knife_spec.rb
index adfb2e9a83..000106c2fb 100644
--- a/chef/spec/unit/knife_spec.rb
+++ b/chef/spec/unit/knife_spec.rb
@@ -198,7 +198,7 @@ describe Chef::Knife do
@knife.stub!(:run).and_raise(Net::HTTPServerException.new("403 Forbidden", response))
@knife.stub!(:username).and_return("sadpanda")
@knife.run_with_pretty_exceptions
- @stdout.string.should match(%r[ERROR: You authenticated successfully to http://localhost:4000 as sadpanda but you are not authorized for this action])
+ @stdout.string.should match(%r[ERROR: You authenticated successfully to http.+ as sadpanda but you are not authorized for this action])
@stdout.string.should match(%r[Response: y u no administrator])
end
diff --git a/chef/spec/unit/provider/cron/solaris_spec.rb b/chef/spec/unit/provider/cron/solaris_spec.rb
index 6b99899c1a..b551ff111d 100644
--- a/chef/spec/unit/provider/cron/solaris_spec.rb
+++ b/chef/spec/unit/provider/cron/solaris_spec.rb
@@ -47,20 +47,20 @@ CRON
it "should report if it can't find the cron entry" do
@provider.stub!(:popen4).and_return(@status)
- Chef::Log.should_receive(:debug).with("Cron '#{@new_resource.name}' not found")
+ Chef::Log.should_receive(:debug).with("#{@new_resource} cron '#{@new_resource.name}' not found")
@provider.load_current_resource
end
it "should report an empty crontab" do
@status = mock("Status", :exitstatus => 1)
@provider.stub!(:popen4).and_return(@status)
- Chef::Log.should_receive(:debug).with("Cron empty for '#{@new_resource.user}'")
+ Chef::Log.should_receive(:debug).with("#{@new_resource} cron empty for '#{@new_resource.user}'")
@provider.load_current_resource
end
it "should report finding a match if the entry exists" do
@provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_receive(:debug).with("Found cron '#{@new_resource.name}'")
+ Chef::Log.should_receive(:debug).with("#{@new_resource} found cron '#{@new_resource.name}'")
@provider.load_current_resource
end
@@ -114,7 +114,7 @@ CRON
describe Chef::Provider::Cron::Solaris, "action_create" do
it "should add the cron entry if cron exists" do
@provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_receive(:info).with("Added cron '#{@new_resource.name}'")
+ Chef::Log.should_receive(:info).with("cron[cronhole some stuff] added crontab entry")
@provider.action_create
end
@@ -127,7 +127,7 @@ CRON
CRON
@provider.cron_empty=true
@provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_receive(:info).with("Added cron '#{@new_resource.name}'")
+ Chef::Log.should_receive(:info).with("cron[cronhole some stuff] added crontab entry")
@provider.action_create
end
@@ -141,7 +141,7 @@ CRON
CRON
@provider.cron_exists=true
@provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_receive(:info).with("Updated cron '#{@new_resource.name}'")
+ Chef::Log.should_receive(:info).with("cron[cronhole some stuff] updated crontab entry")
@provider.should_receive(:compare_cron).once.and_return(true)
@provider.action_create
end
@@ -154,8 +154,8 @@ CRON
30 * * * * /bin/true
CRON
@provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_not_receive(:info).with("Updated cron '#{@new_resource.name}'")
- Chef::Log.should_receive(:debug).with("Skipping existing cron entry '#{@new_resource.name}'")
+ Chef::Log.should_not_receive(:info).with("#{@new_resource} updated crontab entry")
+ Chef::Log.should_receive(:debug).with("#{@new_resource} skipping existing cron entry '#{@new_resource.name}'")
@provider.should_receive(:compare_cron).once.and_return(false)
@provider.cron_exists = true
@provider.action_create
@@ -171,7 +171,7 @@ MAILTO=warn@example.com
30 * * * * /bin/true
CRON
@provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_receive(:info).with("Updated cron '#{@new_resource.name}'")
+ Chef::Log.should_receive(:info).with("cron[cronhole some stuff] updated crontab entry")
@provider.cron_exists = true
@provider.should_receive(:compare_cron).once.and_return(true)
@provider.action_create
@@ -201,7 +201,7 @@ CRON
30 * * * * /bin/true
CRON
provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_receive(:info).with("Updated cron 'lobster rage'")
+ Chef::Log.should_receive(:info).with("cron[lobster rage] updated crontab entry")
provider.cron_exists = true
provider.should_receive(:compare_cron).once.and_return(true)
provider.action_create
@@ -218,7 +218,7 @@ CRON
C
@provider.cron_exists=true
@provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_receive(:info).with("Deleted cron '#{@new_resource.name}'")
+ Chef::Log.should_receive(:info).with("cron[cronhole some stuff] deleted crontab entry")
@provider.action_delete
end
@@ -229,7 +229,7 @@ C
* 10 * * * /bin/false
C
@provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_not_receive(:info).with("Deleted cron '#{@new_resource.name}'")
+ Chef::Log.should_not_receive(:info).with("cron[bar] deleted crontab entry")
@provider.action_delete
end
end
diff --git a/chef/spec/unit/provider/cron_spec.rb b/chef/spec/unit/provider/cron_spec.rb
index 0437365bfb..e32916dd9d 100644
--- a/chef/spec/unit/provider/cron_spec.rb
+++ b/chef/spec/unit/provider/cron_spec.rb
@@ -112,7 +112,7 @@ CRON
* 10 * * * /bin/false
CRONTAB
@provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_receive(:info).with("Added cron '#{@new_resource.name}'")
+ Chef::Log.should_receive(:info).with("cron[cronhole some stuff] added crontab entry")
@provider.action_create
end
@@ -130,7 +130,7 @@ CRON
it "should create the cron entry even if cron is empty" do
@provider.cron_empty=true
@provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_receive(:info).with("Added cron '#{@new_resource.name}'")
+ Chef::Log.should_receive(:info).with("cron[cronhole some stuff] added crontab entry")
@provider.action_create
end
@@ -138,7 +138,7 @@ CRON
@provider.current_resource = @current_resource
@provider.cron_exists=true
@provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_receive(:info).with("Updated cron '#{@new_resource.name}'")
+ Chef::Log.should_receive(:info).with("cron[cronhole some stuff] updated crontab entry")
@provider.should_receive(:compare_cron).once.and_return(true)
@provider.action_create
end
@@ -168,7 +168,7 @@ MAILTO=warn@example.com
30 * * * * /bin/true
CRON
@provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_receive(:info).with("Updated cron '#{@new_resource.name}'")
+ Chef::Log.should_receive(:info).with("cron[cronhole some stuff] updated crontab entry")
@provider.cron_exists = true
@provider.should_receive(:compare_cron).once.and_return(true)
@provider.action_create
@@ -198,7 +198,7 @@ CRON
30 * * * * /bin/true
CRON
provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_receive(:info).with("Updated cron 'lobster rage'")
+ Chef::Log.should_receive(:info).with("cron[lobster rage] updated crontab entry")
provider.cron_exists = true
provider.should_receive(:compare_cron).once.and_return(true)
provider.action_create
@@ -219,7 +219,7 @@ CRON
CRON
@provider.cron_exists=true
@provider.stub!(:popen4).and_yield(@pid, @stdin, @stdout, @stderr).and_return(@status)
- Chef::Log.should_receive(:debug).with("Deleted cron '#{@new_resource.name}'")
+ Chef::Log.should_receive(:info).with("#{@new_resource} deleted crontab entry")
@provider.action_delete
end
diff --git a/chef/spec/unit/provider/deploy_spec.rb b/chef/spec/unit/provider/deploy_spec.rb
index b028425fd6..cab1578c4b 100644
--- a/chef/spec/unit/provider/deploy_spec.rb
+++ b/chef/spec/unit/provider/deploy_spec.rb
@@ -234,6 +234,8 @@ describe Chef::Provider::Deploy do
@provider.should_receive(:enforce_ownership)
@provider.should_receive(:run_command).with(:command => "migration_foo", :cwd => @expected_release_dir,
:user => "deployNinja", :group => "deployNinjas",
+ :command_log_level => :info, :live_stream => STDOUT,
+ :command_log_prepend => "deploy[/my/deploy/dir]",
:environment => {"RAILS_ENV"=>"production"})
@provider.migrate
end
@@ -298,7 +300,7 @@ describe Chef::Provider::Deploy do
it "runs the restart command in the current application dir when the resource has a restart_command" do
@resource.restart_command "restartcmd"
- @provider.should_receive(:run_command).with(:command => "restartcmd", :cwd => "/my/deploy/dir/current")
+ @provider.should_receive(:run_command).with(:command => "restartcmd", :cwd => "/my/deploy/dir/current", :command_log_prepend => "deploy[/my/deploy/dir]", :command_log_level => :debug)
@provider.restart
end
diff --git a/chef/spec/unit/provider/git_spec.rb b/chef/spec/unit/provider/git_spec.rb
index 0c7501337c..45297063a6 100644
--- a/chef/spec/unit/provider/git_spec.rb
+++ b/chef/spec/unit/provider/git_spec.rb
@@ -88,7 +88,7 @@ describe Chef::Provider::Git do
it "converts resource.revision from a tag to a SHA" do
@resource.revision "v1.0"
@stdout = "503c22a5e41f5ae3193460cca044ed1435029f53\trefs/heads/0.8-alpha\n"
- @provider.should_receive(:shell_out!).with(@git_ls_remote + "v1.0", {}).and_return(mock("ShellOut result", :stdout => @stdout))
+ @provider.should_receive(:shell_out!).with(@git_ls_remote + "v1.0", {:command_log_prepend=>"git[web2.0 app]", :command_log_level=>:debug}).and_return(mock("ShellOut result", :stdout => @stdout))
@provider.target_revision.should eql("503c22a5e41f5ae3193460cca044ed1435029f53")
end
@@ -121,7 +121,7 @@ b7d19519a1c15f1c1a324e2683bd728b6198ce5a\trefs/tags/0.7.8^{}
ebc1b392fe7e8f0fbabc305c299b4d365d2b4d9b\trefs/tags/chef-server-package
SHAS
@resource.revision ''
- @provider.should_receive(:shell_out!).with(@git_ls_remote, {}).and_return(mock("ShellOut result", :stdout => @stdout))
+ @provider.should_receive(:shell_out!).with(@git_ls_remote, {:command_log_prepend=>"git[web2.0 app]", :command_log_level=>:debug}).and_return(mock("ShellOut result", :stdout => @stdout))
@provider.target_revision.should eql("28af684d8460ba4793eda3e7ac238c864a5d029a")
end
end
@@ -135,34 +135,34 @@ SHAS
@resource.ssh_wrapper "do_it_this_way.sh"
expected_cmd = 'git clone git://github.com/opscode/chef.git /my/deploy/dir'
@provider.should_receive(:shell_out!).with(expected_cmd, :user => "deployNinja",
- :environment =>{"GIT_SSH"=>"do_it_this_way.sh"})
+ :environment =>{"GIT_SSH"=>"do_it_this_way.sh"}, :command_log_level => :info, :command_log_prepend => "git[web2.0 app]", :live_stream => STDOUT)
@provider.clone
end
it "compiles a clone command using --depth for shallow cloning" do
@resource.depth 5
expected_cmd = 'git clone --depth 5 git://github.com/opscode/chef.git /my/deploy/dir'
- @provider.should_receive(:shell_out!).with(expected_cmd, {})
+ @provider.should_receive(:shell_out!).with(expected_cmd, {:command_log_level => :info, :command_log_prepend => "git[web2.0 app]", :live_stream => STDOUT})
@provider.clone
end
it "compiles a clone command with a remote other than ``origin''" do
@resource.remote "opscode"
expected_cmd = 'git clone -o opscode git://github.com/opscode/chef.git /my/deploy/dir'
- @provider.should_receive(:shell_out!).with(expected_cmd, {})
+ @provider.should_receive(:shell_out!).with(expected_cmd, {:command_log_level => :info, :command_log_prepend => "git[web2.0 app]", :live_stream => STDOUT})
@provider.clone
end
it "runs a checkout command with default options" do
expected_cmd = 'git checkout -b deploy d35af14d41ae22b19da05d7d03a0bafc321b244c'
- @provider.should_receive(:shell_out!).with(expected_cmd, :cwd => "/my/deploy/dir")
+ @provider.should_receive(:shell_out!).with(expected_cmd, :cwd => "/my/deploy/dir", :command_log_level => :debug, :command_log_prepend => "git[web2.0 app]")
@provider.checkout
end
it "runs an enable_submodule command" do
@resource.enable_submodules true
expected_cmd = "git submodule init && git submodule update"
- @provider.should_receive(:shell_out!).with(expected_cmd, :cwd => "/my/deploy/dir")
+ @provider.should_receive(:shell_out!).with(expected_cmd, :cwd => "/my/deploy/dir", :command_log_level => :info, :command_log_prepend => "git[web2.0 app]", :live_stream => STDOUT)
@provider.enable_submodules
end
@@ -173,7 +173,7 @@ SHAS
it "runs a sync command with default options" do
expected_cmd = "git fetch origin && git fetch origin --tags && git reset --hard d35af14d41ae22b19da05d7d03a0bafc321b244c"
- @provider.should_receive(:shell_out!).with(expected_cmd, :cwd=> "/my/deploy/dir")
+ @provider.should_receive(:shell_out!).with(expected_cmd, :cwd=> "/my/deploy/dir", :command_log_level => :debug, :command_log_prepend => "git[web2.0 app]")
@provider.fetch_updates
end
@@ -182,7 +182,7 @@ SHAS
@resource.group("thisis")
expected_cmd = "git fetch origin && git fetch origin --tags && git reset --hard d35af14d41ae22b19da05d7d03a0bafc321b244c"
@provider.should_receive(:shell_out!).with(expected_cmd, :cwd => "/my/deploy/dir",
- :user => "whois", :group => "thisis")
+ :user => "whois", :group => "thisis", :command_log_level => :debug, :command_log_prepend => "git[web2.0 app]")
@provider.fetch_updates
end
@@ -190,9 +190,9 @@ SHAS
@resource.remote "opscode"
conf_tracking_branches = "git config remote.opscode.url git://github.com/opscode/chef.git && " +
"git config remote.opscode.fetch +refs/heads/*:refs/remotes/opscode/*"
- @provider.should_receive(:shell_out!).with(conf_tracking_branches, :cwd => "/my/deploy/dir")
+ @provider.should_receive(:shell_out!).with(conf_tracking_branches, :cwd => "/my/deploy/dir", :command_log_prepend => "git[web2.0 app]", :command_log_level => :debug)
fetch_command = "git fetch opscode && git fetch opscode --tags && git reset --hard d35af14d41ae22b19da05d7d03a0bafc321b244c"
- @provider.should_receive(:shell_out!).with(fetch_command, :cwd => "/my/deploy/dir")
+ @provider.should_receive(:shell_out!).with(fetch_command, :cwd => "/my/deploy/dir", :command_log_level => :debug, :command_log_prepend => "git[web2.0 app]")
@provider.fetch_updates
end
@@ -232,7 +232,6 @@ SHAS
@provider.should_not_receive(:clone)
@provider.should_not_receive(:checkout)
@provider.should_not_receive(:enable_submodules)
- Chef::Log.should_receive(:info).with("Taking no action, checkout destination /my/deploy/dir already exists or is a non-empty directory")
@provider.action_checkout
@resource.should_not be_updated
end
diff --git a/chef/spec/unit/provider/group/dscl_spec.rb b/chef/spec/unit/provider/group/dscl_spec.rb
index 1e8fe5d20f..8f720a2a65 100644
--- a/chef/spec/unit/provider/group/dscl_spec.rb
+++ b/chef/spec/unit/provider/group/dscl_spec.rb
@@ -190,7 +190,7 @@ describe Chef::Provider::Group::Dscl do
end
it "should log an appropriate message" do
- Chef::Log.should_receive(:debug).with("group[aj]: removing group members all your base")
+ Chef::Log.should_receive(:debug).with("group[aj] removing group members all your base")
@provider.set_members
end
@@ -208,7 +208,7 @@ describe Chef::Provider::Group::Dscl do
end
it "should log an appropriate debug message" do
- Chef::Log.should_receive(:debug).with("group[aj]: setting group members all, your, base")
+ Chef::Log.should_receive(:debug).with("group[aj] setting group members all, your, base")
@provider.set_members
end
diff --git a/chef/spec/unit/provider/group/gpasswd_spec.rb b/chef/spec/unit/provider/group/gpasswd_spec.rb
index e7da572589..5c0357bf91 100644
--- a/chef/spec/unit/provider/group/gpasswd_spec.rb
+++ b/chef/spec/unit/provider/group/gpasswd_spec.rb
@@ -77,7 +77,7 @@ describe Chef::Provider::Group::Gpasswd, "modify_group_members" do
end
it "logs a message and does not modify group membership" do
- Chef::Log.should_receive(:debug).with("group[wheel]: not changing group members, the group has no members")
+ Chef::Log.should_receive(:debug).with("group[wheel] not changing group members, the group has no members")
@provider.should_not_receive(:shell_out!)
@provider.modify_group_members
end
@@ -85,7 +85,7 @@ describe Chef::Provider::Group::Gpasswd, "modify_group_members" do
describe "when the resource specifies group members" do
it "should log an appropriate debug message" do
- Chef::Log.should_receive(:debug).with("group[wheel]: setting group members to lobster, rage, fist")
+ Chef::Log.should_receive(:debug).with("group[wheel] setting group members to lobster, rage, fist")
@provider.stub!(:shell_out!)
@provider.modify_group_members
end
diff --git a/chef/spec/unit/provider/group/pw_spec.rb b/chef/spec/unit/provider/group/pw_spec.rb
index 346b5fa342..702d172d19 100644
--- a/chef/spec/unit/provider/group/pw_spec.rb
+++ b/chef/spec/unit/provider/group/pw_spec.rb
@@ -79,7 +79,7 @@ describe Chef::Provider::Group::Pw do
end
it "should log an appropriate message" do
- Chef::Log.should_receive(:debug).with("group[wheel]: not changing group members, the group has no members")
+ Chef::Log.should_receive(:debug).with("group[wheel] not changing group members, the group has no members")
@provider.set_members_option
end
@@ -95,7 +95,7 @@ describe Chef::Provider::Group::Pw do
end
it "should log an appropriate message" do
- Chef::Log.should_receive(:debug).with("group[wheel]: removing group members all, your, base")
+ Chef::Log.should_receive(:debug).with("group[wheel] removing group members all, your, base")
@provider.set_members_option
end
@@ -111,7 +111,7 @@ describe Chef::Provider::Group::Pw do
end
it "should log an appropriate debug message" do
- Chef::Log.should_receive(:debug).with("group[wheel]: setting group members to all, your, base")
+ Chef::Log.should_receive(:debug).with("group[wheel] setting group members to all, your, base")
@provider.set_members_option
end
diff --git a/chef/spec/unit/provider/group/usermod_spec.rb b/chef/spec/unit/provider/group/usermod_spec.rb
index 9e675763fa..4aad0a2d1c 100644
--- a/chef/spec/unit/provider/group/usermod_spec.rb
+++ b/chef/spec/unit/provider/group/usermod_spec.rb
@@ -36,7 +36,7 @@ describe Chef::Provider::Group::Usermod do
end
it "should log an appropriate message" do
- Chef::Log.should_receive(:debug).with("group[wheel]: not changing group members, the group has no members")
+ Chef::Log.should_receive(:debug).with("group[wheel] not changing group members, the group has no members")
@provider.modify_group_members
end
end
diff --git a/chef/spec/unit/provider/link_spec.rb b/chef/spec/unit/provider/link_spec.rb
index 98676d9433..684c47e72a 100644
--- a/chef/spec/unit/provider/link_spec.rb
+++ b/chef/spec/unit/provider/link_spec.rb
@@ -201,7 +201,7 @@ describe Chef::Resource::Link do
end
it "should log an appropriate message" do
- Chef::Log.should_receive(:info).with("Creating a symbolic link from /tmp/lolololol -> /tmp/fofile-link for link[/tmp/fofile-link]")
+ Chef::Log.should_receive(:info).with("link[/tmp/fofile-link] created")
@provider.action_create
end
@@ -324,7 +324,7 @@ describe Chef::Resource::Link do
end
it "should log an appropriate error message" do
- Chef::Log.should_receive(:info).with("Deleting link[/tmp/fofile-link] at /tmp/fofile-link")
+ Chef::Log.should_receive(:info).with("link[/tmp/fofile-link] deleted")
@provider.action_delete
end
@@ -377,7 +377,7 @@ describe Chef::Resource::Link do
end
it "deletes the link and marks the resource updated" do
- Chef::Log.should_receive(:info).with("Deleting link[/tmp/fofile-link] at /tmp/fofile-link")
+ Chef::Log.should_receive(:info).with("link[/tmp/fofile-link] deleted")
File.should_receive(:delete).with("/tmp/fofile-link").and_return(true)
@provider.action_delete
@new_resource.should be_updated
diff --git a/chef/spec/unit/provider/package_spec.rb b/chef/spec/unit/provider/package_spec.rb
index bb79e6b40b..7654b57bb9 100644
--- a/chef/spec/unit/provider/package_spec.rb
+++ b/chef/spec/unit/provider/package_spec.rb
@@ -159,7 +159,7 @@ describe Chef::Provider::Package do
it "should print the word 'uninstalled' if there was no original version" do
@current_resource.stub!(:version).and_return(nil)
- Chef::Log.should_receive(:info).with("Upgrading #{@new_resource} version from uninstalled to 1.0")
+ Chef::Log.should_receive(:info).with("package[emacs] upgraded from uninstalled to 1.0")
@provider.action_upgrade
end
end
diff --git a/chef/spec/unit/provider/subversion_spec.rb b/chef/spec/unit/provider/subversion_spec.rb
index f9e3291e93..575ca202a8 100644
--- a/chef/spec/unit/provider/subversion_spec.rb
+++ b/chef/spec/unit/provider/subversion_spec.rb
@@ -212,7 +212,6 @@ describe Chef::Provider::Subversion do
::File.stub!(:directory?).with("/my/deploy").and_return(true)
::Dir.stub!(:entries).with("/my/deploy/dir").and_return(['.','..','foo','bar'])
@provider.should_not_receive(:checkout_command)
- Chef::Log.should_receive(:info).with("Taking no action, checkout destination /my/deploy/dir already exists or is a non-empty directory")
@provider.action_checkout
@resource.should_not be_updated
end
diff --git a/chef/spec/unit/provider/user/pw_spec.rb b/chef/spec/unit/provider/user/pw_spec.rb
index ee119d2c6b..365786033c 100644
--- a/chef/spec/unit/provider/user/pw_spec.rb
+++ b/chef/spec/unit/provider/user/pw_spec.rb
@@ -176,7 +176,7 @@ describe Chef::Provider::User::Pw do
end
it "logs an appropriate message" do
- Chef::Log.should_receive(:debug).with("user[adam]: no change needed to password")
+ Chef::Log.should_receive(:debug).with("user[adam] no change needed to password")
@provider.modify_password
end
end
@@ -188,7 +188,7 @@ describe Chef::Provider::User::Pw do
end
it "should log an appropriate message" do
- Chef::Log.should_receive(:debug).with("user[adam]: updating password")
+ Chef::Log.should_receive(:debug).with("user[adam] updating password")
@provider.modify_password
end
diff --git a/chef/spec/unit/rest_spec.rb b/chef/spec/unit/rest_spec.rb
index de23f8b45d..8a9105c1d6 100644
--- a/chef/spec/unit/rest_spec.rb
+++ b/chef/spec/unit/rest_spec.rb
@@ -316,6 +316,27 @@ describe Chef::REST do
@request_mock['User-Agent'].should match /^Chef Client\/#{Chef::VERSION}/
end
+ context "when configured with custom http headers" do
+ before(:each) do
+ @custom_headers = {
+ 'X-Custom-ChefSecret' => 'sharpknives',
+ 'X-Custom-RequestPriority' => 'extremely low'
+ }
+ Chef::Config[:custom_http_headers] = @custom_headers
+ end
+
+ after(:each) do
+ Chef::Config[:custom_http_headers] = nil
+ end
+
+ it "should set them on the http request" do
+ url_string = an_instance_of(String)
+ header_hash = hash_including(@custom_headers)
+ Net::HTTP::Get.should_receive(:new).with(url_string, header_hash)
+ @rest.api_request(:GET, @url, {})
+ end
+ end
+
it "should set the cookie for this request if one exists for the given host:port" do
Chef::REST::CookieJar.instance["#{@url.host}:#{@url.port}"] = "cookie monster"
Net::HTTP::Get.should_receive(:new).with("/?foo=bar",
diff --git a/features/api/nodes/cookbook_sync_api.feature b/features/api/nodes/cookbook_sync_api.feature
index db6ac7561c..1a833ae8b1 100644
--- a/features/api/nodes/cookbook_sync_api.feature
+++ b/features/api/nodes/cookbook_sync_api.feature
@@ -59,7 +59,7 @@ Feature: Synchronize cookbooks to the edge
When I 'GET' the path '/nodes/sync/cookbooks'
Then I should get a '403 "Forbidden"' exception
- @cookbook_dependencies
+ @cookbook_dependencies @positive
Scenario: Retrieve the list of cookbooks when dependencies are resolvable
Given I am an administrator
And I upload the set of 'dep_test_*' cookbooks