chef 11.12.8-x86-mingw32 → 11.14.0.alpha.2-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +4 -2
- data/distro/common/html/_sources/index.txt +6 -0
- data/distro/common/html/_sources/knife_ssl_check.txt +41 -0
- data/distro/common/html/_sources/knife_ssl_fetch.txt +41 -0
- data/distro/common/html/_static/basic.css +2 -5
- data/distro/common/html/_static/doctools.js +5 -14
- data/distro/common/html/_static/jquery.js +2 -154
- data/distro/common/html/_static/pygments.css +2 -2
- data/distro/common/html/_static/searchtools.js +212 -150
- data/distro/common/html/_static/underscore.js +29 -21
- data/distro/common/html/_static/websupport.js +1 -1
- data/distro/common/html/ctl_chef_client.html +15 -18
- data/distro/common/html/ctl_chef_server.html +7 -7
- data/distro/common/html/ctl_chef_shell.html +6 -6
- data/distro/common/html/ctl_chef_solo.html +7 -8
- data/distro/common/html/index.html +34 -24
- data/distro/common/html/knife.html +23 -24
- data/distro/common/html/knife_bootstrap.html +13 -9
- data/distro/common/html/knife_client.html +10 -11
- data/distro/common/html/knife_common_options.html +6 -7
- data/distro/common/html/knife_configure.html +3 -4
- data/distro/common/html/knife_cookbook.html +18 -11
- data/distro/common/html/knife_cookbook_site.html +14 -14
- data/distro/common/html/knife_data_bag.html +24 -23
- data/distro/common/html/knife_delete.html +4 -5
- data/distro/common/html/knife_deps.html +4 -5
- data/distro/common/html/knife_diff.html +6 -7
- data/distro/common/html/knife_download.html +12 -13
- data/distro/common/html/knife_edit.html +4 -5
- data/distro/common/html/knife_environment.html +8 -9
- data/distro/common/html/knife_exec.html +9 -10
- data/distro/common/html/knife_index_rebuild.html +4 -5
- data/distro/common/html/knife_list.html +8 -9
- data/distro/common/html/knife_node.html +34 -33
- data/distro/common/html/knife_raw.html +2 -3
- data/distro/common/html/knife_recipe_list.html +3 -4
- data/distro/common/html/knife_role.html +30 -29
- data/distro/common/html/knife_search.html +7 -7
- data/distro/common/html/knife_show.html +4 -5
- data/distro/common/html/knife_ssh.html +2 -3
- data/distro/common/html/knife_ssl_check.html +148 -0
- data/distro/common/html/knife_ssl_fetch.html +152 -0
- data/distro/common/html/knife_status.html +4 -5
- data/distro/common/html/knife_tag.html +2 -3
- data/distro/common/html/knife_upload.html +5 -6
- data/distro/common/html/knife_user.html +9 -10
- data/distro/common/html/knife_using.html +12 -12
- data/distro/common/html/knife_xargs.html +11 -12
- data/distro/common/html/search.html +1 -2
- data/distro/common/html/searchindex.js +1 -1
- data/distro/common/man/man1/chef-shell.1 +19 -11
- data/distro/common/man/man1/knife-bootstrap.1 +35 -19
- data/distro/common/man/man1/knife-client.1 +111 -28
- data/distro/common/man/man1/knife-configure.1 +30 -14
- data/distro/common/man/man1/knife-cookbook-site.1 +105 -22
- data/distro/common/man/man1/knife-cookbook.1 +164 -23
- data/distro/common/man/man1/knife-data-bag.1 +157 -33
- data/distro/common/man/man1/knife-delete.1 +21 -17
- data/distro/common/man/man1/knife-deps.1 +60 -16
- data/distro/common/man/man1/knife-diff.1 +37 -17
- data/distro/common/man/man1/knife-download.1 +68 -24
- data/distro/common/man/man1/knife-edit.1 +19 -15
- data/distro/common/man/man1/knife-environment.1 +105 -17
- data/distro/common/man/man1/knife-exec.1 +78 -18
- data/distro/common/man/man1/knife-index-rebuild.1 +16 -8
- data/distro/common/man/man1/knife-list.1 +39 -23
- data/distro/common/man/man1/knife-node.1 +170 -22
- data/distro/common/man/man1/knife-raw.1 +33 -13
- data/distro/common/man/man1/knife-recipe-list.1 +17 -5
- data/distro/common/man/man1/knife-role.1 +86 -18
- data/distro/common/man/man1/knife-search.1 +80 -16
- data/distro/common/man/man1/knife-show.1 +30 -14
- data/distro/common/man/man1/knife-ssh.1 +54 -14
- data/distro/common/man/man1/knife-ssl-check.1 +207 -0
- data/distro/common/man/man1/knife-ssl-fetch.1 +207 -0
- data/distro/common/man/man1/knife-status.1 +48 -12
- data/distro/common/man/man1/knife-tag.1 +30 -10
- data/distro/common/man/man1/knife-upload.1 +72 -20
- data/distro/common/man/man1/knife-user.1 +79 -23
- data/distro/common/man/man1/knife-xargs.1 +61 -53
- data/distro/common/man/man8/chef-client.8 +87 -29
- data/distro/common/man/man8/chef-solo.8 +36 -15
- data/lib/chef/application.rb +19 -14
- data/lib/chef/application/client.rb +5 -0
- data/lib/chef/application/solo.rb +5 -0
- data/lib/chef/application/windows_service_manager.rb +3 -0
- data/lib/chef/chef_fs/chef_fs_data_store.rb +72 -24
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb +20 -4
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbooks_dir.rb +20 -1
- data/lib/chef/chef_fs/file_system/file_system_entry.rb +10 -2
- data/lib/chef/client.rb +2 -3
- data/lib/chef/config.rb +34 -8
- data/lib/chef/cookbook/cookbook_version_loader.rb +45 -4
- data/lib/chef/cookbook_version.rb +38 -30
- data/lib/chef/dsl/recipe.rb +4 -1
- data/lib/chef/event_dispatch/base.rb +14 -0
- data/lib/chef/event_dispatch/events_output_stream.rb +29 -0
- data/lib/chef/exceptions.rb +8 -0
- data/lib/chef/formatters/base.rb +16 -45
- data/lib/chef/formatters/doc.rb +51 -26
- data/lib/chef/formatters/indentable_output_stream.rb +165 -0
- data/lib/chef/knife/node_environment_set.rb +54 -0
- data/lib/chef/knife/user_create.rb +1 -1
- data/lib/chef/monkey_patches/pathname.rb +32 -0
- data/lib/chef/node.rb +1 -1
- data/lib/chef/platform/provider_mapping.rb +345 -338
- data/lib/chef/policy_builder/expand_node_object.rb +1 -1
- data/lib/chef/policy_builder/policyfile.rb +1 -1
- data/lib/chef/provider.rb +1 -0
- data/lib/chef/provider/git.rb +1 -1
- data/lib/chef/provider/link.rb +2 -2
- data/lib/chef/provider/remote_file/content.rb +1 -1
- data/lib/chef/provider/remote_file/local_file.rb +8 -2
- data/lib/chef/provider/service/arch.rb +0 -1
- data/lib/chef/provider/service/debian.rb +0 -2
- data/lib/chef/provider/service/freebsd.rb +2 -1
- data/lib/chef/provider/service/gentoo.rb +1 -1
- data/lib/chef/provider/service/init.rb +0 -1
- data/lib/chef/provider/service/insserv.rb +0 -2
- data/lib/chef/provider/service/invokercd.rb +0 -2
- data/lib/chef/provider/service/macosx.rb +2 -1
- data/lib/chef/provider/service/redhat.rb +0 -1
- data/lib/chef/provider/service/simple.rb +1 -0
- data/lib/chef/provider/service/solaris.rb +1 -0
- data/lib/chef/provider/service/systemd.rb +1 -1
- data/lib/chef/provider/service/upstart.rb +1 -1
- data/lib/chef/provider/user.rb +9 -9
- data/lib/chef/provider/user/solaris.rb +2 -0
- data/lib/chef/resource.rb +1 -0
- data/lib/chef/resource/remote_file.rb +32 -6
- data/lib/chef/run_context.rb +22 -0
- data/lib/chef/run_lock.rb +43 -4
- data/lib/chef/version.rb +2 -2
- data/spec/functional/http/simple_spec.rb +84 -0
- data/spec/functional/resource/remote_file_spec.rb +107 -43
- data/spec/functional/rest_spec.rb +94 -0
- data/spec/functional/run_lock_spec.rb +1 -1
- data/spec/functional/win32/service_manager_spec.rb +6 -0
- data/spec/integration/knife/chef_fs_data_store_spec.rb +2 -0
- data/spec/integration/recipes/lwrp_inline_resources_spec.rb +76 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/support/mock/platform.rb +7 -0
- data/spec/support/pedant/pedant_config.rb +121 -0
- data/spec/support/pedant/run_pedant.rb +63 -0
- data/spec/support/pedant/stickywicket.pem +27 -0
- data/spec/support/shared/functional/http.rb +242 -0
- data/spec/support/shared/unit/api_error_inspector.rb +2 -2
- data/spec/unit/api_client_spec.rb +2 -2
- data/spec/unit/application/client_spec.rb +6 -1
- data/spec/unit/application/knife_spec.rb +4 -0
- data/spec/unit/application/solo_spec.rb +2 -0
- data/spec/unit/application_spec.rb +7 -0
- data/spec/unit/client_spec.rb +16 -0
- data/spec/unit/config_spec.rb +3 -20
- data/spec/unit/cookbook_version_spec.rb +224 -122
- data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +2 -2
- data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +2 -2
- data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +2 -2
- data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +2 -2
- data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +2 -2
- data/spec/unit/handler_spec.rb +0 -1
- data/spec/unit/knife/client_bulk_delete_spec.rb +3 -0
- data/spec/unit/knife/cookbook_bulk_delete_spec.rb +2 -0
- data/spec/unit/knife/cookbook_metadata_spec.rb +2 -2
- data/spec/unit/knife/cookbook_site_install_spec.rb +3 -1
- data/spec/unit/knife/cookbook_upload_spec.rb +10 -10
- data/spec/unit/knife/node_environment_set_spec.rb +80 -0
- data/spec/unit/knife/user_create_spec.rb +6 -4
- data/spec/unit/knife/user_edit_spec.rb +5 -0
- data/spec/unit/knife_spec.rb +3 -0
- data/spec/unit/mixin/securable_spec.rb +18 -20
- data/spec/unit/node/attribute_spec.rb +15 -2
- data/spec/unit/node/immutable_collections_spec.rb +4 -4
- data/spec/unit/provider/cron_spec.rb +14 -14
- data/spec/unit/provider/git_spec.rb +4 -4
- data/spec/unit/provider/group_spec.rb +1 -1
- data/spec/unit/provider/ohai_spec.rb +2 -2
- data/spec/unit/provider/remote_file/content_spec.rb +58 -35
- data/spec/unit/provider/remote_file/local_file_spec.rb +23 -0
- data/spec/unit/provider/service/solaris_smf_service_spec.rb +13 -13
- data/spec/unit/resource/mount_spec.rb +0 -1
- data/spec/unit/resource/remote_file_spec.rb +29 -0
- data/spec/unit/resource_spec.rb +1 -1
- data/spec/unit/run_context_spec.rb +7 -0
- data/spec/unit/run_lock_spec.rb +98 -0
- data/spec/unit/version_constraint_spec.rb +1 -1
- metadata +166 -153
- data/distro/common/html/_static/chef.css +0 -507
- data/distro/common/html/_static/chef_logo.png +0 -0
- data/lib/chef/checksum/storage.rb +0 -18
- data/lib/chef/checksum/storage/filesystem.rb +0 -56
- data/spec/unit/checksum/storage/filesystem_spec.rb +0 -70
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
.\" Man page generated from reStructuredText.
|
2
|
+
.
|
3
|
+
.TH "KNIFE-SEARCH" "1" "Chef 11.12.0" "" "knife search"
|
2
4
|
.SH NAME
|
3
5
|
knife-search \- The man page for the knife search subcommand.
|
4
6
|
.
|
@@ -28,34 +30,42 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
28
30
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
29
31
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
30
32
|
..
|
31
|
-
.\" Man page generated from reStructuredText.
|
32
|
-
.
|
33
33
|
.sp
|
34
|
-
Search indexes allow queries to be made for any type of data that is indexed by the server, including data bags (and data bag items), environments, nodes, and roles. A defined query syntax is used to support search patterns like exact, wildcard, range, and fuzzy. A search is a full\-text query that can be done from several locations, including from within a recipe, by using the \fBsearch\fP subcommand in Knife,
|
34
|
+
Search indexes allow queries to be made for any type of data that is indexed by the Chef server, including data bags (and data bag items), environments, nodes, and roles. A defined query syntax is used to support search patterns like exact, wildcard, range, and fuzzy. A search is a full\-text query that can be done from several locations, including from within a recipe, by using the \fBsearch\fP subcommand in Knife, or by using the \fB/search\fP or \fB/search/INDEX\fP endpoints in the Chef Server API\&. The search engine is based on Apache Solr and is run from the Chef server\&.
|
35
35
|
.sp
|
36
|
-
The \fBknife search\fP subcommand is used run a search query for information that is indexed on a server
|
36
|
+
The \fBknife search\fP subcommand is used run a search query for information that is indexed on a Chef server\&.
|
37
37
|
.sp
|
38
38
|
\fBSyntax\fP
|
39
39
|
.sp
|
40
|
-
This
|
40
|
+
This subcommand has the following syntax:
|
41
|
+
.INDENT 0.0
|
42
|
+
.INDENT 3.5
|
41
43
|
.sp
|
42
44
|
.nf
|
43
45
|
.ft C
|
44
46
|
$ knife search INDEX SEARCH_QUERY
|
45
47
|
.ft P
|
46
48
|
.fi
|
49
|
+
.UNINDENT
|
50
|
+
.UNINDENT
|
47
51
|
.sp
|
48
52
|
where \fBINDEX\fP is one of \fBclient\fP, \fBenvironment\fP, \fBnode\fP, \fBrole\fP, or the name of a data bag and \fBSEARCH_QUERY\fP is the search query syntax for the query that will be executed.
|
49
53
|
.sp
|
50
|
-
\fBINDEX\fP is implied if omitted, and will default to \fBnode\fP
|
54
|
+
\fBINDEX\fP is implied if omitted, and will default to \fBnode\fP\&. For example:
|
55
|
+
.INDENT 0.0
|
56
|
+
.INDENT 3.5
|
51
57
|
.sp
|
52
58
|
.nf
|
53
59
|
.ft C
|
54
60
|
$ knife search \(aq*:*\(aq \-i
|
55
61
|
.ft P
|
56
62
|
.fi
|
63
|
+
.UNINDENT
|
64
|
+
.UNINDENT
|
57
65
|
.sp
|
58
66
|
will return something similar to:
|
67
|
+
.INDENT 0.0
|
68
|
+
.INDENT 3.5
|
59
69
|
.sp
|
60
70
|
.nf
|
61
71
|
.ft C
|
@@ -71,30 +81,44 @@ ohai\-test
|
|
71
81
|
win2k8\-dev
|
72
82
|
.ft P
|
73
83
|
.fi
|
84
|
+
.UNINDENT
|
85
|
+
.UNINDENT
|
74
86
|
.sp
|
75
87
|
and is the same search as:
|
88
|
+
.INDENT 0.0
|
89
|
+
.INDENT 3.5
|
76
90
|
.sp
|
77
91
|
.nf
|
78
92
|
.ft C
|
79
93
|
$ knife search node \(aq*:*" \-i
|
80
94
|
.ft P
|
81
95
|
.fi
|
96
|
+
.UNINDENT
|
97
|
+
.UNINDENT
|
82
98
|
.sp
|
83
99
|
If the \fBSEARCH_QUERY\fP does not contain a colon character (\fB:\fP), then the default query pattern is \fBtags:*#{@query}* OR roles:*#{@query}* OR fqdn:*#{@query}* OR addresses:*#{@query}*\fP, which means the following two search queries are effectively the same:
|
100
|
+
.INDENT 0.0
|
101
|
+
.INDENT 3.5
|
84
102
|
.sp
|
85
103
|
.nf
|
86
104
|
.ft C
|
87
105
|
$ knife search ubuntu
|
88
106
|
.ft P
|
89
107
|
.fi
|
108
|
+
.UNINDENT
|
109
|
+
.UNINDENT
|
90
110
|
.sp
|
91
111
|
or:
|
112
|
+
.INDENT 0.0
|
113
|
+
.INDENT 3.5
|
92
114
|
.sp
|
93
115
|
.nf
|
94
116
|
.ft C
|
95
117
|
$ knife search node "tags:*ubuntu* OR roles:*ubuntu* OR fqdn:*ubuntu* (etc.)"
|
96
118
|
.ft P
|
97
119
|
.fi
|
120
|
+
.UNINDENT
|
121
|
+
.UNINDENT
|
98
122
|
.sp
|
99
123
|
\fBOptions\fP
|
100
124
|
.sp
|
@@ -129,7 +153,7 @@ The $EDITOR that is used for all interactive commands.
|
|
129
153
|
The name of the environment. When this option is added to a command, the command will run only against the named environment.
|
130
154
|
.TP
|
131
155
|
.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP
|
132
|
-
The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP
|
156
|
+
The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP\&.
|
133
157
|
.TP
|
134
158
|
.B \fB\-h\fP, \fB\-\-help\fP
|
135
159
|
Shows help for the command.
|
@@ -138,10 +162,10 @@ Shows help for the command.
|
|
138
162
|
Indicates that only matching object IDs will be shown.
|
139
163
|
.TP
|
140
164
|
.B \fBINDEX\fP
|
141
|
-
The name of the index to be queried: \fBclient\fP, \fBenvironment\fP, \fBnode\fP, \fBrole\fP, or \fBDATA_BAG_NAME\fP
|
165
|
+
The name of the index to be queried: \fBclient\fP, \fBenvironment\fP, \fBnode\fP, \fBrole\fP, or \fBDATA_BAG_NAME\fP\&. Default index: \fBnode\fP\&.
|
142
166
|
.TP
|
143
167
|
.B \fB\-k KEY\fP, \fB\-\-key KEY\fP
|
144
|
-
The private key that Knife will use to sign requests made by the API client to the server
|
168
|
+
The private key that Knife will use to sign requests made by the API client to the Chef server\&.
|
145
169
|
.TP
|
146
170
|
.B \fB\-l\fP, \fB\-\-long\fP
|
147
171
|
Display long output when searching nodes while using the default summary format.
|
@@ -165,16 +189,16 @@ Indicates that only the run\-list will be shown.
|
|
165
189
|
The number of rows to be returned.
|
166
190
|
.TP
|
167
191
|
.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP
|
168
|
-
The URL for the server
|
192
|
+
The URL for the Chef server\&.
|
169
193
|
.TP
|
170
194
|
.B \fBSEARCH_QUERY\fP
|
171
|
-
The search query used to identify a a list of items on a server
|
195
|
+
The search query used to identify a a list of items on a Chef server\&. This option uses the same syntax as the \fBsearch\fP sub\-command.
|
172
196
|
.TP
|
173
197
|
.B \fB\-u USER\fP, \fB\-\-user USER\fP
|
174
|
-
The user name used by Knife to sign requests made by the API client to the server
|
198
|
+
The user name used by Knife to sign requests made by the API client to the Chef server\&. Authentication will fail if the user name does not match the private key.
|
175
199
|
.TP
|
176
200
|
.B \fB\-v\fP, \fB\-\-version\fP
|
177
|
-
The version of the chef\-client
|
201
|
+
The version of the chef\-client\&.
|
178
202
|
.TP
|
179
203
|
.B \fB\-V\fP, \fB\-\-verbose\fP
|
180
204
|
Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity.
|
@@ -183,20 +207,26 @@ Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity.
|
|
183
207
|
Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation).
|
184
208
|
.TP
|
185
209
|
.B \fB\-z\fP, \fB\-\-local\-mode\fP
|
186
|
-
Indicates that the chef\-client will be run in local mode, which allows all commands that work against the server to also work against the local chef\-repo
|
210
|
+
Indicates that the chef\-client will be run in local mode, which allows all commands that work against the Chef server to also work against the local chef\-repo\&.
|
187
211
|
.UNINDENT
|
188
212
|
.sp
|
189
213
|
\fBExamples\fP
|
190
214
|
.sp
|
191
215
|
To search for the IDs of all nodes running on the Amazon EC2 platform, enter:
|
216
|
+
.INDENT 0.0
|
217
|
+
.INDENT 3.5
|
192
218
|
.sp
|
193
219
|
.nf
|
194
220
|
.ft C
|
195
221
|
$ knife search node \(aqec2:*\(aq \-i
|
196
222
|
.ft P
|
197
223
|
.fi
|
224
|
+
.UNINDENT
|
225
|
+
.UNINDENT
|
198
226
|
.sp
|
199
227
|
to return something like:
|
228
|
+
.INDENT 0.0
|
229
|
+
.INDENT 3.5
|
200
230
|
.sp
|
201
231
|
.nf
|
202
232
|
.ft C
|
@@ -211,16 +241,24 @@ ip\-0A58E134.ec2.internal
|
|
211
241
|
ip\-0A7CFFD5.ec2.internal
|
212
242
|
.ft P
|
213
243
|
.fi
|
244
|
+
.UNINDENT
|
245
|
+
.UNINDENT
|
214
246
|
.sp
|
215
247
|
To search for the instance type (flavor) of all nodes running on the Amazon EC2 platform, enter:
|
248
|
+
.INDENT 0.0
|
249
|
+
.INDENT 3.5
|
216
250
|
.sp
|
217
251
|
.nf
|
218
252
|
.ft C
|
219
253
|
$ knife search node \(aqec2:*\(aq \-a ec2.instance_type
|
220
254
|
.ft P
|
221
255
|
.fi
|
256
|
+
.UNINDENT
|
257
|
+
.UNINDENT
|
222
258
|
.sp
|
223
259
|
to return something like:
|
260
|
+
.INDENT 0.0
|
261
|
+
.INDENT 3.5
|
224
262
|
.sp
|
225
263
|
.nf
|
226
264
|
.ft C
|
@@ -239,56 +277,82 @@ ec2.instance_type: m1.large
|
|
239
277
|
id: ip\-0A7CFFD5.ec2.internal
|
240
278
|
.ft P
|
241
279
|
.fi
|
280
|
+
.UNINDENT
|
281
|
+
.UNINDENT
|
242
282
|
.sp
|
243
283
|
To search for all nodes running Ubuntu, enter:
|
284
|
+
.INDENT 0.0
|
285
|
+
.INDENT 3.5
|
244
286
|
.sp
|
245
287
|
.nf
|
246
288
|
.ft C
|
247
289
|
$ knife search node \(aqplatform:ubuntu\(aq
|
248
290
|
.ft P
|
249
291
|
.fi
|
292
|
+
.UNINDENT
|
293
|
+
.UNINDENT
|
250
294
|
.sp
|
251
295
|
To search for all nodes running CentOS in the production environment, enter:
|
296
|
+
.INDENT 0.0
|
297
|
+
.INDENT 3.5
|
252
298
|
.sp
|
253
299
|
.nf
|
254
300
|
.ft C
|
255
301
|
$ knife search node \(aqchef_environment:production AND platform:centos\(aq
|
256
302
|
.ft P
|
257
303
|
.fi
|
304
|
+
.UNINDENT
|
305
|
+
.UNINDENT
|
258
306
|
.sp
|
259
307
|
To find a nested attribute, use a pattern similar to the following:
|
308
|
+
.INDENT 0.0
|
309
|
+
.INDENT 3.5
|
260
310
|
.sp
|
261
311
|
.nf
|
262
312
|
.ft C
|
263
313
|
$ knife search node <query_to_run> \-a <main_attribute>.<nested_attribute>
|
264
314
|
.ft P
|
265
315
|
.fi
|
316
|
+
.UNINDENT
|
317
|
+
.UNINDENT
|
266
318
|
.sp
|
267
319
|
To build a search query to use more than one attribute, use an underscore (\fB_\fP) to separate each attribute. For example, the following query will search for all nodes running a specific version of Ruby:
|
320
|
+
.INDENT 0.0
|
321
|
+
.INDENT 3.5
|
268
322
|
.sp
|
269
323
|
.nf
|
270
324
|
.ft C
|
271
325
|
$ knife search node "languages_ruby_version:1.9.3"
|
272
326
|
.ft P
|
273
327
|
.fi
|
328
|
+
.UNINDENT
|
329
|
+
.UNINDENT
|
274
330
|
.sp
|
275
331
|
To build a search query that can find a nested attribute:
|
332
|
+
.INDENT 0.0
|
333
|
+
.INDENT 3.5
|
276
334
|
.sp
|
277
335
|
.nf
|
278
336
|
.ft C
|
279
337
|
$ knife search node name:<node_name> \-a kernel.machine
|
280
338
|
.ft P
|
281
339
|
.fi
|
340
|
+
.UNINDENT
|
341
|
+
.UNINDENT
|
282
342
|
.sp
|
283
343
|
To test a search query that will be used in a \fBknife ssh\fP command:
|
344
|
+
.INDENT 0.0
|
345
|
+
.INDENT 3.5
|
284
346
|
.sp
|
285
347
|
.nf
|
286
348
|
.ft C
|
287
349
|
$ knife search node "role:web NOT name:web03"
|
288
350
|
.ft P
|
289
351
|
.fi
|
352
|
+
.UNINDENT
|
353
|
+
.UNINDENT
|
290
354
|
.sp
|
291
|
-
where the query in the previous example will search all servers that have the \fBweb\fP role, but not on the server named \fBweb03\fP
|
355
|
+
where the query in the previous example will search all servers that have the \fBweb\fP role, but not on the server named \fBweb03\fP\&.
|
292
356
|
.SH AUTHOR
|
293
357
|
Chef
|
294
358
|
.\" Generated by docutils manpage writer.
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
.\" Man page generated from reStructuredText.
|
2
|
+
.
|
3
|
+
.TH "KNIFE-SHOW" "1" "Chef 11.12.0" "" "knife show"
|
2
4
|
.SH NAME
|
3
5
|
knife-show \- The man page for the knife show subcommand.
|
4
6
|
.
|
@@ -28,20 +30,22 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
28
30
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
29
31
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
30
32
|
..
|
31
|
-
.\" Man page generated from reStructuredText.
|
32
|
-
.
|
33
33
|
.sp
|
34
|
-
The \fBknife show\fP subcommand is used to view the details of one (or more) objects on the server
|
34
|
+
The \fBknife show\fP subcommand is used to view the details of one (or more) objects on the Chef server\&. This subcommand works similar to \fBknife cookbook show\fP, \fBknife data bag show\fP, \fBknife environment show\fP, \fBknife node show\fP, and \fBknife role show\fP, but with a single verb (and a single action).
|
35
35
|
.sp
|
36
36
|
\fBSyntax\fP
|
37
37
|
.sp
|
38
|
-
This
|
38
|
+
This subcommand has the following syntax:
|
39
|
+
.INDENT 0.0
|
40
|
+
.INDENT 3.5
|
39
41
|
.sp
|
40
42
|
.nf
|
41
43
|
.ft C
|
42
44
|
$ knife show [PATTERN...] (options)
|
43
45
|
.ft P
|
44
46
|
.fi
|
47
|
+
.UNINDENT
|
48
|
+
.UNINDENT
|
45
49
|
.sp
|
46
50
|
\fBOptions\fP
|
47
51
|
.sp
|
@@ -55,7 +59,7 @@ The attribute (or attributes) to show.
|
|
55
59
|
The configuration file to use.
|
56
60
|
.TP
|
57
61
|
.B \fB\-\-chef\-repo\-path PATH\fP
|
58
|
-
The path to the chef\-repo
|
62
|
+
The path to the chef\-repo\&. This setting will override the default path to the chef\-repo\&. Default: same as specified by \fBchef_repo_path\fP in config.rb.
|
59
63
|
.TP
|
60
64
|
.B \fB\-\-chef\-zero\-port PORT\fP
|
61
65
|
The port on which chef\-zero will listen.
|
@@ -64,7 +68,7 @@ The port on which chef\-zero will listen.
|
|
64
68
|
Indicates whether colored output will be used.
|
65
69
|
.TP
|
66
70
|
.B \fB\-\-concurrency\fP
|
67
|
-
The number of allowed concurrent connections. Default: \fB10\fP
|
71
|
+
The number of allowed concurrent connections. Default: \fB10\fP\&.
|
68
72
|
.TP
|
69
73
|
.B \fB\-d\fP, \fB\-\-disable\-editing\fP
|
70
74
|
Indicates that $EDITOR will not be opened; data will be accepted as\-is.
|
@@ -79,13 +83,13 @@ The $EDITOR that is used for all interactive commands.
|
|
79
83
|
The name of the environment. When this option is added to a command, the command will run only against the named environment.
|
80
84
|
.TP
|
81
85
|
.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP
|
82
|
-
The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP
|
86
|
+
The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP\&.
|
83
87
|
.TP
|
84
88
|
.B \fB\-h\fP, \fB\-\-help\fP
|
85
89
|
Shows help for the command.
|
86
90
|
.TP
|
87
91
|
.B \fB\-k KEY\fP, \fB\-\-key KEY\fP
|
88
|
-
The private key that Knife will use to sign requests made by the API client to the server
|
92
|
+
The private key that Knife will use to sign requests made by the API client to the Chef server\&.
|
89
93
|
.TP
|
90
94
|
.B \fB\-\-local\fP
|
91
95
|
Indicates that instead of remote files, local files will be shown.
|
@@ -94,16 +98,16 @@ Indicates that instead of remote files, local files will be shown.
|
|
94
98
|
Indicates that data will be shown after a destructive operation.
|
95
99
|
.TP
|
96
100
|
.B \fB\-\-repo\-mode MODE\fP
|
97
|
-
The layout of the local chef\-repo
|
101
|
+
The layout of the local chef\-repo\&. Possible values: \fBstatic\fP, \fBeverything\fP, or \fBhosted_everything\fP\&. Use \fBstatic\fP for just roles, environments, cookbooks, and data bags. By default, \fBeverything\fP and \fBhosted_everything\fP are dynamically selected depending on the server type. Default: \fBeverything\fP / \fBhosted_everything\fP\&.
|
98
102
|
.TP
|
99
103
|
.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP
|
100
|
-
The URL for the server
|
104
|
+
The URL for the Chef server\&.
|
101
105
|
.TP
|
102
106
|
.B \fB\-u USER\fP, \fB\-\-user USER\fP
|
103
|
-
The user name used by Knife to sign requests made by the API client to the server
|
107
|
+
The user name used by Knife to sign requests made by the API client to the Chef server\&. Authentication will fail if the user name does not match the private key.
|
104
108
|
.TP
|
105
109
|
.B \fB\-v\fP, \fB\-\-version\fP
|
106
|
-
The version of the chef\-client
|
110
|
+
The version of the chef\-client\&.
|
107
111
|
.TP
|
108
112
|
.B \fB\-V\fP, \fB\-\-verbose\fP
|
109
113
|
Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity.
|
@@ -112,32 +116,44 @@ Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity.
|
|
112
116
|
Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation).
|
113
117
|
.TP
|
114
118
|
.B \fB\-z\fP, \fB\-\-local\-mode\fP
|
115
|
-
Indicates that the chef\-client will be run in local mode, which allows all commands that work against the server to also work against the local chef\-repo
|
119
|
+
Indicates that the chef\-client will be run in local mode, which allows all commands that work against the Chef server to also work against the local chef\-repo\&.
|
116
120
|
.UNINDENT
|
117
121
|
.sp
|
118
122
|
\fBExamples\fP
|
119
123
|
.sp
|
120
124
|
To show all cookbooks in the \fBcookbooks/\fP directory:
|
125
|
+
.INDENT 0.0
|
126
|
+
.INDENT 3.5
|
121
127
|
.sp
|
122
128
|
.nf
|
123
129
|
.ft C
|
124
130
|
$ knife show cookbooks/
|
125
131
|
.ft P
|
126
132
|
.fi
|
133
|
+
.UNINDENT
|
134
|
+
.UNINDENT
|
127
135
|
.sp
|
128
136
|
or, (if already in the \fBcookbooks/\fP directory in the local chef\-repo):
|
137
|
+
.INDENT 0.0
|
138
|
+
.INDENT 3.5
|
129
139
|
.sp
|
130
140
|
.nf
|
131
141
|
.ft C
|
132
142
|
$ knife show
|
133
143
|
.ft P
|
134
144
|
.fi
|
145
|
+
.UNINDENT
|
146
|
+
.UNINDENT
|
147
|
+
.INDENT 0.0
|
148
|
+
.INDENT 3.5
|
135
149
|
.sp
|
136
150
|
.nf
|
137
151
|
.ft C
|
138
152
|
$ knife show roles/ environments/
|
139
153
|
.ft P
|
140
154
|
.fi
|
155
|
+
.UNINDENT
|
156
|
+
.UNINDENT
|
141
157
|
.SH AUTHOR
|
142
158
|
Chef
|
143
159
|
.\" Generated by docutils manpage writer.
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
.\" Man page generated from reStructuredText.
|
2
|
+
.
|
3
|
+
.TH "KNIFE-SSH" "1" "Chef 11.12.0" "" "knife ssh"
|
2
4
|
.SH NAME
|
3
5
|
knife-ssh \- The man page for the knife ssh subcommand.
|
4
6
|
.
|
@@ -28,20 +30,22 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
28
30
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
29
31
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
30
32
|
..
|
31
|
-
.\" Man page generated from reStructuredText.
|
32
|
-
.
|
33
33
|
.sp
|
34
34
|
The \fBknife ssh\fP subcommand is used to invoke SSH commands (in parallel) on a subset of nodes within an organization, based on the results of a search query.
|
35
35
|
.sp
|
36
36
|
\fBSyntax\fP
|
37
37
|
.sp
|
38
|
-
This
|
38
|
+
This subcommand has the following syntax:
|
39
|
+
.INDENT 0.0
|
40
|
+
.INDENT 3.5
|
39
41
|
.sp
|
40
42
|
.nf
|
41
43
|
.ft C
|
42
44
|
$ knife ssh SEARCH_QUERY SSH_COMMAND (options)
|
43
45
|
.ft P
|
44
46
|
.fi
|
47
|
+
.UNINDENT
|
48
|
+
.UNINDENT
|
45
49
|
.sp
|
46
50
|
\fBOptions\fP
|
47
51
|
.sp
|
@@ -79,7 +83,7 @@ The $EDITOR that is used for all interactive commands.
|
|
79
83
|
The name of the environment. When this option is added to a command, the command will run only against the named environment.
|
80
84
|
.TP
|
81
85
|
.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP
|
82
|
-
The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP
|
86
|
+
The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP\&.
|
83
87
|
.TP
|
84
88
|
.B \fB\-G GATEWAY\fP, \fB\-\-ssh\-gateway GATEWAY\fP
|
85
89
|
The SSH tunnel or gateway that is used to run a bootstrap action on a machine that is not accessible from the workstation.
|
@@ -91,16 +95,16 @@ Shows help for the command.
|
|
91
95
|
The SSH identity file used for authentication. Key\-based authentication is recommended.
|
92
96
|
.TP
|
93
97
|
.B \fB\-k KEY\fP, \fB\-\-key KEY\fP
|
94
|
-
The private key that Knife will use to sign requests made by the API client to the server
|
98
|
+
The private key that Knife will use to sign requests made by the API client to the Chef server\&.
|
95
99
|
.TP
|
96
100
|
.B \fB\-m\fP, \fB\-\-manual\-list\fP
|
97
101
|
Indicates that a search query is a space\-separated list of servers. If there is more than one item in the list, put quotes around the entire list. For example: \fB\-\-manual\-list "server01 server 02 server 03"\fP
|
98
102
|
.TP
|
99
103
|
.B \fB\-\-[no\-]host\-key\-verify\fP
|
100
|
-
Use \fB\-\-no\-host\-key\-verify\fP to disable host key verification. Default setting: \fB\-\-host\-key\-verify\fP
|
104
|
+
Use \fB\-\-no\-host\-key\-verify\fP to disable host key verification. Default setting: \fB\-\-host\-key\-verify\fP\&.
|
101
105
|
.TP
|
102
106
|
.B \fBOTHER\fP
|
103
|
-
The shell type. Possible values: \fBinteractive\fP, \fBscreen\fP, \fBtmux\fP, \fBmacterm\fP, or \fBcssh\fP
|
107
|
+
The shell type. Possible values: \fBinteractive\fP, \fBscreen\fP, \fBtmux\fP, \fBmacterm\fP, or \fBcssh\fP\&. (\fBcsshx\fP is deprecated in favor of \fBcssh\fP\&.)
|
104
108
|
.TP
|
105
109
|
.B \fB\-p PORT\fP, \fB\-\-ssh\-port PORT\fP
|
106
110
|
The SSH port.
|
@@ -112,19 +116,19 @@ The SSH password. This can be used to pass the password directly on the command
|
|
112
116
|
Indicates that data will be shown after a destructive operation.
|
113
117
|
.TP
|
114
118
|
.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP
|
115
|
-
The URL for the server
|
119
|
+
The URL for the Chef server\&.
|
116
120
|
.TP
|
117
121
|
.B \fBSEARCH_QUERY\fP
|
118
|
-
The search query used to return a list of servers to be accessed using SSH and the specified \fBSSH_COMMAND\fP
|
122
|
+
The search query used to return a list of servers to be accessed using SSH and the specified \fBSSH_COMMAND\fP\&. This option uses the same syntax as the search sub\-command.
|
119
123
|
.TP
|
120
124
|
.B \fBSSH_COMMAND\fP
|
121
125
|
The command that will be run against the results of a search query.
|
122
126
|
.TP
|
123
127
|
.B \fB\-u USER\fP, \fB\-\-user USER\fP
|
124
|
-
The user name used by Knife to sign requests made by the API client to the server
|
128
|
+
The user name used by Knife to sign requests made by the API client to the Chef server\&. Authentication will fail if the user name does not match the private key.
|
125
129
|
.TP
|
126
130
|
.B \fB\-v\fP, \fB\-\-version\fP
|
127
|
-
The version of the chef\-client
|
131
|
+
The version of the chef\-client\&.
|
128
132
|
.TP
|
129
133
|
.B \fB\-V\fP, \fB\-\-verbose\fP
|
130
134
|
Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity.
|
@@ -136,20 +140,26 @@ The SSH user name.
|
|
136
140
|
Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation).
|
137
141
|
.TP
|
138
142
|
.B \fB\-z\fP, \fB\-\-local\-mode\fP
|
139
|
-
Indicates that the chef\-client will be run in local mode, which allows all commands that work against the server to also work against the local chef\-repo
|
143
|
+
Indicates that the chef\-client will be run in local mode, which allows all commands that work against the Chef server to also work against the local chef\-repo\&.
|
140
144
|
.UNINDENT
|
141
145
|
.sp
|
142
146
|
\fBExamples\fP
|
143
147
|
.sp
|
144
148
|
To find the uptime of all of web servers running Ubuntu on the Amazon EC2 platform, enter:
|
149
|
+
.INDENT 0.0
|
150
|
+
.INDENT 3.5
|
145
151
|
.sp
|
146
152
|
.nf
|
147
153
|
.ft C
|
148
154
|
$ knife ssh "role:web" "uptime" \-x ubuntu \-a ec2.public_hostname
|
149
155
|
.ft P
|
150
156
|
.fi
|
157
|
+
.UNINDENT
|
158
|
+
.UNINDENT
|
151
159
|
.sp
|
152
160
|
to return something like:
|
161
|
+
.INDENT 0.0
|
162
|
+
.INDENT 3.5
|
153
163
|
.sp
|
154
164
|
.nf
|
155
165
|
.ft C
|
@@ -160,22 +170,34 @@ ec2\-75\-101\-240\-230.compute\-1.amazonaws.com 13:50:48 up 1 day, 22:59, 1 u
|
|
160
170
|
ec2\-184\-73\-60\-141.compute\-1.amazonaws.com 13:50:48 up 1 day, 23:30, 1 user, load average: 0.32, 0.17, 0.15
|
161
171
|
.ft P
|
162
172
|
.fi
|
173
|
+
.UNINDENT
|
174
|
+
.UNINDENT
|
175
|
+
.INDENT 0.0
|
176
|
+
.INDENT 3.5
|
163
177
|
.sp
|
164
178
|
.nf
|
165
179
|
.ft C
|
166
180
|
$ knife ssh \(aqname:*\(aq \(aqsudo chef\-client\(aq
|
167
181
|
.ft P
|
168
182
|
.fi
|
183
|
+
.UNINDENT
|
184
|
+
.UNINDENT
|
169
185
|
.sp
|
170
186
|
To force a chef\-client run on all of the web servers running Ubuntu on the Amazon EC2 platform, enter:
|
187
|
+
.INDENT 0.0
|
188
|
+
.INDENT 3.5
|
171
189
|
.sp
|
172
190
|
.nf
|
173
191
|
.ft C
|
174
192
|
$ knife ssh "role:web" "sudo chef\-client" \-x ubuntu \-a ec2.public_hostname
|
175
193
|
.ft P
|
176
194
|
.fi
|
195
|
+
.UNINDENT
|
196
|
+
.UNINDENT
|
177
197
|
.sp
|
178
198
|
to return something like:
|
199
|
+
.INDENT 0.0
|
200
|
+
.INDENT 3.5
|
179
201
|
.sp
|
180
202
|
.nf
|
181
203
|
.ft C
|
@@ -206,30 +228,46 @@ ec2\-184\-73\-60\-141.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +000
|
|
206
228
|
ec2\-184\-73\-60\-141.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Report handlers complete
|
207
229
|
.ft P
|
208
230
|
.fi
|
231
|
+
.UNINDENT
|
232
|
+
.UNINDENT
|
209
233
|
.sp
|
210
234
|
To query for all nodes that have the "webserver" role and then use SSH to run the command "sudo chef\-client", enter:
|
235
|
+
.INDENT 0.0
|
236
|
+
.INDENT 3.5
|
211
237
|
.sp
|
212
238
|
.nf
|
213
239
|
.ft C
|
214
240
|
$ knife ssh "role:webserver" "sudo chef\-client"
|
215
241
|
.ft P
|
216
242
|
.fi
|
243
|
+
.UNINDENT
|
244
|
+
.UNINDENT
|
245
|
+
.INDENT 0.0
|
246
|
+
.INDENT 3.5
|
217
247
|
.sp
|
218
248
|
.nf
|
219
249
|
.ft C
|
220
250
|
$ knife ssh name:* "sudo aptitude upgrade \-y"
|
221
251
|
.ft P
|
222
252
|
.fi
|
253
|
+
.UNINDENT
|
254
|
+
.UNINDENT
|
223
255
|
.sp
|
224
256
|
To specify the shell type used on the nodes returned by a search query:
|
257
|
+
.INDENT 0.0
|
258
|
+
.INDENT 3.5
|
225
259
|
.sp
|
226
260
|
.nf
|
227
261
|
.ft C
|
228
262
|
$ knife ssh roles:opscode\-omnitruck macterm
|
229
263
|
.ft P
|
230
264
|
.fi
|
265
|
+
.UNINDENT
|
266
|
+
.UNINDENT
|
231
267
|
.sp
|
232
|
-
where \fBscreen\fP is one of the following values: \fBcssh\fP, \fBinteractive\fP, \fBmacterm\fP, \fBscreen\fP, or \fBtmux\fP
|
268
|
+
where \fBscreen\fP is one of the following values: \fBcssh\fP, \fBinteractive\fP, \fBmacterm\fP, \fBscreen\fP, or \fBtmux\fP\&. If the node does not have the shell type installed, Knife will return an error similar to the following:
|
269
|
+
.INDENT 0.0
|
270
|
+
.INDENT 3.5
|
233
271
|
.sp
|
234
272
|
.nf
|
235
273
|
.ft C
|
@@ -238,6 +276,8 @@ you need the rb\-appscript gem to use knife ssh macterm.
|
|
238
276
|
ERROR: LoadError: cannot load such file \-\- appscript
|
239
277
|
.ft P
|
240
278
|
.fi
|
279
|
+
.UNINDENT
|
280
|
+
.UNINDENT
|
241
281
|
.SH AUTHOR
|
242
282
|
Chef
|
243
283
|
.\" Generated by docutils manpage writer.
|