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
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "KNIFE\-STATUS" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
4
+ .TH "KNIFE\-STATUS" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBknife\-status\fR \- Display status information for the nodes in your infrastructure
@@ -13,5 +13,17 @@
13
13
  \fB\-r\fR, \fB\-\-run\-list RUN_LIST\fR
14
14
  Show the run list
15
15
  .
16
- .P
16
+ .SH "DESCRIPTION"
17
17
  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\.
18
+ .
19
+ .SH "SEE ALSO"
20
+ \fBknife\-search\fR(1)
21
+ .
22
+ .SH "AUTHOR"
23
+ Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
24
+ .
25
+ .SH "DOCUMENTATION"
26
+ 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\.
27
+ .
28
+ .SH "CHEF"
29
+ Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "KNIFE\-TAG" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
4
+ .TH "KNIFE\-TAG" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBknife\-tag\fR \- Apply tags to nodes on a Chef Server
@@ -10,4 +10,34 @@
10
10
  \fBknife\fR \fBtag\fR \fIsubcommand\fR \fI(options)\fR
11
11
  .
12
12
  .SH "TAG SUBCOMMANDS"
13
-
13
+ The following \fBtag\fR subcommands are available:
14
+ .
15
+ .SH "CREATE"
16
+ \fBknife tag create\fR \fInode\fR \fItag\fR [\fI\.\.\.\fR]
17
+ .
18
+ .P
19
+ Adds one or more tags to \fInode\fR
20
+ .
21
+ .SH "DELETE"
22
+ \fBknife tag delete\fR \fInode\fR \fItag\fR [\fI\.\.\.\fR]
23
+ .
24
+ .P
25
+ Removes one or more tags from \fInode\fR
26
+ .
27
+ .SH "LIST"
28
+ \fBknife tag list\fR \fInode\fR
29
+ .
30
+ .P
31
+ Lists the tags applied to \fInode\fR
32
+ .
33
+ .SH "SEE ALSO"
34
+ \fBknife\-node(1)\fR
35
+ .
36
+ .SH "AUTHOR"
37
+ Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
38
+ .
39
+ .SH "DOCUMENTATION"
40
+ This manual page was written by Daniel DeLeo \fIdan@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
41
+ .
42
+ .SH "CHEF"
43
+ Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
@@ -1,24 +1,71 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "KNIFE" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
4
+ .TH "KNIFE" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
5
5
  .
6
6
  .SH "NAME"
7
- \fBknife\fR \- Chef Server REST API utility
7
+ \fBknife\fR \- Chef Server API client utility
8
8
  .
9
9
  .SH "SYNOPSIS"
10
- \fBknife\fR \fIsub\-command\fR \fI(options)\fR
10
+ \fBknife\fR \fIsub\-command\fR [\fIargument\fR\.\.\.] \fI(options)\fR
11
11
  .
12
12
  .SH "DESCRIPTION"
13
- 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\.
13
+ Knife is a command\-line utility used to manage data on a Chef server through the HTTP(S) API\. Knife is organized into groups of subcommands centered around the various object types in Chef\. Each category of subcommand is documented in its own manual page\. Available topics are:
14
14
  .
15
- .P
16
- Unless otherwise specified, output is in JSON format, and input files are also JSON format\.
15
+ .IP "\(bu" 4
16
+ bootstrap
17
+ .
18
+ .IP "\(bu" 4
19
+ client
20
+ .
21
+ .IP "\(bu" 4
22
+ configure
23
+ .
24
+ .IP "\(bu" 4
25
+ cookbook\-site
26
+ .
27
+ .IP "\(bu" 4
28
+ cookbook
29
+ .
30
+ .IP "\(bu" 4
31
+ data\-bag
32
+ .
33
+ .IP "\(bu" 4
34
+ environment
35
+ .
36
+ .IP "\(bu" 4
37
+ exec
38
+ .
39
+ .IP "\(bu" 4
40
+ index
41
+ .
42
+ .IP "\(bu" 4
43
+ node
44
+ .
45
+ .IP "\(bu" 4
46
+ recipe
47
+ .
48
+ .IP "\(bu" 4
49
+ role
50
+ .
51
+ .IP "\(bu" 4
52
+ search
53
+ .
54
+ .IP "\(bu" 4
55
+ ssh
56
+ .
57
+ .IP "\(bu" 4
58
+ status
59
+ .
60
+ .IP "\(bu" 4
61
+ tag
62
+ .
63
+ .IP "" 0
17
64
  .
