microwave 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/Rakefile +4 -4
  2. data/bin/chef-solo +2 -0
  3. data/spec/spec_helper.rb +2 -0
  4. data/spec/unit/checksum/storage/filesystem_spec.rb +4 -4
  5. data/spec/unit/config_spec.rb +7 -4
  6. data/spec/unit/data_bag_spec.rb +11 -11
  7. data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +8 -8
  8. data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +5 -5
  9. metadata +10 -124
  10. data/distro/README +0 -2
  11. data/distro/arch/etc/conf.d/chef-client.conf +0 -5
  12. data/distro/arch/etc/conf.d/chef-expander.conf +0 -8
  13. data/distro/arch/etc/conf.d/chef-server-webui.conf +0 -10
  14. data/distro/arch/etc/conf.d/chef-server.conf +0 -10
  15. data/distro/arch/etc/conf.d/chef-solr.conf +0 -8
  16. data/distro/arch/etc/rc.d/chef-client +0 -90
  17. data/distro/arch/etc/rc.d/chef-expander +0 -78
  18. data/distro/arch/etc/rc.d/chef-server +0 -78
  19. data/distro/arch/etc/rc.d/chef-server-webui +0 -78
  20. data/distro/arch/etc/rc.d/chef-solr +0 -78
  21. data/distro/common/html/chef-client.8.html +0 -145
  22. data/distro/common/html/chef-expander.8.html +0 -164
  23. data/distro/common/html/chef-expanderctl.8.html +0 -146
  24. data/distro/common/html/chef-server-webui.8.html +0 -185
  25. data/distro/common/html/chef-server.8.html +0 -182
  26. data/distro/common/html/chef-solo.8.html +0 -191
  27. data/distro/common/html/chef-solr.8.html +0 -165
  28. data/distro/common/html/knife-bootstrap.1.html +0 -241
  29. data/distro/common/html/knife-client.1.html +0 -219
  30. data/distro/common/html/knife-configure.1.html +0 -170
  31. data/distro/common/html/knife-cookbook-site.1.html +0 -241
  32. data/distro/common/html/knife-cookbook.1.html +0 -384
  33. data/distro/common/html/knife-data-bag.1.html +0 -238
  34. data/distro/common/html/knife-environment.1.html +0 -267
  35. data/distro/common/html/knife-exec.1.html +0 -134
  36. data/distro/common/html/knife-index.1.html +0 -125
  37. data/distro/common/html/knife-node.1.html +0 -250
  38. data/distro/common/html/knife-recipe.1.html +0 -92
  39. data/distro/common/html/knife-role.1.html +0 -200
  40. data/distro/common/html/knife-search.1.html +0 -288
  41. data/distro/common/html/knife-ssh.1.html +0 -156
  42. data/distro/common/html/knife-status.1.html +0 -128
  43. data/distro/common/html/knife-tag.1.html +0 -137
  44. data/distro/common/html/knife.1.html +0 -320
  45. data/distro/common/html/shef.1.html +0 -283
  46. data/distro/common/man/man1/knife-bootstrap.1 +0 -201
  47. data/distro/common/man/man1/knife-client.1 +0 -99
  48. data/distro/common/man/man1/knife-configure.1 +0 -88
  49. data/distro/common/man/man1/knife-cookbook-site.1 +0 -145
  50. data/distro/common/man/man1/knife-cookbook.1 +0 -345
  51. data/distro/common/man/man1/knife-data-bag.1 +0 -136
  52. data/distro/common/man/man1/knife-environment.1 +0 -178
  53. data/distro/common/man/man1/knife-exec.1 +0 -46
  54. data/distro/common/man/man1/knife-index.1 +0 -29
  55. data/distro/common/man/man1/knife-node.1 +0 -134
  56. data/distro/common/man/man1/knife-role.1 +0 -88
  57. data/distro/common/man/man1/knife-search.1 +0 -280
  58. data/distro/common/man/man1/knife-ssh.1 +0 -79
  59. data/distro/common/man/man1/knife-status.1 +0 -29
  60. data/distro/common/man/man1/knife-tag.1 +0 -43
  61. data/distro/common/man/man1/knife.1 +0 -288
  62. data/distro/common/man/man1/shef.1 +0 -256
  63. data/distro/common/man/man8/chef-client.8 +0 -104
  64. data/distro/common/man/man8/chef-expander.8 +0 -97
  65. data/distro/common/man/man8/chef-expanderctl.8 +0 -62
  66. data/distro/common/man/man8/chef-server-webui.8 +0 -155
  67. data/distro/common/man/man8/chef-server.8 +0 -147
  68. data/distro/common/man/man8/chef-solo.8 +0 -158
  69. data/distro/common/man/man8/chef-solr.8 +0 -122
  70. data/distro/common/markdown/README +0 -3
  71. data/distro/common/markdown/man1/knife-bootstrap.mkd +0 -141
  72. data/distro/common/markdown/man1/knife-client.mkd +0 -103
  73. data/distro/common/markdown/man1/knife-configure.mkd +0 -70
  74. data/distro/common/markdown/man1/knife-cookbook-site.mkd +0 -123
  75. data/distro/common/markdown/man1/knife-cookbook.mkd +0 -263
  76. data/distro/common/markdown/man1/knife-data-bag.mkd +0 -121
  77. data/distro/common/markdown/man1/knife-environment.mkd +0 -151
  78. data/distro/common/markdown/man1/knife-exec.mkd +0 -37
  79. data/distro/common/markdown/man1/knife-index.mkd +0 -30
  80. data/distro/common/markdown/man1/knife-node.mkd +0 -130
  81. data/distro/common/markdown/man1/knife-role.mkd +0 -85
  82. data/distro/common/markdown/man1/knife-search.mkd +0 -180
  83. data/distro/common/markdown/man1/knife-ssh.mkd +0 -69
  84. data/distro/common/markdown/man1/knife-status.mkd +0 -36
  85. data/distro/common/markdown/man1/knife-tag.mkd +0 -39
  86. data/distro/common/markdown/man1/knife.mkd +0 -218
  87. data/distro/common/markdown/man1/shef.mkd +0 -189
  88. data/distro/common/markdown/man8/chef-client.mkd +0 -74
  89. data/distro/common/markdown/man8/chef-expander.mkd +0 -82
  90. data/distro/common/markdown/man8/chef-expanderctl.mkd +0 -58
  91. data/distro/common/markdown/man8/chef-server-webui.mkd +0 -121
  92. data/distro/common/markdown/man8/chef-server.mkd +0 -121
  93. data/distro/common/markdown/man8/chef-solo.mkd +0 -107
  94. data/distro/common/markdown/man8/chef-solr.mkd +0 -89
  95. data/distro/debian/etc/default/chef-client +0 -4
  96. data/distro/debian/etc/default/chef-expander +0 -8
  97. data/distro/debian/etc/default/chef-server +0 -9
  98. data/distro/debian/etc/default/chef-server-webui +0 -9
  99. data/distro/debian/etc/default/chef-solr +0 -8
  100. data/distro/debian/etc/init.d/chef-client +0 -210
  101. data/distro/debian/etc/init.d/chef-expander +0 -176
  102. data/distro/debian/etc/init.d/chef-server +0 -122
  103. data/distro/debian/etc/init.d/chef-server-webui +0 -123
  104. data/distro/debian/etc/init.d/chef-solr +0 -176
  105. data/distro/debian/etc/init/chef-client.conf +0 -17
  106. data/distro/debian/etc/init/chef-expander.conf +0 -17
  107. data/distro/debian/etc/init/chef-server-webui.conf +0 -17
  108. data/distro/debian/etc/init/chef-server.conf +0 -17
  109. data/distro/debian/etc/init/chef-solr.conf +0 -17
  110. data/distro/redhat/etc/init.d/chef-client +0 -121
  111. data/distro/redhat/etc/init.d/chef-expander +0 -104
  112. data/distro/redhat/etc/init.d/chef-server +0 -112
  113. data/distro/redhat/etc/init.d/chef-server-webui +0 -112
  114. data/distro/redhat/etc/init.d/chef-solr +0 -104
  115. data/distro/redhat/etc/logrotate.d/chef-client +0 -8
  116. data/distro/redhat/etc/logrotate.d/chef-expander +0 -8
  117. data/distro/redhat/etc/logrotate.d/chef-server +0 -8
  118. data/distro/redhat/etc/logrotate.d/chef-server-webui +0 -8
  119. data/distro/redhat/etc/logrotate.d/chef-solr +0 -8
  120. data/distro/redhat/etc/sysconfig/chef-client +0 -15
  121. data/distro/redhat/etc/sysconfig/chef-expander +0 -7
  122. data/distro/redhat/etc/sysconfig/chef-server +0 -14
  123. data/distro/redhat/etc/sysconfig/chef-server-webui +0 -14
  124. data/distro/redhat/etc/sysconfig/chef-solr +0 -8
  125. data/distro/windows/service_manager.rb +0 -164
