.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "KNIFE" "1" "April 2014" "Chef 10.32.2" "Chef Manual" . .SH "NAME" \fBknife\fR \- Chef Server API client utility . .SH "SYNOPSIS" \fBknife\fR \fIsub\-command\fR [\fIargument\fR\.\.\.] \fI(options)\fR . .SH "DESCRIPTION" Knife is a command\-line utility used to manage data on a Chef server through the HTTP(S) API\. Knife is organized into groups of subcommands centered around the various object types in Chef\. Each category of subcommand is documented in its own manual page\. Available topics are: . .IP "\(bu" 4 bootstrap . .IP "\(bu" 4 client . .IP "\(bu" 4 configure . .IP "\(bu" 4 cookbook\-site . .IP "\(bu" 4 cookbook . .IP "\(bu" 4 data\-bag . .IP "\(bu" 4 environment . .IP "\(bu" 4 exec . .IP "\(bu" 4 index . .IP "\(bu" 4 node . .IP "\(bu" 4 recipe . .IP "\(bu" 4 role . .IP "\(bu" 4 search . .IP "\(bu" 4 ssh . .IP "\(bu" 4 status . .IP "\(bu" 4 tag . .IP "" 0 . .P If the knife manuals are in your \fBMANPATH\fR, you can access help for the above topics using \fBman knife\-TOPIC\fR; otherwise, you can view the documentation using \fBknife help TOPIC\fR\. . .SH "OPTIONS" . .TP \fB\-s\fR, \fB\-\-server\-url\fR URL Chef Server URL, corresponds to \fBChef::Config\fR \fBchef_server_url\fR\. . .TP \fB\-k\fR, \fB\-\-key\fR KEY API Client Key, corresponds to \fBChef::Config\fR \fBclient_key\fR\. . .TP \fB\-c\fR, \fB\-\-config\fR CONFIG The configuration file to use . .TP \fB\-E\fR, \fB\-\-environment ENVIRONMENT\fR Set the Chef environment . .TP \fB\-e\fR, \fB\-\-editor\fR EDITOR Set the editor to use for interactive commands . .TP \fB\-F\fR, \fB\-\-format\fR FORMAT Which format to use for output\. See FORMATS for details\. . .TP \fB\-d\fR, \fB\-\-disable\-editing\fR Do not open EDITOR, just accept the data as is . .TP \fB\-u\fR, \fB\-\-user\fR USER API Client Username, corresponds to \fBChef::Config\fR \fBnode_name\fR\. . .TP \fB\-p\fR, \fB\-\-print\-after\fR Show the data after a destructive operation . .TP \fB\-v\fR, \fB\-\-version\fR Show chef version . .TP \fB\-V\fR, \fB\-\-verbose\fR More verbose output\. Use twice for max verbosity\. . .TP \fB\-y\fR, \fB\-\-yes\fR Say yes to all prompts for confirmation . .TP \fB\-\-defaults\fR Accept default values for all questions . .TP \fB\-\-[no\-]color\fR Use colored output\. Color enabled by default\. . .TP \fB\-h\fR, \fB\-\-help\fR Show the available options for a command\. . .SH "SUB\-COMMANDS" Sub\-commands that operate on the basic Chef data types are structured as \fINOUN verb NOUN (options)\fR\. For all data types, the following commands are available: . .IP "\(bu" 4 create (create) . .IP "\(bu" 4 list and show (read) . .IP "\(bu" 4 edit (update) . .IP "\(bu" 4 delete (destroy) . .IP "" 0 . .P Knife also includes commands that take actions other than displaying or modifying data on the Chef Server, such as \fBknife\-ssh(1)\fR\. . .SH "CONFIGURATION" The knife configuration file is a Ruby DSL to set configuration parameters for Knife\'s \fBGENERAL OPTIONS\fR\. The default location for the config file is \fB~/\.chef/knife\.rb\fR\. If managing multiple Chef repositories, per\-repository config files can be created\. The file must be \fB\.chef/knife\.rb\fR in the current directory of the repository\. . .P If the config file exists, knife uses these settings for \fBGENERAL OPTIONS\fR defaults\. . .IP "\(bu" 4 \fBnode_name\fR: User or client identity (i\.e\., \fIname\fR) to use for authenticating requests to the Chef Server\. . .IP "\(bu" 4 \fBclient_key\fR: Private key file to authenticate to the Chef server\. Corresponds to the \fB\-k\fR or \fB\-\-key\fR option\. . .IP "\(bu" 4 \fBchef_server_url\fR: URL of the Chef server\. Corresponds to the \fB\-s\fR or \fB\-\-server\-url\fR option\. This is requested from the user when running this sub\-command\. . .IP "\(bu" 4 \fBcache_type\fR: The type of cache to use\. Default is BasicFile\. 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\. . .IP "\(bu" 4 \fBcache_options\fR: Specifies various options to use for caching\. These options are dependent on the \fBcache_type\fR\. . .IP "\(bu" 4 \fBvalidation_client_name\fR: Specifies the name of the client used to validate new clients\. . .IP "\(bu" 4 \fBvalidation_key\fR: Specifies the private key file to use when bootstrapping new hosts\. See knife\-client(1) for more information about the validation client\. . .IP "\(bu" 4 \fBcookbook_copyright\fR, \fBcookbook_email\fR, \fBcookbook_license\fR, \fBreadme_format\fR Used by \fBknife cookbook create\fR sub\-command to specify the copyright holder, maintainer email, license and readme format (respectively) for new cookbooks\. The copyright holder is listed as the maintainer in the cookbook\'s metadata and as the Copyright in the comments of the default recipe\. The maintainer email is used in the cookbook metadata\. The license determines what preamble to put in the comment of the default recipe, and is listed as the license in the cookbook metadata\. Currently supported licenses are "apachev2" and "none"\. Any other values will result in an empty license in the metadata (needs to be filled in by the author), and no comment preamble in the default recipe\. Currently supported readme formats are "md", "mkd", "txt", and "rdoc"\. Any other value will result in an unformatted README\. . .IP "" 0 . .SH "FILES" \fI~/\.chef/knife\.rb\fR . .P Ruby DSL configuration file for knife\. See \fBCONFIGURATION\fR\. . .SH "FORMATS" The amount of content displayed and the output format are modified by the \fB\-\-format\fR option\. If no alternate format is selected, the default is summary\. . .P Valid formats are: . .TP \fBsummary\fR displays the node in a custom, summarized format (default) . .TP \fBtext\fR displays the node data in its entirety using the colorized tree display . .TP \fBjson\fR displays the node in JSON format . .TP \fByaml\fR displays the node in YAML format . .TP \fBpp\fR displays the node using Ruby\'s pretty printer\. . .P For brevity, only the first character of the format is required, for example, \-Fj will produce JSON format output\. . .SH "CHEF WORKFLOW" When working with Chef and Knife in the local repository, the recommended workflow outline looks like: . .IP "\(bu" 4 Create repository\. A skeleton sample is provided at \fIhttp://github\.com/opscode/chef\-repo/\fR\. . .IP "\(bu" 4 Configure knife, see \fBCONFIGURATION\fR\. . .IP "\(bu" 4 Download cookbooks from the Opscode cookbooks site, see \fBCOOKBOOK SITE SUB\-COMMANDS\fR\. . .IP "\(bu" 4 Or, create new cookbooks, see \fBcookbook create\fR sub\-command\. . .IP "\(bu" 4 Commit changes to the version control system\. See your tool\'s documentation\. . .IP "\(bu" 4 Upload cookbooks to the Chef Server, see \fBCOOKBOOK SUB\-COMMANDS\fR\. . .IP "\(bu" 4 Launch instances in the Cloud, OR provision new hosts; see \fBCLOUD COMPUTING SUB\-COMMANDS\fR and \fBBOOTSTRAP SUB\-COMMANDS\fR\. . .IP "\(bu" 4 Watch Chef configure systems! . .IP "" 0 . .P A note about git: Opscode and many folks in the Chef community use git, but it is not required, except in the case of the \fBcookbook site vendor\fR sub\-command, as it uses git directly\. Version control is strongly recommended though, and git fits with a lot of the workflow paradigms\. . .SH "EXAMPLES" . .SH "ENVIRONMENT" . .TP \fBEDITOR\fR The text editor to use for editing data\. The \-\-editor option takes precedence over this value, and the \-\-disable\-editing option supresses data editing entirely\. . .SH "SEE ALSO" \fBchef\-client(8)\fR \fBchef\-server(8)\fR \fBshef(1)\fR . .P \fBknife\-bootstrap(1)\fR \fBknife\-client(1)\fR \fBknife\-configure(1)\fR \fBknife\-cookbook\-site(1)\fR \fBknife\-cookbook(1)\fR \fBknife\-data\-bag(1)\fR \fBknife\-environment(1)\fR \fBknife\-exec(1)\fR \fBknife\-index(1)\fR \fBknife\-node(1)\fR \fBknife\-recipe(1)\fR \fBknife\-role(1)\fR \fBknife\-search(1)\fR \fBknife\-ssh(1)\fR \fBknife\-tag(1)\fR . .P Complete Chef documentation is available online: \fIhttp://wiki\.opscode\.com/display/chef/Home/\fR . .P JSON is JavaScript Object Notation \fIhttp://json\.org/\fR . .P SOLR is an open source search engine\. \fIhttp://lucene\.apache\.org/solr/\fR . .P \fBgit(1)\fR is a version control system \fIhttp://git\-scm\.com/\fR . .P This manual page was generated from Markdown with \fBronn(1)\fR \fIhttp://rtomayko\.github\.com/ronn/ronn\.1\.html\fR . .SH "AUTHOR" Chef was written by Adam Jacob \fIadam@opscode\.com\fR of Opscode (\fIhttp://www\.opscode\.com\fR), with contributions from the community\. . .SH "DOCUMENTATION" This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. . .SH "LICENSE" Both Chef and this documentation are released under the terms of the Apache 2\.0 License\. You may view the license online: \fIhttp://www\.apache\.org/licenses/LICENSE\-2\.0\.html\fR On some systems, the complete text of the Apache 2\.0 License may be found in \fB/usr/share/common\-licenses/Apache\-2\.0\fR\. . .SH "CHEF" Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR