chef 10.16.6 → 10.18.0.rc.1
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 +4 -4
- data/distro/common/html/knife-cookbook.1.html +4 -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 +4 -4
- data/distro/common/html/knife-role.1.html +4 -4
- data/distro/common/html/knife-search.1.html +4 -4
- data/distro/common/html/knife-ssh.1.html +4 -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 +1 -1
- data/distro/common/man/man1/knife-client.1 +1 -1
- data/distro/common/man/man1/knife-configure.1 +1 -1
- data/distro/common/man/man1/knife-cookbook-site.1 +1 -1
- data/distro/common/man/man1/knife-cookbook.1 +1 -1
- data/distro/common/man/man1/knife-data-bag.1 +1 -1
- data/distro/common/man/man1/knife-environment.1 +1 -1
- data/distro/common/man/man1/knife-exec.1 +1 -1
- data/distro/common/man/man1/knife-index.1 +1 -1
- data/distro/common/man/man1/knife-node.1 +1 -1
- data/distro/common/man/man1/knife-role.1 +1 -1
- data/distro/common/man/man1/knife-search.1 +1 -1
- data/distro/common/man/man1/knife-ssh.1 +1 -1
- data/distro/common/man/man1/knife-status.1 +1 -1
- data/distro/common/man/man1/knife-tag.1 +1 -1
- data/distro/common/man/man1/knife.1 +1 -1
- data/distro/common/man/man1/shef.1 +1 -1
- data/distro/common/man/man8/chef-client.8 +1 -1
- data/distro/common/man/man8/chef-expander.8 +1 -1
- data/distro/common/man/man8/chef-expanderctl.8 +1 -1
- data/distro/common/man/man8/chef-server-webui.8 +1 -1
- data/distro/common/man/man8/chef-server.8 +1 -1
- data/distro/common/man/man8/chef-solo.8 +1 -1
- data/distro/common/man/man8/chef-solr.8 +1 -1
- data/lib/chef/api_client.rb +22 -0
- data/lib/chef/cookbook/chefignore.rb +1 -1
- data/lib/chef/cookbook/cookbook_version_loader.rb +1 -3
- data/lib/chef/encrypted_data_bag_item.rb +135 -6
- data/lib/chef/formatters/doc.rb +2 -2
- data/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb +1 -0
- data/lib/chef/knife/bootstrap/archlinux-gems.erb +6 -19
- data/lib/chef/knife/bootstrap/centos5-gems.erb +15 -24
- data/lib/chef/knife/bootstrap/chef-full.erb +9 -22
- data/lib/chef/knife/bootstrap/fedora13-gems.erb +5 -19
- data/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb +4 -16
- data/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb +7 -24
- data/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb +5 -19
- data/lib/chef/knife/bootstrap.rb +3 -3
- data/lib/chef/knife/client_reregister.rb +5 -4
- data/lib/chef/knife/cookbook_create.rb +178 -28
- data/lib/chef/knife/cookbook_site_install.rb +1 -1
- data/lib/chef/knife/core/bootstrap_context.rb +2 -2
- data/lib/chef/knife/ssh.rb +31 -15
- data/lib/chef/mixin/recipe_definition_dsl_core.rb +1 -1
- data/lib/chef/platform.rb +8 -0
- data/lib/chef/provider/log.rb +1 -1
- data/lib/chef/provider/package/yum-dump.py +20 -0
- data/lib/chef/provider/package/yum.rb +41 -0
- data/lib/chef/resource/log.rb +10 -1
- data/lib/chef/resource.rb +3 -2
- data/lib/chef/rest.rb +10 -5
- data/lib/chef/version.rb +1 -1
- data/spec/data/cookbooks/chefignore +2 -0
- data/spec/functional/knife/ssh_spec.rb +59 -1
- data/spec/stress/win32/security_spec.rb +4 -4
- data/spec/support/matchers/leak.rb +1 -1
- data/spec/unit/api_client_spec.rb +90 -17
- data/spec/unit/cookbook/chefignore_spec.rb +2 -1
- data/spec/unit/encrypted_data_bag_item_spec.rb +177 -6
- data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +20 -0
- data/spec/unit/knife/bootstrap_spec.rb +69 -28
- data/spec/unit/knife/client_reregister_spec.rb +23 -22
- data/spec/unit/knife/cookbook_site_install_spec.rb +12 -2
- data/spec/unit/knife/core/bootstrap_context_spec.rb +7 -0
- data/spec/unit/knife/data_bag_create_spec.rb +5 -0
- data/spec/unit/knife/data_bag_edit_spec.rb +13 -0
- data/spec/unit/knife/data_bag_from_file_spec.rb +15 -1
- data/spec/unit/knife/ssh_spec.rb +93 -1
- data/spec/unit/provider/package/yum_spec.rb +79 -11
- data/spec/unit/resource/log_spec.rb +9 -0
- metadata +854 -850
@@ -105,11 +105,11 @@ may not be publicly reachable.</p>
|
|
105
105
|
|
106
106
|
<h2 id="AUTHOR">AUTHOR</h2>
|
107
107
|
|
108
|
-
<p> Chef was written by Adam Jacob <a href="&#
|
108
|
+
<p> Chef was written by Adam Jacob <a href="mailto:adam@opscode.com" data-bare-link="true">adam@opscode.com</a> with many contributions from the community.</p>
|
109
109
|
|
110
110
|
<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
|
111
111
|
|
112
|
-
<p> This manual page was written by Joshua Timberman <a href="mailto&#
|
112
|
+
<p> This manual page was written by Joshua Timberman <a href="mailto:joshua@opscode.com" data-bare-link="true">joshua@opscode.com</a>.
|
113
113
|
Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
|
114
114
|
|
115
115
|
<h2 id="CHEF">CHEF</h2>
|
@@ -118,8 +118,8 @@ may not be publicly reachable.</p>
|
|
118
118
|
|
119
119
|
|
120
120
|
<ol class='man-decor man-foot man foot'>
|
121
|
-
<li class='tl'>Chef 10.
|
122
|
-
<li class='tc'>
|
121
|
+
<li class='tl'>Chef 10.18.0.rc.1</li>
|
122
|
+
<li class='tc'>December 2012</li>
|
123
123
|
<li class='tr'>knife-status(1)</li>
|
124
124
|
</ol>
|
125
125
|
|
@@ -114,11 +114,11 @@
|
|
114
114
|
|
115
115
|
<h2 id="AUTHOR">AUTHOR</h2>
|
116
116
|
|
117
|
-
<p> Chef was written by Adam Jacob <a href="&#
|
117
|
+
<p> Chef was written by Adam Jacob <a href="mailto:adam@opscode.com" data-bare-link="true">adam@opscode.com</a> with many contributions from the community.</p>
|
118
118
|
|
119
119
|
<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
|
120
120
|
|
121
|
-
<p> This manual page was written by Daniel DeLeo <a href="m&#
|
121
|
+
<p> This manual page was written by Daniel DeLeo <a href="mailto:dan@opscode.com" data-bare-link="true">dan@opscode.com</a>.
|
122
122
|
Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
|
123
123
|
|
124
124
|
<h2 id="CHEF">CHEF</h2>
|
@@ -127,8 +127,8 @@
|
|
127
127
|
|
128
128
|
|
129
129
|
<ol class='man-decor man-foot man foot'>
|
130
|
-
<li class='tl'>Chef 10.
|
131
|
-
<li class='tc'>
|
130
|
+
<li class='tl'>Chef 10.18.0.rc.1</li>
|
131
|
+
<li class='tc'>December 2012</li>
|
132
132
|
<li class='tr'>knife-tag(1)</li>
|
133
133
|
</ol>
|
134
134
|
|
@@ -291,12 +291,12 @@ data editing entirely.</dd>
|
|
291
291
|
|
292
292
|
<h2 id="AUTHOR">AUTHOR</h2>
|
293
293
|
|
294
|
-
<p> Chef was written by Adam Jacob <a href="&#
|
294
|
+
<p> Chef was written by Adam Jacob <a href="mailto:adam@opscode.com" data-bare-link="true">adam@opscode.com</a> of Opscode
|
295
295
|
(<a href="http://www.opscode.com" data-bare-link="true">http://www.opscode.com</a>), with contributions from the community.</p>
|
296
296
|
|
297
297
|
<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
|
298
298
|
|
299
|
-
<p> This manual page was written by Joshua Timberman <a href="&#
|
299
|
+
<p> This manual page was written by Joshua Timberman <a href="mailto:joshua@opscode.com" data-bare-link="true">joshua@opscode.com</a>.</p>
|
300
300
|
|
301
301
|
<h2 id="LICENSE">LICENSE</h2>
|
302
302
|
|
@@ -310,8 +310,8 @@ data editing entirely.</dd>
|
|
310
310
|
|
311
311
|
|
312
312
|
<ol class='man-decor man-foot man foot'>
|
313
|
-
<li class='tl'>Chef 10.
|
314
|
-
<li class='tc'>
|
313
|
+
<li class='tl'>Chef 10.18.0.rc.1</li>
|
314
|
+
<li class='tc'>December 2012</li>
|
315
315
|
<li class='tr'>knife(1)</li>
|
316
316
|
</ol>
|
317
317
|
|
@@ -258,12 +258,12 @@ and may become out of sync with the behavior of those libraries.</p>
|
|
258
258
|
|
259
259
|
<h2 id="AUTHOR">AUTHOR</h2>
|
260
260
|
|
261
|
-
<p> Chef was written by Adam Jacob <a href="&#
|
261
|
+
<p> Chef was written by Adam Jacob <a href="mailto:adam@opscode.com" data-bare-link="true">adam@opscode.com</a> with many
|
262
262
|
contributions from the community. Shef was written by Daniel DeLeo.</p>
|
263
263
|
|
264
264
|
<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
|
265
265
|
|
266
|
-
<p> This manual page was written by Daniel DeLeo <a href="&#
|
266
|
+
<p> This manual page was written by Daniel DeLeo <a href="mailto:dan@opscode.com" data-bare-link="true">dan@opscode.com</a>.
|
267
267
|
Permission is granted to copy, distribute and / or modify this
|
268
268
|
document under the terms of the Apache 2.0 License.</p>
|
269
269
|
|
@@ -273,8 +273,8 @@ and may become out of sync with the behavior of those libraries.</p>
|
|
273
273
|
|
274
274
|
|
275
275
|
<ol class='man-decor man-foot man foot'>
|
276
|
-
<li class='tl'>Chef 10.
|
277
|
-
<li class='tc'>
|
276
|
+
<li class='tl'>Chef 10.18.0.rc.1</li>
|
277
|
+
<li class='tc'>December 2012</li>
|
278
278
|
<li class='tr'>shef(1)</li>
|
279
279
|
</ol>
|
280
280
|
|
@@ -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\-BOOTSTRAP" "1" "
|
4
|
+
.TH "KNIFE\-BOOTSTRAP" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-bootstrap\fR \- Install Chef Client on a remote host
|
@@ -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\-CLIENT" "1" "
|
4
|
+
.TH "KNIFE\-CLIENT" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-client\fR \- Manage Chef API Clients
|
@@ -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\-CONFIGURE" "1" "
|
4
|
+
.TH "KNIFE\-CONFIGURE" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-configure\fR \- Generate configuration files for knife or Chef Client
|
@@ -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\-COOKBOOK\-SITE" "1" "
|
4
|
+
.TH "KNIFE\-COOKBOOK\-SITE" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-cookbook\-site\fR \- Install and update open source cookbooks
|
@@ -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\-COOKBOOK" "1" "
|
4
|
+
.TH "KNIFE\-COOKBOOK" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-cookbook\fR \- upload and manage chef cookbooks
|
@@ -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\-DATA\-BAG" "1" "
|
4
|
+
.TH "KNIFE\-DATA\-BAG" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-data\-bag\fR \- Store arbitrary data on a Chef Server
|
@@ -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\-ENVIRONMENT" "1" "
|
4
|
+
.TH "KNIFE\-ENVIRONMENT" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-environment\fR \- Define cookbook policies for the environments in your infrastructure
|
@@ -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\-EXEC" "1" "
|
4
|
+
.TH "KNIFE\-EXEC" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-exec\fR \- Run user scripts using the Chef API DSL
|
@@ -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\-INDEX" "1" "
|
4
|
+
.TH "KNIFE\-INDEX" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-index\fR \- Rebuild the search index on a Chef Server
|
@@ -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\-NODE" "1" "
|
4
|
+
.TH "KNIFE\-NODE" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-node\fR \- Manage the hosts in your infrastructure
|
@@ -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\-ROLE" "1" "
|
4
|
+
.TH "KNIFE\-ROLE" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-role\fR \- Group common configuration settings
|
@@ -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\-SEARCH" "1" "
|
4
|
+
.TH "KNIFE\-SEARCH" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-search\fR \- Find objects on a Chef Server by query
|
@@ -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\-SSH" "1" "
|
4
|
+
.TH "KNIFE\-SSH" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-ssh\fR \- Run a command or interactive session on multiple remote hosts
|
@@ -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" "
|
4
|
+
.TH "KNIFE\-STATUS" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-status\fR \- Display status information for the nodes in your infrastructure
|
@@ -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" "
|
4
|
+
.TH "KNIFE\-TAG" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\-tag\fR \- Apply tags to nodes on a Chef Server
|
@@ -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" "1" "
|
4
|
+
.TH "KNIFE" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBknife\fR \- Chef Server API client utility
|
@@ -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 "SHEF" "1" "
|
4
|
+
.TH "SHEF" "1" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBshef\fR \- Interactive Chef Console
|
@@ -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 "CHEF\-CLIENT" "8" "
|
4
|
+
.TH "CHEF\-CLIENT" "8" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBchef\-client\fR \- Runs a client node connecting to a chef\-server\.
|
@@ -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 "CHEF\-EXPANDER" "8" "
|
4
|
+
.TH "CHEF\-EXPANDER" "8" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBchef\-expander\fR \- fetches messages from RabbitMQ, processes, and loads into chef\-solr
|
@@ -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 "CHEF\-EXPANDERCTL" "8" "
|
4
|
+
.TH "CHEF\-EXPANDERCTL" "8" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBchef\-expanderctl\fR \- management program for chef\-expander
|
@@ -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 "CHEF\-SERVER\-WEBUI" "8" "
|
4
|
+
.TH "CHEF\-SERVER\-WEBUI" "8" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBchef\-server\-webui\fR \- Start the Chef Server merb application slice providing Web User Interface (Management Console)\.
|
@@ -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 "CHEF\-SERVER" "8" "
|
4
|
+
.TH "CHEF\-SERVER" "8" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBchef\-server\fR \- Start the Chef Server merb application slice\.
|
@@ -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 "CHEF\-SOLO" "8" "
|
4
|
+
.TH "CHEF\-SOLO" "8" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBchef\-solo\fR \- Runs chef in solo mode against a specified cookbook location\.
|
@@ -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 "CHEF\-SOLR" "8" "
|
4
|
+
.TH "CHEF\-SOLR" "8" "December 2012" "Chef 10.18.0.rc.1" "Chef Manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBchef\-solr\fR \- Runs as Chef\'s search server
|
data/lib/chef/api_client.rb
CHANGED
@@ -164,6 +164,7 @@ class Chef
|
|
164
164
|
def self.json_create(o)
|
165
165
|
client = Chef::ApiClient.new
|
166
166
|
client.name(o["name"] || o["clientname"])
|
167
|
+
client.private_key(o["private_key"]) if o["private_key"]
|
167
168
|
client.public_key(o["public_key"])
|
168
169
|
client.admin(o["admin"])
|
169
170
|
client.couchdb_rev = o["_rev"]
|
@@ -180,6 +181,11 @@ class Chef
|
|
180
181
|
rs["rows"].collect { |r| r[lookup] }
|
181
182
|
end
|
182
183
|
|
184
|
+
def self.reregister(name)
|
185
|
+
api_client = load(name)
|
186
|
+
api_client.reregister
|
187
|
+
end
|
188
|
+
|
183
189
|
def self.list(inflate=false)
|
184
190
|
if inflate
|
185
191
|
response = Hash.new
|
@@ -251,6 +257,17 @@ class Chef
|
|
251
257
|
end
|
252
258
|
end
|
253
259
|
|
260
|
+
def reregister
|
261
|
+
r = Chef::REST.new(Chef::Config[:chef_server_url])
|
262
|
+
reregistered_self = r.put_rest("clients/#{name}", { :name => name, :admin => admin, :private_key => true })
|
263
|
+
if reregistered_self.respond_to?(:[])
|
264
|
+
private_key(reregistered_self["private_key"])
|
265
|
+
else
|
266
|
+
private_key(reregistered_self.private_key)
|
267
|
+
end
|
268
|
+
self
|
269
|
+
end
|
270
|
+
|
254
271
|
# Create the client via the REST API
|
255
272
|
def create
|
256
273
|
Chef::REST.new(Chef::Config[:chef_server_url]).post_rest("clients", self)
|
@@ -266,6 +283,11 @@ class Chef
|
|
266
283
|
"client[#{@name}]"
|
267
284
|
end
|
268
285
|
|
286
|
+
def inspect
|
287
|
+
"Chef::ApiClient name:'#{name}' admin:'#{admin.inspect}' " +
|
288
|
+
"public_key:'#{public_key}' private_key:'#{private_key}'"
|
289
|
+
end
|
290
|
+
|
269
291
|
end
|
270
292
|
end
|
271
293
|
|
@@ -104,9 +104,7 @@ class Chef
|
|
104
104
|
end
|
105
105
|
|
106
106
|
def empty?
|
107
|
-
cookbook_settings.
|
108
|
-
all_empty && files.last.empty?
|
109
|
-
end
|
107
|
+
@cookbook_settings.values.all? { |files_hash| files_hash.empty? }
|
110
108
|
end
|
111
109
|
|
112
110
|
def merge!(other_cookbook_loader)
|
@@ -50,6 +50,140 @@ class Chef::EncryptedDataBagItem
|
|
50
50
|
DEFAULT_SECRET_FILE = "/etc/chef/encrypted_data_bag_secret"
|
51
51
|
ALGORITHM = 'aes-256-cbc'
|
52
52
|
|
53
|
+
class UnsupportedEncryptedDataBagItemFormat < StandardError
|
54
|
+
end
|
55
|
+
|
56
|
+
class DecryptionFailure < StandardError
|
57
|
+
end
|
58
|
+
|
59
|
+
class UnsupportedCipher < StandardError
|
60
|
+
end
|
61
|
+
|
62
|
+
#=== Decryptor
|
63
|
+
# For backwards compatibility, Chef implements decryption/deserialization for
|
64
|
+
# older encrypted data bag item formats in addition to the current version.
|
65
|
+
# Each decryption/deserialization strategy is implemented as a class in this
|
66
|
+
# namespace. For convenience the factory method +Decryptor.for()+ can be used
|
67
|
+
# to create an instance of the appropriate strategy for the given encrypted
|
68
|
+
# data bag value.
|
69
|
+
module Decryptor
|
70
|
+
|
71
|
+
# Detects the encrypted data bag item format version and instantiates a
|
72
|
+
# decryptor object for that version. Call #for_decrypted_item on the
|
73
|
+
# resulting object to decrypt and deserialize it.
|
74
|
+
def self.for(encrypted_value, key)
|
75
|
+
case format_version_of(encrypted_value)
|
76
|
+
when 1
|
77
|
+
Version1Decryptor.new(encrypted_value, key)
|
78
|
+
when 0
|
79
|
+
Version0Decryptor.new(encrypted_value, key)
|
80
|
+
else
|
81
|
+
raise UnsupportedEncryptedDataBagItemFormat,
|
82
|
+
"This version of chef does not support encrypted data bag item format version '#{format_version}'"
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
def self.format_version_of(encrypted_value)
|
87
|
+
if encrypted_value.respond_to?(:key?)
|
88
|
+
encrypted_value["version"]
|
89
|
+
else
|
90
|
+
0
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
class Version1Decryptor
|
95
|
+
|
96
|
+
attr_reader :encrypted_data
|
97
|
+
attr_reader :key
|
98
|
+
|
99
|
+
def initialize(encrypted_data, key)
|
100
|
+
@encrypted_data = encrypted_data
|
101
|
+
@key = key
|
102
|
+
end
|
103
|
+
|
104
|
+
def for_decrypted_item
|
105
|
+
Yajl::Parser.parse(decrypted_data)["json_wrapper"]
|
106
|
+
end
|
107
|
+
|
108
|
+
|
109
|
+
def encrypted_bytes
|
110
|
+
Base64.decode64(@encrypted_data["encrypted_data"])
|
111
|
+
end
|
112
|
+
|
113
|
+
def iv
|
114
|
+
Base64.decode64(@encrypted_data["iv"])
|
115
|
+
end
|
116
|
+
|
117
|
+
def decrypted_data
|
118
|
+
@decrypted_data ||= begin
|
119
|
+
plaintext = openssl_decryptor.update(encrypted_bytes)
|
120
|
+
plaintext << openssl_decryptor.final
|
121
|
+
rescue OpenSSL::Cipher::CipherError => e
|
122
|
+
raise DecryptionFailure, "Error decrypting data bag value: '#{e.message}'. Most likely the provided key is incorrect"
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
def openssl_decryptor
|
127
|
+
@openssl_decryptor ||= begin
|
128
|
+
assert_valid_cipher!
|
129
|
+
d = OpenSSL::Cipher::Cipher.new(ALGORITHM)
|
130
|
+
d.decrypt
|
131
|
+
d.key = Digest::SHA256.digest(key)
|
132
|
+
d.iv = iv
|
133
|
+
d
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
def assert_valid_cipher!
|
138
|
+
# In the future, chef may support configurable ciphers. For now, only
|
139
|
+
# aes-256-cbc is supported.
|
140
|
+
requested_cipher = @encrypted_data["cipher"]
|
141
|
+
unless requested_cipher == ALGORITHM
|
142
|
+
raise UnsupportedCipher,
|
143
|
+
"Cipher '#{requested_cipher}' is not supported by this version of Chef. Available ciphers: ['#{ALGORITHM}']"
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
end
|
148
|
+
|
149
|
+
class Version0Decryptor
|
150
|
+
|
151
|
+
attr_reader :encrypted_data
|
152
|
+
attr_reader :key
|
153
|
+
|
154
|
+
def initialize(encrypted_data, key)
|
155
|
+
@encrypted_data = encrypted_data
|
156
|
+
@key = key
|
157
|
+
end
|
158
|
+
|
159
|
+
def for_decrypted_item
|
160
|
+
YAML.load(decrypted_data)
|
161
|
+
end
|
162
|
+
|
163
|
+
def decrypted_data
|
164
|
+
@decrypted_data ||= begin
|
165
|
+
plaintext = openssl_decryptor.update(encrypted_bytes)
|
166
|
+
plaintext << openssl_decryptor.final
|
167
|
+
rescue OpenSSL::Cipher::CipherError => e
|
168
|
+
raise DecryptionFailure, "Error decrypting data bag value: '#{e.message}'. Most likely the provided key is incorrect"
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
def encrypted_bytes
|
173
|
+
Base64.decode64(@encrypted_data)
|
174
|
+
end
|
175
|
+
|
176
|
+
def openssl_decryptor
|
177
|
+
@openssl_decryptor ||= begin
|
178
|
+
d = OpenSSL::Cipher::Cipher.new(ALGORITHM)
|
179
|
+
d.decrypt
|
180
|
+
d.pkcs5_keyivgen(key)
|
181
|
+
d
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
53
187
|
def initialize(enc_hash, secret)
|
54
188
|
@enc_hash = enc_hash
|
55
189
|
@secret = secret
|
@@ -60,7 +194,7 @@ class Chef::EncryptedDataBagItem
|
|
60
194
|
if key == "id" || value.nil?
|
61
195
|
value
|
62
196
|
else
|
63
|
-
|
197
|
+
Decryptor.for(value, @secret).for_decrypted_item
|
64
198
|
end
|
65
199
|
end
|
66
200
|
|
@@ -88,7 +222,6 @@ class Chef::EncryptedDataBagItem
|
|
88
222
|
end
|
89
223
|
|
90
224
|
def self.load(data_bag, name, secret = nil)
|
91
|
-
path = "data/#{data_bag}/#{name}"
|
92
225
|
raw_hash = Chef::DataBagItem.load(data_bag, name)
|
93
226
|
secret = secret || self.load_secret
|
94
227
|
self.new(raw_hash, secret)
|
@@ -98,10 +231,6 @@ class Chef::EncryptedDataBagItem
|
|
98
231
|
Base64.encode64(self.cipher(:encrypt, value.to_yaml, key))
|
99
232
|
end
|
100
233
|
|
101
|
-
def self.decrypt_value(value, key)
|
102
|
-
YAML.load(self.cipher(:decrypt, Base64.decode64(value), key))
|
103
|
-
end
|
104
|
-
|
105
234
|
def self.load_secret(path=nil)
|
106
235
|
path = path || Chef::Config[:encrypted_data_bag_secret] || DEFAULT_SECRET_FILE
|
107
236
|
secret = case path
|
data/lib/chef/formatters/doc.rb
CHANGED
@@ -21,7 +21,7 @@ class Chef
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def run_completed(node)
|
24
|
-
if Chef::Config[:
|
24
|
+
if Chef::Config[:why_run]
|
25
25
|
puts "Chef Client finished, #{@updated_resources} resources would have been updated"
|
26
26
|
else
|
27
27
|
puts "Chef Client finished, #{@updated_resources} resources updated"
|
@@ -29,7 +29,7 @@ class Chef
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def run_failed(exception)
|
32
|
-
if Chef::Config[:
|
32
|
+
if Chef::Config[:why_run]
|
33
33
|
puts "Chef Client failed. #{@updated_resources} resources would have been updated"
|
34
34
|
else
|
35
35
|
puts "Chef Client failed. #{@updated_resources} resources updated"
|
@@ -56,6 +56,7 @@ class Chef
|
|
56
56
|
return nil if dynamic_resource?
|
57
57
|
@snippet ||= begin
|
58
58
|
if file = resource.source_line[/^(([\w]:)?[^:]+):([\d]+)/,1] and line = resource.source_line[/^#{file}:([\d]+)/,1].to_i
|
59
|
+
return nil unless ::File.exists?(file)
|
59
60
|
lines = IO.readlines(file)
|
60
61
|
|
61
62
|
relevant_lines = ["# In #{file}\n\n"]
|