@@ -1,43 +0,0 @@
1
- .\" generated with Ronn/v0.7.3
2
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
- .
4
- .TH "KNIFE\-TAG" "1" "October 2012" "Chef 10.16.0.rc.1" "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
@@ -1,288 +0,0 @@
1
- .\" generated with Ronn/v0.7.3
2
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
- .
4
- .TH "KNIFE" "1" "October 2012" "Chef 10.16.0.rc.1" "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\-\-environment ENVIRONMENT\fR
84
- Set the Chef environment
85
- .
86
- .TP
87
- \fB\-e\fR, \fB\-\-editor\fR EDITOR
88
- Set the editor to use for interactive commands
89
- .
90
- .TP
91
- \fB\-F\fR, \fB\-\-format\fR FORMAT
92
- Which format to use for output\. See FORMATS for details\.
93
- .
94
- .TP
95
- \fB\-d\fR, \fB\-\-disable\-editing\fR
96
- Do not open EDITOR, just accept the data as is
97
- .
98
- .TP
99
- \fB\-u\fR, \fB\-\-user\fR USER
100
- API Client Username, corresponds to \fBChef::Config\fR \fBnode_name\fR\.
101
- .
102
- .TP
103
- \fB\-p\fR, \fB\-\-print\-after\fR
104
- Show the data after a destructive operation
105
- .
106
- .TP
107
- \fB\-v\fR, \fB\-\-version\fR
108
- Show chef version
109
- .
110
- .TP
111
- \fB\-V\fR, \fB\-\-verbose\fR
112
- More verbose output\. Use twice for max verbosity\.
113
- .
114
- .TP
115
- \fB\-y\fR, \fB\-\-yes\fR
116
- Say yes to all prompts for confirmation
117
- .
118
- .TP
119
- \fB\-\-defaults\fR
120
- Accept default values for all questions
121
- .
122
- .TP
123
- \fB\-\-[no\-]color\fR
124
- Use colored output\. Color enabled by default\.
125
- .
126
- .TP
127
- \fB\-h\fR, \fB\-\-help\fR
128
- Show the available options for a command\.
129
- .
130
- .SH "SUB\-COMMANDS"
131
- 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:
132
- .
133
- .IP "\(bu" 4
134
- create (create)
135
- .
136
- .IP "\(bu" 4
137
- list and show (read)
138
- .
139
- .IP "\(bu" 4
140
- edit (update)
141
- .
142
- .IP "\(bu" 4
143
- delete (destroy)
144
- .
145
- .IP "" 0
146
- .
147
- .P
148
- Knife also includes commands that take actions other than displaying or modifying data on the Chef Server, such as \fBknife\-ssh(1)\fR\.
149
- .
150
- .SH "CONFIGURATION"
151
- 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\.
152
- .
153
- .P
154
- If the config file exists, knife uses these settings for \fBGENERAL OPTIONS\fR defaults\.
155
- .
156
- .IP "\(bu" 4
157
- \fBnode_name\fR: User or client identity (i\.e\., \fIname\fR) to use for authenticating requests to the Chef Server\.
158
- .
159
- .IP "\(bu" 4
160
- \fBclient_key\fR: Private key file to authenticate to the Chef server\. Corresponds to the \fB\-k\fR or \fB\-\-key\fR option\.
161
- .
162
- .IP "\(bu" 4
163
- \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\.
164
- .
165
- .IP "\(bu" 4
166
- \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\.
167
- .
168
- .IP "\(bu" 4
169
- \fBcache_options\fR: Specifies various options to use for caching\. These options are dependent on the \fBcache_type\fR\.
170
- .
171
- .IP "\(bu" 4
172
- \fBvalidation_client_name\fR: Specifies the name of the client used to validate new clients\.
173
- .
174
- .IP "\(bu" 4
175
- \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\.
176
- .
177
- .IP "\(bu" 4
178
- \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\.
179
- .
180
- .IP "" 0
181
- .
182
- .SH "FILES"
183
- \fI~/\.chef/knife\.rb\fR
184
- .
185
- .P
186
- Ruby DSL configuration file for knife\. See \fBCONFIGURATION\fR\.
187
- .
188
- .SH "FORMATS"
189
- 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\.
190
- .
191
- .P
192
- Valid formats are:
193
- .
194
- .TP
195
- \fBsummary\fR
196
- displays the node in a custom, summarized format (default)
197
- .
198
- .TP
199
- \fBtext\fR
200
- displays the node data in its entirety using the colorized tree display
201
- .
202
- .TP
203
- \fBjson\fR
204
- displays the node in JSON format
205
- .
206
- .TP
207
- \fByaml\fR
208
- displays the node in YAML format
209
- .
210
- .TP
211
- \fBpp\fR
212
- displays the node using Ruby\'s pretty printer\.
213
- .
214
- .P
215
- For brevity, only the first character of the format is required, for example, \-Fj will produce JSON format output\.
216
- .
217
- .SH "CHEF WORKFLOW"
218
- When working with Chef and Knife in the local repository, the recommended workflow outline looks like:
219
- .
220
- .IP "\(bu" 4
221
- Create repository\. A skeleton sample is provided at \fIhttp://github\.com/opscode/chef\-repo/\fR\.
222
- .
223
- .IP "\(bu" 4
224
- Configure knife, see \fBCONFIGURATION\fR\.
225
- .
226
- .IP "\(bu" 4
227
- Download cookbooks from the Opscode cookbooks site, see \fBCOOKBOOK SITE SUB\-COMMANDS\fR\.
228
- .
229
- .IP "\(bu" 4
230
- Or, create new cookbooks, see \fBcookbook create\fR sub\-command\.
231
- .
232
- .IP "\(bu" 4
233
- Commit changes to the version control system\. See your tool\'s documentation\.
234
- .
235
- .IP "\(bu" 4
236
- Upload cookbooks to the Chef Server, see \fBCOOKBOOK SUB\-COMMANDS\fR\.
237
- .
238
- .IP "\(bu" 4
239
- Launch instances in the Cloud, OR provision new hosts; see \fBCLOUD COMPUTING SUB\-COMMANDS\fR and \fBBOOTSTRAP SUB\-COMMANDS\fR\.
240
- .
241
- .IP "\(bu" 4
242
- Watch Chef configure systems!
243
- .
244
- .IP "" 0
245
- .
246
- .P
247
- 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\.
248
- .
249
- .SH "EXAMPLES"
250
- .
251
- .SH "ENVIRONMENT"
252
- .
253
- .TP
254
- \fBEDITOR\fR
255
- 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\.
256
- .
257
- .SH "SEE ALSO"
258
- \fBchef\-client(8)\fR \fBchef\-server(8)\fR \fBshef(1)\fR
259
- .
260
- .P
261
- \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
262
- .
263
- .P
264
- Complete Chef documentation is available online: \fIhttp://wiki\.opscode\.com/display/chef/Home/\fR
265
- .
266
- .P
267
- JSON is JavaScript Object Notation \fIhttp://json\.org/\fR
268
- .
269
- .P
270
- SOLR is an open source search engine\. \fIhttp://lucene\.apache\.org/solr/\fR
271
- .
272
- .P
273
- \fBgit(1)\fR is a version control system \fIhttp://git\-scm\.com/\fR
274
- .
275
- .P
276
- This manual page was generated from Markdown with \fBronn(1)\fR \fIhttp://rtomayko\.github\.com/ronn/ronn\.1\.html\fR
277
- .
278
- .SH "AUTHOR"
279
- Chef was written by Adam Jacob \fIadam@opscode\.com\fR of Opscode (\fIhttp://www\.opscode\.com\fR), with contributions from the community\.
280
- .
281
- .SH "DOCUMENTATION"
282
- This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\.
283
- .
284
- .SH "LICENSE"
285
- 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\.
286
- .
287
- .SH "CHEF"
288
- Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
@@ -1,256 +0,0 @@
1
- .\" generated with Ronn/v0.7.3
2
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
- .
4
- .TH "SHEF" "1" "October 2012" "Chef 10.16.0.rc.1" "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