chef 0.10.0.rc.0 → 0.10.0.rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/distro/common/html/chef-client.8.html +1 -1
- data/distro/common/html/chef-expander-cluster.8.html +1 -1
- data/distro/common/html/chef-expanderctl.8.html +1 -1
- data/distro/common/html/chef-server-webui.8.html +1 -1
- data/distro/common/html/chef-server.8.html +1 -1
- data/distro/common/html/chef-solo.8.html +1 -1
- data/distro/common/html/chef-solr.8.html +1 -1
- data/distro/common/html/knife-bootstrap.1.html +1 -1
- data/distro/common/html/knife-client.1.html +1 -1
- data/distro/common/html/knife-configure.1.html +1 -1
- data/distro/common/html/knife-cookbook-site.1.html +1 -1
- data/distro/common/html/knife-cookbook.1.html +1 -1
- data/distro/common/html/knife-data-bag.1.html +1 -1
- data/distro/common/html/knife-environment.1.html +1 -1
- data/distro/common/html/knife-exec.1.html +1 -1
- data/distro/common/html/knife-index.1.html +1 -1
- data/distro/common/html/knife-node.1.html +1 -1
- data/distro/common/html/knife-recipe.1.html +1 -1
- data/distro/common/html/knife-role.1.html +1 -1
- data/distro/common/html/knife-search.1.html +1 -1
- data/distro/common/html/knife-ssh.1.html +1 -1
- data/distro/common/html/knife-status.1.html +1 -1
- data/distro/common/html/knife-tag.1.html +1 -1
- data/distro/common/html/knife.1.html +1 -1
- data/distro/common/html/shef.1.html +1 -1
- 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-cluster.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.rb +1 -0
- data/lib/chef/api_client.rb +6 -0
- data/lib/chef/application.rb +5 -6
- data/lib/chef/application/client.rb +5 -0
- data/lib/chef/cookbook_uploader.rb +4 -1
- data/lib/chef/cookbook_version.rb +12 -15
- data/lib/chef/handler/error_report.rb +2 -9
- data/lib/chef/knife.rb +1 -0
- data/lib/chef/knife/bootstrap.rb +5 -35
- data/lib/chef/knife/bootstrap/archlinux-gems.erb +1 -1
- data/lib/chef/knife/bootstrap/centos5-gems.erb +6 -15
- data/lib/chef/knife/bootstrap/fedora13-gems.erb +4 -12
- data/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb +4 -15
- data/lib/chef/knife/cookbook_list.rb +0 -1
- data/lib/chef/knife/core/bootstrap_context.rb +81 -0
- data/lib/chef/knife/data_bag_create.rb +1 -0
- data/lib/chef/knife/search.rb +3 -0
- data/lib/chef/knife/ssh.rb +2 -0
- data/lib/chef/provider/deploy.rb +1 -1
- data/lib/chef/provider/subversion.rb +1 -1
- data/lib/chef/resource.rb +9 -8
- data/lib/chef/shell_out.rb +1 -1
- data/lib/chef/solr_query.rb +1 -1
- data/lib/chef/version.rb +1 -1
- metadata +3 -2
|
@@ -131,7 +131,7 @@ found in /usr/share/common-licenses/Apache-2.0.</p>
|
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
<ol class='man-decor man-foot man foot'>
|
|
134
|
-
<li class='tl'>Chef 0.10.0.rc.
|
|
134
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
135
135
|
<li class='tc'>April 2011</li>
|
|
136
136
|
<li class='tr'>chef-client(8)</li>
|
|
137
137
|
</ol>
|
|
@@ -154,7 +154,7 @@ found in /usr/share/common-licenses/Apache-2.0.</p>
|
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
<ol class='man-decor man-foot man foot'>
|
|
157
|
-
<li class='tl'>Chef 0.10.0.rc.
|
|
157
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
158
158
|
<li class='tc'>April 2011</li>
|
|
159
159
|
<li class='tr'>chef-expander-cluster(8)</li>
|
|
160
160
|
</ol>
|
|
@@ -136,7 +136,7 @@ found in /usr/share/common-licenses/Apache-2.0.</p>
|
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
<ol class='man-decor man-foot man foot'>
|
|
139
|
-
<li class='tl'>Chef 0.10.0.rc.
|
|
139
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
140
140
|
<li class='tc'>April 2011</li>
|
|
141
141
|
<li class='tr'>chef-expanderctl(8)</li>
|
|
142
142
|
</ol>
|
|
@@ -175,7 +175,7 @@ found in /usr/share/common-licenses/Apache-2.0.</p>
|
|
|
175
175
|
|
|
176
176
|
|
|
177
177
|
<ol class='man-decor man-foot man foot'>
|
|
178
|
-
<li class='tl'>Chef 0.10.0.rc.
|
|
178
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
179
179
|
<li class='tc'>April 2011</li>
|
|
180
180
|
<li class='tr'>chef-server-webui(8)</li>
|
|
181
181
|
</ol>
|
|
@@ -172,7 +172,7 @@ found in /usr/share/common-licenses/Apache-2.0.</p>
|
|
|
172
172
|
|
|
173
173
|
|
|
174
174
|
<ol class='man-decor man-foot man foot'>
|
|
175
|
-
<li class='tl'>Chef 0.10.0.rc.
|
|
175
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
176
176
|
<li class='tc'>April 2011</li>
|
|
177
177
|
<li class='tr'>chef-server(8)</li>
|
|
178
178
|
</ol>
|
|
@@ -181,7 +181,7 @@ found in /usr/share/common-licenses/Apache-2.0.</p>
|
|
|
181
181
|
|
|
182
182
|
|
|
183
183
|
<ol class='man-decor man-foot man foot'>
|
|
184
|
-
<li class='tl'>Chef 0.10.0.rc.
|
|
184
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
185
185
|
<li class='tc'>April 2011</li>
|
|
186
186
|
<li class='tr'>chef-solo(8)</li>
|
|
187
187
|
</ol>
|
|
@@ -153,7 +153,7 @@ found in /usr/share/common-licenses/Apache-2.0.</p>
|
|
|
153
153
|
|
|
154
154
|
|
|
155
155
|
<ol class='man-decor man-foot man foot'>
|
|
156
|
-
<li class='tl'>Chef 0.10.0.rc.
|
|
156
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
157
157
|
<li class='tc'>April 2011</li>
|
|
158
158
|
<li class='tr'>chef-solr(8)</li>
|
|
159
159
|
</ol>
|
|
@@ -231,7 +231,7 @@ to other users via the process list using tools such as <span class="man-ref">ps
|
|
|
231
231
|
|
|
232
232
|
|
|
233
233
|
<ol class='man-decor man-foot man foot'>
|
|
234
|
-
<li class='tl'>Chef 0.10.0.rc.
|
|
234
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
235
235
|
<li class='tc'>April 2011</li>
|
|
236
236
|
<li class='tr'>knife-bootrap(1)</li>
|
|
237
237
|
</ol>
|
|
@@ -209,7 +209,7 @@ setting up a host for management with Chef.</p>
|
|
|
209
209
|
|
|
210
210
|
|
|
211
211
|
<ol class='man-decor man-foot man foot'>
|
|
212
|
-
<li class='tl'>Chef 0.10.0.rc.
|
|
212
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
213
213
|
<li class='tc'>April 2011</li>
|
|
214
214
|
<li class='tr'>knife-client(1)</li>
|
|
215
215
|
</ol>
|
|
@@ -160,7 +160,7 @@ may need to modify that setting after copying to a remote host.</p></li>
|
|
|
160
160
|
|
|
161
161
|
|
|
162
162
|
<ol class='man-decor man-foot man foot'>
|
|
163
|
-
<li class='tl'>Chef 0.10.0.rc.
|
|
163
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
164
164
|
<li class='tc'>April 2011</li>
|
|
165
165
|
<li class='tr'>knife-configure(1)</li>
|
|
166
166
|
</ol>
|
|
@@ -257,7 +257,7 @@ override_attributes "aws_s3_bucket" => "production"
|
|
|
257
257
|
|
|
258
258
|
|
|
259
259
|
<ol class='man-decor man-foot man foot'>
|
|
260
|
-
<li class='tl'>Chef 0.10.0.rc.
|
|
260
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
261
261
|
<li class='tc'>April 2011</li>
|
|
262
262
|
<li class='tr'>knife-environment(1)</li>
|
|
263
263
|
</ol>
|
|
@@ -115,7 +115,7 @@ time for all objects to be indexed and available for search.</p>
|
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
<ol class='man-decor man-foot man foot'>
|
|
118
|
-
<li class='tl'>Chef 0.10.0.rc.
|
|
118
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
119
119
|
<li class='tc'>April 2011</li>
|
|
120
120
|
<li class='tr'>knife-index(1)</li>
|
|
121
121
|
</ol>
|
|
@@ -260,7 +260,7 @@ run list, the correct syntax is "role[ROLE_NAME]"</p>
|
|
|
260
260
|
|
|
261
261
|
|
|
262
262
|
<ol class='man-decor man-foot man foot'>
|
|
263
|
-
<li class='tl'>Chef 0.10.0.rc.
|
|
263
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
264
264
|
<li class='tc'>April 2011</li>
|
|
265
265
|
<li class='tr'>knife-node(1)</li>
|
|
266
266
|
</ol>
|
|
@@ -133,7 +133,7 @@ query syntax. The following data types are indexed for search:
|
|
|
133
133
|
|
|
134
134
|
|
|
135
135
|
<ol class='man-decor man-foot man foot'>
|
|
136
|
-
<li class='tl'>Chef 0.10.0.rc.
|
|
136
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
137
137
|
<li class='tc'>April 2011</li>
|
|
138
138
|
<li class='tr'>knife-search(1)</li>
|
|
139
139
|
</ol>
|
|
@@ -118,7 +118,7 @@ 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 0.10.0.rc.
|
|
121
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
122
122
|
<li class='tc'>April 2011</li>
|
|
123
123
|
<li class='tr'>knife-status(1)</li>
|
|
124
124
|
</ol>
|
|
@@ -273,7 +273,7 @@ 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 0.10.0.rc.
|
|
276
|
+
<li class='tl'>Chef 0.10.0.rc.1</li>
|
|
277
277
|
<li class='tc'>April 2011</li>
|
|
278
278
|
<li class='tr'>shef(1)</li>
|
|
279
279
|
</ol>
|
|
@@ -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\-BOOTRAP" "1" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-BOOTRAP" "1" "April 2011" "Chef 0.10.0.rc.1" "Chef Manual"
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBknife\-bootrap\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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-CLIENT" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-CONFIGURE" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-COOKBOOK\-SITE" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-COOKBOOK" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-DATA\-BAG" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-ENVIRONMENT" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-EXEC" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-INDEX" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-NODE" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-ROLE" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-SEARCH" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-SSH" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-STATUS" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE\-TAG" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "KNIFE" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "SHEF" "1" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "CHEF\-CLIENT" "8" "April 2011" "Chef 0.10.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\-CLUSTER" "8" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "CHEF\-EXPANDER\-CLUSTER" "8" "April 2011" "Chef 0.10.0.rc.1" "Chef Manual"
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBchef\-expander\-cluster\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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "CHEF\-EXPANDERCTL" "8" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "CHEF\-SERVER\-WEBUI" "8" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "CHEF\-SERVER" "8" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "CHEF\-SOLO" "8" "April 2011" "Chef 0.10.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" "April 2011" "Chef 0.10.0.rc.
|
|
4
|
+
.TH "CHEF\-SOLR" "8" "April 2011" "Chef 0.10.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.rb
CHANGED
data/lib/chef/api_client.rb
CHANGED
data/lib/chef/application.rb
CHANGED
|
@@ -127,13 +127,12 @@ class Chef::Application
|
|
|
127
127
|
class << self
|
|
128
128
|
def debug_stacktrace(e)
|
|
129
129
|
message = "#{e.class}: #{e}\n#{e.backtrace.join("\n")}"
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
chef_stacktrace_out = "Generated at #{Time.now.to_s}\n"
|
|
131
|
+
chef_stacktrace_out += message
|
|
132
|
+
|
|
133
|
+
Chef::FileCache.store("chef-stacktrace.out", chef_stacktrace_out)
|
|
134
|
+
Chef::Log.fatal("Stacktrace dumped to #{Chef::FileCache.load("chef-stacktrace.out", false)}")
|
|
132
135
|
Chef::Log.debug(message)
|
|
133
|
-
chef_stacktrace_out = File.open(filename, "w")
|
|
134
|
-
chef_stacktrace_out.puts "Generated at #{Time.now.to_s}"
|
|
135
|
-
chef_stacktrace_out.puts message
|
|
136
|
-
chef_stacktrace_out.close
|
|
137
136
|
true
|
|
138
137
|
end
|
|
139
138
|
|
|
@@ -128,6 +128,11 @@ class Chef::Application::Client < Chef::Application
|
|
|
128
128
|
:description => "Set the client key file location",
|
|
129
129
|
:proc => nil
|
|
130
130
|
|
|
131
|
+
option :environment,
|
|
132
|
+
:short => '-E ENVIRONMENT',
|
|
133
|
+
:long => '--environment ENVIRONMENT',
|
|
134
|
+
:description => 'Set the Chef Environment on the node'
|
|
135
|
+
|
|
131
136
|
option :version,
|
|
132
137
|
:short => "-v",
|
|
133
138
|
:long => "--version",
|
|
@@ -100,8 +100,11 @@ class Chef
|
|
|
100
100
|
raise
|
|
101
101
|
end
|
|
102
102
|
end
|
|
103
|
+
|
|
103
104
|
# files are uploaded, so save the manifest
|
|
104
|
-
opts[:force] ? cookbook.
|
|
105
|
+
save_url = opts[:force] ? cookbook.force_save_url : cookbook.save_url
|
|
106
|
+
rest.put_rest(save_url, cookbook)
|
|
107
|
+
|
|
105
108
|
Chef::Log.info("Upload complete!")
|
|
106
109
|
end
|
|
107
110
|
|
|
@@ -823,21 +823,18 @@ class Chef
|
|
|
823
823
|
self.class.chef_server_rest
|
|
824
824
|
end
|
|
825
825
|
|
|
826
|
-
#
|
|
827
|
-
# document on the server and it
|
|
828
|
-
#
|
|
829
|
-
def
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
#
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
def force_save
|
|
839
|
-
chef_server_rest.put_rest("cookbooks/#{name}/#{version}?force=true", self)
|
|
840
|
-
self
|
|
826
|
+
# Return the URL to save (PUT) this object to the server via the
|
|
827
|
+
# REST api. If there is an existing document on the server and it
|
|
828
|
+
# is marked frozen, a PUT will result in a 409 Conflict.
|
|
829
|
+
def save_url
|
|
830
|
+
"cookbooks/#{name}/#{version}"
|
|
831
|
+
end
|
|
832
|
+
|
|
833
|
+
# Adds the `force=true` parameter to the upload URL. This allows
|
|
834
|
+
# the user to overwrite a frozen cookbook (a PUT against the
|
|
835
|
+
# normal #save_url raises a 409 Conflict in this case).
|
|
836
|
+
def force_save_url
|
|
837
|
+
"cookbooks/#{name}/#{version}?force=true"
|
|
841
838
|
end
|
|
842
839
|
|
|
843
840
|
def destroy
|
|
@@ -24,15 +24,8 @@ class Chef
|
|
|
24
24
|
class ErrorReport < ::Chef::Handler
|
|
25
25
|
|
|
26
26
|
def report
|
|
27
|
-
Chef::
|
|
28
|
-
|
|
29
|
-
File.open(report_path, "w") do |file|
|
|
30
|
-
file.puts Chef::JSONCompat.to_json_pretty(data)
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def report_path
|
|
35
|
-
File.join(Chef::Config[:file_cache_path], "failed-run-data.json")
|
|
27
|
+
Chef::FileCache.store("failed-run-data.json", Chef::JSONCompat.to_json_pretty(data))
|
|
28
|
+
Chef::Log.fatal("Saving node information to #{Chef::FileCache.load("failed-run-data.json", false)}")
|
|
36
29
|
end
|
|
37
30
|
|
|
38
31
|
end
|
data/lib/chef/knife.rb
CHANGED
|
@@ -407,6 +407,7 @@ class Chef
|
|
|
407
407
|
when NameError, NoMethodError
|
|
408
408
|
ui.error "knife encountered an unexpected error"
|
|
409
409
|
ui.info "This may be a bug in the '#{self.class.common_name}' knife command or plugin"
|
|
410
|
+
ui.info "Please collect the output of this command with the `-VV` option before filing a bug report."
|
|
410
411
|
ui.info "Exception: #{e.class.name}: #{e.message}"
|
|
411
412
|
when Chef::Exceptions::PrivateKeyMissing
|
|
412
413
|
ui.error "Your private key could not be loaded from #{api_key}"
|
data/lib/chef/knife/bootstrap.rb
CHANGED
|
@@ -24,11 +24,13 @@ class Chef
|
|
|
24
24
|
class Bootstrap < Knife
|
|
25
25
|
|
|
26
26
|
deps do
|
|
27
|
+
require 'chef/knife/core/bootstrap_context'
|
|
27
28
|
require 'chef/json_compat'
|
|
28
29
|
require 'tempfile'
|
|
29
30
|
require 'highline'
|
|
30
31
|
require 'net/ssh'
|
|
31
32
|
require 'net/ssh/multi'
|
|
33
|
+
Chef::Knife::Ssh.load_deps
|
|
32
34
|
end
|
|
33
35
|
|
|
34
36
|
banner "knife bootstrap FQDN (options)"
|
|
@@ -66,9 +68,9 @@ class Chef
|
|
|
66
68
|
:description => "Install the pre-release chef gems"
|
|
67
69
|
|
|
68
70
|
option :bootstrap_version,
|
|
69
|
-
:long => "--bootstrap-version",
|
|
71
|
+
:long => "--bootstrap-version VERSION",
|
|
70
72
|
:description => "The version of Chef to install",
|
|
71
|
-
:proc => lambda { |v| Chef::Config[:bootstrap_version] = v }
|
|
73
|
+
:proc => lambda { |v| Chef::Config[:knife][:bootstrap_version] = v }
|
|
72
74
|
|
|
73
75
|
option :distro,
|
|
74
76
|
:short => "-d DISTRO",
|
|
@@ -126,9 +128,7 @@ class Chef
|
|
|
126
128
|
end
|
|
127
129
|
|
|
128
130
|
def render_template(template=nil)
|
|
129
|
-
context =
|
|
130
|
-
context[:run_list] = config[:run_list]
|
|
131
|
-
context[:config] = config
|
|
131
|
+
context = Knife::Core::BootstrapContext.new(config, config[:run_list], Chef::Config)
|
|
132
132
|
Erubis::Eruby.new(template).evaluate(context)
|
|
133
133
|
end
|
|
134
134
|
|
|
@@ -193,36 +193,6 @@ class Chef
|
|
|
193
193
|
command
|
|
194
194
|
end
|
|
195
195
|
|
|
196
|
-
module TemplateHelper
|
|
197
|
-
|
|
198
|
-
#
|
|
199
|
-
# == Chef::Knife::Bootstrap::TemplateHelper
|
|
200
|
-
#
|
|
201
|
-
# The methods in the TemplateHelper module expect to have access to
|
|
202
|
-
# the instance varialbles set above as part of the context in the
|
|
203
|
-
# Chef::Knife::Bootstrap#render_context method. Those instance
|
|
204
|
-
# variables are:
|
|
205
|
-
#
|
|
206
|
-
# * @config - a hash of knife's config values
|
|
207
|
-
# * @run_list - the run list for the node to boostrap
|
|
208
|
-
#
|
|
209
|
-
|
|
210
|
-
::Erubis::Context.send(:include, Chef::Knife::Bootstrap::TemplateHelper)
|
|
211
|
-
|
|
212
|
-
def bootstrap_version_string(type=nil)
|
|
213
|
-
version = Chef::Config[:bootstrap_version] || Chef::VERSION
|
|
214
|
-
case type
|
|
215
|
-
when :gems
|
|
216
|
-
if @config[:prerelease]
|
|
217
|
-
"--prerelease"
|
|
218
|
-
else
|
|
219
|
-
"--version #{version}"
|
|
220
|
-
end
|
|
221
|
-
else
|
|
222
|
-
version
|
|
223
|
-
end
|
|
224
|
-
end
|
|
225
|
-
end
|
|
226
196
|
end
|
|
227
197
|
end
|
|
228
198
|
end
|
|
@@ -4,7 +4,7 @@ if [ ! -f /usr/bin/chef-client ]; then
|
|
|
4
4
|
pacman -S --noconfirm ruby ntp base-devel
|
|
5
5
|
ntpdate -u pool.ntp.org
|
|
6
6
|
gem install ohai --no-rdoc --no-ri --verbose
|
|
7
|
-
gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string
|
|
7
|
+
gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %>
|
|
8
8
|
fi
|
|
9
9
|
|
|
10
10
|
mkdir -p /etc/chef
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
bash -c '
|
|
2
2
|
if [ ! -f /usr/bin/chef-client ]; then
|
|
3
|
-
|
|
4
|
-
rpm -Uvh http://download.elff.bravenet.com/5/i386/elff-release-5-3.noarch.rpm
|
|
3
|
+
wget -O /etc/yum.repos.d/aegis.repo http://rpm.aegisco.com/aegisco/el5/aegisco.repo
|
|
5
4
|
|
|
6
|
-
yum install -y ruby ruby-devel gcc gcc-c++ automake autoconf make
|
|
5
|
+
yum install -y ruby-1.8.7.334-2.el5 ruby-devel-1.8.7.334-2.el5 gcc gcc-c++ automake autoconf make
|
|
7
6
|
|
|
8
7
|
cd /tmp
|
|
9
8
|
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
|
|
@@ -15,13 +14,13 @@ fi
|
|
|
15
14
|
gem update --system
|
|
16
15
|
gem update
|
|
17
16
|
gem install ohai --no-rdoc --no-ri --verbose
|
|
18
|
-
gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string
|
|
17
|
+
gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %>
|
|
19
18
|
|
|
20
19
|
mkdir -p /etc/chef
|
|
21
20
|
|
|
22
21
|
(
|
|
23
22
|
cat <<'EOP'
|
|
24
|
-
<%=
|
|
23
|
+
<%= validation_key %>
|
|
25
24
|
EOP
|
|
26
25
|
) > /tmp/validation.pem
|
|
27
26
|
awk NF /tmp/validation.pem > /etc/chef/validation.pem
|
|
@@ -29,15 +28,7 @@ rm /tmp/validation.pem
|
|
|
29
28
|
|
|
30
29
|
(
|
|
31
30
|
cat <<'EOP'
|
|
32
|
-
|
|
33
|
-
log_location STDOUT
|
|
34
|
-
chef_server_url "<%= Chef::Config[:chef_server_url] %>"
|
|
35
|
-
validation_client_name "<%= Chef::Config[:validation_client_name] %>"
|
|
36
|
-
<% if @config[:chef_node_name] == nil %>
|
|
37
|
-
# Using default node name (fqdn)
|
|
38
|
-
<% else %>
|
|
39
|
-
node_name "<%= @config[:chef_node_name] %>"
|
|
40
|
-
<% end %>
|
|
31
|
+
<%= config_content %>
|
|
41
32
|
EOP
|
|
42
33
|
) > /etc/chef/client.rb
|
|
43
34
|
|
|
@@ -47,4 +38,4 @@ cat <<'EOP'
|
|
|
47
38
|
EOP
|
|
48
39
|
) > /etc/chef/first-boot.json
|
|
49
40
|
|
|
50
|
-
|
|
41
|
+
<%= start_chef %>'
|
|
@@ -4,13 +4,13 @@ yum install -y ruby ruby-devel gcc gcc-c++ automake autoconf rubygems make
|
|
|
4
4
|
gem update --system
|
|
5
5
|
gem update
|
|
6
6
|
gem install ohai --no-rdoc --no-ri --verbose
|
|
7
|
-
gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string
|
|
7
|
+
gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %>
|
|
8
8
|
|
|
9
9
|
mkdir -p /etc/chef
|
|
10
10
|
|
|
11
11
|
(
|
|
12
12
|
cat <<'EOP'
|
|
13
|
-
<%=
|
|
13
|
+
<%= validation_key %>
|
|
14
14
|
EOP
|
|
15
15
|
) > /tmp/validation.pem
|
|
16
16
|
awk NF /tmp/validation.pem > /etc/chef/validation.pem
|
|
@@ -18,15 +18,7 @@ rm /tmp/validation.pem
|
|
|
18
18
|
|
|
19
19
|
(
|
|
20
20
|
cat <<'EOP'
|
|
21
|
-
|
|
22
|
-
log_location STDOUT
|
|
23
|
-
chef_server_url "<%= Chef::Config[:chef_server_url] %>"
|
|
24
|
-
validation_client_name "<%= Chef::Config[:validation_client_name] %>"
|
|
25
|
-
<% if @config[:chef_node_name] == nil %>
|
|
26
|
-
# Using default node name"
|
|
27
|
-
<% else %>
|
|
28
|
-
node_name "<%= @config[:chef_node_name] %>"
|
|
29
|
-
<% end %>
|
|
21
|
+
<%= config_content %>
|
|
30
22
|
EOP
|
|
31
23
|
) > /etc/chef/client.rb
|
|
32
24
|
|
|
@@ -36,4 +28,4 @@ cat <<'EOP'
|
|
|
36
28
|
EOP
|
|
37
29
|
) > /etc/chef/first-boot.json
|
|
38
30
|
|
|
39
|
-
|
|
31
|
+
<%= start_chef %>'
|
|
@@ -10,13 +10,13 @@ if [ ! -f /usr/bin/chef-client ]; then
|
|
|
10
10
|
fi
|
|
11
11
|
|
|
12
12
|
gem install ohai --no-rdoc --no-ri --verbose
|
|
13
|
-
gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string
|
|
13
|
+
gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %>
|
|
14
14
|
|
|
15
15
|
mkdir -p /etc/chef
|
|
16
16
|
|
|
17
17
|
(
|
|
18
18
|
cat <<'EOP'
|
|
19
|
-
<%=
|
|
19
|
+
<%= validation_key %>
|
|
20
20
|
EOP
|
|
21
21
|
) > /tmp/validation.pem
|
|
22
22
|
awk NF /tmp/validation.pem > /etc/chef/validation.pem
|
|
@@ -24,18 +24,7 @@ rm /tmp/validation.pem
|
|
|
24
24
|
|
|
25
25
|
(
|
|
26
26
|
cat <<'EOP'
|
|
27
|
-
|
|
28
|
-
log_location STDOUT
|
|
29
|
-
chef_server_url "<%= Chef::Config[:chef_server_url] %>"
|
|
30
|
-
validation_client_name "<%= Chef::Config[:validation_client_name] %>"
|
|
31
|
-
<% if @config[:chef_node_name] == nil %>
|
|
32
|
-
# Using default node name (fqdn)
|
|
33
|
-
<% else %>
|
|
34
|
-
node_name "<%= @config[:chef_node_name] %>"
|
|
35
|
-
<% end %>
|
|
36
|
-
<% if Chef::Config[:environment] != nil %>
|
|
37
|
-
environment "<%= Chef::Config[:environment]%>"
|
|
38
|
-
<% end %>
|
|
27
|
+
<%= config_content %>
|
|
39
28
|
EOP
|
|
40
29
|
) > /etc/chef/client.rb
|
|
41
30
|
|
|
@@ -45,4 +34,4 @@ cat <<'EOP'
|
|
|
45
34
|
EOP
|
|
46
35
|
) > /etc/chef/first-boot.json
|
|
47
36
|
|
|
48
|
-
|
|
37
|
+
<%= start_chef %>'
|
|
@@ -39,7 +39,6 @@ class Chef
|
|
|
39
39
|
env = config[:environment]
|
|
40
40
|
num_versions = config[:all_versions] ? "num_versions=all" : "num_versions=1"
|
|
41
41
|
api_endpoint = env ? "/environments/#{env}/cookbooks?#{num_versions}" : "/cookbooks?#{num_versions}"
|
|
42
|
-
ui.info("Showing latest versions. Use --show-all to list all available versions.") unless config[:all_versions]
|
|
43
42
|
cookbook_versions = rest.get_rest(api_endpoint)
|
|
44
43
|
format_cookbook_list_for_display(cookbook_versions).each do |line|
|
|
45
44
|
ui.msg(line)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Author:: Daniel DeLeo (<dan@opscode.com>)
|
|
3
|
+
# Copyright:: Copyright (c) 2011 Opscode, Inc.
|
|
4
|
+
# License:: Apache License, Version 2.0
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
# you may not use this file except in compliance with the License.
|
|
8
|
+
# You may obtain a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
# See the License for the specific language governing permissions and
|
|
16
|
+
# limitations under the License.
|
|
17
|
+
#
|
|
18
|
+
|
|
19
|
+
require 'chef/run_list'
|
|
20
|
+
class Chef
|
|
21
|
+
class Knife
|
|
22
|
+
module Core
|
|
23
|
+
# Instances of BootstrapContext are the context objects (i.e., +self+) for
|
|
24
|
+
# bootstrap templates. For backwards compatability, they +must+ set the
|
|
25
|
+
# following instance variables:
|
|
26
|
+
# * @config - a hash of knife's config values
|
|
27
|
+
# * @run_list - the run list for the node to boostrap
|
|
28
|
+
#
|
|
29
|
+
class BootstrapContext
|
|
30
|
+
|
|
31
|
+
def initialize(config, run_list, chef_config)
|
|
32
|
+
@config = config
|
|
33
|
+
@run_list = run_list
|
|
34
|
+
@chef_config = chef_config
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def bootstrap_version_string
|
|
38
|
+
if @config[:prerelease]
|
|
39
|
+
"--prerelease"
|
|
40
|
+
else
|
|
41
|
+
version = knife_config[:bootstrap_version] || Chef::VERSION
|
|
42
|
+
"--version #{version}"
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def bootstrap_environment
|
|
47
|
+
@chef_config[:environment] || '_default'
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def validation_key
|
|
51
|
+
IO.read(@chef_config[:validation_key])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def config_content
|
|
55
|
+
client_rb = <<-CONFIG
|
|
56
|
+
log_level :info
|
|
57
|
+
log_location STDOUT
|
|
58
|
+
chef_server_url "#{@chef_config[:chef_server_url]}"
|
|
59
|
+
validation_client_name "#{@chef_config[:validation_client_name]}"
|
|
60
|
+
CONFIG
|
|
61
|
+
if @config[:chef_node_name]
|
|
62
|
+
client_rb << %Q{node_name "#{@config[:chef_node_name]}"\n}
|
|
63
|
+
else
|
|
64
|
+
client_rb << "# Using default node name (fqdn)\n"
|
|
65
|
+
end
|
|
66
|
+
client_rb
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def start_chef
|
|
70
|
+
"/usr/bin/chef-client -j /etc/chef/first-boot.json -E #{bootstrap_environment}"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def knife_config
|
|
74
|
+
@chef_config.key?(:knife) ? @chef_config[:knife] : {}
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
data/lib/chef/knife/search.rb
CHANGED
data/lib/chef/knife/ssh.rb
CHANGED
|
@@ -27,6 +27,7 @@ class Chef
|
|
|
27
27
|
require 'net/ssh/multi'
|
|
28
28
|
require 'readline'
|
|
29
29
|
require 'chef/search/query'
|
|
30
|
+
require 'chef/mixin/command'
|
|
30
31
|
end
|
|
31
32
|
|
|
32
33
|
attr_writer :password
|
|
@@ -300,6 +301,7 @@ class Chef
|
|
|
300
301
|
end
|
|
301
302
|
|
|
302
303
|
def run
|
|
304
|
+
extend Chef::Mixin::Command
|
|
303
305
|
|
|
304
306
|
@longest = 0
|
|
305
307
|
|
data/lib/chef/provider/deploy.rb
CHANGED
|
@@ -307,7 +307,7 @@ class Chef
|
|
|
307
307
|
gems = YAML.load(IO.read("#{release_path}/gems.yml"))
|
|
308
308
|
|
|
309
309
|
gems.map do |g|
|
|
310
|
-
r = Chef::Resource::GemPackage.new(g[:name])
|
|
310
|
+
r = Chef::Resource::GemPackage.new(g[:name], run_context)
|
|
311
311
|
r.version g[:version]
|
|
312
312
|
r.action :install
|
|
313
313
|
r.source "http://gems.github.com"
|
|
@@ -31,7 +31,7 @@ class Chef
|
|
|
31
31
|
def load_current_resource
|
|
32
32
|
@current_resource = Chef::Resource::Subversion.new(@new_resource.name)
|
|
33
33
|
|
|
34
|
-
unless [:export, :force_export].include?(@new_resource.action.first)
|
|
34
|
+
unless [:export, :force_export].include?(Array(@new_resource.action).first)
|
|
35
35
|
if current_revision = find_current_revision
|
|
36
36
|
@current_resource.revision current_revision
|
|
37
37
|
end
|
data/lib/chef/resource.rb
CHANGED
|
@@ -70,6 +70,7 @@ F
|
|
|
70
70
|
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
+
FORBIDDEN_IVARS = [:@run_context, :@node]
|
|
73
74
|
HIDDEN_IVARS = [:@allowed_actions, :@resource_name, :@source_line, :@run_context, :@name, :@node]
|
|
74
75
|
|
|
75
76
|
include Chef::Mixin::CheckHelper
|
|
@@ -320,7 +321,7 @@ F
|
|
|
320
321
|
end
|
|
321
322
|
|
|
322
323
|
def inspect
|
|
323
|
-
ivars = instance_variables.map { |ivar| ivar.to_sym } -
|
|
324
|
+
ivars = instance_variables.map { |ivar| ivar.to_sym } - FORBIDDEN_IVARS
|
|
324
325
|
ivars.inject("<#{to_s}") do |str, ivar|
|
|
325
326
|
str << " #{ivar}: #{instance_variable_get(ivar).inspect}"
|
|
326
327
|
end << ">"
|
|
@@ -328,11 +329,10 @@ F
|
|
|
328
329
|
|
|
329
330
|
# Serialize this object as a hash
|
|
330
331
|
def to_json(*a)
|
|
332
|
+
safe_ivars = instance_variables.map { |ivar| ivar.to_sym } - FORBIDDEN_IVARS
|
|
331
333
|
instance_vars = Hash.new
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
instance_vars[iv] = self.instance_variable_get(iv)
|
|
335
|
-
end
|
|
334
|
+
safe_ivars.each do |iv|
|
|
335
|
+
instance_vars[iv.to_s.sub(/^@/, '')] = instance_variable_get(iv)
|
|
336
336
|
end
|
|
337
337
|
results = {
|
|
338
338
|
'json_class' => self.class.name,
|
|
@@ -342,10 +342,11 @@ F
|
|
|
342
342
|
end
|
|
343
343
|
|
|
344
344
|
def to_hash
|
|
345
|
+
safe_ivars = instance_variables.map { |ivar| ivar.to_sym } - FORBIDDEN_IVARS
|
|
345
346
|
instance_vars = Hash.new
|
|
346
|
-
|
|
347
|
+
safe_ivars.each do |iv|
|
|
347
348
|
key = iv.to_s.sub(/^@/,'').to_sym
|
|
348
|
-
instance_vars[key] =
|
|
349
|
+
instance_vars[key] = instance_variable_get(iv)
|
|
349
350
|
end
|
|
350
351
|
instance_vars
|
|
351
352
|
end
|
|
@@ -444,7 +445,7 @@ F
|
|
|
444
445
|
def json_create(o)
|
|
445
446
|
resource = self.new(o["instance_vars"]["@name"])
|
|
446
447
|
o["instance_vars"].each do |k,v|
|
|
447
|
-
resource.instance_variable_set(k.to_sym, v)
|
|
448
|
+
resource.instance_variable_set("@#{k}".to_sym, v)
|
|
448
449
|
end
|
|
449
450
|
resource
|
|
450
451
|
end
|
data/lib/chef/shell_out.rb
CHANGED
data/lib/chef/solr_query.rb
CHANGED
|
@@ -152,7 +152,7 @@ class Chef
|
|
|
152
152
|
delete_database(db)
|
|
153
153
|
|
|
154
154
|
results = {}
|
|
155
|
-
[Chef::ApiClient, Chef::Node, Chef::Role].each do |klass|
|
|
155
|
+
[Chef::ApiClient, Chef::Node, Chef::Role, Chef::Environment].each do |klass|
|
|
156
156
|
results[klass.name] = reindex_all(klass) ? "success" : "failed"
|
|
157
157
|
end
|
|
158
158
|
databags = Chef::DataBag.cdb_list(true)
|
data/lib/chef/version.rb
CHANGED
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: chef
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: 7
|
|
5
|
-
version: 0.10.0.rc.
|
|
5
|
+
version: 0.10.0.rc.1
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Adam Jacob
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-04-
|
|
13
|
+
date: 2011-04-27 00:00:00 -07:00
|
|
14
14
|
default_executable:
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
@@ -389,6 +389,7 @@ files:
|
|
|
389
389
|
- lib/chef/knife/cookbook_site_vendor.rb
|
|
390
390
|
- lib/chef/knife/cookbook_test.rb
|
|
391
391
|
- lib/chef/knife/cookbook_upload.rb
|
|
392
|
+
- lib/chef/knife/core/bootstrap_context.rb
|
|
392
393
|
- lib/chef/knife/core/cookbook_scm_repo.rb
|
|
393
394
|
- lib/chef/knife/core/generic_presenter.rb
|
|
394
395
|
- lib/chef/knife/core/node_editor.rb
|