18
65
  .P
19
- 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\.
66
+ If the knife manuals are in your \fBMANPATH\fR, you can access help for the above topics using \fBman knife\-TOPIC\fR; otherwise, you can view the documentation using \fBknife help TOPIC\fR\.
20
67
  .
21
- .SH "GENERAL OPTIONS"
68
+ .SH "OPTIONS"
22
69
  .
23
70
  .TP
24
71
  \fB\-s\fR, \fB\-\-server\-url\fR URL
@@ -70,13 +117,10 @@ Say yes to all prompts for confirmation
70
117
  .
71
118
  .TP
72
119
  \fB\-h\fR, \fB\-\-help\fR
73
- Show this message
74
- .
75
- .P
76
- Usage information for sub\-commands can be displayed with \fBknife SUB\-COMMAND \-\-help\fR\.
120
+ Show the available options for a command\.
77
121
  .
78
122
  .SH "SUB\-COMMANDS"
79
- 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\.
123
+ Sub\-commands that operate on the basic Chef data types are structured as \fINOUN verb NOUN (options)\fR\. For all data types, the following commands are available:
80
124
  .
81
125
  .IP "\(bu" 4
82
126
  create (create)
@@ -93,13 +137,7 @@ delete (destroy)
93
137
  .IP "" 0
94
138
  .
95
139
  .P
96
- Objects stored on the server support these, as described below\.
97
- .
98
- .SH "GENERAL SUB\-COMMANDS"
99
- \fBrecipe list [PATTERN]\fR
100
- .
101
- .P
102
- List available recipes from the server\. Specify \fIPATTERN\fR as a regular expression to limit the results\.
140
+ Knife also includes commands that take actions other than displaying or modifying data on the Chef Server, such as \fBknife\-ssh(1)\fR\.
103
141
  .
104
142
  .SH "CONFIGURATION"
105
143
  The knife configuration file is a Ruby DSL to set configuration parameters for Knife\'s \fBGENERAL OPTIONS\fR\. The default location for the config file is \fB~/\.chef/knife\.rb\fR\. If managing multiple Chef repositories, per\-repository config files can be created\. The file must be \fB\.chef/knife\.rb\fR in the current directory of the repository\.
@@ -107,103 +145,31 @@ The knife configuration file is a Ruby DSL to set configuration parameters for K
107
145
  .P
108
146
  If the config file exists, knife uses these settings for \fBGENERAL OPTIONS\fR defaults\.
109
147
  .
110
- .P
111
- \fBlog_level\fR
112
- .
113
- .P
114
- 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:
115
- .
116
148
  .IP "\(bu" 4
117
- :info
149
+ \fBnode_name\fR: User or client identity (i\.e\., \fIname\fR) to use for authenticating requests to the Chef Server\.
118
150
  .
119
151
  .IP "\(bu" 4
120
- :debug
152
+ \fBclient_key\fR: Private key file to authenticate to the Chef server\. Corresponds to the \fB\-k\fR or \fB\-\-key\fR option\.
121
153
  .
122
154
  .IP "\(bu" 4
123
- :warn
155
+ \fBchef_server_url\fR: URL of the Chef server\. Corresponds to the \fB\-s\fR or \fB\-\-server\-url\fR option\. This is requested from the user when running this sub\-command\.
124
156
  .
125
157
  .IP "\(bu" 4
