chef 0.10.0.beta.7 → 0.10.0.beta.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/distro/common/html/knife-bootstrap.1.html +182 -0
  2. data/distro/common/html/knife-client.1.html +216 -0
  3. data/distro/common/html/knife-configure.1.html +170 -0
  4. data/distro/common/html/knife-cookbook-site.1.html +166 -0
  5. data/distro/common/html/knife-cookbook.1.html +233 -0
  6. data/distro/common/html/knife-data-bag.1.html +234 -0
  7. data/distro/common/html/knife-environment.1.html +93 -0
  8. data/distro/common/html/knife-exec.1.html +93 -0
  9. data/distro/common/html/knife-index.1.html +125 -0
  10. data/distro/common/html/knife-node.1.html +268 -0
  11. data/distro/common/html/knife-recipe.1.html +92 -0
  12. data/distro/common/html/knife-role.1.html +136 -0
  13. data/distro/common/html/knife-search.1.html +102 -0
  14. data/distro/common/html/knife-ssh.1.html +101 -0
  15. data/distro/common/html/knife-status.1.html +97 -0
  16. data/distro/common/html/knife-tag.1.html +93 -0
  17. data/distro/common/html/knife.1.html +362 -0
  18. data/distro/common/man/man1/knife-bootstrap.1 +137 -0
  19. data/distro/common/man/man1/knife-client.1 +98 -0
  20. data/distro/common/man/man1/knife-configure.1 +88 -0
  21. data/distro/common/man/man1/knife-cookbook-site.1 +91 -0
  22. data/distro/common/man/man1/knife-cookbook.1 +242 -0
  23. data/distro/common/man/man1/knife-data-bag.1 +130 -0
  24. data/distro/common/man/man1/knife-environment.1 +13 -0
  25. data/distro/common/man/man1/knife-exec.1 +13 -0
  26. data/distro/common/man/man1/knife-index.1 +29 -0
  27. data/distro/common/man/man1/knife-node.1 +153 -0
  28. data/distro/common/man/man1/knife-recipe.1 +13 -0
  29. data/distro/common/man/man1/knife-role.1 +64 -0
  30. data/distro/common/man/man1/knife-search.1 +37 -0
  31. data/distro/common/man/man1/knife-ssh.1 +33 -0
  32. data/distro/common/man/man1/knife-status.1 +17 -0
  33. data/distro/common/man/man1/knife-tag.1 +13 -0
  34. data/distro/common/man/man1/knife.1 +346 -0
  35. data/distro/common/man/{man8/shef.8 → man1/shef.1} +0 -0
  36. data/distro/common/man/{man1/chef-server-webui.1 → man8/chef-server-webui.8} +0 -0
  37. data/distro/common/man/{man1/chef-server.1 → man8/chef-server.8} +0 -0
  38. data/distro/common/man/{man1/chef-solr.1 → man8/chef-solr.8} +0 -0
  39. data/distro/common/markdown/man1/knife-bootstrap.mkd +88 -0
  40. data/distro/common/markdown/man1/knife-client.mkd +101 -0
  41. data/distro/common/markdown/man1/knife-configure.mkd +70 -0
  42. data/distro/common/markdown/man1/knife-cookbook-site.mkd +69 -0
  43. data/distro/common/markdown/man1/knife-cookbook.mkd +136 -0
  44. data/distro/common/markdown/man1/knife-data-bag.mkd +117 -0
  45. data/distro/common/markdown/man1/knife-environment.mkd +8 -0
  46. data/distro/common/markdown/man1/knife-exec.mkd +9 -0
  47. data/distro/common/markdown/man1/knife-index.mkd +30 -0
  48. data/distro/common/markdown/man1/knife-node.mkd +147 -0
  49. data/distro/common/markdown/man1/knife-recipe.mkd +24 -0
  50. data/distro/common/markdown/man1/knife-role.mkd +79 -0
  51. data/distro/common/markdown/man1/knife-search.mkd +56 -0
  52. data/distro/common/markdown/man1/knife-ssh.mkd +64 -0
  53. data/distro/common/markdown/man1/knife-status.mkd +38 -0
  54. data/distro/common/markdown/man1/knife-tag.mkd +8 -0
  55. data/distro/common/markdown/man1/knife.mkd +261 -0
  56. data/lib/chef/cookbook/metadata.rb +76 -40
  57. data/lib/chef/cookbook_version.rb +86 -2
  58. data/lib/chef/cookbook_version_selector.rb +7 -2
  59. data/lib/chef/environment.rb +41 -0
  60. data/lib/chef/knife/configure.rb +4 -0
  61. data/lib/chef/knife/cookbook_upload.rb +4 -1
  62. data/lib/chef/knife/help.rb +98 -0
  63. data/lib/chef/rest.rb +1 -0
  64. data/lib/chef/version.rb +1 -1
  65. metadata +58 -11
  66. data/distro/common/man/man1/chef-indexer.1 +0 -42
  67. data/distro/common/man/man1/chef-solr-indexer.1 +0 -55
  68. data/distro/common/man/man8/chef-solr-rebuild.8 +0 -37
  69. data/distro/common/man/man8/knife.8 +0 -1349
  70. data/distro/common/markdown/knife.mkd +0 -865
