summaryrefslogtreecommitdiff
path: root/distro/common/man/man1/knife.1
diff options
context:
space:
mode:
authorjamescott <jamescott@opscode.com>2013-10-18 12:59:08 -0700
committersersut <serdar@opscode.com>2013-10-18 13:42:10 -0700
commit957f369948268d00c071d30db0519354d560bfef (patch)
treec944c7d309c9eeec04782ea5ecf7c30a42d17de6 /distro/common/man/man1/knife.1
parent16fbe1b5225abd6cfcf2c86f0f59fe7ae46ead45 (diff)
downloadchef-957f369948268d00c071d30db0519354d560bfef.tar.gz
Update the man pages for chef & knife.
Diffstat (limited to 'distro/common/man/man1/knife.1')
-rw-r--r--distro/common/man/man1/knife.1511
1 files changed, 227 insertions, 284 deletions
diff --git a/distro/common/man/man1/knife.1 b/distro/common/man/man1/knife.1
index 4e157422d1..7e20d8a4c9 100644
--- a/distro/common/man/man1/knife.1
+++ b/distro/common/man/man1/knife.1
@@ -1,285 +1,228 @@
-.\" generated with Ronn/v0.7.3
-.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.TH "KNIFE" "1" "Chef 11.8.0" "" "knife"
+.SH NAME
+knife \- The man page for the knife command line tool.
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Man page generated from reStructuredText.
+.
+.sp
+Knife is a command\-line tool that provides an interface between a local chef\-repo and the server. Knife helps users to manage:
+.INDENT 0.0
+.IP \(bu 2
+Nodes
+.IP \(bu 2
+Cookbooks and recipes
+.IP \(bu 2
+Roles
+.IP \(bu 2
+Stores of JSON data (data bags), including encrypted data
+.IP \(bu 2
+Environments
+.IP \(bu 2
+Cloud resources, including provisioning
+.IP \(bu 2
+The installation of the chef\-client on management workstations
+.IP \(bu 2
+Searching of indexed data on the server
+.UNINDENT
+.sp
+Knife subcommands:
+.INDENT 0.0
+.IP \(bu 2
+knife bootstrap
+.IP \(bu 2
+knife client
+.IP \(bu 2
+knife configure
+.IP \(bu 2
+knife cookbook
+.IP \(bu 2
+knife cookbook site
+.IP \(bu 2
+knife data bag
+.IP \(bu 2
+knife delete
+.IP \(bu 2
+knife deps
+.IP \(bu 2
+knife diff
+.IP \(bu 2
+knife download
+.IP \(bu 2
+knife edit
+.IP \(bu 2
+knife environment
+.IP \(bu 2
+knife exec
+.IP \(bu 2
+knife list
+.IP \(bu 2
+knife node
+.IP \(bu 2
+knife raw
+.IP \(bu 2
+knife recipe list
+.IP \(bu 2
+knife role
+.IP \(bu 2
+knife search
+.IP \(bu 2
+knife show
+.IP \(bu 2
+knife ssh
+.IP \(bu 2
+knife status
+.IP \(bu 2
+knife tag
+.IP \(bu 2
+knife upload
+.IP \(bu 2
+knife user
+.IP \(bu 2
+knife xargs
+.UNINDENT
+.SH WORKING WITH KNIFE
+.sp
+Knife runs from a management workstation and sits in\-between a server and an organization\(aqs infrastructure. Knife interacts with a server by using the same REST API that is used by a chef\-client. Role\-based authentication controls (RBAC) can be used to authorize changes when Knife is run with Hosted Chef or Private Chef. Knife is configured during workstation setup, but subsequent modifications can be made using the knife.rb configuration file.
+.SS JSON Data Format
+.sp
+Most data is entered using a text editor in JSON format, unless the \fB\-\-disable\-editing\fP option is entered as part of a command. (Encrypted data bags use YAML, which is a superset of JSON.) JSON is a common, language\-independent data format that provides a simple text representation of arbitrary data structures. For more information about JSON, see \fI\%http://www.json.org/\fP or \fI\%http://en.wikipedia.org/wiki/JSON\fP.
+.SS Set the Text Editor
+.sp
+Some Knife commands, such as \fBknife data bag edit\fP, require that information be edited as JSON data using a text editor. For example, the following command:
+.sp
+.nf
+.ft C
+$ knife data bag edit admins admin_name
+.ft P
+.fi
+.sp
+will open up the text editor with data similar to:
+.sp
+.nf
+.ft C
+{
+ "id": "admin_name"
+}
+.ft P
+.fi
+.sp
+Changes to that file can then be made:
+.sp
+.nf
+.ft C
+{
+ "id": "Justin C."
+ "description": "I am passing the time by letting time pass over me ..."
+}
+.ft P
+.fi
+.sp
+The type of text editor that is used by Knife can be configured by adding an entry to the knife.rb file or by setting an \fBEDITOR\fP environment variable. For example, to configure the text editor to always open with vim, add the following to the knife.rb file:
+.sp
+.nf
+.ft C
+knife[:editor] = "/usr/bin/vim"
+.ft P
+.fi
+.sp
+When a Microsoft Windows file path is enclosed in a double\-quoted string (" "), the same backslash character (\fB\e\fP) that is used to define the file path separator is also used in Ruby to define an escape character. The knife.rb file is a Ruby file; therefore, file path separators must be escaped. In addition, spaces in the file path must be replaced with \fB~1\fP so that the length of each section within the file path is not more than 8 characters. For example, if EditPad Pro is the text editor of choice and is located at the following path:
+.sp
+.nf
+.ft C
+C:\e\eProgram Files (x86)\eEditPad Pro\eEditPad.exe
+.ft P
+.fi
+.sp
+the setting in the knife.rb file would be similar to:
+.sp
+.nf
+.ft C
+knife[:editor] = "C:\e\eProgra~1\e\eEditPa~1\e\eEditPad.exe"
+.ft P
+.fi
+.sp
+One approach to working around the double\- vs. single\-quote issue is to put the single\-quotes outside of the double\-quotes. For example, for Notepad++:
+.sp
+.nf
+.ft C
+knife[:editor] = \(aq"C:\eProgram Files (x86)\eNotepad++\enotepad++.exe \-nosession \-multiInst"\(aq
+.ft P
+.fi
+.sp
+for Sublime Text:
+.sp
+.nf
+.ft C
+knife[:editor] = \(aq"C:\eProgram Files\eSublime Text 2\esublime_text.exe \-\-wait"\(aq
+.ft P
+.fi
+.sp
+for TextPad:
+.sp
+.nf
+.ft C
+knife[:editor] = \(aq"C:\eProgram Files (x86)\eTextPad 7\eTextPad.exe"\(aq
+.ft P
+.fi
+.sp
+and for vim:
+.sp
+.nf
+.ft C
+knife[:editor] = \(aq"C:\eProgram Files (x86)\evim\evim74\egvim.exe"\(aq
+.ft P
+.fi
+.SS Using Quotes
+.sp
+Values can be entered with double quotes (" ") or single quotes (\(aq \(aq), but this should be done consistently.
+.SS Sub\-commands
+.sp
+Knife comes with a collection of built in subcommands that work together to provide all of the functionality required to take specific actions against any object in an organization, including cookbooks, nodes, roles, data bags, environments, and users. A Knife plugin extends the functionality beyond built\-in subcommands.
+.sp
+Knife has the following subcommands: \fBbootstrap\fP, \fBclient\fP, \fBconfigure\fP, \fBcookbook\fP, \fBcookbook site\fP, \fBdata bag\fP, \fBdelete\fP, \fBdeps\fP, \fBdiff\fP, \fBdownload\fP, \fBedit\fP, \fBenvironment\fP, \fBexec\fP, \fBindex rebuild\fP, \fBlist\fP, \fBnode\fP, \fBrecipe list\fP, \fBrole\fP, \fBsearch\fP, \fBshow\fP, \fBssh\fP, \fBstatus\fP, \fBtag\fP, \fBupload\fP, \fBuser\fP, and \fBxargs\fP.
+.IP Note
+The following subcommands run only against the open source server: \fBindex rebuild\fP and \fBuser\fP.
+.RE
+.SS Syntax
+.sp
+All Knife subcommands have the following syntax:
+.INDENT 0.0
+.INDENT 3.5
+knife subcommand [ARGUMENT] (options)
+.UNINDENT
+.UNINDENT
+.sp
+Each subcommand has its own set of arguments and options.
+.IP Note
+All syntax examples in this document show variables in ALL_CAPS. For example \fB\-u PORT_LIST\fP (where PORT_LIST is a comma\-separated list of local and public UDP ports) or \fB\-F FORMAT\fP (where FORMAT determines the output format, either \fBsummary\fP, \fBtext\fP, \fBjson\fP, \fByaml\fP, or \fBpp\fP). These variables often require specific values that are unique to each organization.
+.RE
+.SH AUTHOR
+Opscode
+.\" Generated by docutils manpage writer.
.
-.TH "KNIFE" "1" "October 2013" "Chef 11.10.0.alpha.0" "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
-\fBsyntax_check_cache_path\fR: Specifies the path to a directory where knife caches information about files that it has syntax checked\.
-.
-.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 \fBchef\-shell(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