chef 0.10.4.rc.4 → 0.10.4.rc.5
Sign up to get free protection for your applications and to get access to all the features.
- data/distro/common/html/chef-client.8.html +4 -4
- data/distro/common/html/chef-expander.8.html +4 -4
- data/distro/common/html/chef-expanderctl.8.html +4 -4
- data/distro/common/html/chef-server-webui.8.html +4 -4
- data/distro/common/html/chef-server.8.html +4 -4
- data/distro/common/html/chef-solo.8.html +4 -4
- data/distro/common/html/chef-solr.8.html +4 -4
- data/distro/common/html/knife-bootstrap.1.html +4 -4
- data/distro/common/html/knife-client.1.html +4 -4
- data/distro/common/html/knife-configure.1.html +4 -4
- data/distro/common/html/knife-cookbook-site.1.html +6 -6
- data/distro/common/html/knife-cookbook.1.html +11 -4
- data/distro/common/html/knife-data-bag.1.html +4 -4
- data/distro/common/html/knife-environment.1.html +4 -4
- data/distro/common/html/knife-exec.1.html +4 -4
- data/distro/common/html/knife-index.1.html +4 -4
- data/distro/common/html/knife-node.1.html +7 -6
- data/distro/common/html/knife-role.1.html +4 -4
- data/distro/common/html/knife-search.1.html +177 -24
- data/distro/common/html/knife-ssh.1.html +5 -4
- data/distro/common/html/knife-status.1.html +4 -4
- data/distro/common/html/knife-tag.1.html +4 -4
- data/distro/common/html/knife.1.html +4 -4
- data/distro/common/html/shef.1.html +4 -4
- data/distro/common/man/man1/knife-bootstrap.1 +189 -0
- data/distro/common/man/man1/knife-client.1 +99 -0
- data/distro/common/man/man1/knife-configure.1 +88 -0
- data/distro/common/man/man1/knife-cookbook-site.1 +137 -0
- data/distro/common/man/man1/knife-cookbook.1 +340 -0
- data/distro/common/man/man1/knife-data-bag.1 +130 -0
- data/distro/common/man/man1/knife-environment.1 +178 -0
- data/distro/common/man/man1/knife-exec.1 +46 -0
- data/distro/common/man/man1/knife-index.1 +29 -0
- data/distro/common/man/man1/knife-node.1 +154 -0
- data/distro/common/man/man1/knife-role.1 +88 -0
- data/distro/common/man/man1/knife-search.1 +270 -0
- data/distro/common/man/man1/knife-ssh.1 +78 -0
- data/distro/common/man/man1/knife-status.1 +29 -0
- data/distro/common/man/man1/knife-tag.1 +43 -0
- data/distro/common/man/man1/knife.1 +251 -0
- data/distro/common/man/man1/shef.1 +256 -0
- data/distro/common/man/man8/chef-client.8 +84 -0
- data/distro/common/man/man8/chef-expander.8 +97 -0
- data/distro/common/man/man8/chef-expanderctl.8 +62 -0
- data/distro/common/man/man8/chef-server-webui.8 +155 -0
- data/distro/common/man/man8/chef-server.8 +147 -0
- data/distro/common/man/man8/chef-solo.8 +158 -0
- data/distro/common/man/man8/chef-solr.8 +114 -0
- data/distro/common/markdown/man1/knife-search.mkd +130 -6
- data/lib/chef/provider/package/apt.rb +34 -24
- data/lib/chef/version.rb +1 -1
- metadata +28 -4
@@ -0,0 +1,43 @@
|
|
1
|
+
.\" generated with Ronn/v0.7.3
|
2
|
+
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
|
+
.
|
4
|
+
.TH "KNIFE\-TAG" "1" "August 2011" "Chef 0.10.4.rc.5" "Chef Manual"
|
5
|
+
.
|
6
|
+
.SH "NAME"
|
7
|
+
\fBknife\-tag\fR \- Apply tags to nodes on a Chef Server
|
8
|
+
.
|
9
|
+
.SH "SYNOPSIS"
|
10
|
+
\fBknife\fR \fBtag\fR \fIsubcommand\fR \fI(options)\fR
|
11
|
+
.
|
12
|
+
.SH "TAG SUBCOMMANDS"
|
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
|
@@ -0,0 +1,251 @@
|
|
1
|
+
.\" generated with Ronn/v0.7.3
|
2
|
+
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
|
+
.
|
4
|
+
.TH "KNIFE" "1" "August 2011" "Chef 0.10.4.rc.5" "Chef Manual"
|
5
|
+
.
|
6
|
+
.SH "NAME"
|
7
|
+
\fBknife\fR \- Chef Server API client utility
|
8
|
+
.
|
9
|
+
.SH "SYNOPSIS"
|
10
|
+
\fBknife\fR \fIsub\-command\fR [\fIargument\fR\.\.\.] \fI(options)\fR
|
11
|
+
.
|
12
|
+
.SH "DESCRIPTION"
|
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
|
+
.
|
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
|
64
|
+
.
|
65
|
+
.P
|
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\.
|
67
|
+
.
|
68
|
+
.SH "OPTIONS"
|
69
|
+
.
|
70
|
+
.TP
|
71
|
+
\fB\-s\fR, \fB\-\-server\-url\fR URL
|
72
|
+
Chef Server URL, corresponds to \fBChef::Config\fR \fBchef_server_url\fR\.
|
73
|
+
.
|
74
|
+
.TP
|
75
|
+
\fB\-k\fR, \fB\-\-key\fR KEY
|
76
|
+
API Client Key, corresponds to \fBChef::Config\fR \fBclient_key\fR\.
|
77
|
+
.
|
78
|
+
.TP
|
79
|
+
\fB\-c\fR, \fB\-\-config\fR CONFIG
|
80
|
+
The configuration file to use
|
81
|
+
.
|
82
|
+
.TP
|
83
|
+
\fB\-e\fR, \fB\-\-editor\fR EDITOR
|
84
|
+
Set the editor to use for interactive commands
|
85
|
+
.
|
86
|
+
.TP
|
87
|
+
\fB\-F\fR, \fB\-\-format\fR FORMAT
|
88
|
+
Which format to use for output
|
89
|
+
.
|
90
|
+
.TP
|
91
|
+
\fB\-l\fR, \fB\-\-log_level\fR LEVEL
|
92
|
+
Set the log level (debug, info, warn, error, fatal), corresponds to \fBChef::Config\fR \fBlog_level\fR\.
|
93
|
+
.
|
94
|
+
.TP
|
95
|
+
\fB\-L\fR, \fB\-\-logfile\fR LOGLOCATION
|
96
|
+
Set the log file location, defaults to STDOUT, corresponds to \fBChef::Config\fR \fBlog_location\fR\.
|
97
|
+
.
|
98
|
+
.TP
|
99
|
+
\fB\-n\fR, \fB\-\-no\-editor\fR
|
100
|
+
Do not open EDITOR, just accept the data as is
|
101
|
+
.
|
102
|
+
.TP
|
103
|
+
\fB\-u\fR, \fB\-\-user\fR USER
|
104
|
+
API Client Username, corresponds to \fBChef::Config\fR \fBnode_name\fR\.
|
105
|
+
.
|
106
|
+
.TP
|
107
|
+
\fB\-p\fR, \fB\-\-print\-after\fR
|
108
|
+
Show the data after a destructive operation
|
109
|
+
.
|
110
|
+
.TP
|
111
|
+
\fB\-v\fR, \fB\-\-version\fR
|
112
|
+
Show chef version
|
113
|
+
.
|
114
|
+
.TP
|
115
|
+
\fB\-y\fR, \fB\-\-yes\fR
|
116
|
+
Say yes to all prompts for confirmation
|
117
|
+
.
|
118
|
+
.TP
|
119
|
+
\fB\-h\fR, \fB\-\-help\fR
|
120
|
+
Show the available options for a command\.
|
121
|
+
.
|
122
|
+
.SH "SUB\-COMMANDS"
|
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:
|
124
|
+
.
|
125
|
+
.IP "\(bu" 4
|
126
|
+
create (create)
|
127
|
+
.
|
128
|
+
.IP "\(bu" 4
|
129
|
+
list and show (read)
|
130
|
+
.
|
131
|
+
.IP "\(bu" 4
|
132
|
+
edit (update)
|
133
|
+
.
|
134
|
+
.IP "\(bu" 4
|
135
|
+
delete (destroy)
|
136
|
+
.
|
137
|
+
.IP "" 0
|
138
|
+
.
|
139
|
+
.P
|
140
|
+
Knife also includes commands that take actions other than displaying or modifying data on the Chef Server, such as \fBknife\-ssh(1)\fR\.
|
141
|
+
.
|
142
|
+
.SH "CONFIGURATION"
|
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\.
|
144
|
+
.
|
145
|
+
.P
|
146
|
+
If the config file exists, knife uses these settings for \fBGENERAL OPTIONS\fR defaults\.
|
147
|
+
.
|
148
|
+
.IP "\(bu" 4
|
149
|
+
\fBnode_name\fR: User or client identity (i\.e\., \fIname\fR) to use for authenticating requests to the Chef Server\.
|
150
|
+
.
|
151
|
+
.IP "\(bu" 4
|
152
|
+
\fBclient_key\fR: Private key file to authenticate to the Chef server\. Corresponds to the \fB\-k\fR or \fB\-\-key\fR option\.
|
153
|
+
.
|
154
|
+
.IP "\(bu" 4
|
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\.
|
156
|
+
.
|
157
|
+
.IP "\(bu" 4
|
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\.
|
159
|
+
.
|
160
|
+
.IP "\(bu" 4
|
161
|
+
\fBcache_options\fR: Specifies various options to use for caching\. These options are dependent on the \fBcache_type\fR\.
|
162
|
+
.
|
163
|
+
.IP "\(bu" 4
|
164
|
+
\fBvalidation_client_name\fR: Specifies the name of the client used to validate new clients\.
|
165
|
+
.
|
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\.
|
168
|
+
.
|
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\.
|
171
|
+
.
|
172
|
+
.IP "" 0
|
173
|
+
.
|
174
|
+
.SH "FILES"
|
175
|
+
\fI~/\.chef/knife\.rb\fR
|
176
|
+
.
|
177
|
+
.P
|
178
|
+
Ruby DSL configuration file for knife\. See \fBCONFIGURATION\fR\.
|
179
|
+
.
|
180
|
+
.SH "CHEF WORKFLOW"
|
181
|
+
When working with Chef and Knife in the local repository, the recommended workflow outline looks like:
|
182
|
+
.
|
183
|
+
.IP "\(bu" 4
|
184
|
+
Create repository\. A skeleton sample is provided at \fIhttp://github\.com/opscode/chef\-repo/\fR\.
|
185
|
+
.
|
186
|
+
.IP "\(bu" 4
|
187
|
+
Configure knife, see \fBCONFIGURATION\fR\.
|
188
|
+
.
|
189
|
+
.IP "\(bu" 4
|
190
|
+
Download cookbooks from the Opscode cookbooks site, see \fBCOOKBOOK SITE SUB\-COMMANDS\fR\.
|
191
|
+
.
|
192
|
+
.IP "\(bu" 4
|
193
|
+
Or, create new cookbooks, see \fBcookbook create\fR sub\-command\.
|
194
|
+
.
|
195
|
+
.IP "\(bu" 4
|
196
|
+
Commit changes to the version control system\. See your tool\'s documentation\.
|
197
|
+
.
|
198
|
+
.IP "\(bu" 4
|
199
|
+
Upload cookbooks to the Chef Server, see \fBCOOKBOOK SUB\-COMMANDS\fR\.
|
200
|
+
.
|
201
|
+
.IP "\(bu" 4
|
202
|
+
Launch instances in the Cloud, OR provision new hosts; see \fBCLOUD COMPUTING SUB\-COMMANDS\fR and \fBBOOTSTRAP SUB\-COMMANDS\fR\.
|
203
|
+
.
|
204
|
+
.IP "\(bu" 4
|
205
|
+
Watch Chef configure systems!
|
206
|
+
.
|
207
|
+
.IP "" 0
|
208
|
+
.
|
209
|
+
.P
|
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\.
|
211
|
+
.
|
212
|
+
.SH "EXAMPLES"
|
213
|
+
.
|
214
|
+
.SH "ENVIRONMENT"
|
215
|
+
.
|
216
|
+
.TP
|
217
|
+
\fBEDITOR\fR
|
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\.
|
219
|
+
.
|
220
|
+
.SH "SEE ALSO"
|
221
|
+
\fBchef\-client(8)\fR \fBchef\-server(8)\fR \fBshef(1)\fR
|
222
|
+
.
|
223
|
+
.P
|
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
|
225
|
+
.
|
226
|
+
.P
|
227
|
+
Complete Chef documentation is available online: \fIhttp://wiki\.opscode\.com/display/chef/Home/\fR
|
228
|
+
.
|
229
|
+
.P
|
230
|
+
JSON is JavaScript Object Notation \fIhttp://json\.org/\fR
|
231
|
+
.
|
232
|
+
.P
|
233
|
+
SOLR is an open source search engine\. \fIhttp://lucene\.apache\.org/solr/\fR
|
234
|
+
.
|
235
|
+
.P
|
236
|
+
\fBgit(1)\fR is a version control system \fIhttp://git\-scm\.com/\fR
|
237
|
+
.
|
238
|
+
.P
|
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
|
@@ -0,0 +1,256 @@
|
|
1
|
+
.\" generated with Ronn/v0.7.3
|
2
|
+
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
|
+
.
|
4
|
+
.TH "SHEF" "1" "August 2011" "Chef 0.10.4.rc.5" "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
|
14
|
+
The chef server URL
|
15
|
+
.
|
16
|
+
.TP
|
17
|
+
\fB\-z\fR, \fB\-\-client\fR
|
18
|
+
chef\-client mode
|
19
|
+
.
|
20
|
+
.TP
|
21
|
+
\fB\-c\fR, \fB\-\-config CONFIG\fR
|
22
|
+
The configuration file to use
|
23
|
+
.
|
24
|
+
.TP
|
25
|
+
\fB\-j\fR, \fB\-\-json\-attributes JSON_ATTRIBS\fR
|
26
|
+
Load attributes from a JSON file or URL
|
27
|
+
.
|
28
|
+
.TP
|
29
|
+
\fB\-l\fR, \fB\-\-log\-level LOG_LEVEL\fR
|
30
|
+
Set the logging level
|
31
|
+
.
|
32
|
+
.TP
|
33
|
+
\fB\-s\fR, \fB\-\-solo\fR
|
34
|
+
chef\-solo shef session
|
35
|
+
.
|
36
|
+
.TP
|
37
|
+
\fB\-a\fR, \fB\-\-standalone\fR
|
38
|
+
standalone shef session
|
39
|
+
.
|
40
|
+
.TP
|
41
|
+
\fB\-v\fR, \fB\-\-version\fR
|
42
|
+
Show chef version
|
43
|
+
.
|
44
|
+
.TP
|
45
|
+
\fB\-h\fR, \fB\-\-help\fR
|
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
|
+
.
|
246
|
+
.SH "SEE ALSO"
|
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
|