summaryrefslogtreecommitdiff
path: root/chef/distro/common/man/man1/knife.1
blob: dd30f4e6560b278dd0e943139550c2aa0d7e127c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "KNIFE" "1" "April 2013" "Chef 10.24.4" "Chef Manual"
.
.SH "NAME"
\fBknife\fR \- Chef Server API client utility
.
.SH "SYNOPSIS"
\fBknife\fR \fIsub\-command\fR [\fIargument\fR\.\.\.] \fI(options)\fR
.
.SH "DESCRIPTION"
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:
.
.IP "\(bu" 4
bootstrap
.
.IP "\(bu" 4
client
.
.IP "\(bu" 4
configure
.
.IP "\(bu" 4
cookbook\-site
.
.IP "\(bu" 4
cookbook
.
.IP "\(bu" 4
data\-bag
.
.IP "\(bu" 4
environment
.
.IP "\(bu" 4
exec
.
.IP "\(bu" 4
index
.
.IP "\(bu" 4
node
.
.IP "\(bu" 4
recipe
.
.IP "\(bu" 4
role
.
.IP "\(bu" 4
search
.
.IP "\(bu" 4
ssh
.
.IP "\(bu" 4
status
.
.IP "\(bu" 4
tag
.
.IP "" 0
.
.P
If the knife manuals are in your \fBMANPATH\fR, you can access help for the above topics using \fBman knife\-TOPIC\fR; otherwise, you can view the documentation using \fBknife help TOPIC\fR\.
.
.SH "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\-\-environment ENVIRONMENT\fR
Set the Chef environment
.
.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\. See FORMATS for details\.
.
.TP
\fB\-d\fR, \fB\-\-disable\-editing\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\-V\fR, \fB\-\-verbose\fR
More verbose output\. Use twice for max verbosity\.
.
.TP
\fB\-y\fR, \fB\-\-yes\fR
Say yes to all prompts for confirmation
.
.TP
\fB\-\-defaults\fR
Accept default values for all questions
.
.TP
\fB\-\-[no\-]color\fR
Use colored output\. Color enabled by default\.
.
.TP
\fB\-h\fR, \fB\-\-help\fR
Show the available options for a command\.
.
.SH "SUB\-COMMANDS"
Sub\-commands that operate on the basic Chef data types are structured as \fINOUN verb NOUN (options)\fR\. For all data types, the following commands are available:
.
.IP "\(bu" 4
create (create)
.
.IP "\(bu" 4
list and show (read)
.
.IP "\(bu" 4
edit (update)
.
.IP "\(bu" 4
delete (destroy)
.
.IP "" 0
.
.P
Knife also includes commands that take actions other than displaying or modifying data on the Chef Server, such as \fBknife\-ssh(1)\fR\.
.
.SH "CONFIGURATION"
The knife configuration file is a Ruby DSL to set configuration parameters for Knife\'s \fBGENERAL OPTIONS\fR\. The default location for the config file is \fB~/\.chef/knife\.rb\fR\. If managing multiple Chef repositories, per\-repository config files can be created\. The file must be \fB\.chef/knife\.rb\fR in the current directory of the repository\.
.
.P
If the config file exists, knife uses these settings for \fBGENERAL OPTIONS\fR defaults\.
.
.IP "\(bu" 4
\fBnode_name\fR: User or client identity (i\.e\., \fIname\fR) to use for authenticating requests to the Chef Server\.
.
.IP "\(bu" 4
\fBclient_key\fR: Private key file to authenticate to the Chef server\. Corresponds to the \fB\-k\fR or \fB\-\-key\fR option\.
.
.IP "\(bu" 4
\fBchef_server_url\fR: URL of the Chef server\. Corresponds to the \fB\-s\fR or \fB\-\-server\-url\fR option\. This is requested from the user when running this sub\-command\.
.
.IP "\(bu" 4
\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\.
.
.IP "\(bu" 4
\fBcache_options\fR: Specifies various options to use for caching\. These options are dependent on the \fBcache_type\fR\.
.
.IP "\(bu" 4
\fBvalidation_client_name\fR: Specifies the name of the client used to validate new clients\.
.
.IP "\(bu" 4
\fBvalidation_key\fR: Specifies the private key file to use when bootstrapping new hosts\. See knife\-client(1) for more information about the validation client\.
.
.IP "\(bu" 4
\fBcookbook_copyright\fR, \fBcookbook_email\fR, \fBcookbook_license\fR, \fBreadme_format\fR Used by \fBknife cookbook create\fR sub\-command to specify the copyright holder, maintainer email, license and readme format (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\. Currently supported readme formats are "md", "mkd", "txt", and "rdoc"\. Any other value will result in an unformatted README\.
.
.IP "" 0
.
.SH "FILES"
\fI~/\.chef/knife\.rb\fR
.
.P
Ruby DSL configuration file for knife\. See \fBCONFIGURATION\fR\.
.
.SH "FORMATS"
The amount of content displayed and the output format are modified by the \fB\-\-format\fR option\. If no alternate format is selected, the default is summary\.
.
.P
Valid formats are:
.
.TP
\fBsummary\fR
displays the node in a custom, summarized format (default)
.
.TP
\fBtext\fR
displays the node data in its entirety using the colorized tree display
.
.TP
\fBjson\fR
displays the node in JSON format
.
.TP
\fByaml\fR
displays the node in YAML format
.
.TP
\fBpp\fR
displays the node using Ruby\'s pretty printer\.
.
.P
For brevity, only the first character of the format is required, for example, \-Fj will produce JSON format output\.
.
.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"
.
.SH "ENVIRONMENT"
.
.TP
\fBEDITOR\fR
The text editor to use for editing data\. The \-\-editor option takes precedence over this value, and the \-\-disable\-editing option supresses data editing entirely\.
.
.SH "SEE ALSO"
\fBchef\-client(8)\fR \fBchef\-server(8)\fR \fBshef(1)\fR
.
.P
\fBknife\-bootstrap(1)\fR \fBknife\-client(1)\fR \fBknife\-configure(1)\fR \fBknife\-cookbook\-site(1)\fR \fBknife\-cookbook(1)\fR \fBknife\-data\-bag(1)\fR \fBknife\-environment(1)\fR \fBknife\-exec(1)\fR \fBknife\-index(1)\fR \fBknife\-node(1)\fR \fBknife\-recipe(1)\fR \fBknife\-role(1)\fR \fBknife\-search(1)\fR \fBknife\-ssh(1)\fR \fBknife\-tag(1)\fR
.
.P
Complete Chef documentation is available online: \fIhttp://wiki\.opscode\.com/display/chef/Home/\fR
.
.P
JSON is JavaScript Object Notation \fIhttp://json\.org/\fR
.
.P
SOLR is an open source search engine\. \fIhttp://lucene\.apache\.org/solr/\fR
.
.P
\fBgit(1)\fR is a version control system \fIhttp://git\-scm\.com/\fR
.
.P
This manual page was generated from Markdown with \fBronn(1)\fR \fIhttp://rtomayko\.github\.com/ronn/ronn\.1\.html\fR
.
.SH "AUTHOR"
Chef was written by Adam Jacob \fIadam@opscode\.com\fR of Opscode (\fIhttp://www\.opscode\.com\fR), with contributions from the community\.
.
.SH "DOCUMENTATION"
This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\.
.
.SH "LICENSE"
Both Chef and this documentation are released under the terms of the Apache 2\.0 License\. You may view the license online: \fIhttp://www\.apache\.org/licenses/LICENSE\-2\.0\.html\fR On some systems, the complete text of the Apache 2\.0 License may be found in \fB/usr/share/common\-licenses/Apache\-2\.0\fR\.
.
.SH "CHEF"
Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR