chef 0.10.0.beta.8 → 0.10.0.beta.9
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/knife-bootstrap.1.html +69 -10
- data/distro/common/html/knife-client.1.html +25 -22
- data/distro/common/html/knife-configure.1.html +1 -1
- data/distro/common/html/knife-cookbook-site.1.html +91 -19
- data/distro/common/html/knife-cookbook.1.html +216 -76
- data/distro/common/html/knife-data-bag.1.html +1 -1
- data/distro/common/html/knife-environment.1.html +177 -3
- data/distro/common/html/knife-exec.1.html +44 -3
- data/distro/common/html/knife-index.1.html +1 -1
- data/distro/common/html/knife-node.1.html +5 -3
- data/distro/common/html/knife-recipe.1.html +1 -1
- data/distro/common/html/knife-role.1.html +83 -19
- data/distro/common/html/knife-search.1.html +43 -2
- data/distro/common/html/knife-ssh.1.html +57 -2
- data/distro/common/html/knife-status.1.html +33 -2
- data/distro/common/html/knife-tag.1.html +45 -1
- data/distro/common/html/knife.1.html +94 -161
- data/distro/common/html/shef.1.html +283 -0
- data/distro/common/man/man1/knife-bootstrap.1 +56 -4
- data/distro/common/man/man1/knife-client.1 +12 -11
- data/distro/common/man/man1/knife-configure.1 +1 -1
- data/distro/common/man/man1/knife-cookbook-site.1 +64 -22
- data/distro/common/man/man1/knife-cookbook.1 +200 -122
- data/distro/common/man/man1/knife-data-bag.1 +1 -1
- data/distro/common/man/man1/knife-environment.1 +167 -2
- data/distro/common/man/man1/knife-exec.1 +36 -3
- data/distro/common/man/man1/knife-index.1 +1 -1
- data/distro/common/man/man1/knife-node.1 +2 -1
- data/distro/common/man/man1/knife-role.1 +48 -24
- data/distro/common/man/man1/knife-search.1 +27 -3
- data/distro/common/man/man1/knife-ssh.1 +43 -2
- data/distro/common/man/man1/knife-status.1 +14 -2
- data/distro/common/man/man1/knife-tag.1 +32 -2
- data/distro/common/man/man1/knife.1 +91 -186
- data/distro/common/man/man1/shef.1 +237 -26
- data/distro/common/markdown/man1/knife-bootstrap.mkd +57 -7
- data/distro/common/markdown/man1/knife-client.mkd +19 -17
- data/distro/common/markdown/man1/knife-cookbook-site.mkd +63 -15
- data/distro/common/markdown/man1/knife-cookbook.mkd +220 -103
- data/distro/common/markdown/man1/knife-environment.mkd +144 -1
- data/distro/common/markdown/man1/knife-exec.mkd +29 -1
- data/distro/common/markdown/man1/knife-node.mkd +1 -1
- data/distro/common/markdown/man1/knife-role.mkd +36 -30
- data/distro/common/markdown/man1/knife-search.mkd +0 -1
- data/distro/common/markdown/man1/knife-ssh.mkd +0 -2
- data/distro/common/markdown/man1/knife-status.mkd +0 -2
- data/distro/common/markdown/man1/knife-tag.mkd +31 -0
- data/distro/common/markdown/man1/knife.mkd +93 -165
- data/distro/common/markdown/man1/shef.mkd +189 -0
- data/lib/chef/api_client.rb +36 -35
- data/lib/chef/application/knife.rb +1 -1
- data/lib/chef/client.rb +1 -0
- data/lib/chef/cookbook/cookbook_version_loader.rb +29 -7
- data/lib/chef/cookbook_uploader.rb +55 -36
- data/lib/chef/cookbook_version.rb +3 -1
- data/lib/chef/couchdb.rb +0 -1
- data/lib/chef/knife/cookbook_list.rb +1 -1
- data/lib/chef/knife/cookbook_show.rb +1 -0
- data/lib/chef/knife/core/generic_presenter.rb +3 -3
- data/lib/chef/knife/help.rb +6 -2
- data/lib/chef/knife/tag_create.rb +26 -5
- data/lib/chef/knife/tag_delete.rb +34 -5
- data/lib/chef/knife/tag_list.rb +24 -6
- data/lib/chef/node.rb +1 -0
- data/lib/chef/role.rb +1 -0
- data/lib/chef/shef.rb +1 -0
- data/lib/chef/version.rb +1 -1
- metadata +4 -4
- data/distro/common/man/man1/knife-recipe.1 +0 -13
- data/distro/common/markdown/man1/knife-recipe.mkd +0 -24
@@ -5,4 +5,147 @@ knife-environment(1) -- Define cookbook policies for the environments in your in
|
|
5
5
|
|
6
6
|
__knife__ __environment__ _sub-command_ _(options)_
|
7
7
|
|
8
|
-
##
|
8
|
+
## SUBCOMMANDS
|
9
|
+
Environment subcommands follow a basic create, read, update, delete
|
10
|
+
(CRUD) pattern. The following subcommands are available:
|
11
|
+
|
12
|
+
## CREATE
|
13
|
+
__knife environment create__ _environment_ _(options)_
|
14
|
+
|
15
|
+
* `-d`, `--description DESCRIPTION`:
|
16
|
+
The value of the description field.
|
17
|
+
|
18
|
+
Create a new environment object on the Chef Server. The envrionment will
|
19
|
+
be opened in the text editor for editing prior to creation if the -n
|
20
|
+
option is not present.
|
21
|
+
|
22
|
+
## DELETE
|
23
|
+
__knife environment delete__ _environment_ _(options)_
|
24
|
+
|
25
|
+
Destroy an environment on the Chef Server. A prompt for confirmation
|
26
|
+
will be displayed if the -y options is not given.
|
27
|
+
|
28
|
+
## EDIT
|
29
|
+
__knife environment edit__ _environment_ _(options)_
|
30
|
+
|
31
|
+
Fetch _environment_ and display it in the text editor for editing. The
|
32
|
+
environment will be saved to the Chef Server when the editing session
|
33
|
+
exits.
|
34
|
+
|
35
|
+
## FROM FILE
|
36
|
+
__knife environment from file__ _file_ _(options)_
|
37
|
+
|
38
|
+
Create or update an environment from the JSON or Ruby format _file_. See
|
39
|
+
__format__ for the proper format of this file.
|
40
|
+
|
41
|
+
## LIST
|
42
|
+
__knife environment list__ _(options)_
|
43
|
+
* `-w`, `--with-uri`:
|
44
|
+
Show the resource URI for each environment
|
45
|
+
|
46
|
+
## SHOW
|
47
|
+
__knife environment show__ _environment_ _(options)_
|
48
|
+
|
49
|
+
## DESCRIPTION
|
50
|
+
Environments provide a means to apply policies to hosts in your
|
51
|
+
infrastructure based on business function. For example, you may have a
|
52
|
+
separate copy of your infrastructure called "dev" that runs the latest
|
53
|
+
version of your application and should use the newest versions of your
|
54
|
+
cookbooks when configuring systems, and a production instance of your
|
55
|
+
infrastructure where you wish to update code and cookbooks in a more
|
56
|
+
controlled fashion. In Chef, this function is implemented with
|
57
|
+
_environments_.
|
58
|
+
|
59
|
+
Environments contain two major components: a set of cookbook version
|
60
|
+
constraints and environment attributes.
|
61
|
+
|
62
|
+
## SYNTAX
|
63
|
+
A cookbook version constraint is comprised of a _cookbook name_ and a
|
64
|
+
_version constraint_. The _cookbook name_ is the name of a cookbook in
|
65
|
+
your system, and the _version constraint_ is a String describing the
|
66
|
+
version(s) of that cookbook allowed in the environment. Only one
|
67
|
+
_version constraint_ is supported for a given _cookbook name_.
|
68
|
+
|
69
|
+
The exact syntax used to define a cookbook version constraint varies
|
70
|
+
depending on whether you use the JSON format or the Ruby format. In the
|
71
|
+
JSON format, the cookbook version constraints for an environment are
|
72
|
+
represented as a single JSON object, like this:
|
73
|
+
|
74
|
+
{"apache2": ">= 1.5.0"}
|
75
|
+
|
76
|
+
In the Ruby format, the cookbook version contraints for an environment
|
77
|
+
are represented as a Ruby Hash, like this:
|
78
|
+
|
79
|
+
{"apache2" => ">= 1.5.0"}
|
80
|
+
|
81
|
+
A _version number_ is a String comprised of two or three digits
|
82
|
+
separated by a dot (.) character, or in other words, strings of the form
|
83
|
+
"major.minor" or "major.minor.patch". "1.2" and "1.2.3" are examples of
|
84
|
+
valid version numbers. Version numbers containing more than three digits
|
85
|
+
or alphabetic characters are not supported.
|
86
|
+
|
87
|
+
A _version constraint_ String is composed of an _operator_ and a
|
88
|
+
_version number_. The following operators are available:
|
89
|
+
|
90
|
+
* `= VERSION`:
|
91
|
+
Equality. Only the exact version specified may be used.
|
92
|
+
* `> VERSION`:
|
93
|
+
Greater than. Only versions greater than `VERSION` may be used.
|
94
|
+
* `>= VERSION`:
|
95
|
+
Greater than or equal to. Only versions equal to VERSION or greater
|
96
|
+
may be used.
|
97
|
+
* `< VERSION`:
|
98
|
+
Less than. Only versions less than VERSION may be used.
|
99
|
+
* `<= VERSION`:
|
100
|
+
Less than or equal to. Only versions lesser or equal to VERSION may
|
101
|
+
be used.
|
102
|
+
* `~> VERSION`:
|
103
|
+
Pessimistic greater than. Depending on the number of components in
|
104
|
+
the given VERSION, the constraint will be optimistic about future
|
105
|
+
minor or patch revisions only. For example, `~> 1.1` will match any
|
106
|
+
version less than `2.0` and greater than or equal to `1.1.0`,
|
107
|
+
whereas `~> 2.0.5` will match any version less than `2.1.0` and
|
108
|
+
greater than or equal to `2.0.5`.
|
109
|
+
|
110
|
+
## FORMAT
|
111
|
+
The JSON format of an envioronment is as follows:
|
112
|
+
|
113
|
+
{
|
114
|
+
"name": "dev",
|
115
|
+
"description": "The development environment",
|
116
|
+
"cookbook_versions": {
|
117
|
+
"couchdb": "= 11.0.0"
|
118
|
+
},
|
119
|
+
"json_class": "Chef::Environment",
|
120
|
+
"chef_type": "environment",
|
121
|
+
"default_attributes": {
|
122
|
+
"apache2": { "listen_ports": [ "80", "443" ] }
|
123
|
+
},
|
124
|
+
"override_attributes": {
|
125
|
+
"aws_s3_bucket": "production"
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
129
|
+
The Ruby format of an environment is as follows:
|
130
|
+
|
131
|
+
name "dev"
|
132
|
+
description "The development environment"
|
133
|
+
cookbook_versions "couchdb" => "= 11.0.0"
|
134
|
+
default_attributes "apache2" => { "listen_ports" => [ "80", "443" ] }
|
135
|
+
override_attributes "aws_s3_bucket" => "production"
|
136
|
+
|
137
|
+
|
138
|
+
## SEE ALSO
|
139
|
+
__knife-node(1)__ __knife-cookbook(1)__ __knife-role(1)__
|
140
|
+
<http://wiki.opscode.com/display/chef/Environments>
|
141
|
+
<http://wiki.opscode.com/display/chef/Version+Constraints>
|
142
|
+
|
143
|
+
## AUTHOR
|
144
|
+
Chef was written by Adam Jacob <adam@opscode.com> with many contributions from the community.
|
145
|
+
|
146
|
+
## DOCUMENTATION
|
147
|
+
This manual page was written by Daniel DeLeo <dan@opscode.com>.
|
148
|
+
Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.
|
149
|
+
|
150
|
+
## CHEF
|
151
|
+
Knife is distributed with Chef. <http://wiki.opscode.com/display/chef/Home>
|
@@ -5,5 +5,33 @@ knife-exec(1) -- Run user scripts using the Chef API DSL
|
|
5
5
|
|
6
6
|
__knife__ __exec__ _(options)_
|
7
7
|
|
8
|
-
|
8
|
+
* `-E`, `--exec CODE`:
|
9
|
+
Provide a snippet of code to evaluate on the command line
|
10
|
+
|
11
|
+
## DESCRIPTION
|
12
|
+
`knife exec` runs arbitrary ruby scripts in a context similar to that of
|
13
|
+
the shef(1) DSL. See the shef documentation for a description of the
|
14
|
+
commands available.
|
15
|
+
|
16
|
+
## EXAMPLES
|
17
|
+
* Make an API call against an arbitrary endpoint:
|
18
|
+
knife exec -E 'api.get("nodes/fluke.localdomain/cookbooks")'
|
19
|
+
=> list of cookbooks for the node _fluke.localdomain_
|
20
|
+
* Remove the role _obsolete_ from all nodes:
|
21
|
+
knife exec -E 'nodes.transform(:all){|n| n.run\_list.delete("role[obsolete]")}'
|
22
|
+
* Generate the expanded run list for hosts in the `webserver` role:
|
23
|
+
knife exec -E 'nodes.find(:roles => "webserver") {|n| n.expand!; n[:recipes]}'
|
24
|
+
|
25
|
+
## SEE ALSO
|
26
|
+
__shef(1)__
|
27
|
+
|
28
|
+
## AUTHOR
|
29
|
+
Chef was written by Adam Jacob <adam@opscode.com> with many contributions from the community.
|
30
|
+
|
31
|
+
## DOCUMENTATION
|
32
|
+
This manual page was written by Joshua Timberman <joshua@opscode.com>.
|
33
|
+
Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.
|
34
|
+
|
35
|
+
## CHEF
|
36
|
+
Knife is distributed with Chef. <http://wiki.opscode.com/display/chef/Home>
|
9
37
|
|
@@ -5,29 +5,26 @@ knife-role(1) -- Group common configuration settings
|
|
5
5
|
|
6
6
|
__knife__ __role__ _sub-command_ _(options)_
|
7
7
|
|
8
|
-
##
|
9
|
-
|
10
|
-
Roles are data structures that contain __default\_attributes__, and
|
11
|
-
__override_attributes__, which are nested hashes of configuration
|
12
|
-
settings, and a __run_list__, which is an ordered list of recipes and
|
13
|
-
roles that should be applied to a host by chef-client.
|
8
|
+
## ROLE SUB-COMMANDS
|
9
|
+
The following `role` subcommands are available:
|
14
10
|
|
15
|
-
|
16
|
-
|
17
|
-
will override any values set on nodes that apply them.
|
11
|
+
## LIST
|
12
|
+
__knife role list__ _(options)_
|
18
13
|
|
19
|
-
|
20
|
-
|
21
|
-
will recursively replace any roles in the run\_list with that role's
|
22
|
-
run\_list.
|
14
|
+
* `-w`, `--with-uri`:
|
15
|
+
Show corresponding URIs
|
23
16
|
|
17
|
+
List roles.
|
24
18
|
|
25
|
-
##
|
19
|
+
## SHOW
|
20
|
+
__knife role show ROLE__ _(options)_
|
26
21
|
|
27
|
-
|
22
|
+
* `-a`, `--attribute ATTR`:
|
23
|
+
Show only one attribute
|
28
24
|
|
29
|
-
|
25
|
+
Show a specific role.
|
30
26
|
|
27
|
+
## CREATE
|
31
28
|
__knife role create ROLE__ _(options)_
|
32
29
|
|
33
30
|
* `-d`, `--description`:
|
@@ -35,36 +32,45 @@ __knife role create ROLE__ _(options)_
|
|
35
32
|
|
36
33
|
Create a new role.
|
37
34
|
|
38
|
-
|
39
|
-
|
40
|
-
Delete a role.
|
41
|
-
|
35
|
+
## EDIT
|
42
36
|
__knife role edit ROLE__ _(options)_
|
43
37
|
|
44
38
|
Edit a role.
|
45
39
|
|
40
|
+
## FROM FILE
|
46
41
|
__knife role from file FILE__ _(options)_
|
47
42
|
|
48
43
|
Create or update a role from a role Ruby DSL (`.rb`) or JSON file.
|
49
44
|
|
50
|
-
|
45
|
+
## DELETE
|
46
|
+
__knife role delete ROLE__ _(options)_
|
51
47
|
|
52
|
-
|
53
|
-
Show corresponding URIs
|
48
|
+
Delete a role.
|
54
49
|
|
55
|
-
|
50
|
+
## BULK DELETE
|
51
|
+
__knife role bulk delete REGEX__ _(options)_
|
56
52
|
|
57
|
-
|
53
|
+
Delete roles on the Chef Server based on a regular expression. The regular expression (_REGEX_) should be in quotes, not in //'s.
|
58
54
|
|
59
|
-
|
60
|
-
|
55
|
+
## DESCRIPTION
|
56
|
+
Roles provide a mechanism to group repeated configuration settings.
|
57
|
+
Roles are data structures that contain __default\_attributes__, and
|
58
|
+
__override_attributes__, which are nested hashes of configuration
|
59
|
+
settings, and a __run_list__, which is an ordered list of recipes and
|
60
|
+
roles that should be applied to a host by chef-client.
|
61
61
|
|
62
|
-
|
62
|
+
__default_attributes__ will be overridden if they conflict with a value
|
63
|
+
on a node that includes the role. Conversely, __override_attributes__
|
64
|
+
will override any values set on nodes that apply them.
|
63
65
|
|
66
|
+
When __chef-client__(8) configures a host, it will "expand" the
|
67
|
+
__run_list__ included in that host's node data. The expansion process
|
68
|
+
will recursively replace any roles in the run\_list with that role's
|
69
|
+
run\_list.
|
64
70
|
|
65
71
|
## SEE ALSO
|
66
|
-
__knife-
|
67
|
-
|
72
|
+
__knife-node(1)__ __knife-environment(1)__
|
73
|
+
<http://wiki.opscode.com/display/chef/Roles>
|
68
74
|
<http://wiki.opscode.com/display/chef/Attributes>
|
69
75
|
|
70
76
|
## AUTHOR
|
@@ -6,3 +6,34 @@ knife-tag(1) -- Apply tags to nodes on a Chef Server
|
|
6
6
|
__knife__ __tag__ _subcommand_ _(options)_
|
7
7
|
|
8
8
|
## TAG SUBCOMMANDS
|
9
|
+
The following `tag` subcommands are available:
|
10
|
+
|
11
|
+
## CREATE
|
12
|
+
__knife tag create__ _node_ _tag_ [_..._]
|
13
|
+
|
14
|
+
Adds one or more tags to _node_
|
15
|
+
|
16
|
+
## DELETE
|
17
|
+
__knife tag delete__ _node_ _tag_ [_..._]
|
18
|
+
|
19
|
+
Removes one or more tags from _node_
|
20
|
+
|
21
|
+
## LIST
|
22
|
+
__knife tag list__ _node_
|
23
|
+
|
24
|
+
Lists the tags applied to _node_
|
25
|
+
|
26
|
+
|
27
|
+
## SEE ALSO
|
28
|
+
__knife-node(1)__
|
29
|
+
|
30
|
+
## AUTHOR
|
31
|
+
Chef was written by Adam Jacob <adam@opscode.com> with many contributions from the community.
|
32
|
+
|
33
|
+
## DOCUMENTATION
|
34
|
+
This manual page was written by Daniel DeLeo <dan@opscode.com>.
|
35
|
+
Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.
|
36
|
+
|
37
|
+
## CHEF
|
38
|
+
Knife is distributed with Chef. <http://wiki.opscode.com/display/chef/Home>
|
39
|
+
|
@@ -1,28 +1,39 @@
|
|
1
|
-
knife(1) -- Chef Server
|
1
|
+
knife(1) -- Chef Server API client utility
|
2
2
|
========================================
|
3
3
|
|
4
4
|
## SYNOPSIS
|
5
5
|
|
6
|
-
__knife__ _sub-command_ _(options)_
|
6
|
+
__knife__ _sub-command_ [_argument_...] _(options)_
|
7
7
|
|
8
8
|
## DESCRIPTION
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
10
|
+
Knife is a command-line utility used to manage data on a Chef server
|
11
|
+
through the HTTP(S) API. Knife is organized into groups of subcommands
|
12
|
+
centered around the various object types in Chef. Each category of
|
13
|
+
subcommand is documented in its own manual page. Available topics are:
|
14
|
+
|
15
|
+
* bootstrap
|
16
|
+
* client
|
17
|
+
* configure
|
18
|
+
* cookbook-site
|
19
|
+
* cookbook
|
20
|
+
* data-bag
|
21
|
+
* environment
|
22
|
+
* exec
|
23
|
+
* index
|
24
|
+
* node
|
25
|
+
* recipe
|
26
|
+
* role
|
27
|
+
* search
|
28
|
+
* ssh
|
29
|
+
* status
|
30
|
+
* tag
|
31
|
+
|
32
|
+
If the knife manuals are in your `MANPATH`, you can access help for the
|
33
|
+
above topics using `man knife-TOPIC`; otherwise, you can view the
|
34
|
+
documentation using `knife help TOPIC`.
|
35
|
+
|
36
|
+
## OPTIONS
|
26
37
|
* `-s`, `--server-url` URL:
|
27
38
|
Chef Server URL, corresponds to `Chef::Config` `chef_server_url`.
|
28
39
|
* `-k`, `--key` KEY:
|
@@ -48,29 +59,21 @@ noted as `Chef::Config` values.
|
|
48
59
|
* `-y`, `--yes`:
|
49
60
|
Say yes to all prompts for confirmation
|
50
61
|
* `-h`, `--help`:
|
51
|
-
Show
|
52
|
-
|
53
|
-
Usage information for sub-commands can be displayed with `knife SUB-COMMAND --help`.
|
62
|
+
Show the available options for a command.
|
54
63
|
|
55
64
|
## SUB-COMMANDS
|
56
65
|
|
57
|
-
|
58
|
-
|
59
|
-
|
66
|
+
Sub-commands that operate on the basic Chef data types are structured as
|
67
|
+
_NOUN verb NOUN (options)_. For all data types, the following commands
|
68
|
+
are available:
|
60
69
|
|
61
70
|
* create (create)
|
62
71
|
* list and show (read)
|
63
72
|
* edit (update)
|
64
73
|
* delete (destroy)
|
65
74
|
|
66
|
-
|
67
|
-
|
68
|
-
## GENERAL SUB-COMMANDS
|
69
|
-
|
70
|
-
__recipe list [PATTERN]__
|
71
|
-
|
72
|
-
List available recipes from the server. Specify _PATTERN_ as a regular expression to limit the results.
|
73
|
-
|
75
|
+
Knife also includes commands that take actions other than displaying or
|
76
|
+
modifying data on the Chef Server, such as __knife-ssh(1)__.
|
74
77
|
|
75
78
|
## CONFIGURATION
|
76
79
|
|
@@ -82,94 +85,40 @@ be `.chef/knife.rb` in the current directory of the repository.
|
|
82
85
|
|
83
86
|
If the config file exists, knife uses these settings for __GENERAL OPTIONS__ defaults.
|
84
87
|
|
85
|
-
`
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
*
|
92
|
-
|
93
|
-
|
94
|
-
`
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
`
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
Cache that moneta supports: BasicFile, Berkeley, Couch, DataMapper,
|
120
|
-
File, LMC, Memcache, Memory, MongoDB, Redis, Rufus, S3, SDBM, Tyrant,
|
121
|
-
Xattr, YAML.
|
122
|
-
|
123
|
-
`cache_options`
|
124
|
-
|
125
|
-
Specifies various options to use for caching. Default reads the Chef
|
126
|
-
client configuration (/etc/chef/checksums).
|
127
|
-
|
128
|
-
`validation_client_name`
|
129
|
-
|
130
|
-
Specifies the name of the client used to validate new clients. This is
|
131
|
-
requested from the user when running the configuration sub-command.
|
132
|
-
|
133
|
-
`validation_key`
|
134
|
-
|
135
|
-
Specifies the private key file to use for generating ec2 instance data
|
136
|
-
for validating new clients. This is implied from the
|
137
|
-
`validation_client_name`.
|
138
|
-
|
139
|
-
`cookbook_copyright`
|
140
|
-
`cookbook_email`
|
141
|
-
`cookbook_license`
|
142
|
-
|
143
|
-
Used by `knife cookbook create` sub-command to specify the copyright
|
144
|
-
holder, maintainer email and license (respectively) for new cookbooks.
|
145
|
-
The copyright holder is listed as the maintainer in the cookbook's
|
146
|
-
metadata and as the Copyright in the comments of the default recipe. The
|
147
|
-
maintainer email is used in the cookbook metadata. The license
|
148
|
-
determines what preamble to put in the comment of the default recipe,
|
149
|
-
and is listed as the license in the cookbook metadata. Currently
|
150
|
-
supported licenses are "apachev2" and "none". Any other values will
|
151
|
-
result in an empty license in the metadata (needs to be filled in by the
|
152
|
-
author), and no comment preamble in the default recipe.
|
153
|
-
|
154
|
-
`knife[:aws_access_key_id]`
|
155
|
-
`knife[:aws_secret_access_key]`
|
156
|
-
|
157
|
-
Specifies the Amazon AWS EC2 credentials to use when running the ec2 sub-commands.
|
158
|
-
|
159
|
-
`knife[:rackspace_api_username]`
|
160
|
-
`knife[:rackspace_api_key]`
|
161
|
-
|
162
|
-
Specifies the Rackspace Cloud credentials to use when running the rackspace sub-commands.
|
163
|
-
|
164
|
-
`knife[:terremark_username]`
|
165
|
-
`knife[:terremark_password]`
|
166
|
-
`knife[:terremark_service]`
|
167
|
-
|
168
|
-
Specifies the Terremark vCloud credentials to use when running the terremark sub-commands.
|
169
|
-
|
170
|
-
`knife[:slicehost_password]`
|
171
|
-
|
172
|
-
Specifies the Slicehost password to use when running the slicdehost sub-commands.
|
88
|
+
* `node_name`:
|
89
|
+
User or client identity (i.e., _name_) to use for authenticating
|
90
|
+
requests to the Chef Server.
|
91
|
+
* `client_key`:
|
92
|
+
Private key file to authenticate to the Chef server. Corresponds to the
|
93
|
+
`-k` or `--key` option.
|
94
|
+
* `chef_server_url`:
|
95
|
+
URL of the Chef server. Corresponds to the `-s` or `--server-url`
|
96
|
+
option. This is requested from the user when running this sub-command.
|
97
|
+
* `cache_type`:
|
98
|
+
The type of cache to use. Default is BasicFile. This can be any type of
|
99
|
+
Cache that moneta supports: BasicFile, Berkeley, Couch, DataMapper,
|
100
|
+
File, LMC, Memcache, Memory, MongoDB, Redis, Rufus, S3, SDBM, Tyrant,
|
101
|
+
Xattr, YAML.
|
102
|
+
* `cache_options`:
|
103
|
+
Specifies various options to use for caching. These options are
|
104
|
+
dependent on the `cache_type`.
|
105
|
+
* `validation_client_name`:
|
106
|
+
Specifies the name of the client used to validate new clients.
|
107
|
+
* `validation_key`:
|
108
|
+
Specifies the private key file to use when bootstrapping new hosts.
|
109
|
+
See knife-client(1) for more information about the validation
|
110
|
+
client.
|
111
|
+
* `cookbook_copyright`, `cookbook_email`, `cookbook_license`
|
112
|
+
Used by `knife cookbook create` sub-command to specify the copyright
|
113
|
+
holder, maintainer email and license (respectively) for new cookbooks.
|
114
|
+
The copyright holder is listed as the maintainer in the cookbook's
|
115
|
+
metadata and as the Copyright in the comments of the default recipe. The
|
116
|
+
maintainer email is used in the cookbook metadata. The license
|
117
|
+
determines what preamble to put in the comment of the default recipe,
|
118
|
+
and is listed as the license in the cookbook metadata. Currently
|
119
|
+
supported licenses are "apachev2" and "none". Any other values will
|
120
|
+
result in an empty license in the metadata (needs to be filled in by the
|
121
|
+
author), and no comment preamble in the default recipe.
|
173
122
|
|
174
123
|
## FILES
|
175
124
|
|
@@ -197,44 +146,6 @@ recommended though, and git fits with a lot of the workflow paradigms.
|
|
197
146
|
|
198
147
|
## EXAMPLES
|
199
148
|
|
200
|
-
Example client config (`/etc/chef/client.rb`) from `knife configure
|
201
|
-
client`. The same configuration is used when using the `knife bootstrap`
|
202
|
-
command with the default `gem` templates that come with Chef.
|
203
|
-
|
204
|
-
log_level :info
|
205
|
-
log_location STDOUT
|
206
|
-
chef_server_url 'https://api.opscode.com/organizations/ORGNAME'
|
207
|
-
validation_client_name 'ORGNAME-validator'
|
208
|
-
|
209
|
-
Setting up a custom bootstrap is fairly straightforward. Create
|
210
|
-
`.chef/bootstrap` in your Chef Repository directory or in
|
211
|
-
`$HOME/.chef/bootstrap`. Then create the ERB template file.
|
212
|
-
|
213
|
-
mkdir ~/.chef/bootstrap
|
214
|
-
vi ~/.chef/bootstrap/debian5.0-apt.erb
|
215
|
-
|
216
|
-
For example, to create a new bootstrap template that should be used when
|
217
|
-
setting up a new Debian node. Edit the template to run the commands, set
|
218
|
-
up the validation certificate and the client configuration file, and
|
219
|
-
finally to run chef-client on completion. The bootstrap template can be
|
220
|
-
called with:
|
221
|
-
|
222
|
-
knife bootstrap mynode.example.com --template-file ~/.chef/bootstrap/debian5.0-apt.erb
|
223
|
-
|
224
|
-
Or,
|
225
|
-
|
226
|
-
knife bootstrap mynode.example.com --distro debian5.0-apt
|
227
|
-
|
228
|
-
The `--distro` parameter will automatically look in the
|
229
|
-
`~/.chef/bootstrap` directory for a file named `debian5.0-apt.erb`.
|
230
|
-
|
231
|
-
Templates provided by the Chef installation are located in
|
232
|
-
`BASEDIR/lib/chef/knife/bootstrap/*.erb`, where _BASEDIR_ is the
|
233
|
-
location where the package or Gem installed the Chef client libraries.
|
234
|
-
|
235
|
-
Uploading cookbooks to the Opscode cookbooks site using the user/certificate specifically:
|
236
|
-
|
237
|
-
knife cookbook site share example Other -k ~/.chef/USERNAME.pem -u USERNAME
|
238
149
|
|
239
150
|
## ENVIRONMENT
|
240
151
|
* `EDITOR`:
|
@@ -243,19 +154,36 @@ Uploading cookbooks to the Opscode cookbooks site using the user/certificate spe
|
|
243
154
|
data editing entirely.
|
244
155
|
|
245
156
|
## SEE ALSO
|
157
|
+
__chef-client(8)__ __chef-server(8)__ __shef(1)__
|
246
158
|
|
247
|
-
|
159
|
+
__knife-bootstrap(1)__ __knife-client(1)__ __knife-configure(1)__
|
160
|
+
__knife-cookbook-site(1)__ __knife-cookbook(1)__ __knife-data-bag(1)__
|
161
|
+
__knife-environment(1)__ __knife-exec(1)__ __knife-index(1)__
|
162
|
+
__knife-node(1)__ __knife-recipe(1)__ __knife-role(1)__
|
163
|
+
__knife-search(1)__ __knife-ssh(1)__ __knife-tag(1)__
|
248
164
|
|
249
|
-
|
165
|
+
Complete Chef documentation is available online: <http://wiki.opscode.com/display/chef/Home/>
|
250
166
|
|
251
|
-
|
167
|
+
JSON is JavaScript Object Notation <http://json.org/>
|
252
168
|
|
253
|
-
|
169
|
+
SOLR is an open source search engine. <http://lucene.apache.org/solr/>
|
254
170
|
|
255
|
-
|
171
|
+
__git(1)__ is a version control system <http://git-scm.com/>
|
172
|
+
|
173
|
+
This manual page was generated from Markdown with __ronn(1)__ <http://rtomayko.github.com/ronn/ronn.1.html>
|
256
174
|
|
257
175
|
## AUTHOR
|
176
|
+
Chef was written by Adam Jacob <adam@opscode.com> of Opscode
|
177
|
+
(<http://www.opscode.com>), with contributions from the community.
|
178
|
+
|
179
|
+
## DOCUMENTATION
|
180
|
+
This manual page was written by Joshua Timberman <joshua@opscode.com>.
|
181
|
+
|
182
|
+
## LICENSE
|
183
|
+
Both Chef and this documentation are released under the terms of the
|
184
|
+
Apache 2.0 License. You may view the license online: <http://www.apache.org/licenses/LICENSE-2.0.html>
|
185
|
+
On some systems, the complete text of the Apache 2.0 License may be found in `/usr/share/common-licenses/Apache-2.0`.
|
258
186
|
|
259
|
-
|
187
|
+
## CHEF
|
188
|
+
Knife is distributed with Chef. <http://wiki.opscode.com/display/chef/Home>
|
260
189
|
|
261
|
-
On Debian systems, the complete text of the Apache 2.0 License can be found in `/usr/share/common-licenses/Apache-2.0`.
|