126
- :fatal
127
- .
128
- .IP "" 0
129
- .
130
- .P
131
- \fBlog_location\fR
132
- .
133
- .P
134
- Corresponds to the \fB\-L\fR or \fB\-\-log\-file\fR option\. Defaults is \fBSTDOUT\fR\. Valid values are \fBSTDOUT\fR or a filename\.
135
- .
136
- .P
137
- \fBnode_name\fR
138
- .
139
- .P
140
- 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\.
141
- .
142
- .P
143
- \fBclient_key\fR
144
- .
145
- .P
146
- 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\.
147
- .
148
- .P
149
- \fBchef_server_url\fR
150
- .
151
- .P
152
- 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\.
153
- .
154
- .P
155
- \fBcache_type\fR
156
- .
157
- .P
158
- 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\.
159
- .
160
- .P
161
- \fBcache_options\fR
162
- .
163
- .P
164
- Specifies various options to use for caching\. Default reads the Chef client configuration (/etc/chef/checksums)\.
165
- .
166
- .P
167
- \fBvalidation_client_name\fR
158
+ \fBcache_type\fR: The type of cache to use\. Default is BasicFile\. This can be any type of Cache that moneta supports: BasicFile, Berkeley, Couch, DataMapper, File, LMC, Memcache, Memory, MongoDB, Redis, Rufus, S3, SDBM, Tyrant, Xattr, YAML\.
168
159
  .
169
- .P
170
- Specifies the name of the client used to validate new clients\. This is requested from the user when running the configuration sub\-command\.
171
- .
172
- .P
173
- \fBvalidation_key\fR
174
- .
175
- .P
176
- 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\.
177
- .
178
- .P
179
- \fBcookbook_copyright\fR \fBcookbook_email\fR \fBcookbook_license\fR
180
- .
181
- .P
182
- 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\.
183
- .
184
- .P
185
- \fBknife[:aws_access_key_id]\fR \fBknife[:aws_secret_access_key]\fR
186
- .
187
- .P
188
- Specifies the Amazon AWS EC2 credentials to use when running the ec2 sub\-commands\.
189
- .
190
- .P
191
- \fBknife[:rackspace_api_username]\fR \fBknife[:rackspace_api_key]\fR
192
- .
193
- .P
194
- Specifies the Rackspace Cloud credentials to use when running the rackspace sub\-commands\.
160
+ .IP "\(bu" 4
161
+ \fBcache_options\fR: Specifies various options to use for caching\. These options are dependent on the \fBcache_type\fR\.
195
162
  .
196
- .P
197
- \fBknife[:terremark_username]\fR \fBknife[:terremark_password]\fR \fBknife[:terremark_service]\fR
163
+ .IP "\(bu" 4
164
+ \fBvalidation_client_name\fR: Specifies the name of the client used to validate new clients\.
198
165
  .
199
- .P
200
- Specifies the Terremark vCloud credentials to use when running the terremark sub\-commands\.
166
+ .IP "\(bu" 4
167
+ \fBvalidation_key\fR: Specifies the private key file to use when bootstrapping new hosts\. See knife\-client(1) for more information about the validation client\.
201
168
  .
202
- .P
203
- \fBknife[:slicehost_password]\fR
169
+ .IP "\(bu" 4
170
+ \fBcookbook_copyright\fR, \fBcookbook_email\fR, \fBcookbook_license\fR Used by \fBknife cookbook create\fR sub\-command to specify the copyright holder, maintainer email and license (respectively) for new cookbooks\. The copyright holder is listed as the maintainer in the cookbook\'s metadata and as the Copyright in the comments of the default recipe\. The maintainer email is used in the cookbook metadata\. The license determines what preamble to put in the comment of the default recipe, and is listed as the license in the cookbook metadata\. Currently supported licenses are "apachev2" and "none"\. Any other values will result in an empty license in the metadata (needs to be filled in by the author), and no comment preamble in the default recipe\.
204
171
  .
205
- .P
206
- Specifies the Slicehost password to use when running the slicdehost sub\-commands\.
172
+ .IP "" 0
207
173
  .
208
174
  .SH "FILES"
209
175
  \fI~/\.chef/knife\.rb\fR
@@ -244,79 +210,6 @@ Watch Chef configure systems!
244
210
  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\.
245
211
  .
246
212
  .SH "EXAMPLES"
