chef 0.10.0.beta.8 → 0.10.0.beta.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/distro/common/html/knife-bootstrap.1.html +69 -10
  2. data/distro/common/html/knife-client.1.html +25 -22
  3. data/distro/common/html/knife-configure.1.html +1 -1
  4. data/distro/common/html/knife-cookbook-site.1.html +91 -19
  5. data/distro/common/html/knife-cookbook.1.html +216 -76
  6. data/distro/common/html/knife-data-bag.1.html +1 -1
  7. data/distro/common/html/knife-environment.1.html +177 -3
  8. data/distro/common/html/knife-exec.1.html +44 -3
  9. data/distro/common/html/knife-index.1.html +1 -1
  10. data/distro/common/html/knife-node.1.html +5 -3
  11. data/distro/common/html/knife-recipe.1.html +1 -1
  12. data/distro/common/html/knife-role.1.html +83 -19
  13. data/distro/common/html/knife-search.1.html +43 -2
  14. data/distro/common/html/knife-ssh.1.html +57 -2
  15. data/distro/common/html/knife-status.1.html +33 -2
  16. data/distro/common/html/knife-tag.1.html +45 -1
  17. data/distro/common/html/knife.1.html +94 -161
  18. data/distro/common/html/shef.1.html +283 -0
  19. data/distro/common/man/man1/knife-bootstrap.1 +56 -4
  20. data/distro/common/man/man1/knife-client.1 +12 -11
  21. data/distro/common/man/man1/knife-configure.1 +1 -1
  22. data/distro/common/man/man1/knife-cookbook-site.1 +64 -22
  23. data/distro/common/man/man1/knife-cookbook.1 +200 -122
  24. data/distro/common/man/man1/knife-data-bag.1 +1 -1
  25. data/distro/common/man/man1/knife-environment.1 +167 -2
  26. data/distro/common/man/man1/knife-exec.1 +36 -3
  27. data/distro/common/man/man1/knife-index.1 +1 -1
  28. data/distro/common/man/man1/knife-node.1 +2 -1
  29. data/distro/common/man/man1/knife-role.1 +48 -24
  30. data/distro/common/man/man1/knife-search.1 +27 -3
  31. data/distro/common/man/man1/knife-ssh.1 +43 -2
  32. data/distro/common/man/man1/knife-status.1 +14 -2
  33. data/distro/common/man/man1/knife-tag.1 +32 -2
  34. data/distro/common/man/man1/knife.1 +91 -186
  35. data/distro/common/man/man1/shef.1 +237 -26
  36. data/distro/common/markdown/man1/knife-bootstrap.mkd +57 -7
  37. data/distro/common/markdown/man1/knife-client.mkd +19 -17
  38. data/distro/common/markdown/man1/knife-cookbook-site.mkd +63 -15
  39. data/distro/common/markdown/man1/knife-cookbook.mkd +220 -103
  40. data/distro/common/markdown/man1/knife-environment.mkd +144 -1
  41. data/distro/common/markdown/man1/knife-exec.mkd +29 -1
  42. data/distro/common/markdown/man1/knife-node.mkd +1 -1
  43. data/distro/common/markdown/man1/knife-role.mkd +36 -30
  44. data/distro/common/markdown/man1/knife-search.mkd +0 -1
  45. data/distro/common/markdown/man1/knife-ssh.mkd +0 -2
  46. data/distro/common/markdown/man1/knife-status.mkd +0 -2
  47. data/distro/common/markdown/man1/knife-tag.mkd +31 -0
  48. data/distro/common/markdown/man1/knife.mkd +93 -165
  49. data/distro/common/markdown/man1/shef.mkd +189 -0
  50. data/lib/chef/api_client.rb +36 -35
  51. data/lib/chef/application/knife.rb +1 -1
  52. data/lib/chef/client.rb +1 -0
  53. data/lib/chef/cookbook/cookbook_version_loader.rb +29 -7
  54. data/lib/chef/cookbook_uploader.rb +55 -36
  55. data/lib/chef/cookbook_version.rb +3 -1
  56. data/lib/chef/couchdb.rb +0 -1
  57. data/lib/chef/knife/cookbook_list.rb +1 -1
  58. data/lib/chef/knife/cookbook_show.rb +1 -0
  59. data/lib/chef/knife/core/generic_presenter.rb +3 -3
  60. data/lib/chef/knife/help.rb +6 -2
  61. data/lib/chef/knife/tag_create.rb +26 -5
  62. data/lib/chef/knife/tag_delete.rb +34 -5
  63. data/lib/chef/knife/tag_list.rb +24 -6
  64. data/lib/chef/node.rb +1 -0
  65. data/lib/chef/role.rb +1 -0
  66. data/lib/chef/shef.rb +1 -0
  67. data/lib/chef/version.rb +1 -1
  68. metadata +4 -4
  69. data/distro/common/man/man1/knife-recipe.1 +0 -13
  70. data/distro/common/markdown/man1/knife-recipe.mkd +0 -24
@@ -61,6 +61,9 @@
61
61
  <div class='man-navigation' style='display:none'>
62
62
  <a href="#NAME">NAME</a>
63
63
  <a href="#SYNOPSIS">SYNOPSIS</a>
64
+ <a href="#DESCRIPTION">DESCRIPTION</a>
65
+ <a href="#EXAMPLES">EXAMPLES</a>
66
+ <a href="#BUGS">BUGS</a>
64
67
  <a href="#SEE-ALSO">SEE ALSO</a>
65
68
  <a href="#AUTHOR">AUTHOR</a>
66
69
  <a href="#DOCUMENTATION">DOCUMENTATION</a>
@@ -97,12 +100,13 @@
97
100
  </dl>
98
101
 
99
102
 
103
+ <h2 id="DESCRIPTION">DESCRIPTION</h2>
104
+
100
105
  <p>Performs a Chef Bootstrap on the target node. The goal of the bootstrap
101
106
  is to get Chef installed on the target system so it can run Chef Client
102
107
  with a Chef Server. The main assumption is a baseline OS installation
103
108
  exists. This sub-command is used internally by some cloud computing
104
- server create commands and the others will be migrated in a future
105
- version of Chef.</p>
109
+ plugins.</p>
106
110
 
107
111
  <p>The bootstrap sub-command supports supplying a template to perform the
