chef 0.7.16 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of chef might be problematic. Click here for more details.
- data/README.rdoc +11 -10
- data/bin/chef-client +2 -2
- data/bin/chef-solo +1 -1
- data/bin/knife +27 -0
- data/bin/shef +49 -0
- data/distro/README +2 -0
- data/distro/{debian → common}/man/man1/chef-indexer.1 +0 -0
- data/distro/{debian → common}/man/man1/chef-server.1 +0 -0
- data/distro/{debian → common}/man/man8/chef-client.8 +0 -0
- data/distro/{debian → common}/man/man8/chef-solo.8 +0 -0
- data/distro/common/man/man8/knife.8 +375 -0
- data/distro/redhat/etc/init.d/chef-client +8 -4
- data/distro/redhat/etc/init.d/chef-server +16 -15
- data/distro/redhat/etc/init.d/chef-server-webui +78 -0
- data/distro/redhat/etc/init.d/chef-solr +76 -0
- data/distro/redhat/etc/init.d/chef-solr-indexer +75 -0
- data/distro/redhat/etc/sysconfig/chef-client +10 -0
- data/distro/redhat/etc/sysconfig/chef-server +10 -0
- data/distro/redhat/etc/sysconfig/chef-server-webui +10 -0
- data/distro/redhat/etc/sysconfig/chef-solr +9 -0
- data/distro/redhat/etc/sysconfig/chef-solr-indexer +7 -0
- data/distro/suse/etc/init.d/chef-client +121 -0
- data/lib/chef.rb +1 -1
- data/lib/chef/api_client.rb +263 -0
- data/lib/chef/application.rb +1 -1
- data/lib/chef/application/client.rb +21 -3
- data/lib/chef/application/knife.rb +144 -0
- data/lib/chef/application/server.rb +2 -1
- data/lib/chef/application/solo.rb +9 -2
- data/lib/chef/cache.rb +61 -0
- data/lib/chef/cache/checksum.rb +70 -0
- data/lib/chef/certificate.rb +154 -0
- data/lib/chef/client.rb +123 -220
- data/lib/chef/compile.rb +9 -21
- data/lib/chef/config.rb +67 -10
- data/lib/chef/cookbook.rb +49 -22
- data/lib/chef/cookbook/metadata.rb +85 -5
- data/lib/chef/cookbook_loader.rb +4 -4
- data/lib/chef/couchdb.rb +99 -30
- data/lib/chef/daemon.rb +1 -1
- data/lib/chef/data_bag.rb +215 -0
- data/lib/chef/data_bag_item.rb +219 -0
- data/lib/chef/exceptions.rb +3 -0
- data/lib/chef/index_queue.rb +29 -0
- data/lib/chef/index_queue/amqp_client.rb +106 -0
- data/lib/chef/index_queue/consumer.rb +76 -0
- data/lib/chef/index_queue/indexable.rb +74 -0
- data/lib/chef/knife.rb +309 -0
- data/lib/chef/knife/client_bulk_delete.rb +40 -0
- data/lib/chef/knife/client_create.rb +62 -0
- data/lib/chef/knife/client_delete.rb +37 -0
- data/lib/chef/knife/client_edit.rb +37 -0
- data/lib/chef/knife/client_list.rb +40 -0
- data/lib/chef/knife/client_reregister.rb +48 -0
- data/lib/chef/knife/client_show.rb +42 -0
- data/lib/chef/knife/configure.rb +123 -0
- data/lib/chef/knife/cookbook_bulk_delete.rb +46 -0
- data/lib/chef/knife/cookbook_delete.rb +41 -0
- data/lib/chef/knife/cookbook_download.rb +57 -0
- data/lib/chef/knife/cookbook_list.rb +41 -0
- data/lib/chef/knife/cookbook_metadata.rb +87 -0
- data/lib/chef/knife/cookbook_show.rb +75 -0
- data/lib/chef/knife/cookbook_upload.rb +179 -0
- data/lib/chef/knife/data_bag_create.rb +43 -0
- data/lib/chef/knife/data_bag_delete.rb +43 -0
- data/lib/chef/knife/data_bag_edit.rb +49 -0
- data/lib/chef/knife/data_bag_list.rb +42 -0
- data/lib/chef/knife/data_bag_show.rb +40 -0
- data/lib/chef/knife/ec2_instance_data.rb +46 -0
- data/lib/chef/knife/index_rebuild.rb +51 -0
- data/lib/chef/knife/node_bulk_delete.rb +43 -0
- data/lib/chef/knife/node_create.rb +39 -0
- data/lib/chef/knife/node_delete.rb +36 -0
- data/lib/chef/knife/node_edit.rb +36 -0
- data/lib/chef/knife/node_from_file.rb +42 -0
- data/lib/chef/knife/node_list.rb +41 -0
- data/lib/chef/knife/node_run_list_add.rb +64 -0
- data/lib/chef/knife/node_run_list_remove.rb +45 -0
- data/lib/chef/knife/node_show.rb +46 -0
- data/lib/chef/knife/role_bulk_delete.rb +44 -0
- data/lib/chef/knife/role_create.rb +44 -0
- data/lib/chef/knife/role_delete.rb +36 -0
- data/lib/chef/knife/role_edit.rb +37 -0
- data/lib/chef/knife/role_from_file.rb +46 -0
- data/lib/chef/knife/role_list.rb +40 -0
- data/lib/chef/knife/role_show.rb +43 -0
- data/lib/chef/knife/search.rb +94 -0
- data/lib/chef/knife/ssh.rb +170 -0
- data/lib/chef/log.rb +30 -8
- data/lib/chef/mixin/checksum.rb +2 -7
- data/lib/chef/mixin/command.rb +32 -13
- data/lib/chef/mixin/convert_to_class_name.rb +15 -0
- data/lib/chef/mixin/deep_merge.rb +199 -11
- data/lib/chef/mixin/generate_url.rb +18 -9
- data/lib/chef/mixin/language.rb +29 -1
- data/lib/chef/mixin/language_include_attribute.rb +56 -0
- data/lib/chef/mixin/language_include_recipe.rb +53 -0
- data/lib/chef/mixin/params_validate.rb +25 -12
- data/lib/chef/mixin/recipe_definition_dsl_core.rb +2 -0
- data/lib/chef/mixin/template.rb +11 -1
- data/lib/chef/mixin/xml_escape.rb +87 -0
- data/lib/chef/node.rb +144 -122
- data/lib/chef/openid_registration.rb +12 -5
- data/lib/chef/platform.rb +89 -47
- data/lib/chef/provider/breakpoint.rb +36 -0
- data/lib/chef/provider/cron.rb +5 -6
- data/lib/chef/provider/deploy.rb +43 -10
- data/lib/chef/provider/deploy/revision.rb +2 -3
- data/lib/chef/provider/erl_call.rb +72 -0
- data/lib/chef/provider/file.rb +8 -4
- data/lib/chef/provider/git.rb +10 -5
- data/lib/chef/provider/group/dscl.rb +128 -0
- data/lib/chef/provider/http_request.rb +6 -2
- data/lib/chef/provider/ifconfig.rb +1 -0
- data/lib/chef/provider/link.rb +1 -1
- data/lib/chef/provider/log.rb +53 -0
- data/lib/chef/provider/mdadm.rb +88 -0
- data/lib/chef/provider/mount/mount.rb +1 -1
- data/lib/chef/provider/package.rb +1 -1
- data/lib/chef/provider/package/easy_install.rb +106 -0
- data/lib/chef/provider/package/pacman.rb +101 -0
- data/lib/chef/provider/package/portage.rb +1 -1
- data/lib/chef/provider/package/rpm.rb +10 -8
- data/lib/chef/provider/package/yum-dump.py +22 -3
- data/lib/chef/provider/package/yum.rb +32 -8
- data/lib/chef/provider/package/zypper.rb +132 -0
- data/lib/chef/provider/remote_directory.rb +58 -49
- data/lib/chef/provider/remote_file.rb +1 -1
- data/lib/chef/provider/route.rb +136 -80
- data/lib/chef/provider/ruby_block.rb +18 -1
- data/lib/chef/provider/service/arch.rb +109 -0
- data/lib/chef/provider/service/freebsd.rb +0 -1
- data/lib/chef/provider/service/simple.rb +2 -3
- data/lib/chef/provider/service/upstart.rb +191 -0
- data/lib/chef/provider/subversion.rb +12 -4
- data/lib/chef/provider/template.rb +85 -53
- data/lib/chef/provider/user.rb +1 -1
- data/lib/chef/provider/user/dscl.rb +277 -0
- data/lib/chef/provider/user/useradd.rb +1 -0
- data/lib/chef/recipe.rb +2 -41
- data/lib/chef/resource.rb +9 -3
- data/lib/chef/resource/breakpoint.rb +35 -0
- data/lib/chef/resource/deploy.rb +16 -2
- data/lib/chef/resource/easy_install_package.rb +41 -0
- data/lib/chef/resource/erl_call.rb +83 -0
- data/lib/chef/resource/freebsd_package.rb +35 -0
- data/lib/chef/resource/log.rb +62 -0
- data/lib/chef/resource/mdadm.rb +82 -0
- data/lib/chef/resource/pacman_package.rb +33 -0
- data/lib/chef/resource/ruby_block.rb +21 -2
- data/lib/chef/resource/scm.rb +8 -0
- data/lib/chef/resource/subversion.rb +1 -0
- data/lib/chef/resource/user.rb +5 -2
- data/lib/chef/resource/yum_package.rb +36 -0
- data/lib/chef/resource_collection.rb +17 -9
- data/lib/chef/resource_collection/stepable_iterator.rb +124 -0
- data/lib/chef/rest.rb +166 -81
- data/lib/chef/role.rb +114 -38
- data/lib/chef/run_list.rb +15 -6
- data/lib/chef/runner.rb +13 -11
- data/lib/chef/search/query.rb +60 -0
- data/lib/chef/shef.rb +220 -0
- data/lib/chef/shef/ext.rb +297 -0
- data/lib/chef/shef/shef_session.rb +175 -0
- data/lib/chef/streaming_cookbook_uploader.rb +187 -0
- data/lib/chef/tasks/chef_repo.rake +53 -155
- data/lib/chef/util/file_edit.rb +94 -96
- data/lib/chef/webui_user.rb +233 -0
- metadata +219 -63
- data/distro/debian/etc/init.d/chef-indexer +0 -175
- data/distro/redhat/etc/chef/client.rb +0 -16
- data/distro/redhat/etc/chef/indexer.rb +0 -10
- data/distro/redhat/etc/chef/server.rb +0 -22
- data/distro/redhat/etc/init.d/chef-indexer +0 -76
- data/lib/chef/application/indexer.rb +0 -141
- data/lib/chef/queue.rb +0 -145
- data/lib/chef/search.rb +0 -88
- data/lib/chef/search/result.rb +0 -64
- data/lib/chef/search_index.rb +0 -77
- data/lib/chef/util/fileedit.rb +0 -121
data/README.rdoc
CHANGED
@@ -46,6 +46,7 @@ Install the following RubyGems.
|
|
46
46
|
* webrat
|
47
47
|
* merb-core
|
48
48
|
* roman-merb_cucumber
|
49
|
+
* thin
|
49
50
|
|
50
51
|
Ohai is also by Opscode and available on GitHub, http://github.com/opscode/ohai/tree/master.
|
51
52
|
|
@@ -61,25 +62,25 @@ Once everything is installed, run the dev:features rake task. Since the features
|
|
61
62
|
|
62
63
|
The dev:features task:
|
63
64
|
|
64
|
-
* Installs chef, chef-server, chef-server-slice gems. It will fail if required gems above are missing.
|
65
|
-
* Starts chef-server on ports 4000 and 4001.
|
66
|
-
* Starts chef-indexer.
|
67
65
|
* Starts CouchDB on port 5984.
|
68
|
-
* Starts
|
66
|
+
* Starts rabbitmq
|
67
|
+
* Starts solr
|
68
|
+
* Starts chef-indexer.
|
69
|
+
* Starts chef-server on port 4000
|
70
|
+
|
69
71
|
|
70
72
|
You'll know its running when you see:
|
71
73
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
merb : worker (port 4001) ~ Successfully bound to port 4001
|
74
|
+
~ Activating slice 'ChefServerApi' ...
|
75
|
+
merb : worker (port 4000) ~ Starting Thin at port 4000
|
76
|
+
merb : worker (port 4000) ~ Using Thin adapter on host 0.0.0.0 and port 4000.
|
77
|
+
merb : worker (port 4000) ~ Successfully bound to port 4000
|
77
78
|
|
78
79
|
You'll want to leave this terminal running the dev environment.
|
79
80
|
|
80
81
|
== Web Interface:
|
81
82
|
|
82
|
-
With the dev environment running, you can now access the web interface via http://localhost:4000/.
|
83
|
+
With the dev environment running, you can now access the web interface via http://localhost:4000/.
|
83
84
|
|
84
85
|
== Spec testing:
|
85
86
|
|
data/bin/chef-client
CHANGED
@@ -18,9 +18,9 @@
|
|
18
18
|
# See the License for the specific language governing permissions and
|
19
19
|
# limitations under the License.
|
20
20
|
|
21
|
-
|
21
|
+
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
22
22
|
|
23
23
|
require 'rubygems'
|
24
24
|
require 'chef/application/client'
|
25
25
|
|
26
|
-
Chef::Application::Client.new.run
|
26
|
+
Chef::Application::Client.new.run
|
data/bin/chef-solo
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
# See the License for the specific language governing permissions and
|
19
19
|
# limitations under the License.
|
20
20
|
|
21
|
-
|
21
|
+
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
22
22
|
|
23
23
|
require 'rubygems'
|
24
24
|
require 'chef/application/solo'
|
data/bin/knife
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# ./knife - Chef CLI interface
|
4
|
+
#
|
5
|
+
# Author:: Adam Jacob (<adam@opscode.com>)
|
6
|
+
# Copyright:: Copyright (c) 2009 Opscode, Inc.
|
7
|
+
# License:: Apache License, Version 2.0
|
8
|
+
#
|
9
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
10
|
+
# you may not use this file except in compliance with the License.
|
11
|
+
# You may obtain a copy of the License at
|
12
|
+
#
|
13
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
14
|
+
#
|
15
|
+
# Unless required by applicable law or agreed to in writing, software
|
16
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
17
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
18
|
+
# See the License for the specific language governing permissions and
|
19
|
+
# limitations under the License.
|
20
|
+
|
21
|
+
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
|
22
|
+
|
23
|
+
require 'rubygems'
|
24
|
+
require 'chef/application/knife'
|
25
|
+
|
26
|
+
Chef::Application::Knife.new.run
|
27
|
+
|
data/bin/shef
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# ./shef - Run the shef REPL
|
4
|
+
#
|
5
|
+
# Author:: Daniel DeLeo (<dan@kallistec.com>)
|
6
|
+
# Copyright:: Copyright (c) 2009
|
7
|
+
# License:: Apache License, Version 2.0
|
8
|
+
#
|
9
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
10
|
+
# you may not use this file except in compliance with the License.
|
11
|
+
# You may obtain a copy of the License at
|
12
|
+
#
|
13
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
14
|
+
#
|
15
|
+
# Unless required by applicable law or agreed to in writing, software
|
16
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
17
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
18
|
+
# See the License for the specific language governing permissions and
|
19
|
+
# limitations under the License.
|
20
|
+
|
21
|
+
# TODO::EVIL
|
22
|
+
require "rubygems"
|
23
|
+
require "mixlib/cli"
|
24
|
+
|
25
|
+
require "irb"
|
26
|
+
require "irb/completion"
|
27
|
+
|
28
|
+
# TODO::EVIL
|
29
|
+
begin
|
30
|
+
require "#{File.dirname(__FILE__)}/../lib/chef"
|
31
|
+
rescue LoadError
|
32
|
+
# the bin got moved, e.g., by rubygems
|
33
|
+
end
|
34
|
+
require "chef/shef"
|
35
|
+
|
36
|
+
# dirty hack to make IRB initialize shef
|
37
|
+
module IRB
|
38
|
+
class << self
|
39
|
+
alias :run_original_config :run_config
|
40
|
+
|
41
|
+
def run_config
|
42
|
+
run_original_config
|
43
|
+
Shef.init
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
Shef.parse_opts
|
49
|
+
IRB.start
|
data/distro/README
ADDED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,375 @@
|
|
1
|
+
.TH CHEF: "1" "December 2009" "knife: 0.8.0" "System Administration Utilities"
|
2
|
+
.SH NAME
|
3
|
+
knife: \- Chef server REST API utility
|
4
|
+
.SH SYNOPSIS
|
5
|
+
.B knife
|
6
|
+
\fIsub-command (options)\fR
|
7
|
+
.SH DESCRIPTION
|
8
|
+
.TP
|
9
|
+
This manual page documents knife, a command-line utility used to interact with a Chef server directly through the RESTful API. Knife uses sub-commands to take various actions on different types of Chef objects. Some sub-commands take additional options. General options follow sub-commands and their options. A configuration file can be created for common defaults.
|
10
|
+
.TP
|
11
|
+
Unless otherwise specified, output is in JSON format, and input files are also JSON format.
|
12
|
+
.SH GENERAL OPTIONS
|
13
|
+
.TP
|
14
|
+
\fB\-s\fR, \fB\-\-server\-url\fR URL
|
15
|
+
Chef Server URL
|
16
|
+
.TP
|
17
|
+
\fB\-k\fR, \fB\-\-key\fR KEY
|
18
|
+
API Client Key
|
19
|
+
.TP
|
20
|
+
\fB\-c\fR, \fB\-\-config\fR CONFIG
|
21
|
+
The configuration file to use
|
22
|
+
.TP
|
23
|
+
\fB\-e\fR, \fB\-\-editor\fR EDITOR
|
24
|
+
Set the editor to use for interactive commands
|
25
|
+
.TP
|
26
|
+
\fB\-l\fR, \fB\-\-log_level\fR LEVEL
|
27
|
+
Set the log level (debug, info, warn, error, fatal)
|
28
|
+
.TP
|
29
|
+
\fB\-L\fR, \fB\-\-logfile\fR LOGLOCATION
|
30
|
+
Set the log file location, defaults to STDOUT
|
31
|
+
.TP
|
32
|
+
\fB\-n\fR, \fB\-\-no\-editor\fR
|
33
|
+
Do not open EDITOR, just accept the data as is
|
34
|
+
.TP
|
35
|
+
\fB\-u\fR, \fB\-\-user\fR USER
|
36
|
+
API Client Username
|
37
|
+
.TP
|
38
|
+
\fB\-p\fR, \fB\-\-print\-after\fR
|
39
|
+
Show the data after a destructive operation
|
40
|
+
.TP
|
41
|
+
\fB\-v\fR, \fB\-\-version\fR
|
42
|
+
Show chef version
|
43
|
+
.TP
|
44
|
+
\fB\-y\fR, \fB\-\-yes\fR
|
45
|
+
Say yes to all prompts for confirmation
|
46
|
+
.TP
|
47
|
+
\fB\-h\fR, \fB\-\-help\fR
|
48
|
+
Show usage information.
|
49
|
+
.SH SUB-COMMANDS
|
50
|
+
Knife sub-commands are structured as "NOUN verb NOUN (options)". The sub-commands are meant to be intuitively named.
|
51
|
+
.SH CLIENT SUB-COMMANDS
|
52
|
+
.TP
|
53
|
+
Sub-commands related to working with clients, which are registered entities that access the Chef server.
|
54
|
+
.TP
|
55
|
+
.B client bulk delete REGEX \fI(options)\fR
|
56
|
+
.PP
|
57
|
+
Delete clients on the Chef server based on a regular expression.
|
58
|
+
.PP
|
59
|
+
The regular expression (REGEX) here should be in quotes, not //'s.
|
60
|
+
.TP
|
61
|
+
.B client create CLIENT (options)
|
62
|
+
.TP
|
63
|
+
\fB\-f\fR, \fB\-\-file\fR FILE
|
64
|
+
Write the key to a file
|
65
|
+
.PP
|
66
|
+
Create a new client.
|
67
|
+
.PP
|
68
|
+
.B client delete CLIENT (options)
|
69
|
+
.PP
|
70
|
+
Deletes a registered client.
|
71
|
+
.PP
|
72
|
+
.B client edit CLIENT (options)
|
73
|
+
.PP
|
74
|
+
Edit a registered client.
|
75
|
+
.PP
|
76
|
+
.B client list (options)
|
77
|
+
.TP
|
78
|
+
\fB\-w\fR, \fB\-\-with\-uri\fR
|
79
|
+
Show corresponding URIs
|
80
|
+
.PP
|
81
|
+
List all registered clients.
|
82
|
+
.PP
|
83
|
+
.B client reregister CLIENT (options)
|
84
|
+
.TP
|
85
|
+
\fB\-f\fR, \fB\-\-file\fR FILE
|
86
|
+
Write the key to a file
|
87
|
+
.PP
|
88
|
+
Regenerate the private key for a client.
|
89
|
+
.PP
|
90
|
+
.B client show CLIENT (options)
|
91
|
+
.TP
|
92
|
+
\fB\-a\fR, \fB\-\-attribute\fR [ATTR]
|
93
|
+
Show only one attribute
|
94
|
+
.PP
|
95
|
+
Show a client.
|
96
|
+
.SH COOKBOOK SUB-COMMANDS
|
97
|
+
.TP
|
98
|
+
Cookbooks are the fundamental unit of distribution in Chef. They encapsulate all the recipes of resources and the assets used to configure a particular aspect of the infrastructure.
|
99
|
+
.PP
|
100
|
+
.B cookbook bulk delete COOKBOOK REGEX (options)
|
101
|
+
.PP
|
102
|
+
Delete cookbooks based on a regular expression.
|
103
|
+
.PP
|
104
|
+
The regular expression (REGEX) here should be in quotes, not //'s.
|
105
|
+
.PP
|
106
|
+
.B cookbook delete COOKBOOK (options)
|
107
|
+
.PP
|
108
|
+
Delete a single named COOKBOOK.
|
109
|
+
.PP
|
110
|
+
.B cookbook download COOKBOOK (options)
|
111
|
+
.TP
|
112
|
+
\fB\-f\fR, \fB\-\-file\fR FILE
|
113
|
+
The filename to write to
|
114
|
+
.PP
|
115
|
+
Download a cookbook from the server as a gzip(1)'ed, tar(1) archive.
|
116
|
+
.PP
|
117
|
+
.B cookbook list (options)
|
118
|
+
.TP
|
119
|
+
\fB\-w\fR, \fB\-\-with\-uri\fR
|
120
|
+
Show corresponding URIs
|
121
|
+
.PP
|
122
|
+
List all cookbooks.
|
123
|
+
.PP
|
124
|
+
.B cookbook metadata COOKBOOK (options)
|
125
|
+
.TP
|
126
|
+
\fB\-a\fR, \fB\-\-all\fR
|
127
|
+
Generate metadata for all cookbooks, rather than just a single cookbook
|
128
|
+
.PP
|
129
|
+
Generate cookbook metadata for the named COOKBOOK.
|
130
|
+
.TP
|
131
|
+
\fB\-o\fR, \fB\-\-cookbook\-path\fR PATH:PATH
|
132
|
+
A colon\-separated path to look for cookbooks in
|
133
|
+
.PP
|
134
|
+
.B cookbook show COOKBOOK [PART] [FILENAME] (options)
|
135
|
+
.TP
|
136
|
+
\fB\-f\fR, \fB\-\-fqdn\fR FQDN
|
137
|
+
The FQDN of the host to see the file for
|
138
|
+
.TP
|
139
|
+
\fB\-p\fR, \fB\-\-platform\fR PLATFORM
|
140
|
+
The platform to see the file for
|
141
|
+
.TP
|
142
|
+
\fB\-V\fR, \fB\-\-platform\-version\fR VERSION
|
143
|
+
The platform version to see the file for
|
144
|
+
.PP
|
145
|
+
Show the particular part of a COOKBOOK. PART can be one of:
|
146
|
+
.TP
|
147
|
+
\fIattributes definitions files libraries providers recipes resources templates\fR
|
148
|
+
.PP
|
149
|
+
.B cookbook upload COOKBOOK (options)
|
150
|
+
.TP
|
151
|
+
\fB\-a\fR, \fB\-\-all\fR
|
152
|
+
Upload all cookbooks, rather than just a single cookbook
|
153
|
+
.TP
|
154
|
+
\fB\-o\fR, \fB\-\-cookbook\-path\fR PATH:PATH
|
155
|
+
A colon\-separated path to look for cookbooks in
|
156
|
+
.PP
|
157
|
+
Upload a cookbook to the server.
|
158
|
+
.SH DATA BAG SUB-COMMANDS
|
159
|
+
.PP
|
160
|
+
Data bags are stores of JSON blobs. These blobs are called items. They are free form and indexed by the search mechanism on the Chef server.
|
161
|
+
.PP
|
162
|
+
.B data bag create BAG [ITEM] (options)
|
163
|
+
.PP
|
164
|
+
Create a new data bag, or item in a data bag.
|
165
|
+
.PP
|
166
|
+
.B data bag delete BAG [ITEM] (options)
|
167
|
+
.PP
|
168
|
+
Delete a data bag, or item from a data bag.
|
169
|
+
.PP
|
170
|
+
.B data bag edit BAG ITEM (options)
|
171
|
+
.PP
|
172
|
+
Edit an item in a data bag.
|
173
|
+
.PP
|
174
|
+
.B data bag list (options)
|
175
|
+
.TP
|
176
|
+
\fB\-w\fR, \fB\-\-with\-uri\fR
|
177
|
+
Show corresponding URIs
|
178
|
+
.PP
|
179
|
+
List the available data bags.
|
180
|
+
.PP
|
181
|
+
.B data bag show BAG [ITEM] (options)
|
182
|
+
.PP
|
183
|
+
Show a specific data bag or an item in a data bag.
|
184
|
+
.SH NODE SUB-COMMANDS
|
185
|
+
.PP
|
186
|
+
Nodes are the entities which are configured with Chef, typically servers or workstations. Nodes are registered as a client, typcially of the same name, but a single client might represent one or more nodes.
|
187
|
+
.PP
|
188
|
+
.B node bulk delete REGEX (options)
|
189
|
+
.TP
|
190
|
+
Delete nodes based on a regular expression.
|
191
|
+
.PP
|
192
|
+
The regular expression (REGEX) here should be in quotes, not //'s.
|
193
|
+
.PP
|
194
|
+
.B node create NODE (options)
|
195
|
+
.PP
|
196
|
+
Create a new node.
|
197
|
+
.PP
|
198
|
+
.B node delete NODE (options)
|
199
|
+
.PP
|
200
|
+
Delete a single node.
|
201
|
+
.PP
|
202
|
+
.B node edit NODE (options)
|
203
|
+
.PP
|
204
|
+
Edit a node.
|
205
|
+
.PP
|
206
|
+
.B node from file FILE (options)
|
207
|
+
.PP
|
208
|
+
Create a node from a JSON file.
|
209
|
+
.PP
|
210
|
+
.B node list (options)
|
211
|
+
.TP
|
212
|
+
\fB\-w\fR, \fB\-\-with\-uri\fR
|
213
|
+
Show corresponding URIs
|
214
|
+
.PP
|
215
|
+
List all nodes.
|
216
|
+
.PP
|
217
|
+
.B node run_list add [NODE] [ENTRY] (options)
|
218
|
+
.TP
|
219
|
+
\fB\-a\fR, \fB\-\-after\fR [ITEM]
|
220
|
+
Place the ENTRY in the run list after ITEM
|
221
|
+
.PP
|
222
|
+
Add a recipe or role to the node's run_list.
|
223
|
+
.PP
|
224
|
+
.B node run_list remove [NODE] [ENTRY] (options)
|
225
|
+
.PP
|
226
|
+
Remove a recipe or role from the node's run_list.
|
227
|
+
.PP
|
228
|
+
.B node show NODE (options)
|
229
|
+
.TP
|
230
|
+
\fB\-a\fR, \fB\-\-attribute\fR [ATTR]
|
231
|
+
Show only one attribute
|
232
|
+
.TP
|
233
|
+
\fB\-r\fR, \fB\-\-run\-list\fR
|
234
|
+
Show only the run list
|
235
|
+
.PP
|
236
|
+
Show a node.
|
237
|
+
.SH ROLE SUB-COMMANDS
|
238
|
+
.PP
|
239
|
+
Roles provide a mechanism to apply a set of recipes and attributes to nodes. For example, the 'webserver' role might instruct Chef to add a recipe for Apache, and specify a default domain to use.
|
240
|
+
.PP
|
241
|
+
.B role bulk delete REGEX (options)
|
242
|
+
.TP
|
243
|
+
Delete roles based on a regular expression.
|
244
|
+
.PP
|
245
|
+
The regular expression (REGEX) here should be in quotes, not //'s.
|
246
|
+
.PP
|
247
|
+
.B role create ROLE (options)
|
248
|
+
.TP
|
249
|
+
\fB\-d\fR, \fB\-\-description\fR
|
250
|
+
The role description
|
251
|
+
.PP
|
252
|
+
Create a new role.
|
253
|
+
.PP
|
254
|
+
.B role delete ROLE (options)
|
255
|
+
.PP
|
256
|
+
Delete a role.
|
257
|
+
.PP
|
258
|
+
.B role edit ROLE (options)
|
259
|
+
Edit a role.
|
260
|
+
.PP
|
261
|
+
.B role from file FILE (options)
|
262
|
+
.PP
|
263
|
+
Update a role from a file.
|
264
|
+
.PP
|
265
|
+
.B role list (options)
|
266
|
+
.TP
|
267
|
+
\fB\-w\fR, \fB\-\-with\-uri\fR
|
268
|
+
Show corresponding URIs
|
269
|
+
.PP
|
270
|
+
List roles.
|
271
|
+
.PP
|
272
|
+
.B role show ROLE (options)
|
273
|
+
.TP
|
274
|
+
\fB\-a\fR, \fB\-\-attribute\fR [ATTR]
|
275
|
+
Show only one attribute
|
276
|
+
.PP
|
277
|
+
Show a specific role.
|
278
|
+
.SH GENERAL SUB-COMMANDS
|
279
|
+
.PP
|
280
|
+
The following are general sub-commands that do not fit within the other object types used in Chef.
|
281
|
+
.PP
|
282
|
+
.B configure (options)
|
283
|
+
.TP
|
284
|
+
\fB\-r\fR, \fB\-\-repository\fR REPO
|
285
|
+
The path to your chef\-repo
|
286
|
+
.PP
|
287
|
+
Create a configuration file for knife. This will prompt for values to enter into the file. See "\fBCONFIGURATION\fR" below for available options.
|
288
|
+
.PP
|
289
|
+
.B ec2 instance data [RUN LIST...] (options)
|
290
|
+
.TP
|
291
|
+
\fB\-e\fR, \fB\-\-edit\fR
|
292
|
+
Edit the instance data
|
293
|
+
.PP
|
294
|
+
Chef is commonly used with Amazon AWS EC2 nodes. This command will generate instance metadata that can be used to automatically configure an EC2 instance with Chef.
|
295
|
+
.PP
|
296
|
+
.B search INDEX QUERY (options)
|
297
|
+
.TP
|
298
|
+
\fB\-a\fR, \fB\-\-attribute\fR [ATTR]
|
299
|
+
Show only one attribute
|
300
|
+
.TP
|
301
|
+
\fB\-i\fR, \fB\-\-id\-only\fR
|
302
|
+
Show only the ID of matching objects
|
303
|
+
.TP
|
304
|
+
\fB\-R\fR, \fB\-\-rows\fR INT
|
305
|
+
The number of rows to return
|
306
|
+
.TP
|
307
|
+
\fB\-r\fR, \fB\-\-run\-list\fR
|
308
|
+
Show only the run list
|
309
|
+
.TP
|
310
|
+
\fB\-o\fR, \fB\-\-sort\fR SORT
|
311
|
+
The order to sort the results in
|
312
|
+
.TP
|
313
|
+
\fB\-b\fR, \fB\-\-start\fR ROW
|
314
|
+
The row to start returning results at
|
315
|
+
.PP
|
316
|
+
Search indexes are a powerful feature of the Chef server and the search subcommand allows searching any of the available indexes using the SOLR query syntax.
|
317
|
+
.PP
|
318
|
+
.B ssh QUERY COMMAND (options)
|
319
|
+
.TP
|
320
|
+
\fB\-a\fR, \fB\-\-attribute\fR ATTR
|
321
|
+
The attribute to use for opening the connection \- default is fqdn
|
322
|
+
.TP
|
323
|
+
\fB\-C\fR, \fB\-\-concurrency\fR NUM
|
324
|
+
The number of concurrent connections
|
325
|
+
.PP
|
326
|
+
The ssh sub-command requires the net-ssh-multi Ruby library.
|
327
|
+
.PP
|
328
|
+
.SH CONFIGURATION
|
329
|
+
The knife configuration file is a Ruby DSL. If it exists, knife uses the settings for \fBGENERAL OPTIONS\fR defaults.
|
330
|
+
.TP
|
331
|
+
.B log_level
|
332
|
+
A Ruby symbol specifying the log level. Corresponds to the \-l or \-\-log_level option. Default is :info.
|
333
|
+
.TP
|
334
|
+
.B log_location
|
335
|
+
Corresponds to the \-L or \-\-logfile option. Default is STDOUT.
|
336
|
+
.TP
|
337
|
+
.B node_name
|
338
|
+
User to authenticate to the Chef server. Corresponds to the \-u or \-\-user option. This is requested from the user when running this sub-command.
|
339
|
+
.TP
|
340
|
+
.B client_key
|
341
|
+
Private key file to authenticate to the Chef server. Corresponds to the \-k or \-\-key option. This is requested from the user when running this sub-command.
|
342
|
+
.TP
|
343
|
+
.B chef_server_url
|
344
|
+
URL of the Chef server. Corresponds to the \-s or \-\-server\-url option. This is requested from the user when running this sub-command.
|
345
|
+
.TP
|
346
|
+
.B cache_type
|
347
|
+
The type of cache to use. Default is \fIBasicFile\fR. This can be any type of Cache that moneta supports: BasicFile, Berkeley, Couch, DataMapper, File, LMC, Memcache, Memory, MongoDB, Redis, Rufus, S3, SDBM, Tyrant, Xattr, YAML.
|
348
|
+
.TP
|
349
|
+
.B cache_options
|
350
|
+
Specifies various options to use for caching. Default reads the Chef client configuration (/etc/chef/checksums).
|
351
|
+
.TP
|
352
|
+
.B validation_client_name
|
353
|
+
Specifies the name of the client used to validate new clients. This is requested from the user when running the configuration sub-command.
|
354
|
+
.TP
|
355
|
+
.B validation_key
|
356
|
+
Specifies the private key file to use for generating ec2 instance data for validating new clients. This is implied from the validation_client_name.
|
357
|
+
.SH FILES
|
358
|
+
.PP
|
359
|
+
\fI~/.chef/knife.rb\fR
|
360
|
+
.TP
|
361
|
+
Ruby DSL configuration file for Knife. See "\fBCONFIGURATION\fR".
|
362
|
+
.SH SEE ALSO
|
363
|
+
.PP
|
364
|
+
Full documentation for Chef and Knife is located on the Chef wiki, http://wiki.opscode.com/display/chef/Home.
|
365
|
+
.PP
|
366
|
+
JSON is JavaScript Object Notation and more information can be found at http://json.org/.
|
367
|
+
.PP
|
368
|
+
SOLR is an open source search engine. The Chef Server includes a SOLR installation. More information about SOLR, including search query syntax, can be found at http://lucene.apache.org/solr/.
|
369
|
+
.SH AUTHOR
|
370
|
+
Chef was written by Adam Jacob <adam@ospcode.com> of Opscode (http://www.opscode.com), with contributions from the community.
|
371
|
+
This manual page was written by Joshua Timberman <joshua@opscode.com> with help2man. Permission is granted
|
372
|
+
to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.
|
373
|
+
.PP
|
374
|
+
On Debian systems, the complete text of the Apache 2.0 License can be found in
|
375
|
+
/usr/share/common-licenses/Apache-2.0.
|