247
- 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\.
248
- .
249
- .IP "" 4
250
- .
251
- .nf
252
-
253
- log_level :info
254
- log_location STDOUT
255
- chef_server_url \'https://api\.opscode\.com/organizations/ORGNAME\'
256
- validation_client_name \'ORGNAME\-validator\'
257
- .
258
- .fi
259
- .
260
- .IP "" 0
261
- .
262
- .P
263
- 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\.
264
- .
265
- .IP "" 4
266
- .
267
- .nf
268
-
269
- mkdir ~/\.chef/bootstrap
270
- vi ~/\.chef/bootstrap/debian5\.0\-apt\.erb
271
- .
272
- .fi
273
- .
274
- .IP "" 0
275
- .
276
- .P
277
- 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:
278
- .
279
- .IP "" 4
280
- .
281
- .nf
282
-
283
- knife bootstrap mynode\.example\.com \-\-template\-file ~/\.chef/bootstrap/debian5\.0\-apt\.erb
284
- .
285
- .fi
286
- .
287
- .IP "" 0
288
- .
289
- .P
290
- Or,
291
- .
292
- .IP "" 4
293
- .
294
- .nf
295
-
296
- knife bootstrap mynode\.example\.com \-\-distro debian5\.0\-apt
297
- .
298
- .fi
299
- .
300
- .IP "" 0
301
- .
302
- .P
303
- The \fB\-\-distro\fR parameter will automatically look in the \fB~/\.chef/bootstrap\fR directory for a file named \fBdebian5\.0\-apt\.erb\fR\.
304
- .
305
- .P
306
- 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\.
307
- .
308
- .P
309
- Uploading cookbooks to the Opscode cookbooks site using the user/certificate specifically:
310
- .
311
- .IP "" 4
312
- .
313
- .nf
314
-
315
- knife cookbook site share example Other \-k ~/\.chef/USERNAME\.pem \-u USERNAME
316
- .
317
- .fi
318
- .
319
- .IP "" 0
320
213
  .
321
214
  .SH "ENVIRONMENT"
322
215
  .
@@ -325,22 +218,34 @@ knife cookbook site share example Other \-k ~/\.chef/USERNAME\.pem \-u USERNAME
325
218
  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\.
326
219
  .
327
220
  .SH "SEE ALSO"
328
- Full documentation for Chef is located on the Chef wiki, http://wiki\.opscode\.com/display/chef/Home/\.
221
+ \fBchef\-client(8)\fR \fBchef\-server(8)\fR \fBshef(1)\fR
329
222
  .
330
223
  .P
331
- JSON is JavaScript Object Notation and more information can be found at http://json\.org/\.
224
+ \fBknife\-bootstrap(1)\fR \fBknife\-client(1)\fR \fBknife\-configure(1)\fR \fBknife\-cookbook\-site(1)\fR \fBknife\-cookbook(1)\fR \fBknife\-data\-bag(1)\fR \fBknife\-environment(1)\fR \fBknife\-exec(1)\fR \fBknife\-index(1)\fR \fBknife\-node(1)\fR \fBknife\-recipe(1)\fR \fBknife\-role(1)\fR \fBknife\-search(1)\fR \fBknife\-ssh(1)\fR \fBknife\-tag(1)\fR
332
225
  .
333
226
  .P
334
- 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/\.
227
+ Complete Chef documentation is available online: \fIhttp://wiki\.opscode\.com/display/chef/Home/\fR
335
228
  .
336
229
  .P
337
- Git is a version control system and documented at http://git\-scm\.com/\.
230
+ JSON is JavaScript Object Notation \fIhttp://json\.org/\fR
338
231
  .
339
232
  .P
340
- 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\.
233
+ SOLR is an open source search engine\. \fIhttp://lucene\.apache\.org/solr/\fR
341
234
  .
342
- .SH "AUTHOR"
343
- 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\.
235
+ .P
236
+ \fBgit(1)\fR is a version control system \fIhttp://git\-scm\.com/\fR
344
237
  .
345
238
  .P