108
112
  bootstrap steps. If the distro is not specified (via <code>-d</code> or <code>--distro</code>
@@ -119,7 +123,8 @@ sub-command looks in the following locations for the template to use:</p>
119
123
  </ul>
120
124
 
121
125
 
122
- <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>
126
+ <p>The default bootstrap templates are scripts that get copied to the
127
+ target node (FQDN). The following distros are supported:</p>
123
128
 
124
129
  <ul>
125
130
  <li>centos5-gems</li>
@@ -129,9 +134,15 @@ sub-command looks in the following locations for the template to use:</p>
129
134
  </ul>
130
135
 
131
136
 
132
- <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>
137
+ <p>The gems installations will use RubyGems 1.3.6 and Chef installed as a
138
+ gem. The apt installation will use the Opscode APT repository. The
139
+ RubyGems installation requires installing gems with native extensions,
140
+ so development related packages (ruby-dev, build-essential) are
141
+ installed. These are not installed with the apt installation, as native
142
+ extensions are already compiled in the required packages.</p>
133
143
 
134
- <p>In addition to handling the software installation, these bootstrap templates do the following:</p>
144
+ <p>In addition to handling the software installation, these bootstrap
145
+ templates do the following:</p>
135
146
 
136
147
  <ul>
137
148
  <li>Write the validation.pem per the local knife configuration.</li>
@@ -140,7 +151,12 @@ sub-command looks in the following locations for the template to use:</p>
140
151
  </ul>
141
152
 
142
153
 
143
- <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>
154
+ <p>In the case of the RubyGems, the <code>client.rb</code> will be written from
155
+ scratch with a minimal set of values; see <strong>EXAMPLES</strong>. In the case of
156
+ APT Package installation, <code>client.rb</code> will have the
157
+ <code>validation_client_name</code> appended if it is not set to <code>chef-validator</code>
158
+ (default config value), and the <code>node_name</code> will be added if
159
+ <code>chef_node_name</code> option is specified.</p>
144
160
 
145
161
  <p>When this is complete, the bootstrapped node will have:</p>
146
162
 
@@ -151,7 +167,50 @@ sub-command looks in the following locations for the template to use:</p>
151
167
  </ul>
152
168
 
153
169
 
154
- <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>
170
+ <p>Additional custom bootstrap templates can be created and stored in
171
+ <code>.chef/bootstrap/DISTRO.erb</code>, replacing <strong>DISTRO</strong> with the value passed
172
+ with the <code>-d</code> or <code>--distro</code> option. See <strong>EXAMPLES</strong> for more
173
+ information.</p>
174
+
175
+ <h2 id="EXAMPLES">EXAMPLES</h2>
176
+
177
+ <p>Setting up a custom bootstrap is fairly straightforward. Create a
178
+ <code>.chef/bootstrap</code> directory in your Chef Repository or in
179
+ <code>$HOME/.chef/bootstrap</code>. Then create the ERB template file.</p>
180
+
181
+ <pre><code>mkdir ~/.chef/bootstrap
182
+ vi ~/.chef/bootstrap/debian5.0-apt.erb
183
+ </code></pre>
184
+
185
+ <p>For example, to create a new bootstrap template that should be used when
186
+ setting up a new Debian node. Edit the template to run the commands, set
187
+ up the validation certificate and the client configuration file, and
188
+ finally to run chef-client on completion. The bootstrap template can be
189
+ called with:</p>
190
+
191
+ <pre><code>knife bootstrap mynode.example.com --template-file ~/.chef/bootstrap/debian5.0-apt.erb
192
+ </code></pre>
193
+
194
+ <p>Or,</p>
195
+
196
+ <pre><code>knife bootstrap mynode.example.com --distro debian5.0-apt
197
+ </code></pre>
198
+
199
+ <p>The <code>--distro</code> parameter will automatically look in the
200
+ <code>~/.chef/bootstrap</code> directory for a file named <code>debian5.0-apt.erb</code>.</p>
201
+
202
+ <p>Templates provided by the Chef installation are located in
203
+ <code>BASEDIR/lib/chef/knife/bootstrap/*.erb</code>, where <em>BASEDIR</em> is the
204
+ location where the package or Gem installed the Chef client libraries.</p>
205
+
206
+ <h2 id="BUGS">BUGS</h2>
207
+
208
+ <p><code>knife bootstrap</code> is not capable of bootstrapping multiple hosts in
209
+ parallel.</p>
210
+
211
+ <p>The bootstrap script is passed as an argument to <span class="man-ref">sh<span class="s">(1)</span></span> on the remote
212
+ system, so sensitive information contained in the script will be visible
213
+ to other users via the process list using tools such as <span class="man-ref">ps<span class="s">(1)</span></span>.</p>
155
214
 
156
215
  <h2 id="SEE-ALSO">SEE ALSO</h2>
157
216
 
@@ -159,11 +218,11 @@ sub-command looks in the following locations for the template to use:</p>
159
218
 
160
219
  <h2 id="AUTHOR">AUTHOR</h2>
161
220
 
162
- <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>
221
+ <p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#111;&#58;&#x61;&#x64;&#97;&#109;&#64;&#111;&#x70;&#115;&#99;&#x6f;&#x64;&#101;&#x2e;&#x63;&#x6f;&#109;" data-bare-link="true">&#97;&#x64;&#97;&#x6d;&#64;&#111;&#112;&#x73;&#x63;&#x6f;&#x64;&#101;&#46;&#99;&#111;&#x6d;</a> with many contributions from the community.</p>
163
222
 
164
223
  <h2 id="DOCUMENTATION">DOCUMENTATION</h2>
165
224
 
166
- <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>.
225
+ <p> This manual page was written by Joshua Timberman <a href="&#x6d;&#97;&#x69;&#x6c;&#116;&#x6f;&#x3a;&#106;&#111;&#115;&#104;&#117;&#97;&#64;&#111;&#112;&#x73;&#99;&#x6f;&#x64;&#101;&#x2e;&#x63;&#x6f;&#109;" data-bare-link="true">&#106;&#x6f;&#115;&#104;&#117;&#x61;&#64;&#111;&#x70;&#x73;&#x63;&#111;&#x64;&#x65;&#46;&#x63;&#111;&#109;</a>.
167
226
  Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
168
227
 
169
228
  <h2 id="CHEF">CHEF</h2>
@@ -172,7 +231,7 @@ sub-command looks in the following locations for the template to use:</p>
172
231
 
173
232
 
174
233
  <ol class='man-decor man-foot man foot'>
175
- <li class='tl'>Chef 0.10.0.beta.8</li>
234
+ <li class='tl'>Chef 0.10.0.beta.9</li>
176
235
  <li class='tc'>April 2011</li>
177
236
  <li class='tr'>knife-bootrap(1)</li>
178
237
  </ol>
@@ -61,8 +61,7 @@
61
61
  <div class='man-navigation' style='display:none'>
62
62
  <a href="#NAME">NAME</a>
63
63
  <a href="#SYNOPSIS">SYNOPSIS</a>
64
- <a href="#DESCRIPTION">DESCRIPTION</a>
65
- <a href="#CLIENT-SUB-COMMANDS">CLIENT SUB-COMMANDS</a>
64
+ <a href="#SUB-COMMANDS">SUB-COMMANDS</a>
66
65
  <a href="#BULK-DELETE">BULK DELETE</a>
67
66
  <a href="#CREATE">CREATE</a>
68
67
  <a href="#DELETE">DELETE</a>
@@ -70,6 +69,7 @@
70
69
  <a href="#LIST">LIST</a>
71
70
  <a href="#REREGISTER">REREGISTER</a>
72
71
  <a href="#SHOW">SHOW</a>
72
+ <a href="#DESCRIPTION">DESCRIPTION</a>
73
73
  <a href="#SEE-ALSO">SEE ALSO</a>
74
74
  <a href="#AUTHOR">AUTHOR</a>
75
75
  <a href="#DOCUMENTATION">DOCUMENTATION</a>
@@ -91,24 +91,10 @@
91
91
 
92
92
  <p><strong>knife</strong> <strong>client</strong> <em>sub-command</em> <em>(options)</em></p>
93
93
 
94
- <h2 id="DESCRIPTION">DESCRIPTION</h2>
95
-
96
- <p>Clients are identities used for communication with the Chef Server API,
97
- roughly equivalent to user accounts on the Chef Server, except that
98
- clients only communicate with the Chef Server API and are authenticated
99
- via request signatures.</p>
100
-
101
- <p>In the typical case, there will be one client object on the server for
102
- each node, and the corresponding client and node will have identical
103
- names.</p>
104
-
105
- <p>In the Chef authorization model, there is one special client, the
106
- "validator", which is authorized to create new non-administrative
107
- clients but has minimal privileges otherwise. This identity is used as a
108
- sort of "guest account" to create a client identity when initially
109
- setting up a host for management with Chef.</p>
94
+ <h2 id="SUB-COMMANDS">SUB-COMMANDS</h2>
110
95
 
111
- <h2 id="CLIENT-SUB-COMMANDS">CLIENT SUB-COMMANDS</h2>
96
+ <p>Client subcommands follow a basic create, read, update, delete (CRUD)
97
+ pattern. The Following subcommands are available:</p>
112
98
 
113
99
  <h2 id="BULK-DELETE">BULK DELETE</h2>
114
100
 
@@ -187,17 +173,34 @@ Use care when reregistering the validator client.</p>
187
173
 
188
174
  <p>Show a client. Output format is determined by the --format option.</p>
189
175
 
176
+ <h2 id="DESCRIPTION">DESCRIPTION</h2>
177
+
178
+ <p>Clients are identities used for communication with the Chef Server API,
179
+ roughly equivalent to user accounts on the Chef Server, except that
180
+ clients only communicate with the Chef Server API and are authenticated
181
+ via request signatures.</p>
182
+
183
+ <p>In the typical case, there will be one client object on the server for
184
+ each node, and the corresponding client and node will have identical
185
+ names.</p>
186
+
187
+ <p>In the Chef authorization model, there is one special client, the
188
+ "validator", which is authorized to create new non-administrative
189
+ clients but has minimal privileges otherwise. This identity is used as a
190
+ sort of "guest account" to create a client identity when initially
191
+ setting up a host for management with Chef.</p>
192
+
190
193
  <h2 id="SEE-ALSO">SEE ALSO</h2>
191
194
 
192
195
  <p> <strong>knife-node</strong>(1)</p>
193
196
 
194
197
  <h2 id="AUTHOR">AUTHOR</h2>
195
198
 
196
- <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>
199
+ <p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#111;&#58;&#x61;&#x64;&#97;&#109;&#64;&#111;&#x70;&#115;&#99;&#x6f;&#x64;&#101;&#x2e;&#x63;&#x6f;&#109;" data-bare-link="true">&#97;&#x64;&#97;&#x6d;&#64;&#111;&#112;&#x73;&#x63;&#x6f;&#x64;&#101;&#46;&#99;&#111;&#x6d;</a> with many contributions from the community.</p>
197
200
 
198
201
  <h2 id="DOCUMENTATION">DOCUMENTATION</h2>
199
202
 
200
- <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>.
203
+ <p> This manual page was written by Joshua Timberman <a href="&#x6d;&#97;&#x69;&#x6c;&#116;&#x6f;&#x3a;&#106;&#111;&#115;&#104;&#117;&#97;&#64;&#111;&#112;&#x73;&#99;&#x6f;&#x64;&#101;&#x2e;&#x63;&#x6f;&#109;" data-bare-link="true">&#106;&#x6f;&#115;&#104;&#117;&#x61;&#64;&#111;&#x70;&#x73;&#x63;&#111;&#x64;&#x65;&#46;&#x63;&#111;&#109;</a>.
201
204
  Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
202
205
 
203
206
  <h2 id="CHEF">CHEF</h2>
@@ -206,7 +209,7 @@ Use care when reregistering the validator client.</p>
206
209
 
207
210
 
208
211
  <ol class='man-decor man-foot man foot'>
209
- <li class='tl'>Chef 0.10.0.beta.8</li>
212
+ <li class='tl'>Chef 0.10.0.beta.9</li>
210
213
  <li class='tc'>April 2011</li>
211
214
  <li class='tr'>knife-client(1)</li>
212
215
  </ol>
@@ -160,7 +160,7 @@ may need to modify that setting after copying to a remote host.</p></li>
160
160
 
161
161
 
162
162
  <ol class='man-decor man-foot man foot'>
163
- <li class='tl'>Chef 0.10.0.beta.8</li>
163
+ <li class='tl'>Chef 0.10.0.beta.9</li>
164
164
  <li class='tc'>April 2011</li>
165
165
  <li class='tr'>knife-configure(1)</li>
166
166
  </ol>
@@ -62,6 +62,15 @@
62
62
  <a href="#NAME">NAME</a>
63
63
  <a href="#SYNOPSIS">SYNOPSIS</a>
64
64
  <a href="#COOKBOOK-SITE-SUB-COMMANDS">COOKBOOK SITE SUB-COMMANDS</a>
65
+ <a href="#INSTALL">INSTALL</a>
66
+ <a href="#DOWNLOAD">DOWNLOAD</a>
67
+ <a href="#LIST">LIST</a>
68
+ <a href="#SEARCH">SEARCH</a>
69
+ <a href="#SHARE">SHARE</a>
70
+ <a href="#UNSHARE">UNSHARE</a>
71
+ <a href="#SHOW">SHOW</a>
72
+ <a href="#DESCRIPTION">DESCRIPTION</a>
73
+ <a href="#EXAMPLES">EXAMPLES</a>
65
74
  <a href="#SEE-ALSO">SEE ALSO</a>
66
75
  <a href="#AUTHOR">AUTHOR</a>
67
76
  <a href="#DOCUMENTATION">DOCUMENTATION</a>
@@ -85,18 +94,55 @@
85
94
 
86
95
  <h2 id="COOKBOOK-SITE-SUB-COMMANDS">COOKBOOK SITE SUB-COMMANDS</h2>
87
96
 
88
- <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>
97
+ <p><code>knife cookbook site</code> provides the following subcommands:</p>
89
98
 
90
- <p><strong>cookbook site download COOKBOOK [VERSION]</strong> <em>(options)</em></p>
99
+ <h2 id="INSTALL">INSTALL</h2>
100
+
101
+ <p><strong>cookbook site install COOKBOOK [VERSION]</strong> <em>(options)</em></p>
102
+
103
+ <dl>
104
+ <dt><code>-d</code>, <code>--dependencies</code></dt><dd>Grab dependencies automatically</dd>
105
+ </dl>
106
+
107
+
108
+ <p>Uses <span class="man-ref">git<span class="s">(1)</span></span> version control in conjunction with the cookbook site to
109
+ install community contributed cookbooks to your local cookbook
110
+ repository. Running <code>knife cookbook site install</code> does the following:</p>
111
+
112
+ <ol>
113
+ <li>A new "pristine copy" branch is created in git for tracking the
114
+ upstream;</li>
115
+ <li>All existing cookbooks are removed from the branch;</li>
116
+ <li>The cookbook is downloaded from the cookbook site in tarball form;</li>
117
+ <li>The downloaded cookbook is untarred, and its contents commited via git;</li>
118
+ <li>The pristine copy branch is merged into the master branch.</li>
119
+ </ol>
120
+
121
+
122
+ <p>By installing cookbook with this process, you can locally modify the
123
+ upstream cookbook in your master branch ant let git maintain your
124
+ changes as a separate patch. When an updated upstream version becomes
125
+ available, you will be able to merge the upstream changes while
126
+ maintaining your local modifications.</p>
127
+
128
+ <p>If <em>-d</em> is specified, the process is applied recursively to all the
129
+ cookbooks <em>COOKBOOK</em> depends on (via metadata <em>dependencies</em>).</p>
130
+
131
+ <h2 id="DOWNLOAD">DOWNLOAD</h2>
132
+
133
+ <p><strong>knife cookbook site download COOKBOOK [VERSION]</strong> <em>(options)</em></p>
91
134
 
92
135
  <dl>
93
136
  <dt><code>-f</code>, <code>--file FILE</code></dt><dd>The filename to write to</dd>
94
137
  </dl>
95
138
 
96
139
 
97
- <p>Downloads a specific cookbook from the Community site, optionally specifying a certain version.</p>
140
+ <p>Downloads a specific cookbook from the Community site, optionally
141
+ specifying a certain version.</p>
142
+
143
+ <h2 id="LIST">LIST</h2>
98
144
 
99
- <p><strong>cookbook site list</strong> <em>(options)</em></p>
145
+ <p><strong>knife cookbook site list</strong> <em>(options)</em></p>
100
146
 
101
147
  <dl>
102
148
  <dt><code>-w</code>, <code>--with-uri</code></dt><dd>Show corresponding URIs</dd>
@@ -105,11 +151,15 @@
105
151
 
106
152
  <p>Lists available cookbooks from the Community site.</p>
107
153
 
108
- <p><strong>cookbook site search QUERY</strong> <em>(options)</em></p>
154
+ <h2 id="SEARCH">SEARCH</h2>
155
+
156
+ <p><strong>knife cookbook site search QUERY</strong> <em>(options)</em></p>
109
157
 
110
- <p>Searches the Community site with the specified query.</p>
158
+ <p>Searches for available cookbooks matching the specified query.</p>
111
159
 
112
- <p><strong>cookbook site share COOKBOOK CATEGORY</strong> <em>(options)</em></p>
160
+ <h2 id="SHARE">SHARE</h2>
161
+
162
+ <p><strong>knife cookbook site share COOKBOOK CATEGORY</strong> <em>(options)</em></p>
113
163
 
114
164
  <dl>
115
165
  <dt><code>-k</code>, <code>--key KEY</code></dt><dd>API Client Key</dd>
@@ -118,36 +168,58 @@
118
168
  </dl>
119
169
 
120
170
 
121
- <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>
171
+ <p>Uploads the specified cookbook using the given category to the Opscode
172
+ cookbooks site. Requires a login user and certificate for the Opscode
173
+ Cookbooks site. By default, knife will use the username and API key
174
+ you've configured in your configuration file; otherwise you must
175
+ explicitly set these values on the command line or use an alternate
176
+ configuration file.</p>
177
+
178
+ <h2 id="UNSHARE">UNSHARE</h2>
122
179
 
123
- <p><strong>cookbook site unshare COOKBOOK</strong></p>
180
+ <p><strong>knife cookbook site unshare COOKBOOK</strong></p>
124
181
 
125
182
  <p>Stops sharing the specified cookbook on the Opscode cookbooks site.</p>
126
183
 
127
- <p><strong>cookbook site show COOKBOOK [VERSION]</strong> <em>(options)</em></p>
184
+ <h2 id="SHOW">SHOW</h2>
185
+
186
+ <p><strong>knife cookbook site show COOKBOOK [VERSION]</strong> <em>(options)</em></p>
128
187
 
129
188
  <p>Shows information from the site about a particular cookbook.</p>
130
189
 
131
- <p><strong>cookbook site vendor COOKBOOK [VERSION]</strong> <em>(options)</em></p>
190
+ <h2 id="DESCRIPTION">DESCRIPTION</h2>
132
191
 
133
- <dl>
134
- <dt><code>-d</code>, <code>--dependencies</code></dt><dd>Grab dependencies automatically</dd>
135
- </dl>
192
+ <p>The cookbook site, <a href="http://community.opscode.com/" data-bare-link="true">http://community.opscode.com/</a>, is a cookbook
193
+ distribution service operated by Opscode. This service provides users
194
+ with a central location to publish cookbooks for sharing with other
195
+ community members.</p>
196
+
197
+ <p><code>knife cookbook site</code> commands provide an interface to the cookbook
198
+ site's HTTP API. For commands that read data from the API, no account is
199
+ required. In order to upload cookbooks using the <code>knife cookbook site
200
+ share</code> command, you must create an account on the cookbook site and
201
+ configure your credentials via command line option or in your knife
202
+ configuration file.</p>
203
+
204
+ <h2 id="EXAMPLES">EXAMPLES</h2>
136
205
 
206
+ <p>Uploading cookbooks to the Opscode cookbooks site:</p>
137
207
 
138
- <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>
208
+ <pre><code>knife cookbook site share example Other -k ~/.chef/USERNAME.pem -u USERNAME
209
+ </code></pre>
139
210
 
140
211
  <h2 id="SEE-ALSO">SEE ALSO</h2>
141
212
 
142
- <p> <strong>knife-environment</strong>(1)</p>
213
+ <p> <strong><span class="man-ref">knife-cookbook<span class="s">(1)</span></span></strong>
214
+ <a href="http://community.opscode.com/cookbooks" data-bare-link="true">http://community.opscode.com/cookbooks</a></p>
143
215
 
144
216
  <h2 id="AUTHOR">AUTHOR</h2>
145
217
 
146
- <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>
218
+ <p> Chef was written by Adam Jacob <a href="&#x6d;&#x61;&#105;&#108;&#116;&#x6f;&#58;&#97;&#100;&#97;&#109;&#x40;&#x6f;&#x70;&#x73;&#99;&#111;&#100;&#101;&#x2e;&#x63;&#111;&#x6d;" data-bare-link="true">&#97;&#100;&#x61;&#109;&#64;&#x6f;&#x70;&#x73;&#99;&#111;&#x64;&#101;&#x2e;&#x63;&#x6f;&#x6d;</a> with many contributions from the community.</p>
147
219
 
148
220
  <h2 id="DOCUMENTATION">DOCUMENTATION</h2>
149
221
 
150
- <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>.
222
+ <p> This manual page was written by Joshua Timberman <a href="&#x6d;&#x61;&#105;&#108;&#116;&#x6f;&#x3a;&#x6a;&#111;&#115;&#x68;&#x75;&#x61;&#x40;&#111;&#x70;&#x73;&#x63;&#x6f;&#100;&#101;&#46;&#x63;&#111;&#x6d;" data-bare-link="true">&#x6a;&#111;&#115;&#104;&#x75;&#x61;&#x40;&#x6f;&#x70;&#x73;&#x63;&#x6f;&#100;&#101;&#x2e;&#99;&#x6f;&#109;</a>.
151
223
  Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
152
224
 
153
225
  <h2 id="CHEF">CHEF</h2>
@@ -156,7 +228,7 @@
156
228
 
157
229
 
158
230
  <ol class='man-decor man-foot man foot'>
159
- <li class='tl'>Chef 0.10.0.beta.8</li>
231
+ <li class='tl'>Chef 0.10.0.beta.9</li>
160
232
  <li class='tc'>April 2011</li>
161
233
  <li class='tr'>knife-cookbook-site(1)</li>
162
234
  </ol>
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta http-equiv='content-type' value='text/html;charset=utf8'>
5
5
  <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
6
- <title>knife-cookbook(1) - Upload and manage Chef cookbooks</title>
6
+ <title>knife-cookbook(1) - upload and manage chef cookbooks</title>
7
7
  <style type='text/css' media='all'>
8
8
  /* style: man */
9
9
  body#manpage {margin:0}
@@ -61,7 +61,23 @@
61
61
  <div class='man-navigation' style='display:none'>
62
62
  <a href="#NAME">NAME</a>
63
63
  <a href="#SYNOPSIS">SYNOPSIS</a>
64
- <a href="#COOKBOOK-SUB-COMMANDS">COOKBOOK SUB-COMMANDS</a>
64
+ <a href="#SUB-COMMANDS">SUB-COMMANDS</a>
65
+ <a href="#LIST">LIST</a>
66
+ <a href="#SHOW">SHOW</a>
67
+ <a href="#UPLOAD">UPLOAD</a>
68
+ <a href="#DOWNLOAD">DOWNLOAD</a>
69
+ <a href="#DELETE">DELETE</a>
70
+ <a href="#BULK-DELETE">BULK DELETE</a>
71
+ <a href="#COOKBOOK-CREATE">COOKBOOK CREATE</a>
72
+ <a href="#METADATA">METADATA</a>
73
+ <a href="#METADATA-FROM-FILE">METADATA FROM FILE</a>
74
+ <a href="#TEST">TEST</a>
75
+ <a href="#RECIPE-LIST">RECIPE LIST</a>
76
+ <a href="#DESCRIPTION">DESCRIPTION</a>
77
+ <a href="#SEE-ALSO">SEE ALSO</a>
78
+ <a href="#AUTHOR">AUTHOR</a>
79
+ <a href="#DOCUMENTATION">DOCUMENTATION</a>
80
+ <a href="#CHEF">CHEF</a>
65
81
  </div>
66
82
 
67
83
  <ol class='man-decor man-head man head'>
@@ -72,158 +88,282 @@
72
88
 
73
89
  <h2 id="NAME">NAME</h2>
74
90
  <p class="man-name">
75
- <code>knife-cookbook</code> - <span class="man-whatis">Upload and manage Chef cookbooks</span>
91
+ <code>knife-cookbook</code> - <span class="man-whatis">upload and manage chef cookbooks</span>
76
92
  </p>
77
93
 
78
94
  <h2 id="SYNOPSIS">SYNOPSIS</h2>
79
95
 
80
96
  <p><strong>knife</strong> <strong>cookbook</strong> <em>sub-command</em> <em>(options)</em></p>
81
97
 
82
- <h2 id="COOKBOOK-SUB-COMMANDS">COOKBOOK SUB-COMMANDS</h2>
98
+ <h2 id="SUB-COMMANDS">SUB-COMMANDS</h2>
83
99
 
84
- <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>
100
+ <p><code>knife cookbook</code> supports the following sub commands:</p>
85
101
 
86
- <p><strong>cookbook bulk delete REGEX</strong> <em>(options)</em></p>
102
+ <h2 id="LIST">LIST</h2>
103
+
104
+ <p><strong>knife cookbook list</strong> <em>(options)</em></p>
87
105
 
88
106
  <dl>
89
- <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>
107
+ <dt><code>-a</code>, <code>--all</code></dt><dd>show all versions of a cookbook instead of just the most recent</dd>
108
+ <dt><code>-w</code>, <code>--with-uri</code></dt><dd>show corresponding uris</dd>
90
109
  </dl>
91
110
 
92
111
 
93
- <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>
112
+ <p>Lists the cookbooks available on the Chef server.</p>
113
+
114
+ <h2 id="SHOW">SHOW</h2>
94
115
 
95
- <p><strong>cookbook create COOKBOOK</strong> <em>(options)</em></p>
116
+ <p><strong>knife cookbook show cookbook [version] [part] [filename]</strong> <em>(options)</em></p>
96
117
 
97
118
  <dl>
98
- <dt><code>-o</code>, <code>--cookbook-path PATH</code></dt><dd>The directory where the cookbook will be created</dd>
99
- <dt><code>-r</code>, <code>--readme-format FORMAT</code></dt><dd>Format of the README file</dd>
100
- <dt><code>-C</code>, <code>--copyright COPYRIGHT</code></dt><dd>Name of Copyright holder</dd>
101
- <dt><code>-I</code>, <code>--license LICENSE</code></dt><dd>License for cookbook, apachev2 or none</dd>
102
- <dt><code>-E</code>, <code>--email EMAIL</code></dt><dd>Email address of cookbook maintainer</dd>
119
+ <dt><code>-f</code>, <code>--fqdn fqdn </code></dt><dd>the fqdn of the host to see the file for</dd>
120
+ <dt><code>-p</code>, <code>--platform platform </code></dt><dd>the platform to see the file for</dd>
121
+ <dt><code>-v</code>, <code>--platform-version version</code></dt><dd>the platform version to see the file for</dd>
103
122
  </dl>
104
123
 
105
124
 
106
- <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>
125
+ <p>show a particular part of a <em>cookbook</em> for the specified <em>version</em>. <em>part</em> can be one of:</p>
107
126
 
108
127
  <ul>
109
- <li>COOKBOOK/attributes</li>
110
- <li>COOKBOOK/definitions</li>
111
- <li>COOKBOOK/files/default</li>
112
- <li>COOKBOOK/libraries</li>
113
- <li>COOKBOOK/metadata.rb</li>
114
- <li>COOKBOOK/providers</li>
115
- <li>COOKBOOK/README.rdoc</li>
116
- <li>COOKBOOK/recipes/default.rb</li>
117
- <li>COOKBOOK/resources</li>
118
- <li>COOKBOOK/templates/default</li>
128
+ <li><em>attributes</em></li>
129
+ <li><em>definitions</em></li>
130
+ <li><em>files</em></li>
131
+ <li><em>libraries</em></li>
132
+ <li><em>providers</em></li>
133
+ <li><em>recipes</em></li>
134
+ <li><em>resources</em></li>
135
+ <li><em>templates</em></li>
119
136
  </ul>
120
137
 
121
138
 
122
- <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>
139
+ <h2 id="UPLOAD">UPLOAD</h2>
123
140
 
124
- <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>
141
+ <p><strong>knife cookbook upload [cookbooks...]</strong> <em>(options)</em></p>
125
142
 
126
- <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>
143
+ <dl>
144
+ <dt><code>-a</code>, <code>--all</code></dt><dd>upload all cookbooks, rather than just a single cookbook</dd>
145
+ <dt><code>-o</code>, <code>--cookbook-path path:path</code></dt><dd>a colon-separated path to look for cookbooks in</dd>
146
+ <dt><code>-E</code>, <code>--environment ENVIRONMENT</code></dt><dd>An <em>ENVIRONMENT</em> to apply the uploaded cookbooks to. Specifying this
147
+ option will cause knife to edit the <em>ENVIRONMENT</em> to place a strict
148
+ version constraint on the cookbook version(s) uploaded.</dd>
149
+ <dt><code>--freeze</code></dt><dd>Sets the frozen flag on the uploaded cookbook(s) Any future attempt
150
+ to modify the cookbook without changing the version number will
151
+ return an error unless --force is specified.</dd>
152
+ <dt class="flush"><code>--force</code></dt><dd>Overrides the frozen flag on a cookbook, allowing you to overwrite a
153
+ cookbook version that has previously been uploaded with the --freeze
154
+ option.</dd>
155
+ </dl>
127
156
 
128
- <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>
129
157
 
130
- <p>The cookbook copyright, license and email settings can be filled in the <code>knife.rb</code>, for example with default values:</p>
158
+ <p>Uploads one or more cookbooks from your local cookbook repository(ies)
159
+ to the Chef Server. Only files that don't yet exist on the server will
160
+ be uploaded.</p>
131
161
 
132
- <pre><code>cookbook_copyright "YOUR_COMPANY_NAME"
133
- cookbook_license "none"
134
- cookbook_email "YOUR_EMAIL"
135
- </code></pre>
162
+ <h2 id="DOWNLOAD">DOWNLOAD</h2>
136
163
 
137
- <p><strong>cookbook delete COOKBOOK [VERSION]</strong> <em>(options)</em></p>
164
+ <p><strong>knife cookbook download cookbook [version]</strong> <em>(options)</em></p>
138
165
 
139
166
  <dl>
140
- <dt><code>-a</code>, <code>--all</code></dt><dd>Delete all versions</dd>
141
- <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>
167
+ <dt><code>-d</code>, <code>--dir download_directory</code></dt><dd>the directory to download the cookbook into</dd>
168
+ <dt><code>-f</code>, <code>--force</code></dt><dd>overwrite an existing directory with the download</dd>
169
+ <dt><code>-n</code>, <code>--latest</code></dt><dd>download the latest version of the cookbook</dd>
142
170
  </dl>
143
171
 
144
172
 
145
- <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>
173
+ <p>download a cookbook from the chef server. if no version is specified and
174
+ only one version exists on the server, that version will be downloaded.
175
+ if no version is specified and multiple versions are available on the
176
+ server, you will be prompted for a version to download.</p>
146
177
 
147
- <p><strong>cookbook download COOKBOOK [VERSION]</strong> <em>(options)</em></p>
178
+ <h2 id="DELETE">DELETE</h2>
179
+
180
+ <p><strong>knife cookbook delete cookbook [version]</strong> <em>(options)</em></p>
148
181
 
149
182
  <dl>
150
- <dt><code>-d</code>, <code>--dir DOWNLOAD_DIRECTORY</code></dt><dd>The directory to download the cookbook into</dd>
151
- <dt><code>-f</code>, <code>--force</code></dt><dd>Overwrite an existing directory with the download</dd>
152
- <dt><code>-N</code>, <code>--latest</code></dt><dd>Download the latest version of the cookbook</dd>
183
+ <dt><code>-a</code>, <code>--all</code></dt><dd>delete all versions</dd>
184
+ <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>
153
185
  </dl>
154
186
 
155
187
 
156
- <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>
188
+ <p>delete the specified <em>version</em> of the named <em>cookbook</em>. if no version is
189
+ specified, and only one version exists on the server, that version will
190
+ be deleted. if multiple versions are available on the server, you will
191
+ be prompted for a version to delete.</p>
192
+
193
+ <h2 id="BULK-DELETE">BULK DELETE</h2>
157
194
 
158
- <p><strong>cookbook list</strong> <em>(options)</em></p>
195
+ <p><strong>knife cookbook bulk delete regex</strong> <em>(options)</em></p>
159
196
 
160
197
  <dl>
161
- <dt><code>-w</code>, <code>--with-uri</code></dt><dd>Show corresponding URIs</dd>
198
+ <dt><code>-p</code>, <code>--purge</code></dt><dd>purge files from backing store. this will disable any cookbook that
199
+ contains any of the same files as the cookbook being purged.</dd>
162
200
  </dl>
163
201
 
164
202
 
165
- <p>List all the cookbooks.</p>
203
+ <p>delete cookbooks on the chef server based on a regular expression. the
204
+ regular expression (<em>regex</em>) should be in quotes, not in //'s.</p>
166
205
 
167
- <p><strong>cookbook metadata COOKBOOK</strong> <em>(options)</em></p>
206
+ <h2 id="COOKBOOK-CREATE">COOKBOOK CREATE</h2>
207
+
208
+ <p><strong>knife cookbook create cookbook</strong> <em>(options)</em></p>
168
209
 
169
210
  <dl>
170
- <dt><code>-a</code>, <code>--all</code></dt><dd>Generate metadata for all cookbooks, rather than just a single cookbook</dd>
171
- <dt><code>-o</code>, <code>--cookbook-path PATH:PATH</code></dt><dd>A colon-separated path to look for cookbooks in</dd>
211
+ <dt><code>-o</code>, <code>--cookbook-path path</code></dt><dd>the directory where the cookbook will be created</dd>
212
+ <dt><code>-r</code>, <code>--readme-format format</code></dt><dd>format of the readme file</dd>
213
+ <dt><code>-c</code>, <code>--copyright copyright</code></dt><dd>name of copyright holder</dd>
214
+ <dt><code>-i</code>, <code>--license license</code></dt><dd>license for cookbook, apachev2 or none</dd>
215
+ <dt><code>-e</code>, <code>--email email</code></dt><dd>email address of cookbook maintainer</dd>
172
216
  </dl>
173
217
 
174
218
 
175
- <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>
219
+ <p>this is a helper command that creates a new cookbook directory in the
220
+ <code>cookbook_path</code>. the following directories and files are created for the
221
+ named cookbook.</p>
222
+
223
+ <ul>
224
+ <li>cookbook/attributes</li>
225
+ <li>cookbook/definitions</li>
226
+ <li>cookbook/files/default</li>
227
+ <li>cookbook/libraries</li>
228
+ <li>cookbook/metadata.rb</li>
229
+ <li>cookbook/providers</li>
230
+ <li>cookbook/readme.rdoc</li>
231
+ <li>cookbook/recipes/default.rb</li>
232
+ <li>cookbook/resources</li>
233
+ <li>cookbook/templates/default</li>
234
+ </ul>
235
+
176
236
 
177
- <p><strong>cookbook metadata from FILE</strong> <em>(options)</em></p>
237
+ <p>supported readme formats are 'rdoc' (default), 'md', 'mkd', 'txt'. the
238
+ readme file will be written with the specified extension and a set of
239
+ helpful starting headers.</p>
240
+
241
+ <p>specify <code>-c</code> or <code>--copyright</code> with the name of the copyright holder as
242
+ your name or your company/organization name in a quoted string. if this
243
+ value is not specified an all-caps string <code>your_company_name</code> is used
244
+ which can be easily changed with find/replace.</p>
245
+
246
+ <p>specify <code>-i</code> or <code>--license</code> with the license that the cookbook is
247
+ distributed under for sharing with other people or posting to the
248
+ opscode cookbooks site. be aware of the licenses of files you put inside
249
+ the cookbook and follow any restrictions they describe. when using
250
+ <code>none</code> (default) or <code>apachev2</code>, comment header text and metadata file
251
+ are pre-filled. the <code>none</code> license will be treated as
252
+ non-redistributable.</p>
253
+
254
+ <p>specify <code>-e</code> or <code>--email</code> with the email address of the cookbook's
255
+ maintainer. if this value is not specified, an all-caps string
256
+ <code>your_email</code> is used which can easily be changed with find/replace.</p>
257
+
258
+ <p>the cookbook copyright, license and email settings can be filled in the
259
+ <code>knife.rb</code>, for example with default values:</p>
260
+
261
+ <pre><code>cookbook_copyright "your_company_name"
262
+ cookbook_license "none"
263
+ cookbook_email "your_email"
264
+ </code></pre>
178
265
 
179
- <p>Load the cookbook metadata from a specified file.</p>
266
+ <h2 id="METADATA">METADATA</h2>
180
267
 
181
- <p><strong>cookbook show COOKBOOK [VERSION] [PART] [FILENAME]</strong> <em>(options)</em></p>
268
+ <p><strong>knife cookbook metadata cookbook</strong> <em>(options)</em></p>
182
269
 
183
270
  <dl>
184
- <dt><code>-f</code>, <code>--fqdn FQDN </code></dt><dd>The FQDN of the host to see the file for</dd>
185
- <dt><code>-p</code>, <code>--platform PLATFORM </code></dt><dd>The platform to see the file for</dd>
186
- <dt><code>-V</code>, <code>--platform-version VERSION</code></dt><dd>The platform version to see the file for</dd>
271
+ <dt><code>-a</code>, <code>--all</code></dt><dd>generate metadata for all cookbooks, rather than just a single cookbook</dd>
272
+ <dt><code>-o</code>, <code>--cookbook-path path:path</code></dt><dd>a colon-separated path to look for cookbooks in</dd>
187
273
  </dl>
188
274
 
189
275
 
190
- <p>Show a particular part of a <em>COOKBOOK</em> for the specified <em>VERSION</em>. <em>PART</em> can be one of:</p>
276
+ <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>
191
277
 
192
- <ul>
193
- <li><em>attributes</em></li>
194
- <li><em>definitions</em></li>
195
- <li><em>files</em></li>
196
- <li><em>libraries</em></li>
197
- <li><em>providers</em></li>
198
- <li><em>recipes</em></li>
199
- <li><em>resources</em></li>
200
- <li><em>templates</em></li>
201
- </ul>
278
+ <h2 id="METADATA-FROM-FILE">METADATA FROM FILE</h2>
202
279
 
280
+ <p><strong>knife cookbook metadata from file</strong> <em>(options)</em></p>
203
281
 
204
- <p><strong>cookbook test [COOKBOOKS...]</strong> <em>(options)</em></p>
282
+ <p>load the cookbook metadata from a specified file.</p>
283
+
284
+ <h2 id="TEST">TEST</h2>
285
+
286
+ <p><strong>knife cookbook test [cookbooks...]</strong> <em>(options)</em></p>
205
287
 
206
288
  <dl>
207
- <dt><code>-a</code>, <code>--all</code></dt><dd>Test all cookbooks, rather than just a single cookbook</dd>
208
- <dt><code>-o</code>, <code>--cookbook-path PATH:PATH</code></dt><dd>A colon-separated path to look for cookbooks in</dd>
289
+ <dt><code>-a</code>, <code>--all</code></dt><dd>test all cookbooks, rather than just a single cookbook</dd>
290
+ <dt><code>-o</code>, <code>--cookbook-path path:path</code></dt><dd>a colon-separated path to look for cookbooks in</dd>
209
291
  </dl>
210
292
 
211
293
 
212
- <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>
294
+ <p>test the specified cookbooks for syntax errors. this uses the built-in
295
+ ruby syntax checking option for files in the cookbook ending in <code>.rb</code>,
296
+ and the erb syntax check for files ending in <code>.erb</code> (templates).</p>
297
+
298
+ <h2 id="RECIPE-LIST">RECIPE LIST</h2>
213
299
 
214
- <p><strong>cookbook upload [COOKBOOKS...]</strong> <em>(options)</em></p>
300
+ <p><strong>knife recipe list [PATTERN]</strong></p>
301
+
302
+ <p>List available recipes from the server. Specify <em>PATTERN</em> as a regular
303
+ expression to limit the results.</p>
304
+
305
+ <h2 id="DESCRIPTION">DESCRIPTION</h2>
306
+
307
+ <p>Cookbooks are the fundamental unit of distribution in Chef. They
308
+ encapsulate all recipes of resources and assets used to configure a
309
+ particular aspect of the infrastructure. The following sub-commands can
310
+ be used to manipulate the cookbooks stored on the Chef Server.</p>
311
+
312
+ <p>On disk, cookbooks are directories with a defined structure. The
313
+ following directories may appear within a cookbook:</p>
215
314
 
216
315
  <dl>
217
- <dt><code>-a</code>, <code>--all</code></dt><dd>Upload all cookbooks, rather than just a single cookbook</dd>
218
- <dt><code>-o</code>, <code>--cookbook-path PATH:PATH</code></dt><dd>A colon-separated path to look for cookbooks in</dd>
316
+ <dt>COOKBOOK/attributes/</dt><dd>Ruby files that define default parameters to be used in recipes</dd>
317
+ <dt>COOKBOOK/definitions/</dt><dd>Ruby files that contain <em>resource definitions</em></dd>
318
+ <dt>COOKBOOK/files/SPECIFICITY</dt><dd>Files of arbitrary type. These files may be downloaded by
319
+ <span class="man-ref">chef-client<span class="s">(8)</span></span> when configuring a host.</dd>
320
+ <dt>COOKBOOK/libraries/</dt><dd>Ruby files that contain library code needed for recipes</dd>
321
+ <dt>COOKBOOK/providers/</dt><dd>Ruby files that contain Lightweight Provider definitions</dd>
322
+ <dt>COOKBOOK/recipes/</dt><dd>Ruby files that use Chef's recipe DSL to describe the desired
323
+ configuration of a system</dd>
324
+ <dt>COOKBOOK/resources/</dt><dd>Ruby files that contain Lightweight Resource definitions</dd>
325
+ <dt>COOKBOOK/templates/SPECIFICITY</dt><dd>ERuby (ERb) template files. These are referenced by <em>recipes</em> and
326
+ evaluated to dynamically generate configuration files.</dd>
219
327
  </dl>
220
328
 
221
329
 
222
- <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>
330
+ <p><strong>SPECIFICITY</strong> is a feature of <em>files</em> and <em>templates</em> that allow you
331
+ to specify alternate files to be used on a specific OS platform or host.
332
+ The default specificity setting is <em>default</em>, that is files in
333
+ <code>COOKBOOK/files/default</code> will be used when a more specific copy is not
334
+ available. Further documentation for this feature is available on the
335
+ Chef wiki: <a href="http://wiki.opscode.com/display/chef/File+Distribution#FileDistribution-FileSpecificity" data-bare-link="true">http://wiki.opscode.com/display/chef/File+Distribution#FileDistribution-FileSpecificity</a></p>
336
+
337
+ <p>Cookbooks also contain a metadata file that defines various properties
338
+ of the cookbook. The most important of these are the <em>version</em> and the
339
+ <em>dependencies</em>. The <em>version</em> is used in combination with environments
340
+ to select which copy of a given cookbook is distributed to a node. The
341
+ <em>dependencies</em> are used by the server to determine which additional
342
+ cookbooks must be distributed to a given host when it requires a
343
+ cookbook.</p>
344
+
345
+ <h2 id="SEE-ALSO">SEE ALSO</h2>
346
+
347
+ <p> <strong><span class="man-ref">knife-environment<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-cookbook-site<span class="s">(1)</span></span></strong>
348
+ <a href="http://wiki.opscode.com/display/chef/Cookbooks" data-bare-link="true">http://wiki.opscode.com/display/chef/Cookbooks</a>
349
+ <a href="http://wiki.opscode.com/display/chef/Metadata" data-bare-link="true">http://wiki.opscode.com/display/chef/Metadata</a></p>
350
+
351
+ <h2 id="AUTHOR">AUTHOR</h2>
352
+
353
+ <p> Chef was written by Adam Jacob <a href="&#109;&#97;&#105;&#x6c;&#116;&#111;&#x3a;&#97;&#100;&#x61;&#x6d;&#x40;&#111;&#112;&#115;&#99;&#111;&#x64;&#101;&#46;&#x63;&#111;&#x6d;" data-bare-link="true">&#x61;&#100;&#97;&#109;&#64;&#111;&#112;&#x73;&#99;&#111;&#x64;&#x65;&#46;&#x63;&#x6f;&#109;</a> with many contributions from the community.</p>
354
+
355
+ <h2 id="DOCUMENTATION">DOCUMENTATION</h2>
356
+
357
+ <p> This manual page was written by Joshua Timberman <a href="&#109;&#97;&#x69;&#x6c;&#116;&#x6f;&#58;&#106;&#111;&#x73;&#104;&#117;&#97;&#x40;&#x6f;&#x70;&#x73;&#x63;&#111;&#x64;&#101;&#46;&#99;&#111;&#109;" data-bare-link="true">&#x6a;&#111;&#115;&#x68;&#x75;&#x61;&#x40;&#x6f;&#112;&#115;&#x63;&#111;&#100;&#x65;&#46;&#x63;&#x6f;&#109;</a>.
358
+ Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
359
+
360
+ <h2 id="CHEF">CHEF</h2>
361
+
362
+ <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>
223
363
 
224
364
 
225
365
  <ol class='man-decor man-foot man foot'>
226
- <li class='tl'>Chef 0.10.0.beta.8</li>
366
+ <li class='tl'>Chef 0.10.0.beta.9</li>
227
367
  <li class='tc'>April 2011</li>
228
368
  <li class='tr'>knife-cookbook(1)</li>
229
369
  </ol>