@@ -0,0 +1,137 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "KNIFE\-BOOTRAP" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
5
+ .
6
+ .SH "NAME"
7
+ \fBknife\-bootrap\fR \- Install Chef Client on a remote host
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBknife\fR \fBbootstrap\fR \fI(options)\fR
11
+ .
12
+ .TP
13
+ \fB\-i\fR, \fB\-\-identity\-file IDENTITY_FILE\fR
14
+ The SSH identity file used for authentication
15
+ .
16
+ .TP
17
+ \fB\-N\fR, \fB\-\-node\-name NAME\fR
18
+ The Chef node name for your new node
19
+ .
20
+ .TP
21
+ \fB\-P\fR, \fB\-\-ssh\-password PASSWORD\fR
22
+ The ssh password
23
+ .
24
+ .TP
25
+ \fB\-x\fR, \fB\-\-ssh\-user USERNAME\fR
26
+ The ssh username
27
+ .
28
+ .TP
29
+ \fB\-\-prerelease\fR
30
+ Install pre\-release Chef gems
31
+ .
32
+ .TP
33
+ \fB\-r\fR, \fB\-\-run\-list RUN_LIST\fR
34
+ Comma separated list of roles/recipes to apply
35
+ .
36
+ .TP
37
+ \fB\-P\fR, \fB\-\-ssh\-password PASSWORD\fR
38
+ The ssh password
39
+ .
40
+ .TP
41
+ \fB\-x\fR, \fB\-\-ssh\-user USERNAME\fR
42
+ The ssh username
43
+ .
44
+ .TP
45
+ \fB\-\-template\-file TEMPLATE\fR
46
+ Full path to location of template to use
47
+ .
48
+ .TP
49
+ \fB\-\-sudo\fR
50
+ Execute the bootstrap via sudo
51
+ .
52
+ .TP
53
+ \fB\-d\fR, \fB\-\-distro DISTRO\fR
54
+ Bootstrap a distro using a template
55
+ .
56
+ .P
57
+ Performs a Chef Bootstrap on the target node\. The goal of the bootstrap is to get Chef installed on the target system so it can run Chef Client with a Chef Server\. The main assumption is a baseline OS installation exists\. This sub\-command is used internally by some cloud computing server create commands and the others will be migrated in a future version of Chef\.
58
+ .
59
+ .P
60
+ The bootstrap sub\-command supports supplying a template to perform the bootstrap steps\. If the distro is not specified (via \fB\-d\fR or \fB\-\-distro\fR option), an Ubuntu 10\.04 host bootstrapped with RubyGems is assumed\. The \fBDISTRO\fR value corresponds to the base filename of the template, in other words \fBDISTRO\fR\.erb\. A template file can be specified with the \fB\-\-template\-file\fR option in which case the \fBDISTRO\fR is not used\. The sub\-command looks in the following locations for the template to use:
61
+ .
62
+ .IP "\(bu" 4
63
+ \fBbootstrap\fR directory in the installed Chef Knife library\.
64
+ .
65
+ .IP "\(bu" 4
66
+ \fBbootstrap\fR directory in the \fB$PWD/\.chef\fR\.
67
+ .
68
+ .IP "\(bu" 4
69
+ \fBbootstrap\fR directory in the users \fB$HOME/\.chef\fR\.
70
+ .
71
+ .IP "" 0
72
+ .
73
+ .P
74
+ The default bootstrap templates are scripts that get copied to the target node (FQDN)\. As of Chef 0\.9\.8, the following distros are supported:
75
+ .
76
+ .IP "\(bu" 4
77
+ centos5\-gems
78
+ .
79
+ .IP "\(bu" 4
80
+ fedora13\-gems
81
+ .
82
+ .IP "\(bu" 4
83
+ ubuntu10\.04\-gems
84
+ .
85
+ .IP "\(bu" 4
86
+ ubuntu10\.04\-apt
87
+ .
88
+ .IP "" 0
89
+ .
90
+ .P
91
+ The gems installations will use RubyGems 1\.3\.6 and Chef installed as a gem\. The apt installation will use the Opscode APT repository\. The RubyGems installation requires installing gems with native extensions, so development related packages (ruby\-dev, build\-essential) are installed\. These are not installed with the apt installation, as native extensions are already compiled in the required packages\.
92
+ .
93
+ .P
94
+ In addition to handling the software installation, these bootstrap templates do the following:
95
+ .
96
+ .IP "\(bu" 4
97
+ Write the validation\.pem per the local knife configuration\.
98
+ .
99
+ .IP "\(bu" 4
100
+ Write a default config file for Chef (\fB/etc/chef/client\.rb\fR) using values from the \fBknife\.rb\fR\.
101
+ .
102
+ .IP "\(bu" 4
103
+ Create a JSON attributes file containing the specified run list and run Chef\.
104
+ .
105
+ .IP "" 0
106
+ .
107
+ .P
108
+ In the case of the RubyGems, the \fBclient\.rb\fR will be written from scratch with a minimal set of values; see \fBEXAMPLES\fR\. In the case of APT Package installation, \fBclient\.rb\fR will have the \fBvalidation_client_name\fR appended if it is not set to \fBchef\-validator\fR (default config value), and the \fBnode_name\fR will be added if \fBchef_node_name\fR option is specified\.
109
+ .
110
+ .P
111
+ When this is complete, the bootstrapped node will have:
112
+ .
113
+ .IP "\(bu" 4
114
+ Latest Chef version installed from RubyGems or APT Packages from Opscode\. This may be a later version than the local system\.
115
+ .
116
+ .IP "\(bu" 4
117
+ Be validated with the configured Chef Server\.
118
+ .
119
+ .IP "\(bu" 4
120
+ Have run Chef with its default run list if one is specfied\.
121
+ .
122
+ .IP "" 0
123
+ .
124
+ .P
125
+ Additional custom bootstrap templates can be created and stored in \fB\.chef/bootstrap/DISTRO\.erb\fR, replacing \fBDISTRO\fR with the value passed with the \fB\-d\fR or \fB\-\-distro\fR option\. See \fBEXAMPLES\fR for more information\.
126
+ .
127
+ .SH "SEE ALSO"
128
+ \fBknife\-ssh\fR(1)
129
+ .
130
+ .SH "AUTHOR"
131
+ Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
132
+ .
133
+ .SH "DOCUMENTATION"
134
+ This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
135
+ .
136
+ .SH "CHEF"
137
+ Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
@@ -0,0 +1,98 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "KNIFE\-CLIENT" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
5
+ .
6
+ .SH "NAME"
7
+ \fBknife\-client\fR \- Manage Chef API Clients
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBknife\fR \fBclient\fR \fIsub\-command\fR \fI(options)\fR
11
+ .
12
+ .SH "DESCRIPTION"
13
+ Clients are identities used for communication with the Chef Server API, roughly equivalent to user accounts on the Chef Server, except that clients only communicate with the Chef Server API and are authenticated via request signatures\.
14
+ .
15
+ .P
16
+ In the typical case, there will be one client object on the server for each node, and the corresponding client and node will have identical names\.
17
+ .
18
+ .P
19
+ In the Chef authorization model, there is one special client, the "validator", which is authorized to create new non\-administrative clients but has minimal privileges otherwise\. This identity is used as a sort of "guest account" to create a client identity when initially setting up a host for management with Chef\.
20
+ .
21
+ .SH "CLIENT SUB\-COMMANDS"
22
+ .
23
+ .SH "BULK DELETE"
24
+ \fBknife client bulk delete\fR \fIregex\fR \fI(options)\fR
25
+ .
26
+ .P
27
+ Delete clients where the client name matches the regular expression \fIregex\fR on the Chef Server\. The regular expression should be given as a quoted string, and not surrounded by forward slashes\.
28
+ .
29
+ .SH "CREATE"
30
+ \fBknife client create\fR \fIclient name\fR \fI(options)\fR
31
+ .
32
+ .TP
33
+ \fB\-a\fR, \fB\-\-admin\fR
34
+ Create the client as an admin
35
+ .
36
+ .TP
37
+ \fB\-f\fR, \fB\-\-file FILE\fR
38
+ Write the key to a file
39
+ .
40
+ .P
41
+ Create a new client\. This generates an RSA keypair\. The private key will be displayed on \fISTDOUT\fR or written to the named file\. The public half will be stored on the Server\. For \fIchef\-client\fR systems, the private key should be copied to the system as \fB/etc/chef/client\.pem\fR\.
42
+ .
43
+ .P
44
+ Admin clients should be created for users that will use \fIknife\fR to access the API as an administrator\. The private key will generally be copied to \fB~/\.chef/client\e_name\.pem\fR and referenced in the \fBknife\.rb\fR configuration file\.
45
+ .
46
+ .SH "DELETE"
47
+ \fBknife client delete\fR \fIclient name\fR \fI(options)\fR
48
+ .
49
+ .P
50
+ Deletes a registered client\.
51
+ .
52
+ .SH "EDIT"
53
+ \fBclient edit\fR \fIclient name\fR \fI(options)\fR
54
+ .
55
+ .P
56
+ Edit a registered client\.
57
+ .
58
+ .SH "LIST"
59
+ \fBclient list\fR \fI(options)\fR
60
+ .
61
+ .TP
62
+ \fB\-w\fR, \fB\-\-with\-uri\fR
63
+ Show corresponding URIs
64
+ .
65
+ .P
66
+ List all registered clients\.
67
+ .
68
+ .SH "REREGISTER"
69
+ \fBclient reregister\fR \fIclient name\fR \fI(options)\fR
70
+ .
71
+ .TP
72
+ \fB\-f\fR, \fB\-\-file FILE\fR
73
+ Write the key to a file
74
+ .
75
+ .P
76
+ Regenerate the RSA keypair for a client\. The public half will be stored on the server and the private key displayed on \fISTDOUT\fR or written to the named file\. This operation will invalidate the previous keypair used by the client, preventing it from authenticating with the Chef Server\. Use care when reregistering the validator client\.
77
+ .
78
+ .SH "SHOW"
79
+ \fBclient show\fR \fIclient name\fR \fI(options)\fR
80
+ .
81
+ .TP
82
+ \fB\-a\fR, \fB\-\-attribute ATTR\fR
83
+ Show only one attribute
84
+ .
85
+ .P
86
+ Show a client\. Output format is determined by the \-\-format option\.
87
+ .
88
+ .SH "SEE ALSO"
89
+ \fBknife\-node\fR(1)
90
+ .
91
+ .SH "AUTHOR"
92
+ Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
93
+ .
94
+ .SH "DOCUMENTATION"
95
+ This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
96
+ .
97
+ .SH "CHEF"
98
+ Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
@@ -0,0 +1,88 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "KNIFE\-CONFIGURE" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
5
+ .
6
+ .SH "NAME"
7
+ \fBknife\-configure\fR \- Generate configuration files for knife or Chef Client
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBknife\fR \fBconfigure\fR [client] \fI(options)\fR
11
+ .
12
+ .SH "DESCRIPTION"
13
+ Generates a knife\.rb configuration file interactively\. When given the \-\-initial option, also creates a new administrative user\.
14
+ .
15
+ .SH "CONFIGURE SUBCOMMANDS"
16
+ \fBknife configure\fR \fI(options)\fR
17
+ .
18
+ .TP
19
+ \fB\-i\fR, \fB\-\-initial\fR
20
+ Create an initial API Client
21
+ .
22
+ .TP
23
+ \fB\-r\fR, \fB\-\-repository REPO\fR
24
+ The path to your chef\-repo
25
+ .
26
+ .P
27
+ Create a configuration file for knife\. This will prompt for values to enter into the file\. Default values are listed in square brackets if no other entry is typed\. See \fBknife\fR(1) for a description of configuration options\.
28
+ .
29
+ .P
30
+ \fBknife configure client\fR \fIdirectory\fR
31
+ .
32
+ .P
33
+ Read the \fIknife\.rb\fR config file and generate a config file suitable for use in \fI/etc/chef/client\.rb\fR and copy the validation certificate into the specified \fIdirectory\fR\.
34
+ .
35
+ .SH "EXAMPLES"
36
+ .
37
+ .IP "\(bu" 4
38
+ On a freshly installed Chef Server, use \fIknife configure \-i\fR to create an administrator and knife configuration file\. Leave the field blank to accept the default value\. On most systems, the default values are acceptable\.
39
+ .
40
+ .IP
41
+ user@host$ knife configure \-i
42
+ .
43
+ .br
44
+ Please enter the chef server URL: [http://localhost:4000]
45
+ .
46
+ .br
47
+ Please enter a clientname for the new client: [username]
48
+ .
49
+ .br
50
+ Please enter the existing admin clientname: [chef\-webui]
51
+ .
52
+ .br
53
+ Please enter the location of the existing admin client\'s private key: [/etc/chef/webui\.pem]
54
+ .
55
+ .br
56
+ Please enter the validation clientname: [chef\-validator]
57
+ .
58
+ .br
59
+ Please enter the location of the validation key: [/etc/chef/validation\.pem]
60
+ .
61
+ .br
62
+ Please enter the path to a chef repository (or leave blank):
63
+ .
64
+ .br
65
+ Creating initial API user\.\.\.
66
+ .
67
+ .br
68
+ Created (or updated) client[username]
69
+ .
70
+ .br
71
+ Configuration file written to /home/username/\.chef/knife\.rb
72
+ .
73
+ .IP
74
+ This creates a new administrator client named \fIusername\fR, writes a configuration file to \fI/home/username/\.chef/knife\.rb\fR, and the private key to \fI/home/username/\.chef/username\.pem\fR\. The configuration file and private key may be copied to another system to facilitate administration of the Chef Server from a remote system\. Depending on the value given for the Chef Server URL, you may need to modify that setting after copying to a remote host\.
75
+ .
76
+ .IP "" 0
77
+ .
78
+ .SH "SEE ALSO"
79
+ \fBknife\fR(1) \fBknife\-client\fR(1)
80
+ .
81
+ .SH "AUTHOR"
82
+ Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
83
+ .
84
+ .SH "DOCUMENTATION"
85
+ This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
86
+ .
87
+ .SH "CHEF"
88
+ Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
@@ -0,0 +1,91 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "KNIFE\-COOKBOOK\-SITE" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
5
+ .
6
+ .SH "NAME"
7
+ \fBknife\-cookbook\-site\fR \- Install and update open source cookbooks
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBknife\fR \fBcookbook site\fR \fIsub\-command\fR \fI(options)\fR
11
+ .
12
+ .SH "COOKBOOK SITE SUB\-COMMANDS"
13
+ The following sub\-commands are still in the context of cookbooks, but they make use of Opscode\'s Cookbook Community site, \fIhttp://cookbooks\.opscode\.com/\fR\. That site has an API, and these sub\-commands utilize that API, rather than the Chef Server API\.
14
+ .
15
+ .P
16
+ \fBcookbook site download COOKBOOK [VERSION]\fR \fI(options)\fR
17
+ .
18
+ .TP
19
+ \fB\-f\fR, \fB\-\-file FILE\fR
20
+ The filename to write to
21
+ .
22
+ .P
23
+ Downloads a specific cookbook from the Community site, optionally specifying a certain version\.
24
+ .
25
+ .P
26
+ \fBcookbook site list\fR \fI(options)\fR
27
+ .
28
+ .TP
29
+ \fB\-w\fR, \fB\-\-with\-uri\fR
30
+ Show corresponding URIs
31
+ .
32
+ .P
33
+ Lists available cookbooks from the Community site\.
34
+ .
35
+ .P
36
+ \fBcookbook site search QUERY\fR \fI(options)\fR
37
+ .
38
+ .P
39
+ Searches the Community site with the specified query\.
40
+ .
41
+ .P
42
+ \fBcookbook site share COOKBOOK CATEGORY\fR \fI(options)\fR
43
+ .
44
+ .TP
45
+ \fB\-k\fR, \fB\-\-key KEY\fR
46
+ API Client Key
47
+ .
48
+ .TP
49
+ \fB\-u\fR, \fB\-\-user USER\fR
50
+ API Client Username
51
+ .
52
+ .TP
53
+ \fB\-o\fR, \fB\-\-cookbook\-path PATH:PATH\fR
54
+ A colon\-separated path to look for cookbooks in
55
+ .
56
+ .P
57
+ Uploads the specified cookbook using the given category to the Opscode cookbooks site\. Requires a login user and certificate for the Opscode Cookbooks site\. See \fBEXAMPLES\fR for usage if the Opscode user and certificate pair are not used for authenticating with the Chef Server\. In other words, if the Chef Server is not the Opscode Platform\.
58
+ .
59
+ .P
60
+ \fBcookbook site unshare COOKBOOK\fR
61
+ .
62
+ .P
63
+ Stops sharing the specified cookbook on the Opscode cookbooks site\.
64
+ .
65
+ .P
66
+ \fBcookbook site show COOKBOOK [VERSION]\fR \fI(options)\fR
67
+ .
68
+ .P
69
+ Shows information from the site about a particular cookbook\.
70
+ .
71
+ .P
72
+ \fBcookbook site vendor COOKBOOK [VERSION]\fR \fI(options)\fR
73
+ .
74
+ .TP
75
+ \fB\-d\fR, \fB\-\-dependencies\fR
76
+ Grab dependencies automatically
77
+ .
78
+ .P
79
+ Uses \fBgit\fR version control in conjunction with the cookbook site to download upstream cookbooks\. A new vendor branch is created in git, the cookbook downloaded from the site and untarred, then the master branch is merged\. This allows the user to track upstream changes to cookbooks while merging in customizations\. If \fI\-d\fR is specified, all the cookbooks it depends on (via metadata \fIdependencies\fR) are downloaded and untarred as well, each using their own vendor branch\.
80
+ .
81
+ .SH "SEE ALSO"
82
+ \fBknife\-environment\fR(1)
83
+ .
84
+ .SH "AUTHOR"
85
+ Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
86
+ .
87
+ .SH "DOCUMENTATION"
88
+ This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
89
+ .
90
+ .SH "CHEF"
91
+ Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR
@@ -0,0 +1,242 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "KNIFE\-COOKBOOK" "1" "April 2011" "Chef 0.10.0.beta.8" "Chef Manual"
5
+ .
6
+ .SH "NAME"
7
+ \fBknife\-cookbook\fR \- Upload and manage Chef cookbooks
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBknife\fR \fBcookbook\fR \fIsub\-command\fR \fI(options)\fR
11
+ .
12
+ .SH "COOKBOOK SUB\-COMMANDS"
13
+ Cookbooks are the fundamental unit of distribution in Chef\. They encapsulate all recipes of resources and assets used to configure a particular aspect of the infrastructure\. The following sub\-commands can be used to manipulate the cookbooks stored on the Chef Server\.
14
+ .
15
+ .P
16
+ \fBcookbook bulk delete REGEX\fR \fI(options)\fR
17
+ .
18
+ .TP
19
+ \fB\-p\fR, \fB\-\-purge\fR
20
+ Purge files from backing store\. This will disable any cookbook that contains any of the same files as the cookbook being purged\.
21
+ .
22
+ .P
23
+ Delete cookbooks on the Chef Server based on a regular expression\. The regular expression (\fIREGEX\fR) should be in quotes, not in //\'s\.
24
+ .
25
+ .P
26
+ \fBcookbook create COOKBOOK\fR \fI(options)\fR
27
+ .
28
+ .TP
29
+ \fB\-o\fR, \fB\-\-cookbook\-path PATH\fR
30
+ The directory where the cookbook will be created
31
+ .
32
+ .TP
33
+ \fB\-r\fR, \fB\-\-readme\-format FORMAT\fR
34
+ Format of the README file
35
+ .
36
+ .TP
37
+ \fB\-C\fR, \fB\-\-copyright COPYRIGHT\fR
38
+ Name of Copyright holder
39
+ .
40
+ .TP
41
+ \fB\-I\fR, \fB\-\-license LICENSE\fR
42
+ License for cookbook, apachev2 or none
43
+ .
44
+ .TP
45
+ \fB\-E\fR, \fB\-\-email EMAIL\fR
46
+ Email address of cookbook maintainer
47
+ .
48
+ .P
49
+ This is a helper command that creates a new cookbook directory in the \fBcookbook_path\fR\. The following directories and files are created for the named cookbook\.
50
+ .
51
+ .IP "\(bu" 4
52
+ COOKBOOK/attributes
53
+ .
54
+ .IP "\(bu" 4
55
+ COOKBOOK/definitions
56
+ .
57
+ .IP "\(bu" 4
58
+ COOKBOOK/files/default
59
+ .
60
+ .IP "\(bu" 4
61
+ COOKBOOK/libraries
62
+ .
63
+ .IP "\(bu" 4
64
+ COOKBOOK/metadata\.rb
65
+ .
66
+ .IP "\(bu" 4
67
+ COOKBOOK/providers
68
+ .
69
+ .IP "\(bu" 4
70
+ COOKBOOK/README\.rdoc
71
+ .
72
+ .IP "\(bu" 4
73
+ COOKBOOK/recipes/default\.rb
74
+ .
75
+ .IP "\(bu" 4
76
+ COOKBOOK/resources
77
+ .
78
+ .IP "\(bu" 4
79
+ COOKBOOK/templates/default
80
+ .
81
+ .IP "" 0
82
+ .
83
+ .P
84
+ Supported README formats are \'rdoc\' (default), \'md\', \'mkd\', \'txt\'\. The README file will be written with the specified extension and a set of helpful starting headers\.
85
+ .
86
+ .P
87
+ Specify \fB\-C\fR or \fB\-\-copyright\fR with the name of the copyright holder as your name or your company/organization name in a quoted string\. If this value is not specified an all\-caps string \fBYOUR_COMPANY_NAME\fR is used which can be easily changed with find/replace\.
88
+ .
89
+ .P
90
+ Specify \fB\-I\fR or \fB\-\-license\fR with the license that the cookbook is distributed under for sharing with other people or posting to the Opscode Cookbooks site\. Be aware of the licenses of files you put inside the cookbook and follow any restrictions they describe\. When using \fBnone\fR (default) or \fBapachev2\fR, comment header text and metadata file are pre\-filled\. The \fBnone\fR license will be treated as non\-redistributable\.
91
+ .
92
+ .P
93
+ Specify \fB\-E\fR or \fB\-\-email\fR with the email address of the cookbook\'s maintainer\. If this value is not specified, an all\-caps string \fBYOUR_EMAIL\fR is used which can easily be changed with find/replace\.
94
+ .
95
+ .P
96
+ The cookbook copyright, license and email settings can be filled in the \fBknife\.rb\fR, for example with default values:
97
+ .
98
+ .IP "" 4
99
+ .
100
+ .nf
101
+
102
+ cookbook_copyright "YOUR_COMPANY_NAME"
103
+ cookbook_license "none"
104
+ cookbook_email "YOUR_EMAIL"
105
+ .
106
+ .fi
107
+ .
108
+ .IP "" 0
109
+ .
110
+ .P
111
+ \fBcookbook delete COOKBOOK [VERSION]\fR \fI(options)\fR
112
+ .
113
+ .TP
114
+ \fB\-a\fR, \fB\-\-all\fR
115
+ Delete all versions
116
+ .
117
+ .TP
118
+ \fB\-p\fR, \fB\-\-purge\fR
119
+ Purge files from backing store\. This will disable any cookbook that contains any of the same files as the cookbook being purged\.
120
+ .
121
+ .P
122
+ Delete the specified \fIVERSION\fR of the named \fICOOKBOOK\fR\. If no version is specified, and only one version exists on the server, that version will be deleted\. If multiple versions are available on the server, you will be prompted for a version to delete\.
123
+ .
124
+ .P
125
+ \fBcookbook download COOKBOOK [VERSION]\fR \fI(options)\fR
126
+ .
127
+ .TP
128
+ \fB\-d\fR, \fB\-\-dir DOWNLOAD_DIRECTORY\fR
129
+ The directory to download the cookbook into
130
+ .
131
+ .TP
132
+ \fB\-f\fR, \fB\-\-force\fR
133
+ Overwrite an existing directory with the download
134
+ .
135
+ .TP
136
+ \fB\-N\fR, \fB\-\-latest\fR
137
+ Download the latest version of the cookbook
138
+ .
139
+ .P
140
+ Download a cookbook from the Chef Server\. If no version is specified and only one version exists on the server, that version will be downloaded\. If no version is specified and multiple versions are available on the server, you will be prompted for a version to download\.
141
+ .
142
+ .P
143
+ \fBcookbook list\fR \fI(options)\fR
144
+ .
145
+ .TP
146
+ \fB\-w\fR, \fB\-\-with\-uri\fR
147
+ Show corresponding URIs
148
+ .
149
+ .P
150
+ List all the cookbooks\.
151
+ .
152
+ .P
153
+ \fBcookbook metadata COOKBOOK\fR \fI(options)\fR
154
+ .
155
+ .TP
156
+ \fB\-a\fR, \fB\-\-all\fR
157
+ Generate metadata for all cookbooks, rather than just a single cookbook
158
+ .
159
+ .TP
160
+ \fB\-o\fR, \fB\-\-cookbook\-path PATH:PATH\fR
161
+ A colon\-separated path to look for cookbooks in
162
+ .
163
+ .P
164
+ Generate cookbook metadata for the named \fICOOKBOOK\fR\. The \fIPATH\fR used here specifies where the cookbooks directory is located and corresponds to the \fBcookbook_path\fR configuration option\.
165
+ .
166
+ .P
167
+ \fBcookbook metadata from FILE\fR \fI(options)\fR
168
+ .
169
+ .P
170
+ Load the cookbook metadata from a specified file\.
171
+ .
172
+ .P
173
+ \fBcookbook show COOKBOOK [VERSION] [PART] [FILENAME]\fR \fI(options)\fR
174
+ .
175
+ .TP
176
+ \fB\-f\fR, \fB\-\-fqdn FQDN\fR
177
+ The FQDN of the host to see the file for
178
+ .
179
+ .TP
180
+ \fB\-p\fR, \fB\-\-platform PLATFORM\fR
181
+ The platform to see the file for
182
+ .
183
+ .TP
184
+ \fB\-V\fR, \fB\-\-platform\-version VERSION\fR
185
+ The platform version to see the file for
186
+ .
187
+ .P
188
+ Show a particular part of a \fICOOKBOOK\fR for the specified \fIVERSION\fR\. \fIPART\fR can be one of:
189
+ .
190
+ .IP "\(bu" 4
191
+ \fIattributes\fR
192
+ .
193
+ .IP "\(bu" 4
194
+ \fIdefinitions\fR
195
+ .
196
+ .IP "\(bu" 4
197
+ \fIfiles\fR
198
+ .
199
+ .IP "\(bu" 4
200
+ \fIlibraries\fR
201
+ .
202
+ .IP "\(bu" 4
203
+ \fIproviders\fR
204
+ .
205
+ .IP "\(bu" 4
206
+ \fIrecipes\fR
207
+ .
208
+ .IP "\(bu" 4
209
+ \fIresources\fR
210
+ .
211
+ .IP "\(bu" 4
212
+ \fItemplates\fR
213
+ .
214
+ .IP "" 0
215
+ .
216
+ .P
217
+ \fBcookbook test [COOKBOOKS\.\.\.]\fR \fI(options)\fR
218
+ .
219
+ .TP
220
+ \fB\-a\fR, \fB\-\-all\fR
221
+ Test all cookbooks, rather than just a single cookbook
222
+ .
223
+ .TP
224
+ \fB\-o\fR, \fB\-\-cookbook\-path PATH:PATH\fR
225
+ A colon\-separated path to look for cookbooks in
226
+ .
227
+ .P
228
+ Test the specified cookbooks for syntax errors\. This uses the built\-in Ruby syntax checking option for files in the cookbook ending in \fB\.rb\fR, and the ERB syntax check for files ending in \fB\.erb\fR (templates)\.
229
+ .
230
+ .P
231
+ \fBcookbook upload [COOKBOOKS\.\.\.]\fR \fI(options)\fR
232
+ .
233
+ .TP
234
+ \fB\-a\fR, \fB\-\-all\fR
235
+ Upload all cookbooks, rather than just a single cookbook
236
+ .
237
+ .TP
238
+ \fB\-o\fR, \fB\-\-cookbook\-path PATH:PATH\fR
239
+ A colon\-separated path to look for cookbooks in
240
+ .
241
+ .P
242
+ Uploads the specified cookbooks to the Chef Server\. The actual upload executes a number of commands, most of which occur on the local machine\. The cookbook is staged in a temporary location\. Then the \fBcookbook_path\fR (or \fB\-o PATH\fR) is processed to search for the named cookbook, and each occurance is copied in the order specified\. A syntax check is performed a la \fBcookbook test\fR, above\. The metadata is generated, a la \fBcookbook metadata\fR\. A gzip(1)\'ed, tar(1) file is created, and is uploaded to the server\.