346
- 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\.
239
+ This manual page was generated from Markdown with \fBronn(1)\fR \fIhttp://rtomayko\.github\.com/ronn/ronn\.1\.html\fR
240
+ .
241
+ .SH "AUTHOR"
242
+ Chef was written by Adam Jacob \fIadam@opscode\.com\fR of Opscode (\fIhttp://www\.opscode\.com\fR), with contributions from the community\.
243
+ .
244
+ .SH "DOCUMENTATION"
245
+ This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\.
246
+ .
247
+ .SH "LICENSE"
248
+ Both Chef and this documentation are released under the terms of the Apache 2\.0 License\. You may view the license online: \fIhttp://www\.apache\.org/licenses/LICENSE\-2\.0\.html\fR On some systems, the complete text of the Apache 2\.0 License may be found in \fB/usr/share/common\-licenses/Apache\-2\.0\fR\.
249
+ .
250
+ .SH "CHEF"
251
+ Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
@@ -1,45 +1,256 @@
1
- .TH SHEF: "8" "March 2010" "Chef: 0.8.4" "System Administration Utilities"
2
- .SH NAME
3
- shef: \- Run Chef in an IRB session.
4
- .SH SYNOPSIS
5
- .B shef
6
- \fI(options)\fR
7
- .SH DESCRIPTION
8
- .TP
9
- This manual page documents shef, a command-line REPL console used to run Chef in an IRB session. It includes recipe and attribute file syntax, and interactive debugging features.
10
- \fB\-S\fR, \fB\-\-server\fR CHEFSERVERURL
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "SHEF" "1" "April 2011" "Chef 0.10.0.beta.9" "Chef Manual"
5
+ .
6
+ .SH "NAME"
7
+ \fBshef\fR \- Interactive Chef Console
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBshef\fR [\fInamed configuration\fR] \fI(options)\fR
11
+ .
12
+ .TP
13
+ \fB\-S\fR, \fB\-\-server CHEF_SERVER_URL\fR
11
14
  The chef server URL
15
+ .
12
16
  .TP
13
17
  \fB\-z\fR, \fB\-\-client\fR
14
- chef\-client shef session
18
+ chef\-client mode
19
+ .
15
20
  .TP
16
- \fB\-c\fR, \fB\-\-config\fR CONFIG
21
+ \fB\-c\fR, \fB\-\-config CONFIG\fR
17
22
  The configuration file to use
23
+ .
18
24
  .TP
19
- \fB\-j\fR JSON_ATTRIBS
25
+ \fB\-j\fR, \fB\-\-json\-attributes JSON_ATTRIBS\fR
20
26
  Load attributes from a JSON file or URL
21
- .HP
22
- \fB\-\-json\-attributes\fR
27
+ .
28
+ .TP
29
+ \fB\-l\fR, \fB\-\-log\-level LOG_LEVEL\fR
30
+ Set the logging level
31
+ .
23
32
  .TP
24
33
  \fB\-s\fR, \fB\-\-solo\fR
25
34
  chef\-solo shef session
35
+ .
26
36
  .TP
27
37
  \fB\-a\fR, \fB\-\-standalone\fR
28
38
  standalone shef session
39
+ .
29
40
  .TP
30
41
  \fB\-v\fR, \fB\-\-version\fR
31
42
  Show chef version
43
+ .
32
44
  .TP
33
45
  \fB\-h\fR, \fB\-\-help\fR
34
- Show this message
46
+ Show command options
47
+ .
48
+ .P
49
+ When no \-\-config option is specified, shef attempts to load a default configuration file:
50
+ .
51
+ .IP "\(bu" 4
52
+ If a \fInamed configuration\fR is given, shef will load ~/\.chef/\fInamed configuration\fR/shef\.rb
53
+ .
54
+ .IP "\(bu" 4
55
+ If no \fInamed configuration\fR is given shef will load ~/\.chef/shef\.rb if it exists
56
+ .
57
+ .IP "\(bu" 4
58
+ Shef falls back to loading /etc/chef/client\.rb or /etc/chef/solo\.rb if \-z or \-s options are given and no shef\.rb can be found\.
59
+ .
60
+ .IP "\(bu" 4
61
+ The \-\-config option takes precedence over implicit configuration paths\.
62
+ .
63
+ .IP "" 0
64
+ .
65
+ .SH "DESCRIPTION"
66
+ \fBshef\fR is an irb(1) (interactive ruby) session customized for Chef\. \fBshef\fR serves two primary functions: it provides a means to interact with a Chef Server interactively using a convenient DSL; it allows you to define and run Chef recipes interactively\.
67
+ .
68
+ .SH "SYNTAX"
69
+ Shef uses irb\'s subsession feature to provide multiple modes of interaction\. In addition to the primary mode which is entered on start, \fBrecipe\fR and \fBattributes\fR modes are available\.
70
+ .
71
+ .SH "PRIMARY MODE"
72
+ The following commands are available in the primary session:
73
+ .
74
+ .TP
75
+ \fBhelp\fR
76
+ Prints a list of available commands
77
+ .
78
+ .TP
79
+ \fBversion\fR
80
+ Prints the Chef version
81
+ .
82
+ .TP
83
+ \fBrecipe\fR
84
+ Switches to \fBrecipe\fR mode
85
+ .
86
+ .TP
87
+ \fBattributes\fR
88
+ Switches to \fBattributes\fR mode
89
+ .
90
+ .TP
91
+ \fBrun_chef\fR
92
+ Initiates a chef run
93
+ .
94
+ .TP
95
+ \fBreset\fR
96
+ reinitializes shef
97
+ .
98
+ .TP
99
+ \fBecho :on|:off\fR
100
+ Turns irb\'s echo function on or off\. Echo is \fIon\fR by default\.
101
+ .
102
+ .TP
103
+ \fBtracing :on|:off\fR
104
+ Turns irb\'s function tracing feature on or off\. Tracing is extremely verbose and expected to be of interest primarily to developers\.
105
+ .
106
+ .TP
107
+ \fBnode\fR
108
+ Returns the \fInode\fR object for the current host\. See knife\-node(1) for more information about nodes\.
109
+ .
110
+ .TP
111
+ \fBohai\fR
112
+ Prints the attributes of \fInode\fR
113
+ .
114
+ .P
115
+ In addition to these commands, shef provides a DSL for accessing data on the Chef Server\. When working with remote data in shef, you chain method calls in the form \fIobject type\fR\.\fIoperation\fR, where \fIobject type\fR is in plural form\. The following object types are available:
116
+ .
117
+ .IP "\(bu" 4
118
+ \fBnodes\fR
119
+ .
120
+ .IP "\(bu" 4
121
+ \fBroles\fR
122
+ .
123
+ .IP "\(bu" 4
124
+ \fBdata_bags\fR
125
+ .
126
+ .IP "\(bu" 4
127
+ \fBclients\fR
128
+ .
129
+ .IP "\(bu" 4
130
+ \fBcookbooks\fR
131
+ .
132
+ .IP "" 0
133
+ .
134
+ .P
135
+ For each \fIobject type\fR the following operations are available:
136
+ .
137
+ .TP
138
+ \fIobject type\fR\.all(\fI&block\fR)
139
+ Loads all items from the server\. If the optional code \fIblock\fR is given, each item will be passed to the block and the results returned, similar to ruby\'s \fBEnumerable#map\fR method\.
140
+ .
141
+ .TP
142
+ \fIobject type\fR\.show(\fIobject name\fR)
143
+ Aliased as \fIobject type\fR\.load
144
+ .
145
+ .IP
146
+ Loads the singular item identified by \fIobject name\fR\.
147
+ .
148
+ .TP
149
+ \fIobject type\fR\.search(\fIquery\fR, \fI&block\fR)
150
+ Aliased as \fIobject type\fR\.find
151
+ .
152
+ .IP
153
+ Runs a search against the server and returns the matching items\. If the optional code \fIblock\fR is given each item will be passed to the block and the results returned\.
154
+ .
155
+ .IP
156
+ The \fIquery\fR may be a Solr/Lucene format query given as a String, or a Hash of conditions\. If a Hash is given, the options will be ANDed together\. To join conditions with OR, use negative queries, or any advanced search syntax, you must provide give the query in String form\.
157
+ .
158
+ .TP
159
+ \fIobject type\fR\.transform(:all|\fIquery\fR, \fI&block\fR)
160
+ Aliased as \fIobject type\fR\.bulk_edit
161
+ .
162
+ .IP
163
+ Bulk edit objects by processing them with the (required) code \fIblock\fR\. You can edit all objects of the given type by passing the Symbol \fB:all\fR as the argument, or only a subset by passing a \fIquery\fR as the argument\. The \fIquery\fR is evaluated in the same way as with \fBsearch\fR\.
164
+ .
165
+ .IP
166
+ The return value of the code \fIblock\fR is used to alter the behavior of \fBtransform\fR\. If the value returned from the block is \fBnil\fR or \fBfalse\fR, the object will not be saved\. Otherwise, the object is saved after being passed to the block\. This behavior can be exploited to create a dry run to test a data transformation\.
167
+ .
168
+ .SH "RECIPE MODE"
169
+ Recipe mode implements Chef\'s recipe DSL\. Exhaustively documenting this DSL is outside the scope of this document\. See the following pages in the Chef documentation for more information:
170
+ .
171
+ .IP "\(bu" 4
172
+ \fIhttp://wiki\.opscode\.com/display/chef/Resources\fR
173
+ .
174
+ .IP "\(bu" 4
175
+ \fIhttp://wiki\.opscode\.com/display/chef/Recipes\fR
176
+ .
177
+ .IP "" 0
178
+ .
179
+ .P
180
+ Once you have defined resources in the recipe, you can trigger a convergence run via \fBrun_chef\fR
181
+ .
182
+ .SH "EXAMPLES"
183
+ .
184
+ .IP "\(bu" 4
185
+ A "Hello World" interactive recipe
186
+ .
187
+ .IP
188
+ chef > recipe
189
+ .
190
+ .br
191
+ chef:recipe > echo :off
192
+ .
193
+ .br
194
+ chef:recipe > file "/tmp/hello_world"
195
+ .
196
+ .br
197
+ chef:recipe > run_chef
198
+ .
199
+ .br
200
+ [Sat, 09 Apr 2011 08:56:56 \-0700] INFO: Processing file[/tmp/hello_world] action create ((irb#1) line 2)
201
+ .
202
+ .br
203
+ [Sat, 09 Apr 2011 08:56:56 \-0700] INFO: file[/tmp/hello_world] created file /tmp/hello_world
204
+ .
205
+ .br
206
+ chef:recipe > pp ls \'/tmp\'
207
+ .
208
+ .br
209
+ ["\.",
210
+ .
211
+ .br
212
+ "\.\.",
213
+ .
214
+ .br
215
+ "hello_world"]
216
+ .
217
+ .IP "\(bu" 4
218
+ Search for \fInodes\fR by role, and print their IP addresses
219
+ .
220
+ .IP
221
+ chef > nodes\.find(:roles => \'monitoring\-server\') {|n| n[:ipaddress] }
222
+ .
223
+ .br
224
+ => ["10\.254\.199\.5"]
225
+ .
226
+ .IP "\(bu" 4
227
+ Remove the role \fIobsolete\fR from every node in the system
228
+ .
229
+ .IP
230
+ chef > nodes\.transform(:all) {|n| n\.run_list\.delete(\'role[obsolete]\') }
231
+ .
232
+ .br
233
+ => [node[chef098b2\.opschef\.com], node[ree\-woot], node[graphite\-dev], node[fluke\.localdomain], node[ghost\.local], node[kallistec]]
234
+ .
235
+ .IP "" 0
236
+ .
237
+ .SH "BUGS"
238
+ The name \fBshef\fR is clever in print but is confusing when spoken aloud\. Pronouncing \fBshef\fR as \fBchef console\fR is an imperfect workaround\.
239
+ .
240
+ .P
241
+ \fBshef\fR often does not perfectly replicate the context in which chef\-client(8) configures a host, which may lead to discrepancies in observed behavior\.
242
+ .
243
+ .P
244
+ \fBshef\fR has to duplicate much code from chef\-client\'s internal libraries and may become out of sync with the behavior of those libraries\.
245
+ .
35
246
  .SH "SEE ALSO"
36
- The full documentation for
37
- .B shef
38
- is maintained on the Chef wiki, http://wiki.opscode.com/display/chef/Shef/.
39
- .SH AUTHOR
40
- Shef was written by Daniel DeLeo <dan@kallistec.com> as part of Chef, by Opscode, Inc.
41
- This manual page was written by Joshua Timberman <joshua@opscode.com> with help2man. Permission is granted
42
- to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.
43
- .PP
44
- On Debian systems, the complete text of the Apache 2.0 License can be found in
45
- /usr/share/common-licenses/Apache-2.0.
247
+ chef\-client(8) knife(1) \fIhttp://wiki\.opscode\.com/display/chef/Shef\fR
248
+ .
249
+ .SH "AUTHOR"
250
+ Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. Shef was written by Daniel DeLeo\.
251
+ .
252
+ .SH "DOCUMENTATION"
253
+ This manual page was written by Daniel DeLeo \fIdan@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
254
+ .
255
+ .SH "CHEF"
256
+ Shef is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR