diff options
author | sersut <serdar@opscode.com> | 2013-10-18 12:19:31 -0700 |
---|---|---|
committer | sersut <serdar@opscode.com> | 2013-10-18 12:19:31 -0700 |
commit | 53502fa0e95fea9bf9040498b414bc585c3160f5 (patch) | |
tree | 3fa3a9bac5fc8fd29da171eea0f090a37a5473eb /distro/common | |
parent | 28300f908ccc980e3ed395ea0e41f0959bdc0cc3 (diff) | |
download | chef-53502fa0e95fea9bf9040498b414bc585c3160f5.tar.gz |
Revert the man docs back to restore changes from James.
Diffstat (limited to 'distro/common')
24 files changed, 4719 insertions, 1647 deletions
diff --git a/distro/common/man/man1/chef-shell.1 b/distro/common/man/man1/chef-shell.1 index 61e0d875e9..095e8623c0 100644 --- a/distro/common/man/man1/chef-shell.1 +++ b/distro/common/man/man1/chef-shell.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SHELL" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.TH "CHEF\-SHELL" "1" "July 2013" "Chef 11.8.0.alpha.0" "Chef Manual" . .SH "NAME" \fBchef\-shell\fR \- Interactive Chef Console diff --git a/distro/common/man/man1/knife-bootstrap.1 b/distro/common/man/man1/knife-bootstrap.1 index 7732d86438..57afe45343 100644 --- a/distro/common/man/man1/knife-bootstrap.1 +++ b/distro/common/man/man1/knife-bootstrap.1 @@ -1,201 +1,199 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 -. -.TH "KNIFE\-BOOTSTRAP" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" -. -.SH "NAME" -\fBknife\-bootstrap\fR \- Install Chef Client on a remote host -. -.SH "SYNOPSIS" -\fBknife\fR \fBbootstrap\fR \fI(options)\fR -. +.TH "KNIFE-BOOTSTRAP" "1" "Chef 11.8" "" "knife bootstrap" +.SH NAME +knife-bootstrap \- The man page for the knife bootstrap subcommand. +. +.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 +A bootstrap is a process that installs the chef\-client on a target system so that it can run as a chef\-client and communicate with a server. +.sp +The \fBknife bootstrap\fP subcommand is used run a bootstrap operation that installs the chef\-client on the target system. The bootstrap operation must specify the IP address or FQDN of the target system. +.IP Note +To bootstrap the chef\-client on Microsoft Windows machines, the \fI\%knife-windows\fP plugins is required, which includes the necessary bootstrap scripts that are used to do the actual installation. +.RE +.sp +\fBCommon Options\fP +.sp +The following options can be run with all Knife sub\-commands and plug\-ins: +.INDENT 0.0 .TP -\fB\-i\fR, \fB\-\-identity\-file IDENTITY_FILE\fR -The SSH identity file used for authentication -. +.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP +The configuration file to use. .TP -\fB\-N\fR, \fB\-\-node\-name NAME\fR -The Chef node name for your new node -. +.B \fB\-\-color\fP +Indicates that colored output will be used. .TP -\fB\-P\fR, \fB\-\-ssh\-password PASSWORD\fR -The ssh password -. +.B \fB\-d\fP, \fB\-\-disable\-editing\fP +Indicates that $EDITOR will not be opened; data will be accepted as\-is. .TP -\fB\-x\fR, \fB\-\-ssh\-user USERNAME\fR -The ssh username -. +.B \fB\-\-defaults\fP +Indicates that Knife will use the default value, instead of asking a user to provide one. .TP -\fB\-p\fR, \fB\-\-ssh\-port PORT\fR -The ssh port -. +.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP +The $EDITOR that is used for all interactive commands. .TP -\fB\-\-bootstrap\-version VERSION\fR -The version of Chef to install -. +.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP +The name of the environment. When this option is added to a command, the command will run only against the named environment. .TP -\fB\-\-bootstrap\-proxy PROXY_URL\fR -\fBThe proxy server for the node being bootstrapped\fR -. +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. .TP -\fB\-\-prerelease\fR -Install pre\-release Chef gems -. +.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP +The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP. .TP -\fB\-r\fR, \fB\-\-run\-list RUN_LIST\fR -Comma separated list of roles/recipes to apply -. +.B \fB\-h\fP, \fB\-\-help\fP +Shows help for the command. .TP -\fB\-\-template\-file TEMPLATE\fR -Full path to location of template to use -. +.B \fB\-k KEY\fP, \fB\-\-key KEY\fP +The private key that Knife will use to sign requests made by the API client to the server. .TP -\fB\-\-sudo\fR -Execute the bootstrap via sudo -. +.B \fB\-\-no\-color\fP +Indicates that color will not be used in the output. .TP -\fB\-d\fR, \fB\-\-distro DISTRO\fR -Bootstrap a distro using a template -. +.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP +The user password. .TP -\fB\-\-[no\-]host\-key\-verify\fR -Enable host key verification, which is the default behavior\. -. +.B \fB\-\-print\-after\fP +Indicates that data will be shown after a destructive operation. .TP -\fB\-\-hint HINT_NAME[=HINT_FILE]\fR -Provide the name of a hint (with option JSON file) to set for use by Ohai plugins\. -. -.SH "DESCRIPTION" -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 plugins\. -. -.P -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: -. -.IP "\(bu" 4 -\fBbootstrap\fR directory in the installed Chef Knife library\. -. -.IP "\(bu" 4 -\fBbootstrap\fR directory in the \fB$PWD/\.chef\fR\. -. -.IP "\(bu" 4 -\fBbootstrap\fR directory in the users \fB$HOME/\.chef\fR\. -. -.IP "" 0 -. -.P -The default bootstrap templates are scripts that get copied to the target node (FQDN)\. The following distros are supported: -. -.IP "\(bu" 4 -centos5\-gems -. -.IP "\(bu" 4 -fedora13\-gems -. -.IP "\(bu" 4 -ubuntu10\.04\-gems -. -.IP "\(bu" 4 -ubuntu10\.04\-apt -. -.IP "" 0 -. -.P -The gems installations will use RubyGems 1\.3\.6 and Chef installed as a gem\. The apt installation will use the Opscode APT repository\. -. -.P -In addition to handling the software installation, these bootstrap templates do the following: -. -.IP "\(bu" 4 -Write the validation\.pem per the local knife configuration\. -. -.IP "\(bu" 4 -Write a default config file for Chef (\fB/etc/chef/client\.rb\fR) using values from the \fBknife\.rb\fR\. -. -.IP "\(bu" 4 -Create a JSON attributes file containing the specified run list and run Chef\. -. -.IP "" 0 -. -.P -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\. -. -.P -When this is complete, the bootstrapped node will have: -. -.IP "\(bu" 4 -Latest Chef version installed from RubyGems or APT Packages from Opscode\. This may be a later version than the local system\. -. -.IP "\(bu" 4 -Be validated with the configured Chef Server\. -. -.IP "\(bu" 4 -Have run Chef with its default run list if one is specfied\. -. -.IP "" 0 -. -.P -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\. -. -.SH "EXAMPLES" -Setting up a custom bootstrap is fairly straightforward\. Create a \fB\.chef/bootstrap\fR directory in your Chef Repository or in \fB$HOME/\.chef/bootstrap\fR\. Then create the ERB template file\. -. -.IP "" 4 -. +.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP +The URL for the server. +.TP +.B \fB\-u USER\fP, \fB\-\-user USER\fP +The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key. +.TP +.B \fB\-v\fP, \fB\-\-version\fP +The version of the chef\-client. +.TP +.B \fB\-V\fP, \fB\-\-verbose\fP +Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. +.TP +.B \fB\-y\fP, \fB\-\-yes\fP +Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation). +.UNINDENT +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp .nf - -mkdir ~/\.chef/bootstrap -vi ~/\.chef/bootstrap/debian5\.0\-apt\.erb -. +.ft C +$ knife bootstrap FQDN_or_IP_ADDRESS (options) +.ft P .fi -. -.IP "" 0 -. -.P -For example, to create a new bootstrap template that should be used when setting up a new Debian node\. Edit the template to run the commands, set up the validation certificate and the client configuration file, and finally to run chef\-client on completion\. The bootstrap template can be called with: -. -.IP "" 4 -. +.sp +\fBOptions\fP +.sp +This subcommand has the following options: +.INDENT 0.0 +.TP +.B \fB\-A\fP, \fB\-\-forward\-agent\fP +Indicates that SSH agent forwarding is enabled. +.TP +.B \fB\-\-bootstrap\-proxy PROXY_URL\fP +The proxy server for the node that is the target of a bootstrap operation. +.TP +.B \fB\-\-bootstrap\-version VERSION\fP +The version of the chef\-client to install. +.TP +.B \fB\-d DISTRO\fP, \fB\-\-distro DISTRO\fP +The template file to be used during a bootstrap operation. The following distributions are supported: \fBchef\-full\fP (the default bootstrap), \fBcentos5\-gems\fP, \fBfedora13\-gems\fP, \fBubuntu10.04\-gems\fP, \fBubuntu10.04\-apt\fP, \fBubuntu12.04\-gems\fP, and the name of a custom bootstrap template file. When this option is used, Knife will search for the template file in the following order: the \fBbootstrap/\fP folder in the current working directory, the \fBbootstrap/\fP folder in the chef\-repo, the \fBbootstrap/\fP folder in the \fB~/.chef/\fP directory, or a default bootstrap file. Do not use the \fB\-\-template\-file\fP option when \fB\-\-distro\fP is specified. +.TP +.B \fB\-G GATEWAY\fP, \fB\-\-ssh\-gateway GATEWAY\fP +The SSH tunnel or gateway that is used to run a bootstrap action on a machine that is not accessible from the workstation. +.TP +.B \fB\-\-hint HINT_NAME[=HINT_FILE]\fP +An Ohai hint to be set on the target of the bootstrap. The hint is contained in a file and is formatted as JSON: \fB{"attribute":"value","attribute":"value"...}\fP. \fBHINT_NAME\fP is the name of the hint and \fBHINT_FILE\fP is the name of the hint file located at \fB/etc/chef/ohai/hints/HINT_FILE.json\fP. Use multiple \fB\-\-hint\fP options in the command to specify multiple hints. +.TP +.B \fB\-i IDENTITY_FILE\fP, \fB\-\-identity\-file IDENTITY_FILE\fP +The SSH identity file used for authentication. Key\-based authentication is recommended. +.TP +.B \fB\-j JSON_ATTRIBS\fP, \fB\-\-json\-attributes JSON_ATTRIBS\fP +A JSON string that is added to the first run of a chef\-client. +.TP +.B \fB\-N NAME\fP, \fB\-\-node\-name NAME\fP +The name of the node. +.TP +.B \fB\-\-[no\-]host\-key\-verify\fP +Use \fB\-\-no\-host\-key\-verify\fP to disable host key verification. Default setting: \fB\-\-host\-key\-verify\fP. +.TP +.B \fB\-p PORT\fP, \fB\-\-ssh\-port PORT\fP +The SSH port. +.TP +.B \fB\-P PASSWORD\fP, \fB\-\-ssh\-password PASSWORD\fP +The SSH password. This can be used to pass the password directly on the command line. If this option is not specified (and a password is required) Knife will prompt for the password. +.TP +.B \fB\-\-prerelease\fP +Indicates that pre\-release gems should be installed. +.TP +.B \fB\-r RUN_LIST\fP, \fB\-\-run\-list RUN_LIST\fP +A comma\-separated list of roles and/or recipes to be applied. +.TP +.B \fB\-\-secret SECRET\fP +The encryption key that is used for values contained within a data bag. +.TP +.B \fB\-\-secret\-file FILE\fP +The path to the file that contains the encryption key. +.TP +.B \fB\-\-sudo\fP +Indicates that a bootstrap operation should be executed using sudo. +.TP +.B \fB\-\-template\-file TEMPLATE\fP +The path to a template file that will be used during a bootstrap operation. Do not use the \fB\-\-distro\fP option when \fB\-\-template\-file\fP is specified. +.TP +.B \fB\-\-use\-sudo\-password\fP +Indicates that a bootstrap operation is done using sudo, with the password specified by the \fB\-P\fP (or \fB\-\-ssh\-password\fP) option. +.TP +.B \fB\-x USERNAME\fP, \fB\-\-ssh\-user USERNAME\fP +The SSH user name. +.UNINDENT +.sp +\fBExamples\fP +.sp +To pass an SSH password as part of the command: +.sp .nf - -knife bootstrap mynode\.example\.com \-\-template\-file ~/\.chef/bootstrap/debian5\.0\-apt\.erb -. +.ft C +$ knife bootstrap 192.168.1.1 \-x username \-P PASSWORD \-\-sudo +.ft P .fi -. -.IP "" 0 -. -.P -Or, -. -.IP "" 4 -. +.sp +To use a file that contains a private key: +.sp .nf - -knife bootstrap mynode\.example\.com \-\-distro debian5\.0\-apt -. +.ft C +$ knife bootstrap 192.168.1.1 \-x username \-i ~/.ssh/id_rsa \-\-sudo +.ft P .fi +.SH AUTHOR +Opscode +.SH COPYRIGHT +This work is licensed under a Creative Commons Attribution 3.0 Unported License +.\" Generated by docutils manpage writer. . -.IP "" 0 -. -.P -The \fB\-\-distro\fR parameter will automatically look in the \fB~/\.chef/bootstrap\fR directory for a file named \fBdebian5\.0\-apt\.erb\fR\. -. -.P -Templates provided by the Chef installation are located in \fBBASEDIR/lib/chef/knife/bootstrap/*\.erb\fR, where \fIBASEDIR\fR is the location where the package or Gem installed the Chef client libraries\. -. -.SH "BUGS" -\fBknife bootstrap\fR is not capable of bootstrapping multiple hosts in parallel\. -. -.P -The bootstrap script is passed as an argument to sh(1) on the remote system, so sensitive information contained in the script will be visible to other users via the process list using tools such as ps(1)\. -. -.SH "SEE ALSO" -\fBknife\-ssh\fR(1) -. -.SH "AUTHOR" -Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. -. -.SH "DOCUMENTATION" -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\. -. -.SH "CHEF" -Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR diff --git a/distro/common/man/man1/knife-client.1 b/distro/common/man/man1/knife-client.1 index 9d62d015ab..50b42c759b 100644 --- a/distro/common/man/man1/knife-client.1 +++ b/distro/common/man/man1/knife-client.1 @@ -1,99 +1,370 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 +.TH "KNIFE-CLIENT" "1" "Chef 11.8" "" "knife client" +.SH NAME +knife-client \- The man page for the knife client subcommand. . -.TH "KNIFE\-CLIENT" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.nr rst2man-indent-level 0 . -.SH "NAME" -\fBknife\-client\fR \- Manage Chef API Clients -. -.SH "SYNOPSIS" -\fBknife\fR \fBclient\fR \fIsub\-command\fR \fI(options)\fR -. -.SH "SUB\-COMMANDS" -Client subcommands follow a basic create, read, update, delete (CRUD) pattern\. The Following subcommands are available: -. -.SH "BULK DELETE" -\fBknife client bulk delete\fR \fIregex\fR \fI(options)\fR -. -.P -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\. -. -.SH "CREATE" -\fBknife client create\fR \fIclient name\fR \fI(options)\fR +.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 +When a node runs the chef\-client for the first time, it generally does not yet have an API client identity, and so it cannot make authenticated requests to the server. This is where the validation client\-\-\-known as the chef\-validator\-\-\-comes in. When the chef\-client runs, it checks if it has a client key. If the client key does not exist, it then attempts to borrow the identity of the chef\-validator to register itself with the server. In order to register with the server, the private key for the chef\-validator needs to be copied to the host and placed in /etc/chef/validation.pem. +.sp +Once the chef\-client has registered itself with the server, it no longer uses the validation client for anything. It is recommended that you delete the private key for the chef\-validator from the host after the host has registered or use the \fBdelete_validation\fP recipe that can be found in the \fBchef\-client\fP cookbook (\fI\%https://github.com/opscode-cookbooks/chef-client\fP). +.sp +The \fBknife client\fP subcommand is used to manage an API client list and their associated RSA public key\-pairs. This allows authentication requests to be made to the server by any entity that uses the Chef Server API, such as the chef\-client and Knife. +.sp +This subcommand has the following syntax: +.sp +.nf +.ft C +$ knife client [ARGUMENT] (options) +.ft P +.fi +.SH COMMON OPTIONS +.sp +The following options can be run with all Knife sub\-commands and plug\-ins: +.INDENT 0.0 .TP -\fB\-a\fR, \fB\-\-admin\fR -Create the client as an admin -. +.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP +The configuration file to use. .TP -\fB\-f\fR, \fB\-\-file FILE\fR -Write the key to a file -. -.P -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\. -. -.P -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\. -. -.SH "DELETE" -\fBknife client delete\fR \fIclient name\fR \fI(options)\fR -. -.P -Deletes a registered client\. -. -.SH "EDIT" -\fBclient edit\fR \fIclient name\fR \fI(options)\fR -. -.P -Edit a registered client\. -. -.SH "LIST" -\fBclient list\fR \fI(options)\fR -. +.B \fB\-\-color\fP +Indicates that colored output will be used. .TP -\fB\-w\fR, \fB\-\-with\-uri\fR -Show corresponding URIs -. -.P -List all registered clients\. -. -.SH "REREGISTER" -\fBclient reregister\fR \fIclient name\fR \fI(options)\fR -. +.B \fB\-d\fP, \fB\-\-disable\-editing\fP +Indicates that $EDITOR will not be opened; data will be accepted as\-is. .TP -\fB\-f\fR, \fB\-\-file FILE\fR -Write the key to a file -. -.P -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\. -. -.SH "SHOW" -\fBclient show\fR \fIclient name\fR \fI(options)\fR -. +.B \fB\-\-defaults\fP +Indicates that Knife will use the default value, instead of asking a user to provide one. .TP -\fB\-a\fR, \fB\-\-attribute ATTR\fR -Show only one attribute -. -.P -Show a client\. Output format is determined by the \-\-format option\. -. -.SH "DESCRIPTION" -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\. -. -.P -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\. -. -.P -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\. -. -.SH "SEE ALSO" -\fBknife\-node\fR(1) -. -.SH "AUTHOR" -Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. -. -.SH "DOCUMENTATION" -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\. +.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP +The $EDITOR that is used for all interactive commands. +.TP +.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP +The name of the environment. When this option is added to a command, the command will run only against the named environment. +.TP +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. +.TP +.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP +The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP. +.TP +.B \fB\-h\fP, \fB\-\-help\fP +Shows help for the command. +.TP +.B \fB\-k KEY\fP, \fB\-\-key KEY\fP +The private key that Knife will use to sign requests made by the API client to the server. +.TP +.B \fB\-\-no\-color\fP +Indicates that color will not be used in the output. +.TP +.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP +The user password. +.TP +.B \fB\-\-print\-after\fP +Indicates that data will be shown after a destructive operation. +.TP +.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP +The URL for the server. +.TP +.B \fB\-u USER\fP, \fB\-\-user USER\fP +The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key. +.TP +.B \fB\-v\fP, \fB\-\-version\fP +The version of the chef\-client. +.TP +.B \fB\-V\fP, \fB\-\-verbose\fP +Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. +.TP +.B \fB\-y\fP, \fB\-\-yes\fP +Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation). +.UNINDENT +.SH BULK DELETE +.sp +The \fBbulk delete\fP argument is used to delete any API client that matches a pattern defined by a regular expression. The regular expression must be within quotes and not be surrounded by forward slashes (/). +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife client bulk delete REGEX +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.SH CREATE +.sp +The \fBcreate\fP argument is used to create a new API client. This process will generate an RSA key pair for the named API client. The public key will be stored on the server and the private key will be displayed on \fBSTDOUT\fP or written to a named file. +.INDENT 0.0 +.IP \(bu 2 +For the chef\-client, the private key should be copied to the system as /etc/chef/client.pem. +.IP \(bu 2 +For Knife, the private key is typically copied to ~/.chef/client_name.pem and referenced in the knife.rb configuration file. +.UNINDENT +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife client create CLIENT_NAME (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-a\fP, \fB\-\-admin\fP +Indicates that a client will be created as an admin client. This is required when users of the open source server need to access the Chef Server API as an administrator. This option only works when used with the open source server and will have no effect when used with Hosted Chef or Private Chef. +.UNINDENT +.sp +\fBExamples\fP +.sp +To create a Chef Admin client with the name "exampleorg" and save its private key to a file, enter: +.sp +.nf +.ft C +$ knife client create exampleorg \-a \-f "/etc/chef/client.pem" +.ft P +.fi +.sp +When running the \fBcreate\fP argument on Hosted Chef or Private Chef, be sure to omit the \fB\-a\fP option: +.sp +.nf +.ft C +$ knife client create exampleorg \-f "/etc/chef/client.pem" +.ft P +.fi +.SH DELETE +.sp +The \fBdelete\fP argument is used to delete a registered API client. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife client delete CLIENT_NAME +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To delete a client with the name "client_foo", enter: +.sp +.nf +.ft C +$ knife client delete client_foo +.ft P +.fi +.sp +Type \fBY\fP to confirm a deletion. +.SH EDIT +.sp +The \fBedit\fP argument is used to edit the details of a registered API client. When this argument is run, Knife will open $EDITOR to enable editing of the \fBadmin\fP attribute. (None of the other attributes should be changed using this argument.) When finished, Knife will update the server with those changes. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife client edit CLIENT_NAME +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To edit a client with the name "exampleorg", enter: +.sp +.nf +.ft C +$ knife client edit exampleorg +.ft P +.fi +.SH LIST +.sp +The \fBlist\fP argument is used to view a list of registered API client. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife client list (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-w\fP, \fB\-\-with\-uri\fP +Indicates that the corresponding URIs will be shown. +.UNINDENT +.sp +\fBExamples\fP +.sp +To verify the API client list for the server, enter: +.sp +.nf +.ft C +$ knife client list +.ft P +.fi +.sp +to return something similar to: +.sp +.nf +.ft C +exampleorg +i\-12345678 +rs\-123456 +.ft P +.fi +.sp +To verify that an API client can authenticate to the +server correctly, try getting a list of clients using \fB\-u\fP and \fB\-k\fP options to specify its name and private key: +.sp +.nf +.ft C +$ knife client list \-u ORGNAME \-k .chef/ORGNAME.pem +.ft P +.fi +.SH REREGISTER +.sp +The \fBreregister\fP argument is used to regenerate an RSA key pair for an API client. The public key will be stored on the server and the private key will be displayed on \fBSTDOUT\fP or written to a named file. +.IP Note +Running this argument will invalidate the previous RSA key pair, making it unusable during authentication to the server. +.RE +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife client reregister CLIENT_NAME (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. +.UNINDENT +.sp +\fBExamples\fP +.sp +To regenerate the RSA key pair for a client named "testclient" and save it to a file named "rsa_key", enter: +.sp +.nf +.ft C +$ knife client regenerate testclient \-f rsa_key +.ft P +.fi +.SH SHOW +.sp +The \fBshow\fP argument is used to show the details of an API client. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife client show CLIENT_NAME (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-a ATTR\fP, \fB\-\-attribute ATTR\fP +The attribute (or attributes) to show. +.UNINDENT +.sp +\fBExamples\fP +.sp +To view a client named "testclient", enter: +.sp +.nf +.ft C +$ knife client show testclient +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +admin: false +chef_type: client +json_class: Chef::ApiClient +name: testclient +public_key: +.ft P +.fi +.sp +To view information in JSON format, use the \fB\-F\fP common option as part of the command like this: +.sp +.nf +.ft C +$ knife role show devops \-F json +.ft P +.fi +.sp +Other formats available include \fBtext\fP, \fByaml\fP, and \fBpp\fP. +.SH AUTHOR +Opscode +.SH COPYRIGHT +This work is licensed under a Creative Commons Attribution 3.0 Unported License +.\" Generated by docutils manpage writer. . -.SH "CHEF" -Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR diff --git a/distro/common/man/man1/knife-configure.1 b/distro/common/man/man1/knife-configure.1 index aef0507f88..8ca138f3d4 100644 --- a/distro/common/man/man1/knife-configure.1 +++ b/distro/common/man/man1/knife-configure.1 @@ -1,58 +1,152 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 -. -.TH "KNIFE\-CONFIGURE" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" -. -.SH "NAME" -\fBknife\-configure\fR \- Generate configuration files for knife or Chef Client -. -.SH "SYNOPSIS" -\fBknife\fR \fBconfigure\fR [client] \fI(options)\fR -. -.SH "DESCRIPTION" -Generates a knife\.rb configuration file interactively\. When given the \-\-initial option, also creates a new administrative user\. -. -.SH "CONFIGURE SUBCOMMANDS" -\fBknife configure\fR \fI(options)\fR -. +.TH "KNIFE-CONFIGURE" "1" "Chef 11.8" "" "knife configure" +.SH NAME +knife-configure \- The man page for the knife configure subcommand. +. +.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 +The \fBknife configure\fP subcommand is used to create the knife.rb and client.rb files so that they can be distributed to workstations and nodes. +.sp +\fBCommon Options\fP +.sp +The following options can be run with all Knife sub\-commands and plug\-ins: +.INDENT 0.0 .TP -\fB\-i\fR, \fB\-\-initial\fR -Create an initial API Client -. +.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP +The configuration file to use. .TP -\fB\-r\fR, \fB\-\-repository REPO\fR -The path to your chef\-repo -. -.P -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\. -. -.P -\fBknife configure client\fR \fIdirectory\fR -. -.P -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\. -. -.SH "EXAMPLES" -. -.IP "\(bu" 4 -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\. -. -.IP -user@host$ knife configure \-i Please enter the chef server URL: [http://localhost:4000] Please enter a clientname for the new client: [username] Please enter the existing admin clientname: [chef\-webui] Please enter the location of the existing admin client\'s private key: [/etc/chef/webui\.pem] Please enter the validation clientname: [chef\-validator] Please enter the location of the validation key: [/etc/chef/validation\.pem] Please enter the path to a chef repository (or leave blank): Creating initial API user\.\.\. Created (or updated) client[username] Configuration file written to /home/username/\.chef/knife\.rb -. -.IP -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\. -. -.IP "" 0 -. -.SH "SEE ALSO" -\fBknife\fR(1) \fBknife\-client\fR(1) -. -.SH "AUTHOR" -Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. -. -.SH "DOCUMENTATION" -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\. +.B \fB\-\-color\fP +Indicates that colored output will be used. +.TP +.B \fB\-d\fP, \fB\-\-disable\-editing\fP +Indicates that $EDITOR will not be opened; data will be accepted as\-is. +.TP +.B \fB\-\-defaults\fP +Indicates that Knife will use the default value, instead of asking a user to provide one. +.TP +.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP +The $EDITOR that is used for all interactive commands. +.TP +.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP +The name of the environment. When this option is added to a command, the command will run only against the named environment. +.TP +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. +.TP +.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP +The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP. +.TP +.B \fB\-h\fP, \fB\-\-help\fP +Shows help for the command. +.TP +.B \fB\-k KEY\fP, \fB\-\-key KEY\fP +The private key that Knife will use to sign requests made by the API client to the server. +.TP +.B \fB\-\-no\-color\fP +Indicates that color will not be used in the output. +.TP +.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP +The user password. +.TP +.B \fB\-\-print\-after\fP +Indicates that data will be shown after a destructive operation. +.TP +.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP +The URL for the server. +.TP +.B \fB\-u USER\fP, \fB\-\-user USER\fP +The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key. +.TP +.B \fB\-v\fP, \fB\-\-version\fP +The version of the chef\-client. +.TP +.B \fB\-V\fP, \fB\-\-verbose\fP +Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. +.TP +.B \fB\-y\fP, \fB\-\-yes\fP +Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation). +.UNINDENT +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife configure (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This subcommand has the following options: +.INDENT 0.0 +.TP +.B \fB\-\-admin\-client\-name NAME\fP +The name of the client, typically the name of the admin client. +.TP +.B \fB\-\-admin\-client\-key PATH\fP +The path to the private key used by the client, typically a file named \fBadmin.pem\fP. +.TP +.B \fB\-i\fP, \fB\-\-initial\fP +Use to create a API client, typically an administrator client on a freshly\-installed server. +.TP +.B \fB\-r REPO\fP, \fB\-\-repository REPO\fP +The path to the chef\-repo. +.TP +.B \fB\-\-validation\-client\-name NAME\fP +The name of the validation client. +.TP +.B \fB\-\-validation\-key PATH\fP +The path to the validation key used by the client, typically a file named \fBvalidation.pem\fP. +.UNINDENT +.sp +\fBExamples\fP +.sp +To create a knife.rb file, enter: +.sp +.nf +.ft C +$ knife configure +.ft P +.fi +.sp +To configure a client.rb, enter: +.sp +.nf +.ft C +$ knife configure client \(aq/directory\(aq +.ft P +.fi +.SH AUTHOR +Opscode +.SH COPYRIGHT +This work is licensed under a Creative Commons Attribution 3.0 Unported License +.\" Generated by docutils manpage writer. . -.SH "CHEF" -Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR diff --git a/distro/common/man/man1/knife-cookbook-site.1 b/distro/common/man/man1/knife-cookbook-site.1 index 9970854f2f..049900fce8 100644 --- a/distro/common/man/man1/knife-cookbook-site.1 +++ b/distro/common/man/man1/knife-cookbook-site.1 @@ -1,145 +1,479 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 -. -.TH "KNIFE\-COOKBOOK\-SITE" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" -. -.SH "NAME" -\fBknife\-cookbook\-site\fR \- Install and update open source cookbooks -. -.SH "SYNOPSIS" -\fBknife\fR \fBcookbook site\fR \fIsub\-command\fR \fI(options)\fR -. -.SH "COOKBOOK SITE SUB\-COMMANDS" -\fBknife cookbook site\fR provides the following subcommands: -. -.SH "INSTALL" -\fBcookbook site install COOKBOOK [VERSION]\fR \fI(options)\fR -. +.TH "KNIFE-COOKBOOK-SITE" "1" "Chef 11.8" "" "knife cookbook site" +.SH NAME +knife-cookbook-site \- The man page for the knife cookbook site subcommand. +. +.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 +The Cookbooks Site API is used to provide access to the cookbooks community hosted at \fI\%https://cookbooks.opscode.com\fP. All of the cookbooks in the community are accessible through a REST API located at \fI\%https://cookbooks.opscode.com/api/v1/\fP by using any of the supported endpoints. In most cases, using Knife and the \fBknife cookbook site\fP sub\-command (and any of its arguments) is the recommended method of interacting with these cookbooks, but in some cases, using the REST API directly may make sense. +.sp +The \fBknife cookbook site\fP subcommand is used to interact with cookbooks that are located at \fI\%https://cookbooks.opscode.com\fP. A user account is required for any community actions that write data to this site. The following arguments do not require a user account: \fBdownload\fP, \fBsearch\fP, \fBinstall\fP, and \fBlist\fP. +.sp +This subcommand has the following syntax: +.sp +.nf +.ft C +$ knife cookbook site [ARGUMENT] (options) +.ft P +.fi +.SH COMMON OPTIONS +.sp +The following options can be run with all Knife sub\-commands and plug\-ins: +.INDENT 0.0 .TP -\fB\-D\fR, \fB\-\-skip\-dependencies\fR -Skip automatic installation of dependencies\. -. +.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP +The configuration file to use. .TP -\fB\-o\fR, \fB\-\-cookbook\-path PATH\fR -Install cookbooks to PATH -. +.B \fB\-\-color\fP +Indicates that colored output will be used. .TP -\fB\-B\fR, \fB\-\-branch BRANCH\fR -Default branch to work with [defaults to master] -. -.P -Uses git(1) version control in conjunction with the cookbook site to install community contributed cookbooks to your local cookbook repository\. Running \fBknife cookbook site install\fR does the following: -. -.IP "1." 4 -A new "pristine copy" branch is created in git for tracking the upstream; -. -.IP "2." 4 -All existing cookbooks are removed from the branch; -. -.IP "3." 4 -The cookbook is downloaded from the cookbook site in tarball form; -. -.IP "4." 4 -The downloaded cookbook is untarred, and its contents commited via git; -. -.IP "5." 4 -The pristine copy branch is merged into the master branch\. -. -.IP "" 0 -. -.P -By installing cookbook with this process, you can locally modify the upstream cookbook in your master branch and let git maintain your changes as a separate patch\. When an updated upstream version becomes available, you will be able to merge the upstream changes while maintaining your local modifications\. -. -.P -Unless \fI\-\-skip\-dependencies\fR is specified, the process is applied recursively to all the cookbooks \fICOOKBOOK\fR depends on (via metadata \fIdependencies\fR)\. -. -.SH "DOWNLOAD" -\fBknife cookbook site download COOKBOOK [VERSION]\fR \fI(options)\fR -. +.B \fB\-d\fP, \fB\-\-disable\-editing\fP +Indicates that $EDITOR will not be opened; data will be accepted as\-is. .TP -\fB\-f\fR, \fB\-\-file FILE\fR -The filename to write to -. +.B \fB\-\-defaults\fP +Indicates that Knife will use the default value, instead of asking a user to provide one. .TP -\fB\-\-force\fR -Force download deprecated cookbook -. -.P -Downloads a specific cookbook from the Community site, optionally specifying a certain version\. -. -.SH "LIST" -\fBknife cookbook site list\fR \fI(options)\fR -. +.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP +The $EDITOR that is used for all interactive commands. .TP -\fB\-w\fR, \fB\-\-with\-uri\fR -Show corresponding URIs -. -.P -Lists available cookbooks from the Community site\. -. -.SH "SEARCH" -\fBknife cookbook site search QUERY\fR \fI(options)\fR -. -.P -Searches for available cookbooks matching the specified query\. -. -.SH "SHARE" -\fBknife cookbook site share COOKBOOK CATEGORY\fR \fI(options)\fR -. +.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP +The name of the environment. When this option is added to a command, the command will run only against the named environment. .TP -\fB\-k\fR, \fB\-\-key KEY\fR -API Client Key -. +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. .TP -\fB\-u\fR, \fB\-\-user USER\fR -API Client Username -. +.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP +The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP. .TP -\fB\-o\fR, \fB\-\-cookbook\-path PATH:PATH\fR -A colon\-separated path to look for cookbooks in -. -.P -Uploads the specified cookbook using the given category to the Opscode cookbooks site\. Requires a login user and certificate for the Opscode Cookbooks site\. By default, knife will use the username and API key you\'ve configured in your configuration file; otherwise you must explicitly set these values on the command line or use an alternate configuration file\. -. -.SH "UNSHARE" -\fBknife cookbook site unshare COOKBOOK\fR -. -.P -Stops sharing the specified cookbook on the Opscode cookbooks site\. -. -.SH "SHOW" -\fBknife cookbook site show COOKBOOK [VERSION]\fR \fI(options)\fR -. -.P -Shows information from the site about a particular cookbook\. -. -.SH "DESCRIPTION" -The cookbook site, \fIhttp://community\.opscode\.com/\fR, is a cookbook distribution service operated by Opscode\. This service provides users with a central location to publish cookbooks for sharing with other community members\. -. -.P -\fBknife cookbook site\fR commands provide an interface to the cookbook site\'s HTTP API\. For commands that read data from the API, no account is required\. In order to upload cookbooks using the \fBknife cookbook site share\fR command, you must create an account on the cookbook site and configure your credentials via command line option or in your knife configuration file\. -. -.SH "EXAMPLES" -Uploading cookbooks to the Opscode cookbooks site: -. -.IP "" 4 -. +.B \fB\-h\fP, \fB\-\-help\fP +Shows help for the command. +.TP +.B \fB\-k KEY\fP, \fB\-\-key KEY\fP +The private key that Knife will use to sign requests made by the API client to the server. +.TP +.B \fB\-\-no\-color\fP +Indicates that color will not be used in the output. +.TP +.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP +The user password. +.TP +.B \fB\-\-print\-after\fP +Indicates that data will be shown after a destructive operation. +.TP +.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP +The URL for the server. +.TP +.B \fB\-u USER\fP, \fB\-\-user USER\fP +The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key. +.TP +.B \fB\-v\fP, \fB\-\-version\fP +The version of the chef\-client. +.TP +.B \fB\-V\fP, \fB\-\-verbose\fP +Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. +.TP +.B \fB\-y\fP, \fB\-\-yes\fP +Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation). +.UNINDENT +.SH DOWNLOAD +.sp +The \fBdownload\fP argument is used to download a cookbook from the community website. A cookbook will be downloaded as a tar.gz archive and placed in the current working directory. If a cookbook (or cookbook version) has been deprecated and the \fB\-\-force\fP option is not used, Knife will alert the user that the cookbook is deprecated and then will provide the name of the most recent non\-deprecated version of that cookbook. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp .nf - -knife cookbook site share example Other \-k ~/\.chef/USERNAME\.pem \-u USERNAME -. +.ft C +$ knife cookbook site download COOKBOOK_NAME [COOKBOOK_VERSION] (options) +.ft P .fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fBCOOKBOOK_VERSION\fP +The version of a cookbook to be downloaded. If a cookbook has only one version, this option does not need to be specified. If a cookbook has more than one version and this option is not specified, Knife will prompt for a version. +.TP +.B \fB\-f\fP, \fB\-\-force\fP +Indicates that an existing directory will be overwritten. +.UNINDENT +.sp +\fBExamples\fP +.sp +To download the cookbook "getting\-started", enter: +.sp +.nf +.ft C +$ knife cookbook site download getting\-started +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +Downloading getting\-started from the cookbooks site at version 0.3.0 to + /Users/sdanna/opscodesupport/getting\-started\-0.3.0.tar.gz +Cookbook saved: /Users/sdanna/opscodesupport/getting\-started\-0.3.0.tar.gz +.ft P +.fi +.SH INSTALL +.sp +The \fBinstall\fP argument is used to install a cookbook that has been downloaded from the community site to a local git repository . This action uses the git version control system in conjunction with the \fI\%https://cookbooks.opscode.com\fP site to install community\-contributed cookbooks to the local chef\-repo. Using this argument does the following: +.INDENT 0.0 +.INDENT 3.5 +.INDENT 0.0 +.IP 1. 3 +A new "pristine copy" branch is created in git for tracking the upstream. +.IP 2. 3 +All existing versions of a cookbook are removed from the branch. +.IP 3. 3 +The cookbook is downloaded from \fI\%https://cookbooks.opscode.com\fP in the tar.gz format. +.IP 4. 3 +The downloaded cookbook is untarred and its contents are committed to git and a tag is created. +.IP 5. 3 +The "pristine copy" branch is merged into the master branch. +.UNINDENT +.UNINDENT +.UNINDENT +.sp +This process allows the upstream cookbook in the master branch to be modified while letting git maintain changes as a separate patch. When an updated upstream version becomes available, those changes can be merged while maintaining any local modifications. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook site install COOKBOOK_NAME [COOKBOOK_VERSION] (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-b\fP, \fB\-\-use\-current\-branch\fP +Indicates that the current branch will be used. +.TP +.B \fB\-B BRANCH\fP, \fB\-\-branch BRANCH\fP +The name of the default branch. This will default to the master branch. +.TP +.B \fBCOOKBOOK_VERSION\fP +The version of the cookbook to be installed. If a version is not specified, the most recent version of the cookbook will be installed. +.TP +.B \fB\-D\fP, \fB\-\-skip\-dependencies\fP +Indicates that all cookbooks to which the installed cookbook has a dependency will not be installed. +.TP +.B \fB\-o PATH:PATH\fP, \fB\-\-cookbook\-path PATH:PATH\fP +The directory in which cookbook are created. This can be a colon\-separated path. +.UNINDENT +.sp +\fBExamples\fP +.sp +To install the cookbook "getting\-started", enter: +.sp +.nf +.ft C +$ knife cookbook site install getting\-started +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +Installing getting\-started to /Users/sdanna/opscodesupport/.chef/../cookbooks +Checking out the master branch. +Creating pristine copy branch chef\-vendor\-getting\-started +Downloading getting\-started from the cookbooks site at version 0.3.0 to + /Users/sdanna/opscodesupport/.chef/../cookbooks/getting\-started.tar.gz +Cookbook saved: /Users/sdanna/opscodesupport/.chef/../cookbooks/getting\-started.tar.gz +Removing pre\-existing version. +Uncompressing getting\-started version /Users/sdanna/opscodesupport/.chef/../cookbooks. +removing downloaded tarball +1 files updated, committing changes +Creating tag cookbook\-site\-imported\-getting\-started\-0.3.0 +Checking out the master branch. +Updating 4d44b5b..b4c32f2 +Fast\-forward + cookbooks/getting\-started/README.rdoc | 4 +++ + cookbooks/getting\-started/attributes/default.rb | 1 + + cookbooks/getting\-started/metadata.json | 29 ++++++++++++++++++++ + cookbooks/getting\-started/metadata.rb | 6 ++++ + cookbooks/getting\-started/recipes/default.rb | 23 +++++++++++++++ + .../templates/default/chef\-getting\-started.txt.erb | 5 +++ + 6 files changed, 68 insertions(+), 0 deletions(\-) + create mode 100644 cookbooks/getting\-started/README.rdoc + create mode 100644 cookbooks/getting\-started/attributes/default.rb + create mode 100644 cookbooks/getting\-started/metadata.json + create mode 100644 cookbooks/getting\-started/metadata.rb + create mode 100644 cookbooks/getting\-started/recipes/default.rb + create mode 100644 cookbooks/getting\-started/templates/default/chef\-getting\-started.txt.erb +Cookbook getting\-started version 0.3.0 successfully installed +.ft P +.fi +.SH LIST +.sp +The \fBlist\fP argument is used to view a list of cookbooks that are currently available at \fI\%https://cookbooks.opscode.com\fP. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook site list +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-w\fP, \fB\-\-with\-uri\fP +Indicates that the corresponding URIs will be shown. +.UNINDENT +.sp +\fBExamples\fP +.sp +To view a list of cookbooks at \fI\%https://cookbooks.opscode.com\fP server, enter: +.sp +.nf +.ft C +$ knife cookbook site list +.ft P +.fi +.sp +to return: +.sp +.nf +.ft C +1password homesick rabbitmq +7\-zip hostname rabbitmq\-management +AmazonEC2Tag hosts rabbitmq_chef +R hosts\-awareness rackspaceknife +accounts htop radiant +ack\-grep hudson rails +activemq icinga rails_enterprise +ad id3lib redis\-package +ad\-likewise iftop redis2 +ant iis redmine +[...truncated...] +.ft P +.fi +.SH SEARCH +.sp +The \fBsearch\fP argument is used to search for a cookbook at \fI\%https://cookbooks.opscode.com\fP. A search query is used to return a list of cookbooks at \fI\%https://cookbooks.opscode.com\fP and uses the same syntax as the \fBknife search\fP sub\-command. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook site search SEARCH_QUERY (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To search for all of the cookbooks that can be used with Apache, enter: +.sp +.nf +.ft C +$ knife cookbook site search apache* +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +apache2: + cookbook: http://cookbooks.opscode.com/api/v1/cookbooks/apache2 + cookbook_description: Installs and configures apache2 using Debian symlinks with helper definitions + cookbook_maintainer: opscode + cookbook_name: apache2 +instiki: + cookbook: http://cookbooks.opscode.com/api/v1/cookbooks/instiki + cookbook_description: Installs instiki, a Ruby on Rails wiki server under passenger+Apache2. + cookbook_maintainer: jtimberman + cookbook_name: instiki +kickstart: + cookbook: http://cookbooks.opscode.com/api/v1/cookbooks/kickstart + cookbook_description: Creates apache2 vhost and serves a kickstart file. + cookbook_maintainer: opscode + cookbook_name: kickstart +[...truncated...] +.ft P +.fi +.SH SHARE +.sp +The \fBshare\fP argument is used to add a cookbook to \fI\%https://cookbooks.opscode.com\fP. This action will require a user account and a certificate for \fI\%http://community.opscode.com\fP. By default, Knife will use the user name and API key that is identified in the configuration file used during the upload; otherwise these values must be specified on the command line or in an alternate configuration file. If a cookbook already exists on \fI\%https://cookbooks.opscode.com\fP, then only an owner or maintainer of that cookbook can make updates. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook site share COOKBOOK_NAME CATEGORY (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fBCATEGORY\fP +The cookbook category: \fBDatabases\fP, \fBWeb Servers\fP, \fBProcess Management\fP, \fBMonitoring and Trending\fP, \fBProgramming Languages\fP, \fBPackage Management\fP, \fBApplications\fP, \fBNetworking\fP, \fBOperations Systems and Virtualization\fP, \fBUtilities\fP, or \fBOther\fP. +.TP +.B \fB\-o PATH:PATH\fP, \fB\-\-cookbook\-path PATH:PATH\fP +The directory in which cookbook are created. This can be a colon\-separated path. +.UNINDENT +.sp +\fBExamples\fP +.sp +To share a cookbook named "apache2": +.sp +.nf +.ft C +$ knife cookbook site share "apache2" "Web Servers" +.ft P +.fi +.SH SHOW +.sp +The \fBshow\fP argument is used to view information about a cookbook on \fI\%https://cookbooks.opscode.com\fP. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook site show COOKBOOK_NAME [COOKBOOK_VERSION] +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fBCOOKBOOK_VERSION\fP +The version of a cookbook to be shown. If a cookbook has only one version, this option does not need to be specified. If a cookbook has more than one version and this option is not specified, a list of cookbook versions will be returned. +.UNINDENT +.sp +\fBExamples\fP +.sp +To show the details for a cookbook named "haproxy": +.sp +.nf +.ft C +$ knife cookbook site show haproxy +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +average_rating: +category: Networking +created_at: 2009\-10\-25T23:51:07Z +description: Installs and configures haproxy +external_url: +latest_version: http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/1_0_3 +maintainer: opscode +name: haproxy +updated_at: 2011\-06\-30T21:53:25Z +versions: + http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/1_0_3 + http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/1_0_2 + http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/1_0_1 + http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/1_0_0 + http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/0_8_1 + http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/0_8_0 + http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/0_7_0 +.ft P +.fi +.sp +To view information in JSON format, use the \fB\-F\fP common option as part of the command like this: +.sp +.nf +.ft C +$ knife role show devops \-F json +.ft P +.fi +.sp +Other formats available include \fBtext\fP, \fByaml\fP, and \fBpp\fP. +.SH UNSHARE +.sp +The \fBunshare\fP argument is used to stop the sharing of a cookbook at \fI\%https://cookbooks.opscode.com\fP. Only the maintainer of a cookbook may perform this action. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook site unshare COOKBOOK_NAME +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To unshare a cookbook named "getting\-started", enter: +.sp +.nf +.ft C +$ knife cookbook site unshare getting\-started +.ft P +.fi +.SH AUTHOR +Opscode +.SH COPYRIGHT +This work is licensed under a Creative Commons Attribution 3.0 Unported License +.\" Generated by docutils manpage writer. . -.IP "" 0 -. -.SH "SEE ALSO" -\fBknife\-cookbook(1)\fR \fIhttp://community\.opscode\.com/cookbooks\fR -. -.SH "AUTHOR" -Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. -. -.SH "DOCUMENTATION" -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\. -. -.SH "CHEF" -Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR diff --git a/distro/common/man/man1/knife-cookbook.1 b/distro/common/man/man1/knife-cookbook.1 index c5b04c8526..82e991687c 100644 --- a/distro/common/man/man1/knife-cookbook.1 +++ b/distro/common/man/man1/knife-cookbook.1 @@ -1,332 +1,644 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 -. -.TH "KNIFE\-COOKBOOK" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" -. -.SH "NAME" -\fBknife\-cookbook\fR \- upload and manage chef cookbooks -. -.SH "SYNOPSIS" -\fBknife\fR \fBcookbook\fR \fIsub\-command\fR \fI(options)\fR -. -.SH "SUB\-COMMANDS" -\fBknife cookbook\fR supports the following sub commands: -. -.SH "LIST" -\fBknife cookbook list\fR \fI(options)\fR -. -.TP -\fB\-a\fR, \fB\-\-all\fR -show all versions of a cookbook instead of just the most recent -. -.TP -\fB\-w\fR, \fB\-\-with\-uri\fR -show corresponding uris -. -.P -Lists the cookbooks available on the Chef server\. -. -.SH "SHOW" -\fBknife cookbook show cookbook [version] [part] [filename]\fR \fI(options)\fR -. -.TP -\fB\-f\fR, \fB\-\-fqdn fqdn\fR -the fqdn of the host to see the file for -. -.TP -\fB\-p\fR, \fB\-\-platform platform\fR -the platform to see the file for -. -.TP -\fB\-v\fR, \fB\-\-platform\-version version\fR -the platform version to see the file for -. +.TH "KNIFE-COOKBOOK" "1" "Chef 11.8" "" "knife cookbook" +.SH NAME +knife-cookbook \- The man page for the knife cookbook subcommand. +. +.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 +A cookbook is the fundamental unit of configuration and policy distribution. Each cookbook defines a scenario, such as everything needed to install and configure MySQL, and then it contains all of the components that are required to support that scenario, including: +.INDENT 0.0 +.IP \(bu 2 +Attribute values that are set on nodes +.IP \(bu 2 +Definitions that allow the creation of reusable collections of resources +.IP \(bu 2 +File distributions +.IP \(bu 2 +Libraries that extend the chef\-client and/or provide helpers to Ruby code +.IP \(bu 2 +Recipes that specify which resources to manage and the order in which those resources will be applied +.IP \(bu 2 +Custom resources and providers +.IP \(bu 2 +Templates +.IP \(bu 2 +Versions +.IP \(bu 2 +Metadata about recipes (including dependencies), version constraints, supported platforms, and so on +.UNINDENT +.sp +The \fBknife cookbook\fP subcommand is used to interact with cookbooks that are located on the server or the local chef\-repo. +.sp +This subcommand has the following syntax: +.sp +.nf +.ft C +$ knife cookbook [ARGUMENT] (options) +.ft P +.fi +.SH COMMON OPTIONS +.sp +The following options can be run with all Knife sub\-commands and plug\-ins: +.INDENT 0.0 .TP -\fB\-w\fR, \fB\-\-with\-uri\fR -Show corresponding URIs -. -.P -show a particular part of a \fIcookbook\fR for the specified \fIversion\fR\. \fIpart\fR can be one of: -. -.IP "\(bu" 4 -\fIattributes\fR -. -.IP "\(bu" 4 -\fIdefinitions\fR -. -.IP "\(bu" 4 -\fIfiles\fR -. -.IP "\(bu" 4 -\fIlibraries\fR -. -.IP "\(bu" 4 -\fIproviders\fR -. -.IP "\(bu" 4 -\fIrecipes\fR -. -.IP "\(bu" 4 -\fIresources\fR -. -.IP "\(bu" 4 -\fItemplates\fR -. -.IP "" 0 -. -.SH "UPLOAD" -\fBknife cookbook upload [cookbooks\.\.\.]\fR \fI(options)\fR -. +.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP +The configuration file to use. .TP -\fB\-a\fR, \fB\-\-all\fR -upload all cookbooks, rather than just a single cookbook -. +.B \fB\-\-color\fP +Indicates that colored output will be used. .TP -\fB\-o\fR, \fB\-\-cookbook\-path path:path\fR -a colon\-separated path to look for cookbooks in -. +.B \fB\-d\fP, \fB\-\-disable\-editing\fP +Indicates that $EDITOR will not be opened; data will be accepted as\-is. .TP -\fB\-d\fR, \fB\-\-upload\-dependencies\fR -Uploads additional cookbooks that this cookbook lists in as dependencies in its metadata\. -. +.B \fB\-\-defaults\fP +Indicates that Knife will use the default value, instead of asking a user to provide one. .TP -\fB\-E\fR, \fB\-\-environment ENVIRONMENT\fR -An \fIENVIRONMENT\fR to apply the uploaded cookbooks to\. Specifying this option will cause knife to edit the \fIENVIRONMENT\fR to place a strict version constraint on the cookbook version(s) uploaded\. -. +.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP +The $EDITOR that is used for all interactive commands. .TP -\fB\-\-freeze\fR -Sets the frozen flag on the uploaded cookbook(s) Any future attempt to modify the cookbook without changing the version number will return an error unless \-\-force is specified\. -. +.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP +The name of the environment. When this option is added to a command, the command will run only against the named environment. .TP -\fB\-\-force\fR -Overrides the frozen flag on a cookbook, allowing you to overwrite a cookbook version that has previously been uploaded with the \-\-freeze option\. -. -.P -Uploads one or more cookbooks from your local cookbook repository(ies) to the Chef Server\. Only files that don\'t yet exist on the server will be uploaded\. -. -.P -As the command parses the name args as 1\.\.n cookbook names: \fBknife cookbook upload COOKBOOK COOKBOOK \.\.\.\fR works for one to many cookbooks\. -. -.SH "DOWNLOAD" -\fBknife cookbook download cookbook [version]\fR \fI(options)\fR -. +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. .TP -\fB\-d\fR, \fB\-\-dir download_directory\fR -the directory to download the cookbook into -. +.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP +The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP. .TP -\fB\-f\fR, \fB\-\-force\fR -overwrite an existing directory with the download -. +.B \fB\-h\fP, \fB\-\-help\fP +Shows help for the command. .TP -\fB\-n\fR, \fB\-\-latest\fR -download the latest version of the cookbook -. -.P -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\. -. -.SH "DELETE" -\fBknife cookbook delete cookbook [version]\fR \fI(options)\fR -. +.B \fB\-k KEY\fP, \fB\-\-key KEY\fP +The private key that Knife will use to sign requests made by the API client to the server. .TP -\fB\-a\fR, \fB\-\-all\fR -delete all versions -. +.B \fB\-\-no\-color\fP +Indicates that color will not be used in the output. .TP -\fB\-p\fR, \fB\-\-purge\fR -purge files from backing store\. this will disable any cookbook that contains any of the same files as the cookbook being purged\. -. -.P -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\. -. -.SH "BULK DELETE" -\fBknife cookbook bulk delete regex\fR \fI(options)\fR -. +.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP +The user password. .TP -\fB\-p\fR, \fB\-\-purge\fR -purge files from backing store\. this will disable any cookbook that contains any of the same files as the cookbook being purged\. -. -.P -delete cookbooks on the chef server based on a regular expression\. the regular expression (\fIregex\fR) should be in quotes, not in //\'s\. -. -.SH "COOKBOOK CREATE" -\fBknife cookbook create cookbook\fR \fI(options)\fR -. +.B \fB\-\-print\-after\fP +Indicates that data will be shown after a destructive operation. .TP -\fB\-o\fR, \fB\-\-cookbook\-path path\fR -the directory where the cookbook will be created -. +.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP +The URL for the server. .TP -\fB\-r\fR, \fB\-\-readme\-format format\fR -format of the readme file md, mkd, txt, rdoc -. +.B \fB\-u USER\fP, \fB\-\-user USER\fP +The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key. .TP -\fB\-C\fR, \fB\-\-copyright copyright\fR -name of copyright holder -. +.B \fB\-v\fP, \fB\-\-version\fP +The version of the chef\-client. .TP -\fB\-i\fR, \fB\-\-license license\fR -license for cookbook, apachev2 or none -. +.B \fB\-V\fP, \fB\-\-verbose\fP +Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. .TP -\fB\-m\fR, \fB\-\-email email\fR -email address of cookbook maintainer -. -.P -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\. -. -.IP "\(bu" 4 +.B \fB\-y\fP, \fB\-\-yes\fP +Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation). +.UNINDENT +.SH BULK DELETE +.sp +The \fBbulk delete\fP argument is used to delete cookbook files that match a pattern defined by a regular expression. The regular expression must be within quotes and not be surrounded by forward slashes (/). +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook bulk delete REGEX (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-p\fP, \fB\-\-purge\fP +Indicates that a cookbook (or cookbook version) will be removed entirely from the server. This action should be used carefully because only one copy of any single file is stored on the server. Consequently, purging a cookbook will disable any other cookbook that references one or more files from a cookbook that has been purged. +.UNINDENT +.sp +\fBExamples\fP +.sp +To bulk delete many cookbooks, use a regular expression to define the pattern: +.sp +.nf +.ft C +$ knife cookbook bulk delete "^[0\-9]{3}$" \-p +.ft P +.fi +.SH CREATE +.sp +The \fBcreate\fP argument is used to create a new cookbook directory on the local machine, including the following directories and files: +.INDENT 0.0 +.INDENT 3.5 +.INDENT 0.0 +.IP \(bu 2 cookbook/attributes -. -.IP "\(bu" 4 +.IP \(bu 2 +cookbook/CHANGELOG.md +.IP \(bu 2 cookbook/definitions -. -.IP "\(bu" 4 +.IP \(bu 2 cookbook/files/default -. -.IP "\(bu" 4 +.IP \(bu 2 cookbook/libraries -. -.IP "\(bu" 4 -cookbook/metadata\.rb -. -.IP "\(bu" 4 +.IP \(bu 2 +cookbook/metadata.rb +.IP \(bu 2 cookbook/providers -. -.IP "\(bu" 4 -cookbook/readme\.md -. -.IP "\(bu" 4 -cookbook/recipes/default\.rb -. -.IP "\(bu" 4 +.IP \(bu 2 +cookbook/README.md (or .rdoc) +.IP \(bu 2 +cookbook/recipes/default.rb +.IP \(bu 2 cookbook/resources -. -.IP "\(bu" 4 +.IP \(bu 2 cookbook/templates/default -. -.IP "" 0 -. -.P -supported readme formats are \'md\' (default), \'mkd\', \'txt\', \'rdoc\'\. the readme file will be written with the specified extension and a set of helpful starting headers\. -. -.P -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\. -. -.P -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\. -. -.P -specify \fB\-m\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\. -. -.P -the cookbook copyright, license, email and readme_format settings can be filled in the \fBknife\.rb\fR, for example with default values: -. -.IP "" 4 -. +.UNINDENT +.UNINDENT +.UNINDENT +.sp +After the cookbook is created, it can be uploaded to the server using the \fBknife upload\fP argument. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp .nf - -cookbook_copyright "your_company_name" -cookbook_license "none" -cookbook_email "your_email" -readme_format "md" -. +.ft C +$ knife cookbook create COOKBOOK_NAME (options) +.ft P .fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-C COPYRIGHT_HOLDER\fP, \fB\-\-copyright COPYRIGHT_HOLDER\fP +The name of the copyright holder. This option will place a copyright notice that contains the name of the copyright holder in each of the pre\-created files. If this option is not specified, a copyright name of "your_company_name" will be used instead; it can be easily modified later. +.TP +.B \fB\-I LICENSE\fP, \fB\-\-license LICENSE\fP +The type of license under which a cookbook is distributed: \fBapachev2\fP, \fBgplv2\fP, \fBgplv3\fP, \fBmit\fP, or \fBnone\fP (default). This option will place the appropriate license notice in the pre\-created files. Be aware of the licenses for files inside of a cookbook and be sure to follow any restrictions they describe. +.TP +.B \fB\-m EMAIL\fP, \fB\-\-email EMAIL\fP +The email address for the individual who maintains the cookbook. This option will place an email address in each of the pre\-created files. If this option is not specified, an email name of "your_email" will be used instead; it can be easily modified later. +.TP +.B \fB\-o PATH\fP, \fB\-\-cookbook\-path PATH\fP +The directory in which cookbook are created. This can be a colon\-separated path. +.TP +.B \fB\-r FORMAT\fP, \fB\-\-readme\-format FORMAT\fP +The document format of the readme file: \fBmd\fP (markdown) and \fBrdoc\fP (Ruby docs). +.UNINDENT +.sp +\fBExamples\fP +.sp +To create a cookbook named "my_cookbook" with copyright, email, license, and readme format options specified, enter: +.sp +.nf +.ft C +$ knife cookbook create my_cookbook \-C "My Name" \-m "my@email.com" \-I apachev2 \-r md +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +** Creating cookbook my_cookbook +** Creating README for cookbook: my_cookbook +** Creating metadata for cookbook: my_cookbook +.ft P +.fi +.SH DELETE +.sp +The \fBdelete\fP argument is used to delete a specified cookbook or cookbook version on the server (and not locally). +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook delete COOKBOOK_NAME [COOKBOOK_VERSION] (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-a\fP, \fB\-\-all\fP +Indicates that a cookbook and every version of that cookbook will be deleted. +.TP +.B \fBCOOKBOOK_VERSION\fP +The version of a cookbook to be deleted. If a cookbook has only one version, this option does not need to be specified. If a cookbook has more than one version and this option is not specified, Knife will prompt for a version. +.TP +.B \fB\-p\fP, \fB\-\-purge\fP +Indicates that a cookbook (or cookbook version) will be removed entirely from the server. This action should be used carefully because only one copy of any single file is stored on the server. Consequently, purging a cookbook will disable any other cookbook that references one or more files from a cookbook that has been purged. +.UNINDENT +.sp +\fBExamples\fP +.sp +To delete version "0.8" from a cookbook named "smartmon", enter: +.sp +.nf +.ft C +$ knife cookbook delete smartmon 0.8 +.ft P +.fi +.sp +Type \fBY\fP to confirm a deletion. +.SH DOWNLOAD +.sp +The \fBdownload\fP argument is used to download a cookbook from the server to the current working directory. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook download COOKBOOK_NAME [COOKBOOK_VERSION] (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-d DOWNLOAD_DIRECTORY\fP, \fB\-\-dir DOWNLOAD_DIRECTORY\fP +The directory into which a cookbook will be downloaded. +.TP +.B \fB\-f\fP, \fB\-\-force\fP +Indicates that an existing directory will be overwritten. +.TP +.B \fB\-N\fP, \fB\-\-latest\fP +Indicates that the most recent version of a cookbook will be downloaded. +.UNINDENT +.sp +\fBExamples\fP +.sp +To download a cookbook named "smartmon", enter: +.sp +.nf +.ft C +$ knife cookbook download smartmon +.ft P +.fi +.SH LIST +.sp +The \fBlist\fP argument is used to view a list of cookbooks that are currently available on the server. The list will contain only the most recent version for each cookbook by default. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook list (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-a\fP, \fB\-\-all\fP +Indicates that all available versions of each cookbook will be returned. +.TP +.B \fB\-w\fP, \fB\-\-with\-uri\fP +Indicates that the corresponding URIs will be shown. +.UNINDENT +.sp +\fBExamples\fP +.sp +To view a list of cookbooks: +.sp +.nf +.ft C +$ knife cookbook list +.ft P +.fi +.SH METADATA +.sp +The \fBmetadata\fP argument is used to generate the metadata for one or more cookbooks. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook metadata (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-a\fP, \fB\-\-all\fP +Indicates that metadata should be generated for all cookbooks, and not just for a specified cookbook. +.TP +.B \fB\-o PATH:PATH\fP, \fB\-\-cookbook\-path PATH:PATH\fP +The directory in which cookbook are created. This can be a colon\-separated path. +.UNINDENT +.sp +\fBExamples\fP +.sp +To generate metadata for all cookbooks: +.sp +.nf +.ft C +$ knife cookbook metadata \-a +.ft P +.fi +.SH METADATA FROM FILE +.sp +The \fBmetadata from file\fP argument is used to load the metadata for a cookbook from a file. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook metadata from file FILE +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To view cookbook metadata from a JSON file: +.sp +.nf +.ft C +$ knife cookbook metadta from file /path/to/file +.ft P +.fi +.SH SHOW +.sp +The \fBshow\fP argument is used to view information about a cookbook, parts of a cookbook (attributes, definitions, files, libraries, providers, recipes, resources, and templates), or a file that is associated with a cookbook (including attributes such as checksum or specificity). +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook show COOKBOOK_NAME [COOKBOOK_VERSION] [PART...] [FILE_NAME] (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fBCOOKBOOK_VERSION\fP +The version of a cookbook to be shown. If a cookbook has only one version, this option does not need to be specified. If a cookbook has more than one version and this option is not specified, a list of cookbook versions will be returned. +.TP +.B \fB\-f FQDN\fP, \fB\-\-fqdn FQDN\fP +The FQDN of the host. +.TP +.B \fBFILE_NAME\fP +The name of a file that is associated with a cookbook. +.TP +.B \fB\-p PLATFORM\fP, \fB\-\-platform PLATFORM\fP +The platform for which a cookbook is designed. +.TP +.B \fBPART\fP +The part of the cookbook to show: \fBattributes\fP, \fBdefinitions\fP, \fBfiles\fP, \fBlibraries\fP, \fBproviders\fP, \fBrecipes\fP, \fBresources\fP, or \fBtemplates\fP. More than one part can be specified. +.TP +.B \fB\-V PLATFORM_VERSION\fP, \fB\-\-platform\-version PLATFORM_VERSION\fP +The version of the platform. +.TP +.B \fB\-w\fP, \fB\-\-with\-uri\fP +Indicates that the corresponding URIs will be shown. +.UNINDENT +.sp +\fBExamples\fP +.sp +To get the list of available versions of a cookbook named "getting\-started", enter: +.sp +.nf +.ft C +$ knife cookbook show getting\-started +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +getting\-started 0.3.0 0.2.0 +.ft P +.fi +.sp +To show a list of data about a cookbook using the name of the cookbook and the version, enter: +.sp +.nf +.ft C +$ knife cookbook show getting\-started 0.3.0 +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +attributes: + checksum: fa0fc4abf3f6787aeb5c3c5c35de667c + name: default.rb + path: attributes/default.rb + specificity: default + url: https://somelongurlhere.com +chef_type: cookbook_version +cookbook_name: getting\-started +definitions: [] +files: [] +frozen?: false +json_class: Chef::CookbookVersion +libraries: [] +.ft P +.fi +.sp +To only view data about "templates", enter: +.sp +.nf +.ft C +$ knife cookbook show getting\-started 0.3.0 templates +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +checksum: a29d6f254577b830091f140c3a78b1fe +name: chef\-getting\-started.txt.erb +path: templates/default/chef\-getting\-started.txt.erb +specificity: default +url: https://someurlhere.com +.ft P +.fi +.sp +To view information in JSON format, use the \fB\-F\fP common option as part of the command like this: +.sp +.nf +.ft C +$ knife role show devops \-F json +.ft P +.fi +.sp +Other formats available include \fBtext\fP, \fByaml\fP, and \fBpp\fP. +.SH TEST +.sp +The \fBtest\fP argument is used to test a cookbook for syntax errors. This argument uses Ruby syntax checking to verify every file in a cookbook that ends in .rb and erb. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook test COOKBOOK_NAME (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-a\fP, \fB\-\-all\fP +Indicates that all cookbooks will be tested. +.TP +.B \fB\-o PATH:PATH\fP, \fB\-\-cookbook\-path PATH:PATH\fP +The directory in which cookbook are created. This can be a colon\-separated path. +.UNINDENT +.sp +\fBExamples\fP +.sp +To test a cookbook named "getting\-started", enter: +.sp +.nf +.ft C +$ knife cookbook test getting\-started +.ft P +.fi +.SH UPLOAD +.sp +The \fBupload\fP argument is used to upload one or more cookbooks (and any files that are associated with those cookbooks) from a local repository to the server. Only files that do not already exist on the server will be uploaded. +.IP Note +Use a chefignore file to prevent the upload of specific files and file types, such as temporary files or files placed in folders by version control systems. The chefignore file must be located in the root of the cookbook repository and must use rules similar to filename globbing (as defined by the Ruby \fBFile.fnmatch\fP syntax). +.RE +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife cookbook upload [COOKBOOK_NAME...] (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-a\fP, \fB\-\-all\fP +Indicates that all cookbooks will be uploaded. +.TP +.B \fB\-d\fP, \fB\-\-include\-dependencies\fP +Indicates that when a cookbook has a dependency on one (or more) cookbooks, those cookbooks will also be uploaded. +.TP +.B \fB\-\-force\fP +Indicates that a cookbook should be updated even if the \fB\-\-freeze\fP flag has been set. +.TP +.B \fB\-\-freeze\fP +Indicates that a cookbook cannot be modified; any changes to this cookbook must be included as a new version. Only the \fB\-\-force\fP option can override this setting. +.TP +.B \fB\-o PATH:PATH\fP, \fB\-\-cookbook\-path PATH:PATH\fP +The directory in which cookbook are created. This can be a colon\-separated path. +.UNINDENT +.sp +\fBExamples\fP +.sp +To upload a cookbook named "getting\-started": +.sp +.nf +.ft C +$ knife cookbook upload getting\-started +.ft P +.fi +.sp +To upload a cookbook, and then prevent other users from being able to make changes to it, enter: +.sp +.nf +.ft C +$ knife cookbook upload redis \-\-freeze +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +Uploading redis... +Upload completed +.ft P +.fi +.sp +If a cookbook is frozen and the \fB\-\-force\fP option is not specified, Knife will return an error message similar to the following: +.sp +.nf +.ft C +Uploading redis... +ERROR: Version 0.1.6 of cookbook redis is frozen. Use \-\-force to override. +.ft P +.fi +.SH AUTHOR +Opscode +.SH COPYRIGHT +This work is licensed under a Creative Commons Attribution 3.0 Unported License +.\" Generated by docutils manpage writer. . -.IP "" 0 -. -.SH "METADATA" -\fBknife cookbook metadata cookbook\fR \fI(options)\fR -. -.TP -\fB\-a\fR, \fB\-\-all\fR -generate metadata for all cookbooks, rather than just a single cookbook -. -.TP -\fB\-o\fR, \fB\-\-cookbook\-path path:path\fR -a colon\-separated path to look for cookbooks in -. -.P -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\. -. -.SH "METADATA FROM FILE" -\fBknife cookbook metadata from file\fR \fI(options)\fR -. -.P -load the cookbook metadata from a specified file\. -. -.SH "TEST" -\fBknife cookbook test [cookbooks\.\.\.]\fR \fI(options)\fR -. -.TP -\fB\-a\fR, \fB\-\-all\fR -test all cookbooks, rather than just a single cookbook -. -.TP -\fB\-o\fR, \fB\-\-cookbook\-path path:path\fR -a colon\-separated path to look for cookbooks in -. -.P -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)\. -. -.SH "RECIPE LIST" -\fBknife recipe list [PATTERN]\fR -. -.P -List available recipes from the server\. Specify \fIPATTERN\fR as a regular expression to limit the results\. -. -.SH "DESCRIPTION" -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\. -. -.P -On disk, cookbooks are directories with a defined structure\. The following directories may appear within a cookbook: -. -.TP -COOKBOOK/attributes/ -Ruby files that define default parameters to be used in recipes -. -.TP -COOKBOOK/definitions/ -Ruby files that contain \fIresource definitions\fR -. -.TP -COOKBOOK/files/SPECIFICITY -Files of arbitrary type\. These files may be downloaded by chef\-client(8) when configuring a host\. -. -.TP -COOKBOOK/libraries/ -Ruby files that contain library code needed for recipes -. -.TP -COOKBOOK/providers/ -Ruby files that contain Lightweight Provider definitions -. -.TP -COOKBOOK/recipes/ -Ruby files that use Chef\'s recipe DSL to describe the desired configuration of a system -. -.TP -COOKBOOK/resources/ -Ruby files that contain Lightweight Resource definitions -. -.TP -COOKBOOK/templates/SPECIFICITY -ERuby (ERb) template files\. These are referenced by \fIrecipes\fR and evaluated to dynamically generate configuration files\. -. -.P -\fBSPECIFICITY\fR is a feature of \fIfiles\fR and \fItemplates\fR that allow you to specify alternate files to be used on a specific OS platform or host\. The default specificity setting is \fIdefault\fR, that is files in \fBCOOKBOOK/files/default\fR will be used when a more specific copy is not available\. Further documentation for this feature is available on the Chef wiki: \fIhttp://wiki\.opscode\.com/display/chef/File+Distribution#FileDistribution\-FileSpecificity\fR -. -.P -Cookbooks also contain a metadata file that defines various properties of the cookbook\. The most important of these are the \fIversion\fR and the \fIdependencies\fR\. The \fIversion\fR is used in combination with environments to select which copy of a given cookbook is distributed to a node\. The \fIdependencies\fR are used by the server to determine which additional cookbooks must be distributed to a given host when it requires a cookbook\. -. -.SH "SEE ALSO" -\fBknife\-environment(1)\fR \fBknife\-cookbook\-site(1)\fR \fIhttp://wiki\.opscode\.com/display/chef/Cookbooks\fR \fIhttp://wiki\.opscode\.com/display/chef/Metadata\fR -. -.SH "AUTHOR" -Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. -. -.SH "DOCUMENTATION" -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\. -. -.SH "CHEF" -Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR diff --git a/distro/common/man/man1/knife-data-bag.1 b/distro/common/man/man1/knife-data-bag.1 index c302d16453..df44979710 100644 --- a/distro/common/man/man1/knife-data-bag.1 +++ b/distro/common/man/man1/knife-data-bag.1 @@ -1,123 +1,488 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 -. -.TH "KNIFE\-DATA\-BAG" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" -. -.SH "NAME" -\fBknife\-data\-bag\fR \- Store arbitrary data on a Chef Server -. -.SH "SYNOPSIS" -\fBknife\fR \fBdata bag\fR \fIsub\-command\fR \fI(options)\fR -. -.SH "DESCRIPTION" -Data bags are stores of arbitrary JSON data\. Each data bag is a collection that may contain many items\. Data Bag Items are indexed by the Chef Server and can be searched via \fBknife\-search\fR(1)\. -. -.P -Data bags are available to all nodes configured by \fBchef\-client\fR(8), and are therefore a convenient mechanism to store global information, such as lists of administrative accounts that should be configured on all hosts\. -. -.SH "DATA BAG SUB\-COMMANDS" -. -.SH "CREATE" -\fBknife data bag create\fR \fIbag name\fR [item id] \fI(options)\fR -. +.TH "KNIFE-DATA-BAG" "1" "Chef 11.8" "" "knife data bag" +.SH NAME +knife-data-bag \- The man page for the knife data bag subcommand. +. +.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 +A data bag is a global variable that is stored as JSON data and is accessible from a server. A data bag is indexed for searching and can be loaded by a recipe or accessed during a search. The contents of a data bag can vary, but they often include sensitive information (such as database passwords). +.sp +The contents of a data bag can be encrypted using \fI\%shared secret encryption\fP. This allows a data bag to store confidential information (such as a database password) or to be managed in a source control system (without plain\-text data appearing in revision history). +.sp +The \fBknife data bag\fP subcommand is used to manage arbitrary stores of globally available JSON data. +.sp +This subcommand has the following syntax: +.sp +.nf +.ft C +$ knife data bag [ARGUMENT] (options) +.ft P +.fi +.SH COMMON OPTIONS +.sp +The following options can be run with all Knife sub\-commands and plug\-ins: +.INDENT 0.0 .TP -\fB\-s\fR, \fB\-\-secret SECRET\fR -A secret key used to encrypt the data bag item\. See \fBencryption support\fR below\. -. +.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP +The configuration file to use. .TP -\fB\-\-secret\-file SECRET_FILE\fR -The path to a file containing the secret key to be used to encrypt the data bag item\. -. -.P -If \fIitem id\fR is given, creates a new, empty data bag item and opens it for editing in your editor\. The data bag will be created if it does not exist\. -. -.P -If \fIitem id\fR is not given, the data bag will be created\. -. -.SH "DELETE" -\fBknife data bag delete\fR \fIbag name\fR [item id] \fI(options)\fR -. -.P -Delete a data bag, or an item from a data bag\. -. -.SH "EDIT" -\fBknife data bag edit\fR \fIbag name\fR \fIitem id\fR \fI(options)\fR -. +.B \fB\-\-color\fP +Indicates that colored output will be used. .TP -\fB\-s\fR, \fB\-\-secret SECRET\fR -A secret key used to encrypt the data bag item\. See \fBencryption support\fR below\. -. +.B \fB\-d\fP, \fB\-\-disable\-editing\fP +Indicates that $EDITOR will not be opened; data will be accepted as\-is. .TP -\fB\-\-secret\-file SECRET_FILE\fR -The path to a file containing the secret key to be used to encrypt the data bag item\. -. -.P -Edit an item in a data bag\. -. -.SH "FROM FILE" -\fBknife data bag from file\fR \fIbag name\fR \fIfile\fR \fI(options)\fR -. -.P -\fBknife data bag from file\fR \fIbag name\fR \fIfile1\fR \fIfile2\fR \fIfile3\fR \fI(options)\fR -. -.P -\fBknife data bag from file\fR \fIbag name\fR \fIfolder\fR \fI(options)\fR -. +.B \fB\-\-defaults\fP +Indicates that Knife will use the default value, instead of asking a user to provide one. .TP -\fB\-s\fR, \fB\-\-secret SECRET\fR -A secret key used to encrypt the data bag item\. See \fBencryption support\fR below\. -. +.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP +The $EDITOR that is used for all interactive commands. .TP -\fB\-\-secret\-file SECRET_FILE\fR -The path to a file containing the secret key to be used to encrypt the data bag item\. -. -.P -Load a data bag item from a JSON file\. If \fIfile\fR is a relative or absolute path to the file, that file will be used\. Otherwise, the \fIfile\fR parameter is treated as the base name of a data bag file in a Chef repository, and \fBknife\fR will search for the file in \fB\./data_bags/bag_name/file\fR\. For example \fBknife data bag from file users dan\.json\fR would attempt to load the file \fB\./data_bags/users/dan\.json\fR\. -. -.SH "LIST" -\fBknife data bag list\fR \fI(options)\fR -. +.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP +The name of the environment. When this option is added to a command, the command will run only against the named environment. .TP -\fB\-w\fR, \fB\-\-with\-uri\fR -Show corresponding URIs -. -.P -Lists the data bags that exist on the Chef Server\. -. -.SH "SHOW" -\fBknife data bag show BAG [ITEM]\fR \fI(options)\fR -. +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. .TP -\fB\-s\fR, \fB\-\-secret SECRET\fR -A secret key used to encrypt the data bag item\. See \fBencryption support\fR below\. -. +.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP +The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP. .TP -\fB\-\-secret\-file SECRET_FILE\fR -The path to a file containing the secret key to be used to encrypt the data bag item\. -. -.P -Show a specific data bag or an item in a data bag\. The output will be formatted according to the \-\-format option\. -. -.SH "ENCRYPTION SUPPORT" -Data Bag Items may be encrypted to keep their contents secret\. This may be desireable when storing sensitive information such as database passwords, API keys, etc\. -. -.P -Data Bag Item encryption uses the AES\-256 CBC symmetric key algorithm\. -. -.P -\fBCAVEATS:\fR Keys are not encrypted; only values are encrypted\. The "id" of a Data Bag Item is not encrypted, since it is used by Chef Server to store the item in its database\. For example, given the following data bag item: {"id": "important_passwords", "secret_password": "opensesame"} The key "secret_password" will be visible to an evesdropper, but the value "opensesame" will be protected\. Both the key "id" and its value "important_passwords" will be visible to an evesdropper\. -. -.P -Chef Server does not provide a secure mechanism for distributing encryption keys\. -. -.SH "SEE ALSO" -\fBknife\-search\fR(1) -. -.SH "AUTHOR" -Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. -. -.SH "DOCUMENTATION" -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\. +.B \fB\-h\fP, \fB\-\-help\fP +Shows help for the command. +.TP +.B \fB\-k KEY\fP, \fB\-\-key KEY\fP +The private key that Knife will use to sign requests made by the API client to the server. +.TP +.B \fB\-\-no\-color\fP +Indicates that color will not be used in the output. +.TP +.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP +The user password. +.TP +.B \fB\-\-print\-after\fP +Indicates that data will be shown after a destructive operation. +.TP +.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP +The URL for the server. +.TP +.B \fB\-u USER\fP, \fB\-\-user USER\fP +The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key. +.TP +.B \fB\-v\fP, \fB\-\-version\fP +The version of the chef\-client. +.TP +.B \fB\-V\fP, \fB\-\-verbose\fP +Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. +.TP +.B \fB\-y\fP, \fB\-\-yes\fP +Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation). +.UNINDENT +.SH CREATE +.sp +The \fBcreate\fP argument is used to add a data bag to the server. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife data bag create DATA_BAG_NAME [DATA_BAG_ITEM] (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fBDATA_BAG_ITEM\fP +The name of a specific item within a data bag. +.TP +.B \fB\-\-secret SECRET\fP +The encryption key that is used for values contained within a data bag. +.TP +.B \fB\-\-secret\-file FILE\fP +The path to the file that contains the encryption key. +.UNINDENT +.IP Note +For encrypted data bag items, use \fIeither\fP \fB\-\-secret\fP or \fB\-\-secret\-file\fP, not both. +.RE +.sp +\fBExamples\fP +.sp +To create a data bag named "admins", enter: +.sp +.nf +.ft C +$ knife data bag create admins +.ft P +.fi +.sp +to return: +.sp +.nf +.ft C +Created data_bag[admins] +.ft P +.fi +.SH DELETE +.sp +The \fBdelete\fP argument is used to delete a data bag or a data bag item from a server. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife data bag delete DATA_BAG_NAME [DATA_BAG_ITEM] (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fBDATA_BAG_ITEM\fP +The name of a specific item within a data bag. +.UNINDENT +.sp +\fBExamples\fP +.sp +To a data bag named "admins", enter: +.sp +.nf +.ft C +$ knife data bag delete admins +.ft P +.fi +.sp +To delete an item named "charlie", enter: +.sp +.nf +.ft C +$ knife data bag delete admins charlie +.ft P +.fi +.sp +Type \fBY\fP to confirm a deletion. +.SH EDIT +.sp +The \fBedit\fP argument is used to edit the data contained in a data bag. If encryption is being used, the data bag will be decrypted, the data will be made available in the $EDITOR, and then encrypted again before saving it to the server. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife data bag edit DATA_BAG_NAME [DATA_BAG_ITEM] (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fBDATA_BAG_ITEM\fP +The name of a specific item within a data bag. +.TP +.B \fB\-\-secret SECRET\fP +The encryption key that is used for values contained within a data bag. +.TP +.B \fB\-\-secret\-file FILE\fP +The path to the file that contains the encryption key. +.UNINDENT +.IP Note +For encrypted data bag items, use \fIeither\fP \fB\-\-secret\fP or \fB\-\-secret\-file\fP, not both. +.RE +.sp +\fBExamples\fP +.sp +To edit the contents of a data bag, enter: +.sp +.nf +.ft C +$ knife data bag edit admins +.ft P +.fi +.sp +To edit an item named "charlie" that is contained in a data bag named "admins", enter: +.sp +.nf +.ft C +$ knife data bag edit admins charlie +.ft P +.fi +.sp +to open the $EDITOR. Once opened, you can update the data before saving it to the server. For example, by changing: +.sp +.nf +.ft C +{ + "id": "charlie" +} +.ft P +.fi +.sp +to: +.sp +.nf +.ft C +{ + "id": "charlie", + "uid": 1005, + "gid":"ops", + "shell":"/bin/zsh", + "comment":"Crazy Charlie" +} +.ft P +.fi +.SH FROM FILE +.sp +The \fBfrom file\fP argument is used to create a data bag on the server from a file. The path to the data bag file must specify one of the following: +.INDENT 0.0 +.IP \(bu 2 +the name of a data bag +.IP \(bu 2 +a relative or absolute path to a file +.UNINDENT +.sp +If the name of a data bag is specified, Knife will search for the data bag in \fB./data_bags/bag_name/file\fP. Once opened, the JSON file should be a hash that contains at least an ID key which represents the name of the data bag item. +.IP Warning +A chef\-client must be version 11.6 (or higher) when using the \fBknife data bag from file\fP argument with the Enterprise Chef or Open Source Chef version 11 servers. +.RE +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife data bag from file DATA_BAG_NAME_or_PATH +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-a\fP, \fB\-\-all\fP +Indicates that all data bags found at the specified path will be uploaded. +.TP +.B \fB\-\-secret SECRET\fP +The encryption key that is used for values contained within a data bag. +.TP +.B \fB\-\-secret\-file FILE\fP +The path to the file that contains the encryption key. +.UNINDENT +.IP Note +For encrypted data bag items, use \fIeither\fP \fB\-\-secret\fP or \fB\-\-secret\-file\fP, not both. +.RE +.sp +\fBExamples\fP +.sp +To create a data bag on the server from a file: +.sp +.nf +.ft C +$ knife data bag from file "path to JSON file" +.ft P +.fi +.sp +To create a data bag named "devops_data" that contains encrypted data, enter: +.sp +.nf +.ft C +$ knife data bag from file devops_data \-\-secret\-file "path to decryption file" +.ft P +.fi +.SH LIST +.sp +The \fBlist\fP argument is used to view a list of data bags that are currently available on the server. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife data bag list +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-w\fP, \fB\-\-with\-uri\fP +Indicates that the corresponding URIs will be shown. +.UNINDENT +.sp +\fBExamples\fP +.sp +For example, to view a list of data bags on the server, enter: +.sp +.nf +.ft C +$ knife data bag list +.ft P +.fi +.SH SHOW +.sp +The \fBshow\fP argument is used to view the contents of a data bag. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife data bag show DATA_BAG_NAME (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fBDATA_BAG_ITEM\fP +The name of a specific item within a data bag. +.TP +.B \fB\-\-secret SECRET\fP +The encryption key that is used for values contained within a data bag. +.TP +.B \fB\-\-secret\-file FILE\fP +The path to the file that contains the encryption key. +.UNINDENT +.IP Note +For encrypted data bag items, use \fIeither\fP \fB\-\-secret\fP or \fB\-\-secret\-file\fP, not both. +.RE +.sp +\fBExamples\fP +.sp +To show the contents of a data bag, enter: +.sp +.nf +.ft C +$ knife data bag show admins +.ft P +.fi +.sp +to return: +.sp +.nf +.ft C +charlie +.ft P +.fi +.sp +To show the contents of a specific item within data bag, enter: +.sp +.nf +.ft C +$ knife data bag show admins charlie +.ft P +.fi +.sp +to return: +.sp +.nf +.ft C +comment: Crazy Charlie +gid: ops +id: charlie +shell: /bin/zsh +uid: 1005 +.ft P +.fi +.sp +To show the contents of a data bag named "passwords" with an item that contains encrypted data named "mysql", enter: +.sp +.nf +.ft C +$ knife data bag show passwords mysql +.ft P +.fi +.sp +to return: +.sp +.nf +.ft C +## sample: +{ + "id": "mysql", + "pass": "trywgFA6R70NO28PNhMpGhEvKBZuxouemnbnAUQsUyo=\en", + "user": "e/p+8WJYVHY9fHcEgAAReg==\en" +} +.ft P +.fi +.sp +To show the decrypted contents of the same data bag, enter: +.sp +.nf +.ft C +$ knife data bag show \-\-secret\-file /path/to/decryption/file passwords mysql +.ft P +.fi +.sp +to return: +.sp +.nf +.ft C +## sample: +{ + "id": "mysql", + "pass": "thesecret123", + "user": "fred" +} +.ft P +.fi +.sp +To view information in JSON format, use the \fB\-F\fP common option as part of the command like this: +.sp +.nf +.ft C +$ knife data bag show admins \-F json +.ft P +.fi +.sp +Other formats available include \fBtext\fP, \fByaml\fP, and \fBpp\fP. +.SH AUTHOR +Opscode +.SH COPYRIGHT +This work is licensed under a Creative Commons Attribution 3.0 Unported License +.\" Generated by docutils manpage writer. . -.SH "CHEF" -Knife is distributed with Chef\. http://wiki\.opscode\.com/display/chef/Home diff --git a/distro/common/man/man1/knife-environment.1 b/distro/common/man/man1/knife-environment.1 index 3f0db943c9..ed272e3892 100644 --- a/distro/common/man/man1/knife-environment.1 +++ b/distro/common/man/man1/knife-environment.1 @@ -1,168 +1,326 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 -. -.TH "KNIFE\-ENVIRONMENT" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" -. -.SH "NAME" -\fBknife\-environment\fR \- Define cookbook policies for the environments in your infrastructure -. -.SH "SYNOPSIS" -\fBknife\fR \fBenvironment\fR \fIsub\-command\fR \fI(options)\fR -. -.SH "SUBCOMMANDS" -Environment subcommands follow a basic create, read, update, delete (CRUD) pattern\. The following subcommands are available: -. -.SH "CREATE" -\fBknife environment create\fR \fIenvironment\fR \fI(options)\fR -. -.TP -\fB\-d\fR, \fB\-\-description DESCRIPTION\fR -The value of the description field\. -. -.P -Create a new environment object on the Chef Server\. The envrionment will be opened in the text editor for editing prior to creation if the \-n option is not present\. -. -.SH "DELETE" -\fBknife environment delete\fR \fIenvironment\fR \fI(options)\fR -. -.P -Destroy an environment on the Chef Server\. A prompt for confirmation will be displayed if the \-y options is not given\. -. -.SH "EDIT" -\fBknife environment edit\fR \fIenvironment\fR \fI(options)\fR -. -.P -Fetch \fIenvironment\fR and display it in the text editor for editing\. The environment will be saved to the Chef Server when the editing session exits\. -. -.SH "FROM FILE" -\fBknife environment from file\fR \fIfile\fR \fI(options)\fR -. -.P -Create or update an environment from the JSON or Ruby format \fIfile\fR\. See \fBformat\fR for the proper format of this file\. -. -.SH "LIST" -\fBknife environment list\fR \fI(options)\fR * \fB\-w\fR, \fB\-\-with\-uri\fR: Show the resource URI for each environment -. -.SH "SHOW" -\fBknife environment show\fR \fIenvironment\fR \fI(options)\fR -. -.SH "DESCRIPTION" -Environments provide a means to apply policies to hosts in your infrastructure based on business function\. For example, you may have a separate copy of your infrastructure called "dev" that runs the latest version of your application and should use the newest versions of your cookbooks when configuring systems, and a production instance of your infrastructure where you wish to update code and cookbooks in a more controlled fashion\. In Chef, this function is implemented with \fIenvironments\fR\. -. -.P -Environments contain two major components: a set of cookbook version constraints and environment attributes\. -. -.SH "SYNTAX" -A cookbook version constraint is comprised of a \fIcookbook name\fR and a \fIversion constraint\fR\. The \fIcookbook name\fR is the name of a cookbook in your system, and the \fIversion constraint\fR is a String describing the version(s) of that cookbook allowed in the environment\. Only one \fIversion constraint\fR is supported for a given \fIcookbook name\fR\. -. -.P -The exact syntax used to define a cookbook version constraint varies depending on whether you use the JSON format or the Ruby format\. In the JSON format, the cookbook version constraints for an environment are represented as a single JSON object, like this: -. -.IP "" 4 -. -.nf - -{"apache2": ">= 1\.5\.0"} -. -.fi -. -.IP "" 0 -. -.P -In the Ruby format, the cookbook version contraints for an environment are represented as a Ruby Hash, like this: -. -.IP "" 4 -. +.TH "KNIFE-ENVIRONMENT" "1" "Chef 11.8" "" "knife environment" +.SH NAME +knife-environment \- The man page for the knife environment subcommand. +. +.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 +An environment is a way to map an organization\(aqs real\-life workflow to what can be configured and managed when using server. Every organization begins with a single environment called the \fB_default\fP environment, which cannot be modified (or deleted). Additional environments can be created to reflect each organization\(aqs patterns and workflow. For example, creating \fBproduction\fP, \fBstaging\fP, \fBtesting\fP, and \fBdevelopment\fP environments. Generally, an environment is also associated with one (or more) cookbook versions. +.sp +The \fBknife environment\fP subcommand is used to manage environments within a single organization on the server. +.sp +This subcommand has the following syntax: +.sp .nf - -{"apache2" => ">= 1\.5\.0"} -. +.ft C +$ knife environment [ARGUMENT] (options) +.ft P .fi -. -.IP "" 0 -. -.P -A \fIversion number\fR is a String comprised of two or three digits separated by a dot (\.) character, or in other words, strings of the form "major\.minor" or "major\.minor\.patch"\. "1\.2" and "1\.2\.3" are examples of valid version numbers\. Version numbers containing more than three digits or alphabetic characters are not supported\. -. -.P -A \fIversion constraint\fR String is composed of an \fIoperator\fR and a \fIversion number\fR\. The following operators are available: -. +.SH COMMON OPTIONS +.sp +The following options can be run with all Knife sub\-commands and plug\-ins: +.INDENT 0.0 .TP -\fB= VERSION\fR -Equality\. Only the exact version specified may be used\. -. +.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP +The configuration file to use. .TP -\fB> VERSION\fR -Greater than\. Only versions greater than \fBVERSION\fR may be used\. -. +.B \fB\-\-color\fP +Indicates that colored output will be used. .TP -\fB>= VERSION\fR -Greater than or equal to\. Only versions equal to VERSION or greater may be used\. -. +.B \fB\-d\fP, \fB\-\-disable\-editing\fP +Indicates that $EDITOR will not be opened; data will be accepted as\-is. .TP -\fB< VERSION\fR -Less than\. Only versions less than VERSION may be used\. -. +.B \fB\-\-defaults\fP +Indicates that Knife will use the default value, instead of asking a user to provide one. .TP -\fB<= VERSION\fR -Less than or equal to\. Only versions lesser or equal to VERSION may be used\. -. +.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP +The $EDITOR that is used for all interactive commands. .TP -\fB~> VERSION\fR -Pessimistic greater than\. Depending on the number of components in the given VERSION, the constraint will be optimistic about future minor or patch revisions only\. For example, \fB~> 1\.1\fR will match any version less than \fB2\.0\fR and greater than or equal to \fB1\.1\.0\fR, whereas \fB~> 2\.0\.5\fR will match any version less than \fB2\.1\.0\fR and greater than or equal to \fB2\.0\.5\fR\. -. -.SH "FORMAT" -The JSON format of an envioronment is as follows: -. -.IP "" 4 -. +.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP +The name of the environment. When this option is added to a command, the command will run only against the named environment. +.TP +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. +.TP +.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP +The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP. +.TP +.B \fB\-h\fP, \fB\-\-help\fP +Shows help for the command. +.TP +.B \fB\-k KEY\fP, \fB\-\-key KEY\fP +The private key that Knife will use to sign requests made by the API client to the server. +.TP +.B \fB\-\-no\-color\fP +Indicates that color will not be used in the output. +.TP +.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP +The user password. +.TP +.B \fB\-\-print\-after\fP +Indicates that data will be shown after a destructive operation. +.TP +.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP +The URL for the server. +.TP +.B \fB\-u USER\fP, \fB\-\-user USER\fP +The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key. +.TP +.B \fB\-v\fP, \fB\-\-version\fP +The version of the chef\-client. +.TP +.B \fB\-V\fP, \fB\-\-verbose\fP +Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. +.TP +.B \fB\-y\fP, \fB\-\-yes\fP +Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation). +.UNINDENT +.SH CREATE +.sp +The \fBcreate\fP argument is used to add an environment object to the server. When this argument is run, Knife will open $EDITOR to enable editing of the \fBENVIRONMENT\fP description field (unless a description is specified as part of the command). When finished, Knife will add the environment to the server. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp .nf - -{ - "name": "dev", - "description": "The development environment", - "cookbook_versions": { - "couchdb": "= 11\.0\.0" - }, - "json_class": "Chef::Environment", - "chef_type": "environment", - "default_attributes": { - "apache2": { "listen_ports": [ "80", "443" ] } - }, - "override_attributes": { - "aws_s3_bucket": "production" - } -} -. +.ft C +$ knife environment create ENVIRONMENT_NAME \-d DESCRIPTION +.ft P .fi -. -.IP "" 0 -. -.P -The Ruby format of an environment is as follows: -. -.IP "" 4 -. +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-d DESCRIPTION\fP, \fB\-\-description DESCRIPTION\fP +The description of the environment. This value will populate the description field for the environment on the server. +.UNINDENT +.sp +\fBExamples\fP +.sp +To create an environment named "dev" with a description of "The development environment.": +.sp +.nf +.ft C +$ knife environment create dev \-d "The development environment." +.ft P +.fi +.SH DELETE +.sp +The \fBdelete\fP argument is used to delete an environment from a server. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife environment delete ENVIRONMENT_NAME +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To delete an environment named "dev", enter: +.sp +.nf +.ft C +$ knife environment delete dev +.ft P +.fi +.sp +Type \fBY\fP to confirm a deletion. +.SH EDIT +.sp +The \fBedit\fP argument is used to edit the attributes of an environment. When this argument is run, Knife will open $EDITOR to enable editing of \fBENVIRONMENT\fP attributes. When finished, Knife will update the server with those changes. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife environment edit ENVIRONMENT_NAME +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To edit an environment named "devops", enter: +.sp +.nf +.ft C +$ knife environment edit devops +.ft P +.fi +.SH FROM FILE +.sp +The \fBfrom file\fP argument is used to add or update an environment using a JSON or Ruby DSL description. It must be run with the \fBcreate\fP or \fBedit\fP arguments. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife environment [create | edit] from file FILE (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-a\fP, \fB\-\-all\fP +Indicates that all environments found at the specified path will be uploaded. +.UNINDENT +.sp +\fBExamples\fP +.sp +To add an environment using data contained in a JSON file: +.sp +.nf +.ft C +$ knife environment create devops from file "path to JSON file" +.ft P +.fi +.sp +or: +.sp +.nf +.ft C +$ knife environment edit devops from file "path to JSON file" +.ft P +.fi +.SH LIST +.sp +The \fBlist\fP argument is used to list all of the environments that are currently available on the server. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife environment list \-w +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-w\fP, \fB\-\-with\-uri\fP +Indicates that the corresponding URIs will be shown. +.UNINDENT +.sp +\fBExamples\fP +.sp +To view a list of environments: +.sp +.nf +.ft C +$ knife environment list \-w +.ft P +.fi +.SH SHOW +.sp +The \fBshow\fP argument is used to display information about the specified environment. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife environment show ENVIRONMENT_NAME +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To view information about the "dev" environment enter: +.sp .nf +.ft C +$ knife environment show dev +.ft P +.fi +.sp +to return: +.sp +.nf +.ft C +% knife environment show dev +chef_type: environment +cookbook_versions: +default_attributes: +description: +json_class: Chef::Environment +name: dev +override_attributes: -name "dev" -description "The development environment" -cookbook_versions "couchdb" => "= 11\.0\.0" -default_attributes "apache2" => { "listen_ports" => [ "80", "443" ] } -override_attributes "aws_s3_bucket" => "production" -. +\e\e +\e\e +\e\e +\e\e +.ft P .fi +.sp +To view information in JSON format, use the \fB\-F\fP common option as part of the command like this: +.sp +.nf +.ft C +$ knife role show devops \-F json +.ft P +.fi +.sp +Other formats available include \fBtext\fP, \fByaml\fP, and \fBpp\fP. +.SH AUTHOR +Opscode +.SH COPYRIGHT +This work is licensed under a Creative Commons Attribution 3.0 Unported License +.\" Generated by docutils manpage writer. . -.IP "" 0 -. -.SH "SEE ALSO" -\fBknife\-node(1)\fR \fBknife\-cookbook(1)\fR \fBknife\-role(1)\fR \fIhttp://wiki\.opscode\.com/display/chef/Environments\fR \fIhttp://wiki\.opscode\.com/display/chef/Version+Constraints\fR -. -.SH "AUTHOR" -Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. -. -.SH "DOCUMENTATION" -This manual page was written by Daniel DeLeo \fIdan@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\. -. -.SH "CHEF" -Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR diff --git a/distro/common/man/man1/knife-exec.1 b/distro/common/man/man1/knife-exec.1 index b001fc08c1..3f9e6fc47b 100644 --- a/distro/common/man/man1/knife-exec.1 +++ b/distro/common/man/man1/knife-exec.1 @@ -1,43 +1,327 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 +.TH "KNIFE-EXEC" "1" "Chef 11.8" "" "knife exec" +.SH NAME +knife-exec \- The man page for the knife exec subcommand. . -.TH "KNIFE\-EXEC" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.nr rst2man-indent-level 0 . -.SH "NAME" -\fBknife\-exec\fR \- Run user scripts using the Chef API DSL -. -.SH "SYNOPSIS" -\fBknife\fR \fBexec\fR \fI(options)\fR +.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 +The \fBknife exec\fP subcommand uses the Knife configuration file to execute Ruby scripts in the context of a fully configured chef\-client. This subcommand is most often used to run scripts that will only access server one time (or otherwise very infrequently). Use this subcommand any time that an operation does not warrant full usage of the Knife subcommand library. +.sp +For Ruby scripts that will be run using the \fBexec\fP subcommand, note the following: +.INDENT 0.0 +.INDENT 3.5 +.INDENT 0.0 +.IP \(bu 2 +The Ruby script must be located on the system from which Knife is run (and not be located on any of the systems that Knife will be managing). +.IP \(bu 2 +Shell commands will be run from a management workstation. For example, something like \fB%x[ls \-lash /opt/only\-on\-a\-node]\fP would give you the directory listing for the "opt/only\-on\-a\-node" directory or a "No such file or directory" error if the file does not already exist locally. +.IP \(bu 2 +When the chef\-shell DSL is available, the chef\-client DSL will not be (unless the management workstation is also a chef\-client). Without the chef\-client DSL, a bash block cannot be used to run bash commands. +.UNINDENT +.UNINDENT +.UNINDENT +.sp +\fBCommon Options\fP +.sp +The following options can be run with all Knife sub\-commands and plug\-ins: +.INDENT 0.0 .TP -\fB\-E\fR, \fB\-\-exec CODE\fR -Provide a snippet of code to evaluate on the command line -. -.SH "DESCRIPTION" -\fBknife exec\fR runs arbitrary ruby scripts in a context similar to that of the chef\-shell(1) DSL\. See the chef\-shell documentation for a description of the commands available\. -. -.SH "EXAMPLES" -. +.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP +The configuration file to use. .TP -Make an API call against an arbitrary endpoint -knife exec \-E \'api\.get("nodes/fluke\.localdomain/cookbooks")\' => list of cookbooks for the node \fIfluke\.localdomain\fR -. +.B \fB\-\-color\fP +Indicates that colored output will be used. .TP -Remove the role \fIobsolete\fR from all nodes -knife exec \-E \'nodes\.transform(:all){|n| n\.run_list\.delete("role[obsolete]")}\' -. +.B \fB\-d\fP, \fB\-\-disable\-editing\fP +Indicates that $EDITOR will not be opened; data will be accepted as\-is. .TP -Generate the expanded run list for hosts in the \fBwebserver\fR role -knife exec \-E \'nodes\.find(:roles => "webserver") {|n| n\.expand!; n[:recipes]}\' -. -.SH "SEE ALSO" -\fBchef\-shell(1)\fR -. -.SH "AUTHOR" -Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. -. -.SH "DOCUMENTATION" -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\. +.B \fB\-\-defaults\fP +Indicates that Knife will use the default value, instead of asking a user to provide one. +.TP +.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP +The $EDITOR that is used for all interactive commands. +.TP +.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP +The name of the environment. When this option is added to a command, the command will run only against the named environment. +.TP +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. +.TP +.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP +The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP. +.TP +.B \fB\-h\fP, \fB\-\-help\fP +Shows help for the command. +.TP +.B \fB\-k KEY\fP, \fB\-\-key KEY\fP +The private key that Knife will use to sign requests made by the API client to the server. +.TP +.B \fB\-\-no\-color\fP +Indicates that color will not be used in the output. +.TP +.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP +The user password. +.TP +.B \fB\-\-print\-after\fP +Indicates that data will be shown after a destructive operation. +.TP +.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP +The URL for the server. +.TP +.B \fB\-u USER\fP, \fB\-\-user USER\fP +The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key. +.TP +.B \fB\-v\fP, \fB\-\-version\fP +The version of the chef\-client. +.TP +.B \fB\-V\fP, \fB\-\-verbose\fP +Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. +.TP +.B \fB\-y\fP, \fB\-\-yes\fP +Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation). +.UNINDENT +.sp +\fBAuthenticated API Requests\fP +.sp +The \fBknife exec\fP subcommand can be used to make authenticated API requests to the server using the following methods: +.TS +center; +|l|l|. +_ +T{ +Method +T} T{ +Description +T} +_ +T{ +\fBapi.delete\fP +T} T{ +Use to delete an object from the server. +T} +_ +T{ +\fBapi.get\fP +T} T{ +Use to get the details of an object on the server. +T} +_ +T{ +\fBapi.post\fP +T} T{ +Use to add an object to the server. +T} +_ +T{ +\fBapi.put\fP +T} T{ +Use to update an object on the server. +T} +_ +.TE +.sp +These methods are used with the \fB\-E\fP option, which executes that string locally on the workstation using chef\-shell. These methods have the following syntax: +.sp +.nf +.ft C +$ knife exec \-E \(aqapi.method(/endpoint)\(aq +.ft P +.fi +.sp +where: +.INDENT 0.0 +.IP \(bu 2 +\fBapi.method\fP is the corresponding authentication method \-\-\- \fBapi.delete\fP, \fBapi.get\fP, \fBapi.post\fP, or \fBapi.put\fP +.IP \(bu 2 +\fB/endpoint\fP is an endpoint in the Chef Server API +.UNINDENT +.sp +For example, to get the data for a node named "Example_Node": +.sp +.nf +.ft C +$ knife exec \-E \(aqputs api.get("/nodes/Example_Node")\(aq +.ft P +.fi +.sp +and to ensure that the output is visible in the console, add the \fBputs\fP in front of the API authorization request: +.sp +.nf +.ft C +$ knife exec \-E \(aqputs api.get("/nodes/Example_Node")\(aq +.ft P +.fi +.sp +where \fBputs\fP is the shorter version of the \fB$stdout.puts\fP predefined variable in Ruby. +.sp +The following example shows how to add a client named "IBM305RAMAC" and the \fB/clients\fP endpoint, and then return the private key for that user in the console: +.sp +.nf +.ft C +$ client_desc = { + "name" => "IBM305RAMAC", + "admin" => false + } + + new_client = api.post("/clients", client_desc) + puts new_client["private_key"] +.ft P +.fi +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife exec SCRIPT (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This subcommand has the following options: +.INDENT 0.0 +.TP +.B \fB\-E CODE\fP, \fB\-\-exec CODE\fP +A string of code that will be executed. +.TP +.B \fB\-p PATH:PATH\fP, \fB\-\-script\-path PATH:PATH\fP +A colon\-separated path at which Ruby scripts are located. +.UNINDENT +.sp +\fBExamples\fP +.sp +There are three ways to use \fBknife exec\fP to run Ruby script files. For example: +.sp +.nf +.ft C +$ knife exec /path/to/script_file +.ft P +.fi +.sp +Or: +.sp +.nf +.ft C +$ knife exec \-E \(aqRUBY CODE\(aq +.ft P +.fi +.sp +Or: +.sp +.nf +.ft C +$ knife exec +RUBY CODE +^D +.ft P +.fi +.sp +To check the status of Knife using a Ruby script named "status.rb" (which looks like): +.sp +.nf +.ft C +printf "%\-5s %\-12s %\-8s %s\en", "Check In", "Name", "Ruby", "Recipes" +nodes.all do |n| + checkin = Time.at(n[\(aqohai_time\(aq]).strftime("%F %R") + rubyver = n[\(aqlanguages\(aq][\(aqruby\(aq][\(aqversion\(aq] + recipes = n.run_list.expand(_default).recipes.join(", ") + printf "%\-20s %\-12s %\-8s %s\en", checkin, n.name, rubyver, recipes +end +.ft P +.fi +.sp +and is located in a directory named "scripts", enter: +.sp +.nf +.ft C +$ knife exec scripts/status.rb +.ft P +.fi +.sp +To show the available free memory for all nodes, enter: +.sp +.nf +.ft C +$ knife exec \-E \(aqnodes.all {|n| puts "#{n.name} has #{n.memory.total} free memory"}\(aq +.ft P +.fi +.sp +To list all of the available search indexes, enter: +.sp +.nf +.ft C +$ knife exec \-E \(aqputs api.get("search").keys\(aq +.ft P +.fi +.sp +To query a node for multiple attributes using a Ruby script named \fBsearch_attributes.rb\fP (which looks like): +.sp +.nf +.ft C +% cat scripts/search_attributes.rb +query = ARGV[2] +attributes = ARGV[3].split(",") +puts "Your query: #{query}" +puts "Your attributes: #{attributes.join(" ")}" +results = {} +search(:node, query) do |n| + results[n.name] = {} + attributes.each {|a| results[n.name][a] = n[a]} +end + +puts results +exit 0 +.ft P +.fi +.sp +enter: +.sp +.nf +.ft C +% knife exec scripts/search_attributes.rb "hostname:test_system" ipaddress,fqdn +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +Your query: hostname:test_system +Your attributes: ipaddress fqdn +{"test_system.example.com"=>{"ipaddress"=>"10.1.1.200", "fqdn"=>"test_system.example.com"}} +.ft P +.fi +.SH AUTHOR +Opscode +.SH COPYRIGHT +This work is licensed under a Creative Commons Attribution 3.0 Unported License +.\" Generated by docutils manpage writer. . -.SH "CHEF" -Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR diff --git a/distro/common/man/man1/knife-index.1 b/distro/common/man/man1/knife-index.1 index 891519c4c6..ac7c5b2655 100644 --- a/distro/common/man/man1/knife-index.1 +++ b/distro/common/man/man1/knife-index.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-INDEX" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.TH "KNIFE\-INDEX" "1" "July 2013" "Chef 11.8.0.alpha.0" "Chef Manual" . .SH "NAME" \fBknife\-index\fR \- Rebuild the search index on a Chef Server diff --git a/distro/common/man/man1/knife-node.1 b/distro/common/man/man1/knife-node.1 index c30ea0f49b..9b36a04228 100644 --- a/distro/common/man/man1/knife-node.1 +++ b/distro/common/man/man1/knife-node.1 @@ -1,134 +1,580 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 -. -.TH "KNIFE\-NODE" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" -. -.SH "NAME" -\fBknife\-node\fR \- Manage the hosts in your infrastructure -. -.SH "SYNOPSIS" -\fBknife\fR \fBnode\fR \fIsub\-command\fR \fI(options)\fR -. -.SH "DESCRIPTION" -Nodes are data structures that represent hosts configured with Chef\. Nodes have a \fBname\fR, a String that uniquely identifies the node, \fBattributes\fR, a nested Hash of properties that describe how the host should be configured, a \fBchef_environment\fR, a String representing the environment to which the node belongs, and a \fBrun_list\fR, an ordered list of \fBrecipes\fR or \fBroles\fR that chef\-client should apply when configuring a host\. -. -.P -When a host communicates with a Chef Server, it authenticates using its \fBnode_name\fR for identification and signs its reqests with a private key\. The Server validates the request by looking up a \fBclient\fR object with a name identical to the \fBnode_name\fR submitted with the request and verifes the signature using the public key for that \fBclient\fR object\. \fBNOTE\fR that the \fBclient\fR is a different object in the system\. It is associated with a node by virtue of having a matching name\. -. -.P -By default \fBchef\-client\fR(8) will create a node using the FQDN of the host for the node name, though this may be overridden by configuration settings\. -. -.SH "NODE SUB\-COMMANDS" -The following \fBnode\fR subcommands are available: -. -.SH "BULK DELETE" -\fBknife node bulk delete\fR \fIregex\fR \fI(options)\fR -. -.P -Deletes nodes for which the name matches the regular expression \fIregex\fR on the Chef Server\. The regular expression should be given in quotes, and should not be surrounded with forward slashes (as is typical of regular expression literals in scripting languages)\. -. -.SH "CREATE" -\fBknife node create\fR \fIname\fR \fI(options)\fR -. -.P -Create a new node\. Unless the \-\-disable\-editing option is given, an empty node object will be created and displayed in your text editor\. If the editor exits with a successful exit status, the node data will be posted to the Chef Server to create the node\. -. -.SH "DELETE" -\fBknife node delete\fR \fIname\fR \fI(options)\fR -. -.P -Deletes the node identified by \fIname\fR on the Chef Server\. -. -.SH "EDIT" -\fBknife node edit\fR \fIname\fR \fI(options)\fR -. +.TH "KNIFE-NODE" "1" "Chef 11.8" "" "knife node" +.SH NAME +knife-node \- The man page for the knife node subcommand. +. +.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 +A node is any physical, virtual, or cloud machine that is configured to be maintained by a chef\-client. +.sp +The \fBknife node\fP subcommand is used to manage the nodes that exist on a server. +.sp +This subcommand has the following syntax: +.sp +.nf +.ft C +$ knife node [ARGUMENT] (options) +.ft P +.fi +.SH COMMON OPTIONS +.sp +The following options can be run with all Knife sub\-commands and plug\-ins: +.INDENT 0.0 .TP -\fB\-a\fR, \fB\-\-all\fR -Display all node data in the editor\. By default, default, override, and automatic attributes are not shown\. -. -.P -Edit the node identified by \fIname\fR\. Like \fBknife node create\fR, the node will be displayed in your text editor unless the \-n option is present\. -. -.SH "FROM FILE" -\fBknife node from file\fR \fIfile\fR \fI(options)\fR -. -.P -Create a node from a JSON format \fIfile\fR\. -. -.SH "LIST" -\fBknife node list\fR \fI(options)\fR -. +.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP +The configuration file to use. .TP -\fB\-w\fR, \fB\-\-with\-uri\fR -Show corresponding URIs -. -.P -List all nodes\. -. -.SH "RUN_LIST ADD" -\fBknife node run_list add\fR \fIname\fR \fIrun list item\fR \fI(options)\fR -. +.B \fB\-\-color\fP +Indicates that colored output will be used. .TP -\fB\-a\fR, \fB\-\-after ITEM\fR -Place the ENTRY in the run list after ITEM -. -.P -Add the \fIrun list item\fR to the node\'s \fBrun_list\fR\. See Run list -. -.SH "RUN_LIST REMOVE" -\fBknife node run_list remove\fR \fInode name\fR \fIrun list item\fR \fI(options)\fR -. -.P -Remove the \fIrun list item\fR from the node\'s \fBrun_list\fR\. -. -.SH "SHOW" -\fBknife node show\fR \fInode name\fR \fI(options)\fR -. +.B \fB\-d\fP, \fB\-\-disable\-editing\fP +Indicates that $EDITOR will not be opened; data will be accepted as\-is. .TP -\fB\-a\fR, \fB\-\-attribute [ATTR]\fR -Show only one attribute -. +.B \fB\-\-defaults\fP +Indicates that Knife will use the default value, instead of asking a user to provide one. .TP -\fB\-r\fR, \fB\-\-run\-list\fR -Show only the run list -. +.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP +The $EDITOR that is used for all interactive commands. .TP -\fB\-F\fR, \fB\-\-format FORMAT\fR -Display the node in a different format\. -. +.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP +The name of the environment. When this option is added to a command, the command will run only against the named environment. .TP -\fB\-m\fR, \fB\-\-medium\fR -Display more, but not all, of the node\'s data when using the default \fIsummary\fR format -. -.P -Displays the node identified by \fInode name\fR on stdout\. -. -.SH "RUN LIST ITEM FORMAT" -Run list items may be either roles or recipes\. When adding a role to a run list, the correct syntax is "role[ROLE_NAME]" -. -.P -When adding a recipe to a run list, there are several valid formats: -. +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. .TP -Fully Qualified Format -"recipe[COOKBOOK::RECIPE_NAME]", for example, "recipe[chef::client]" -. +.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP +The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP. .TP -Cookbook Recipe Format -For brevity, the recipe part of the fully qualified format may be omitted, and recipes specified as "COOKBOOK::RECIPE_NAME", e\.g\., "chef::client" -. +.B \fB\-h\fP, \fB\-\-help\fP +Shows help for the command. .TP -Default Recipe Format -When adding the default recipe of a cookbook to a run list, the recipe name may be omitted as well, e\.g\., "chef::default" may be written as just "chef" -. -.SH "SEE ALSO" -\fBknife\-client\fR(1) \fBknife\-search\fR(1) \fBknife\-role\fR(1) -. -.SH "AUTHOR" -Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. -. -.SH "DOCUMENTATION" -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\. +.B \fB\-k KEY\fP, \fB\-\-key KEY\fP +The private key that Knife will use to sign requests made by the API client to the server. +.TP +.B \fB\-\-no\-color\fP +Indicates that color will not be used in the output. +.TP +.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP +The user password. +.TP +.B \fB\-\-print\-after\fP +Indicates that data will be shown after a destructive operation. +.TP +.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP +The URL for the server. +.TP +.B \fB\-u USER\fP, \fB\-\-user USER\fP +The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key. +.TP +.B \fB\-v\fP, \fB\-\-version\fP +The version of the chef\-client. +.TP +.B \fB\-V\fP, \fB\-\-verbose\fP +Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. +.TP +.B \fB\-y\fP, \fB\-\-yes\fP +Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation). +.UNINDENT +.SH BULK DELETE +.sp +The \fBbulk delete\fP argument is used to delete one or more nodes that match a pattern defined by a regular expression. The regular expression must be within quotes and not be surrounded by forward slashes (/). +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife node bulk delete REGEX +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To bulk delete many nodes, use a regular expression to define the pattern: +.sp +.nf +.ft C +$ knife node bulk delete "^[0\-9]{3}$" +.ft P +.fi +.sp +Type \fBY\fP to confirm a deletion. +.SH CREATE +.sp +The \fBcreate\fP argument is used to add a node to the server. Node data is stored as JSON on the server. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife node create NODE_NAME +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To add a node, enter: +.sp +.nf +.ft C +$ knife node create node1 +.ft P +.fi +.sp +In the $EDITOR enter the node data in JSON: +.sp +.nf +.ft C +## sample: +{ + "normal": { + }, + "name": "foobar", + "override": { + }, + "default": { + }, + "json_class": "Chef::Node", + "automatic": { + }, + "run_list": [ + "recipe[zsh]", + "role[webserver]" + ], + "chef_type": "node" +} +.ft P +.fi +.sp +When finished, save it. +.SH DELETE +.sp +The \fBdelete\fP argument is used to delete a node from the server. +.IP Note +Deleting a node will not delete any corresponding API clients. +.RE +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife node delete NODE_NAME +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To delete a node called "dev", enter: +.sp +.nf +.ft C +$ knife node delete dev +.ft P +.fi +.SH EDIT +.sp +The \fBedit\fP argument is used to edit the details of a node on a server. Node data is stored as JSON on the server. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife node edit NODE_NAME (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-a\fP, \fB\-\-all\fP +Displays a node in the $EDITOR. By default, attributes that are default, override, or automatic are not shown. +.UNINDENT +.sp +\fBExamples\fP +.sp +To edit the data for a node named "node1", enter: +.sp +.nf +.ft C +$ knife node edit node1 \-a +.ft P +.fi +.sp +Update the role data in JSON: +.sp +.nf +.ft C +## sample: +{ + "normal": { + }, + "name": "node1", + "override": { + }, + "default": { + }, + "json_class": "Chef::Node", + "automatic": { + }, + "run_list": [ + "recipe[devops]", + "role[webserver]" + ], + "chef_type": "node" +} +.ft P +.fi +.sp +When finished, save it. +.SH FROM FILE +.sp +The \fBfrom file\fP argument is used to create a node using existing node data as a template. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife node from file FILE +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To add a node using data contained in a JSON file: +.sp +.nf +.ft C +$ knife node from file "path to JSON file" +.ft P +.fi +.SH LIST +.sp +The \fBlist\fP argument is used to view all of the nodes that exist on a server. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife node list (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-w\fP, \fB\-\-with\-uri\fP +Indicates that the corresponding URIs will be shown. +.UNINDENT +.sp +\fBExamples\fP +.sp +To verify the list of nodes that are registered with the server, enter: +.sp +.nf +.ft C +$ knife node list +.ft P +.fi +.sp +to return something similar to: +.sp +.nf +.ft C +i\-12345678 +rs\-123456 +.ft P +.fi +.SH RUN_LIST ADD +.sp +The \fBrun_list add\fP argument is used to add run list items (roles or recipes) to a node. A recipe must be in one of the following formats: fully qualified, cookbook, or default. Both roles and recipes must be in quotes, for example: \fB\(aqrole[ROLE_NAME]\(aq\fP or \fB\(aqrecipe[COOKBOOK::RECIPE_NAME]\(aq\fP. Use a comma to separate roles and recipes when adding more than one, like this: \fB\(aqrecipe[COOKBOOK::RECIPE_NAME],COOKBOOK::RECIPE_NAME,role[ROLE_NAME]\(aq\fP. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife node run_list add NODE_NAME RUN_LIST_ITEM (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-a ITEM\fP, \fB\-\-after ITEM\fP +Use this to add the run list item after the specified run list item. +.UNINDENT +.sp +\fBExamples\fP +.sp +To add a role to a run list, enter: +.sp +.nf +.ft C +$ knife node run_list add node \(aqrole[ROLE_NAME]\(aq +.ft P +.fi +.sp +To add roles and recipes to a run list, enter: +.sp +.nf +.ft C +$ knife node run_list add node \(aqrecipe[COOKBOOK::RECIPE_NAME],recipe[COOKBOOK::RECIPE_NAME],role[ROLE_NAME]\(aq +.ft P +.fi +.sp +To add a recipe to a run list using the fully qualified format, enter: +.sp +.nf +.ft C +$ knife node run_list add node \(aqrecipe[COOKBOOK::RECIPE_NAME]\(aq +.ft P +.fi +.sp +To add a recipe to a run list using the cookbook format, enter: +.sp +.nf +.ft C +$ knife node run_list add node \(aqCOOKBOOK::RECIPE_NAME\(aq +.ft P +.fi +.sp +To add the default recipe of a cookbook to a run list, enter: +.sp +.nf +.ft C +$ knife node run_list add node \(aqCOOKBOOK\(aq +.ft P +.fi +.SH RUN_LIST REMOVE +.sp +The \fBrun_list remove\fP argument is used to remove run list items (roles or recipes) from a node. A recipe must be in one of the following formats: fully qualified, cookbook, or default. Both roles and recipes must be in quotes, for example: \fB\(aqrole[ROLE_NAME]\(aq\fP or \fB\(aqrecipe[COOKBOOK::RECIPE_NAME]\(aq\fP. Use a comma to separate roles and recipes when removing more than one, like this: \fB\(aqrecipe[COOKBOOK::RECIPE_NAME],COOKBOOK::RECIPE_NAME,role[ROLE_NAME]\(aq\fP. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife node run_list remove NODE_NAME RUN_LIST_ITEM +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To remove a role from a run list, enter: +.sp +.nf +.ft C +$ knife node run_list remove node \(aqrole[ROLE_NAME]\(aq +.ft P +.fi +.sp +To remove a recipe from a run list using the fully qualified format, enter: +.sp +.nf +.ft C +$ knife node run_list remove node \(aqrecipe[COOKBOOK::RECIPE_NAME]\(aq +.ft P +.fi +.SH SHOW +.sp +The \fBshow\fP argument is used to display information about a node. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife node show NODE_NAME (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-a ATTR\fP, \fB\-\-attribute ATTR\fP +The attribute (or attributes) to show. +.TP +.B \fB\-l\fP, \fB\-\-long\fP +Display long output when searching nodes while using the default summary format. +.TP +.B \fB\-m\fP, \fB\-\-medium\fP +Display more, but not all, of a node\(aqs data when searching using the default summary format. +.TP +.B \fB\-r\fP, \fB\-\-run\-list\fP +Indicates that only the run\-list will be shown. +.UNINDENT +.sp +\fBExamples\fP +.sp +To view all data for a node named "build", enter: +.sp +.nf +.ft C +$ knife node show build +.ft P +.fi +.sp +to return: +.sp +.nf +.ft C +Node Name: build +Environment: _default +FQDN: +IP: +Run List: +Roles: +Recipes: +Platform: +.ft P +.fi +.sp +To show basic information about a node, truncated and nicely formatted: +.sp +.nf +.ft C +knife node show <node_name> +.ft P +.fi +.sp +To show all information about a node, nicely formatted: +.sp +.nf +.ft C +knife node show \-l <node_name> +.ft P +.fi +.sp +To list a single node attribute: +.sp +.nf +.ft C +knife node show <node_name> \-a <attribute_name> +.ft P +.fi +.sp +where \fB<attribute_name>\fP is something like kernel or platform. (This doesn\(aqt work for nested attributes like \fBnode[kernel][machine]\fP because \fBknife node show\fP doesn\(aqt understand nested attributes.) +.sp +To view the FQDN for a node named "i\-12345678", enter: +.sp +.nf +.ft C +$ knife node show i\-12345678 \-a fqdn +.ft P +.fi +.sp +to return: +.sp +.nf +.ft C +fqdn: ip\-10\-251\-75\-20.ec2.internal +.ft P +.fi +.sp +To view the run list for a node named "dev", enter: +.sp +.nf +.ft C +$ knife node show dev \-r +.ft P +.fi +.sp +To view information in JSON format, use the \fB\-F\fP common option as part of the command like this: +.sp +.nf +.ft C +$ knife role show devops \-F json +.ft P +.fi +.sp +Other formats available include \fBtext\fP, \fByaml\fP, and \fBpp\fP. +.sp +To view node information in raw JSON, use the \fB\-l\fP or \fB\-\-long\fP option: +.sp +.nf +.ft C +knife node show \-l \-F json <node_name> +.ft P +.fi +.sp +and/or: +.sp +.nf +.ft C +knife node show \-l \-\-format=json <node_name> +.ft P +.fi +.SH AUTHOR +Opscode +.SH COPYRIGHT +This work is licensed under a Creative Commons Attribution 3.0 Unported License +.\" Generated by docutils manpage writer. . -.SH "CHEF" -Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR diff --git a/distro/common/man/man1/knife-role.1 b/distro/common/man/man1/knife-role.1 index 7b1dc4dd11..cbf736ebf7 100644 --- a/distro/common/man/man1/knife-role.1 +++ b/distro/common/man/man1/knife-role.1 @@ -1,88 +1,376 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 +.TH "KNIFE-ROLE" "1" "Chef 11.8" "" "knife role" +.SH NAME +knife-role \- The man page for the knife role subcommand. . -.TH "KNIFE\-ROLE" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.nr rst2man-indent-level 0 . -.SH "NAME" -\fBknife\-role\fR \- Group common configuration settings -. -.SH "SYNOPSIS" -\fBknife\fR \fBrole\fR \fIsub\-command\fR \fI(options)\fR -. -.SH "ROLE SUB\-COMMANDS" -The following \fBrole\fR subcommands are available: -. -.SH "LIST" -\fBknife role list\fR \fI(options)\fR +.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 +A role is a way to define certain patterns and processes that exist across nodes in an organization as belonging to a single job function. Each role consists of zero (or more) attributes and a run list. Each node can have zero (or more) roles assigned to it. When a role is run against a node, the configuration details of that node are compared against the attributes of the role, and then the contents of that role\(aqs run list are applied to the node\(aqs configuration details. When a chef\-client runs, it merges its own attributes and run lists with those contained within each assigned role. +.sp +The \fBknife role\fP subcommand is used to manage the roles that are associated with one or more nodes on a server. +.sp +This subcommand has the following syntax: +.sp +.nf +.ft C +$ knife role [ARGUMENT] (options) +.ft P +.fi +.IP Note +Use the \fBknife node\fP subcommand (and the \fBrun_list add node\fP argument) to add a role to a node on the server. +.RE +.SH COMMON OPTIONS +.sp +The following options can be run with all Knife sub\-commands and plug\-ins: +.INDENT 0.0 .TP -\fB\-w\fR, \fB\-\-with\-uri\fR -Show corresponding URIs -. -.P -List roles\. -. -.SH "SHOW" -\fBknife role show ROLE\fR \fI(options)\fR -. +.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP +The configuration file to use. .TP -\fB\-a\fR, \fB\-\-attribute ATTR\fR -Show only one attribute -. -.P -Show a specific role\. -. -.SH "CREATE" -\fBknife role create ROLE\fR \fI(options)\fR -. +.B \fB\-\-color\fP +Indicates that colored output will be used. .TP -\fB\-d\fR, \fB\-\-description\fR -The role description -. -.P -Create a new role\. -. -.SH "EDIT" -\fBknife role edit ROLE\fR \fI(options)\fR -. -.P -Edit a role\. -. -.SH "FROM FILE" -\fBknife role from file FILE\fR \fI(options)\fR -. -.P -Create or update a role from a role Ruby DSL (\fB\.rb\fR) or JSON file\. -. -.SH "DELETE" -\fBknife role delete ROLE\fR \fI(options)\fR -. -.P -Delete a role\. -. -.SH "BULK DELETE" -\fBknife role bulk delete REGEX\fR \fI(options)\fR -. -.P -Delete roles on the Chef Server based on a regular expression\. The regular expression (\fIREGEX\fR) should be in quotes, not in //\'s\. -. -.SH "DESCRIPTION" -Roles provide a mechanism to group repeated configuration settings\. Roles are data structures that contain \fBdefault_attributes\fR, and \fBoverride_attributes\fR, which are nested hashes of configuration settings, and a \fBrun_list\fR, which is an ordered list of recipes and roles that should be applied to a host by chef\-client\. -. -.P -\fBdefault_attributes\fR will be overridden if they conflict with a value on a node that includes the role\. Conversely, \fBoverride_attributes\fR will override any values set on nodes that apply them\. -. -.P -When \fBchef\-client\fR(8) configures a host, it will "expand" the \fBrun_list\fR included in that host\'s node data\. The expansion process will recursively replace any roles in the run_list with that role\'s run_list\. -. -.SH "SEE ALSO" -\fBknife\-node(1)\fR \fBknife\-environment(1)\fR \fIhttp://wiki\.opscode\.com/display/chef/Roles\fR \fIhttp://wiki\.opscode\.com/display/chef/Attributes\fR -. -.SH "AUTHOR" -Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. -. -.SH "DOCUMENTATION" -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\. +.B \fB\-d\fP, \fB\-\-disable\-editing\fP +Indicates that $EDITOR will not be opened; data will be accepted as\-is. +.TP +.B \fB\-\-defaults\fP +Indicates that Knife will use the default value, instead of asking a user to provide one. +.TP +.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP +The $EDITOR that is used for all interactive commands. +.TP +.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP +The name of the environment. When this option is added to a command, the command will run only against the named environment. +.TP +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. +.TP +.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP +The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP. +.TP +.B \fB\-h\fP, \fB\-\-help\fP +Shows help for the command. +.TP +.B \fB\-k KEY\fP, \fB\-\-key KEY\fP +The private key that Knife will use to sign requests made by the API client to the server. +.TP +.B \fB\-\-no\-color\fP +Indicates that color will not be used in the output. +.TP +.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP +The user password. +.TP +.B \fB\-\-print\-after\fP +Indicates that data will be shown after a destructive operation. +.TP +.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP +The URL for the server. +.TP +.B \fB\-u USER\fP, \fB\-\-user USER\fP +The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key. +.TP +.B \fB\-v\fP, \fB\-\-version\fP +The version of the chef\-client. +.TP +.B \fB\-V\fP, \fB\-\-verbose\fP +Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. +.TP +.B \fB\-y\fP, \fB\-\-yes\fP +Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation). +.UNINDENT +.SH BULK DELETE +.sp +The \fBbulk delete\fP argument is used to delete one or more roles that match a pattern defined by a regular expression. The regular expression must be within quotes and not be surrounded by forward slashes (/). +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife role bulk delete REGEX +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To bulk delete roles using a regular expression: +.sp +.nf +.ft C +$ knife role bulk delete "^[0\-9]{3}$" +.ft P +.fi +.SH CREATE +.sp +The \fBcreate\fP argument is used to add a role to the server. To add a role to a node, you must use the \fBnode\fP sub\-command and the \fBrun\-list add\fP argument. Role data is saved as JSON on the server. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife role create ROLE_NAME (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-d DESCRIPTION\fP, \fB\-\-description DESCRIPTION\fP +The description of the role. This value will populate the description field for the role on the server. +.UNINDENT +.sp +\fBExamples\fP +.sp +To add a role named "role1", enter: +.sp +.nf +.ft C +$ knife role create role1 +.ft P +.fi +.sp +In the $EDITOR enter the role data in JSON: +.sp +.nf +.ft C +## sample: +{ + "name": "role1", + "default_attributes": { + }, + "json_class": "Chef::Role", + "run_list": [ + + ], + "description": "", + "chef_type": "role", + "override_attributes": { + } +} +.ft P +.fi +.sp +When finished, save it. +.SH DELETE +.sp +The \fBdelete\fP argument is used to delete a role from the server. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife role delete ROLE_NAME +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To delete a role: +.sp +.nf +.ft C +$ knife role delete devops +.ft P +.fi +.sp +Type \fBY\fP to confirm a deletion. +.SH EDIT +.sp +The \fBedit\fP argument is used to edit role details on the server. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife role edit ROLE_NAME +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To edit the data for a role named "role1", enter: +.sp +.nf +.ft C +$ knife role edit role1 +.ft P +.fi +.sp +Update the role data in JSON: +.sp +.nf +.ft C +## sample: +{ + "name": "role1", + "default_attributes": { + }, + "json_class": "Chef::Role", + "run_list": [ + + ], + "description": "This is the description for the role1 role.", + "chef_type": "role", + "override_attributes": { + } +} +.ft P +.fi +.sp +When finished, save it. +.SH FROM FILE +.sp +The \fBfrom file\fP argument is used to create a role using existing JSON data as a template. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife role from file FILE +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To view role details based on the values contained in a JSON file: +.sp +.nf +.ft C +$ knife role from file "path to JSON file" +.ft P +.fi +.SH LIST +.sp +The \fBlist\fP argument is used to view a list of roles that are currently available on the server. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife role list +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-w\fP, \fB\-\-with\-uri\fP +Indicates that the corresponding URIs will be shown. +.UNINDENT +.sp +\fBExamples\fP +.sp +To view a list of roles on the server and display the URI for each role returned, enter: +.sp +.nf +.ft C +$ knife role list \-w +.ft P +.fi +.SH SHOW +.sp +The \fBshow\fP argument is used to view the details of a role. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife role show ROLE_NAME +.ft P +.fi +.sp +\fBOptions\fP +.sp +This argument has the following options: +.INDENT 0.0 +.TP +.B \fB\-a ATTR\fP, \fB\-\-attribute ATTR\fP +The attribute (or attributes) to show. +.UNINDENT +.sp +\fBExamples\fP +.sp +To view information in JSON format, use the \fB\-F\fP common option as part of the command like this: +.sp +.nf +.ft C +$ knife role show devops \-F json +.ft P +.fi +.sp +Other formats available include \fBtext\fP, \fByaml\fP, and \fBpp\fP. +.sp +To view information in JSON format, use the \fB\-F\fP common option as part of the command like this: +.sp +.nf +.ft C +$ knife role show devops \-F json +.ft P +.fi +.sp +Other formats available include \fBtext\fP, \fByaml\fP, and \fBpp\fP. +.SH AUTHOR +Opscode +.SH COPYRIGHT +This work is licensed under a Creative Commons Attribution 3.0 Unported License +.\" Generated by docutils manpage writer. . -.SH "CHEF" -Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR diff --git a/distro/common/man/man1/knife-search.1 b/distro/common/man/man1/knife-search.1 index 21ab3da1e3..6f4edebe1f 100644 --- a/distro/common/man/man1/knife-search.1 +++ b/distro/common/man/man1/knife-search.1 @@ -1,280 +1,306 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 -. -.TH "KNIFE\-SEARCH" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" -. -.SH "NAME" -\fBknife\-search\fR \- Find objects on a Chef Server by query -. -.SH "SYNOPSIS" -\fBknife\fR \fBsearch INDEX QUERY\fR \fI(options)\fR -. +.TH "KNIFE-SEARCH" "1" "Chef 11.8" "" "knife search" +.SH NAME +knife-search \- The man page for the knife search subcommand. +. +.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 +Search indexes allow queries to be made for any type of data that is indexed by the server, including data bags (and data bag items), environments, nodes, and roles. A defined query syntax is used to support search patterns like exact, wildcard, range, and fuzzy. A search is a full\-text query that can be done from several locations, including from within a recipe, by using the \fBsearch\fP subcommand in Knife, by using the search functionality in the Management Console, or by using the \fB/search\fP or \fB/search/INDEX\fP endpoints in the Chef Server API. The search engine is based on Apache Solr and is run from the server. +.sp +The \fBknife search\fP subcommand is used run a search query for information that is indexed on a server. +.sp +\fBCommon Options\fP +.sp +The following options can be run with all Knife sub\-commands and plug\-ins: +.INDENT 0.0 .TP -\fB\-a\fR, \fB\-\-attribute ATTR\fR -Show only one attribute -. +.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP +The configuration file to use. .TP -\fB\-i\fR, \fB\-\-id\-only\fR -Show only the ID of matching objects -. +.B \fB\-\-color\fP +Indicates that colored output will be used. .TP -\fB\-q\fR, \fB\-\-query QUERY\fR -The search query; useful to protect queries starting with \- -. +.B \fB\-d\fP, \fB\-\-disable\-editing\fP +Indicates that $EDITOR will not be opened; data will be accepted as\-is. .TP -\fB\-R\fR, \fB\-\-rows INT\fR -The number of rows to return -. +.B \fB\-\-defaults\fP +Indicates that Knife will use the default value, instead of asking a user to provide one. .TP -\fB\-r\fR, \fB\-\-run\-list\fR -Show only the run list -. +.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP +The $EDITOR that is used for all interactive commands. .TP -\fB\-o\fR, \fB\-\-sort SORT\fR -The order to sort the results in -. +.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP +The name of the environment. When this option is added to a command, the command will run only against the named environment. .TP -\fB\-b\fR, \fB\-\-start ROW\fR -The row to start returning results at -. +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. .TP -\fB\-m\fR, \fB\-\-medium\fR -Display medium sized output when searching nodes using the default summary format -. +.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP +The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP. .TP -\fB\-l\fR, \fB\-\-long\fR -Display long output when searching nodes using the default summary format -. -.SH "DESCRIPTION" -Search is a feature of the Chef Server that allows you to use a full\-text search engine to query information about your infrastructure and applications\. You can utilize this service via search calls in a recipe or the knife search command\. The search syntax is based on Lucene\. -. -.SH "INDEXES" -Search indexes are a feature of the Chef Server and the search sub\-command allows querying any of the available indexes using SOLR query syntax\. The following data types are indexed for search: -. -.IP "\(bu" 4 -\fInode\fR -. -.IP "\(bu" 4 -\fIrole\fR -. -.IP "\(bu" 4 -\fIenvironment\fR -. -.IP "\(bu" 4 -\fIclients\fR -. -.IP "\(bu" 4 -\fIdata bag\fR -. -.IP "" 0 -. -.P -Data bags are indexed by the data bag\'s name\. For example, to search a data bag named "admins": -. -.IP "" 4 -. +.B \fB\-h\fP, \fB\-\-help\fP +Shows help for the command. +.TP +.B \fB\-k KEY\fP, \fB\-\-key KEY\fP +The private key that Knife will use to sign requests made by the API client to the server. +.TP +.B \fB\-\-no\-color\fP +Indicates that color will not be used in the output. +.TP +.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP +The user password. +.TP +.B \fB\-\-print\-after\fP +Indicates that data will be shown after a destructive operation. +.TP +.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP +The URL for the server. +.TP +.B \fB\-u USER\fP, \fB\-\-user USER\fP +The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key. +.TP +.B \fB\-v\fP, \fB\-\-version\fP +The version of the chef\-client. +.TP +.B \fB\-V\fP, \fB\-\-verbose\fP +Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. +.TP +.B \fB\-y\fP, \fB\-\-yes\fP +Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation). +.UNINDENT +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp .nf - -knife search admins "field:search_pattern" -. +.ft C +$ knife search INDEX SEARCH_QUERY +.ft P .fi -. -.IP "" 0 -. -.SH "QUERY SYNTAX" -Queries have the form \fBfield:search_pattern\fR where \fBfield\fR is a key in the JSON description of the relevant objects (nodes, roles, environments, or data bags)\. Both \fBfield\fR and \fBsearch_pattern\fR are case\-sensitive\. \fBsearch_pattern\fR can be an exact, wildcard, range, or fuzzy match (see below)\. The \fBfield\fR supports exact matching and limited wildcard matching\. -. -.P -Searches will return the relevant objects (nodes, roles, environments, or data bags) where the \fBsearch_pattern\fR matches the object\'s value of \fBfield\fR\. -. -.SS "FIELD NAMES" -Field names are the keys within the JSON description of the object being searched\. Nested Keys can be searched by placing an underscore ("_") between key names\. -. -.SS "WILDCARD MATCHING FOR FIELD NAMES" -The field name also has limited support for wildcard matching\. Both the "*" and "?" wildcards (see below) can be used within a field name; however, they cannot be the first character of the field name\. -. -.SS "EXACT MATCHES" -Without any search modifiers, a search returns those fields for which the \fBsearch_pattern\fR exactly matches the value of \fBfield\fR in the JSON description of the object\. -. -.SS "WILDCARD MATCHES" -Search support both single\- and multi\-character wildcard searches within a search pattern\. -. -.P -\'?\' matches exactly one character\. -. -.P -\'*\' matches zero or more characters\. -. -.SS "RANGE MATCHES" -Range searches allows one to match values between two given values\. To match values between X and Y, inclusively, use square brackets: -. -.IP "" 4 -. +.sp +where \fBINDEX\fP is one of \fBclient\fP, \fBenvironment\fP, \fBnode\fP, \fBrole\fP, or the name of a data bag and \fBSEARCH_QUERY\fP is the search query syntax for the query that will be executed. +.sp +\fBINDEX\fP is implied if omitted, and will default to \fBnode\fP. For example: +.sp .nf - -knife search INDEX \'field:[X TO Y] -. +.ft C +$ knife search \(aq*:*\(aq \-i +.ft P .fi -. -.IP "" 0 -. -.P -To match values between X and Y, exclusively, use curly brackets: -. -.IP "" 4 -. +.sp +will return something similar to: +.sp .nf +.ft C +8 items found -knife search INDEX \'field:{X TO Y}\' -. +centos\-62\-dev +opensuse\-1203 +ubuntu\-1304\-dev +ubuntu\-1304\-orgtest +ubuntu\-1204\-ohai\-test +ubuntu\-1304\-ifcfg\-test +ohai\-test +win2k8\-dev +.ft P .fi -. -.IP "" 0 -. -.P -Values are sorted in lexicographic order\. -. -.SS "FUZZY MATCHES" -Fuzzy searches allows one to match values based on the Levenshtein Distance algorithm\. To perform a fuzzy match, append a tilda (~) to the search term: -. -.IP "" 4 -. +.sp +and is the same search as: +.sp .nf - -knife search INDEX \'field:term~\' -. +.ft C +$ knife node search \(aq*:*" \-i +.ft P .fi -. -.IP "" 0 -. -.P -This search would return nodes whose \fBfield\fR was \'perm\' or \'germ\'\. -. -.SS "BOOLEAN OPERATORS" -The boolean operators NOT, AND, and OR are supported\. To find values of \fBfield\fR that are not X: -. -.IP "" 4 -. +.sp +If the \fBSEARCH_QUERY\fP does not contain a colon character (\fB:\fP), then the default query pattern is \fBtags:*#{@query}* OR roles:*#{@query}* OR fqdn:*#{@query}* OR addresses:*#{@query}*\fP, which means the following two search queries are effectively the same: +.sp .nf - -knife search INDEX \'field:(NOT X)\' -. +.ft C +$ knife search ubuntu +.ft P .fi -. -.IP "" 0 -. -.P -To find records where \fBfield1\fR is X and \fBfield2\fR is Y: -. -.IP "" 4 -. +.sp +or: +.sp .nf - -knife search INDEX \'field1:X AND field2:Y\' -. +.ft C +$ knife search node "tags:*ubuntu* OR roles:*ubuntu* OR fqdn:*ubuntu* (etc.)" +.ft P .fi -. -.IP "" 0 -. -.P -To find records where \fBfield\fR is X or Y: -. -.IP "" 4 -. +.sp +\fBOptions\fP +.sp +This sub\-command has the following options: +.INDENT 0.0 +.TP +.B \fB\-a ATTR\fP, \fB\-\-attribute ATTR\fP +The attribute (or attributes) to show. +.TP +.B \fB\-b ROW\fP, \fB\-\-start ROW\fP +The row at which return results will begin. +.TP +.B \fB\-i\fP, \fB\-\-id\-only\fP +Indicates that only matching object IDs will be shown. +.TP +.B \fBINDEX\fP +The name of the index to be queried: \fBclient\fP, \fBenvironment\fP, \fBnode\fP, \fBrole\fP, or \fBDATA_BAG_NAME\fP. Default index: \fBnode\fP. +.TP +.B \fB\-l\fP, \fB\-\-long\fP +Display long output when searching nodes while using the default summary format. +.TP +.B \fB\-m\fP, \fB\-\-medium\fP +Display more, but not all, of a node\(aqs data when searching using the default summary format. +.TP +.B \fB\-o SORT\fP, \fB\-\-sort SORT\fP +The order in which search results will be sorted. +.TP +.B \fB\-q SEARCH_QUERY\fP, \fB\-\-query SEARCH_QUERY\fP +Use to protect search queries that start with a hyphen (\-). A \fB\-q\fP query may be specified as an argument or an option, but not both. +.TP +.B \fB\-r\fP, \fB\-\-run\-list\fP +Indicates that only the run\-list will be shown. +.TP +.B \fB\-R INT\fP, \fB\-\-rows INT\fP +The number of rows to be returned. +.TP +.B \fBSEARCH_QUERY\fP +The search query used to identify a a list of items on a server. This option uses the same syntax as the \fBsearch\fP sub\-command. +.UNINDENT +.sp +\fBExamples\fP +.sp +To search for the IDs of all nodes running on the Amazon EC2 platform, enter: +.sp .nf - -knife search INDEX \'field:X OR field:Y\' -. +.ft C +$ knife search node \(aqec2:*\(aq \-i +.ft P .fi -. -.IP "" 0 -. -.SS "QUOTING AND SPECIAL CHARACTERS" -In order to avoid having special characters and escape sequences within your search term interpreted by either Ruby or the shell, enclose them in single quotes\. -. -.P -Search terms that include spaces should be enclosed in double\-quotes: -. -.IP "" 4 -. +.sp +to return something like: +.sp .nf +.ft C +4 items found -knife search INDEX \'field:"term with spaces"\' -. +ip\-0A7CA19F.ec2.internal + +ip\-0A58CF8E.ec2.internal + +ip\-0A58E134.ec2.internal + +ip\-0A7CFFD5.ec2.internal +.ft P .fi -. -.IP "" 0 -. -.P -The following characters must be escaped: -. -.IP "" 4 -. +.sp +To search for the instance type (flavor) of all nodes running on the Amazon EC2 platform, enter: +.sp .nf - -+ \- && || ! ( ) { } [ ] ^ " ~ * ? : \e -. +.ft C +$ knife search node \(aqec2:*\(aq \-a ec2.instance_type +.ft P .fi -. -.IP "" 0 -. -.SH "EXAMPLES" -Find the nodes with the fully\-qualified domain name (FQDN) www\.example\.com: -. -.IP "" 4 -. +.sp +to return something like: +.sp .nf +.ft C +4 items found -knife search node \'fqdn:www\.example\.com\' -. +ec2.instance_type: m1.large +id: ip\-0A7CA19F.ec2.internal + +ec2.instance_type: m1.large +id: ip\-0A58CF8E.ec2.internal + +ec2.instance_type: m1.large +id: ip\-0A58E134.ec2.internal + +ec2.instance_type: m1.large +id: ip\-0A7CFFD5.ec2.internal +.ft P .fi -. -.IP "" 0 -. -.P -Find the nodes running a version of Ubuntu: -. -.IP "" 4 -. +.sp +To search for all nodes running Ubuntu, enter: +.sp .nf - -knife search node \'platform:ubuntu*\' -. +.ft C +$ knife search node \(aqplatform:ubuntu\(aq +.ft P .fi -. -.IP "" 0 -. -.P -Find all nodes running CentOS in the production environment: -. -.IP "" 4 -. +.sp +To search for all nodes running CentOS in the production environment, enter: +.sp .nf - -knife search node \'chef_environment:production AND platform:centos\' -. +.ft C +$ knife search node \(aqchef_environment:production AND platform:centos\(aq +.ft P .fi +.sp +To find a nested attribute, use a pattern similar to the following: +.sp +.nf +.ft C +$ knife search node <query_to_run> \-a <main_attribute>.<nested_attribute> +.ft P +.fi +.sp +To build a search query to use more than one attribute, use an underscore ( _ ) to separate each attribute. For example, the following query will search for all nodes running a specific version of Ruby: +.sp +.nf +.ft C +$ knife search node "languages_ruby_version:1.9.3" +.ft P +.fi +.sp +To build a search query that can find a nested attribute: +.sp +.nf +.ft C +$ knife search node name:<node_name> \-a kernel.machine +.ft P +.fi +.sp +To test a search query that will be used in a \fBknife ssh\fP command: +.sp +.nf +.ft C +$ knife search node "role:web AND NOT name:web03" +.ft P +.fi +.sp +where the query in the previous example will search all servers that have the \fBweb\fP role, but not on the server named \fBweb03\fP. +.SH AUTHOR +Opscode +.SH COPYRIGHT +This work is licensed under a Creative Commons Attribution 3.0 Unported License +.\" Generated by docutils manpage writer. . -.IP "" 0 -. -.SH "KNOWN BUGS" -. -.IP "\(bu" 4 -Searches against the client index return no results in most cases\. (CHEF\-2477) -. -.IP "\(bu" 4 -Searches using the fuzzy match operator (~) produce an error\. (CHEF\-2478) -. -.IP "" 0 -. -.SH "SEE ALSO" -\fBknife\-ssh\fR(1) \fIhttp://wiki\.opscode\.com/display/chef/Attributes\fR Lucene Query Parser Syntax \fIhttp://lucene\.apache\.org/java/2_3_2/queryparsersyntax\.html\fR -. -.SH "AUTHOR" -Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. -. -.SH "DOCUMENTATION" -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\. -. -.SH "CHEF" -Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR diff --git a/distro/common/man/man1/knife-ssh.1 b/distro/common/man/man1/knife-ssh.1 index 3f999ba717..ea755c9769 100644 --- a/distro/common/man/man1/knife-ssh.1 +++ b/distro/common/man/man1/knife-ssh.1 @@ -1,79 +1,256 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 +.TH "KNIFE-SSH" "1" "Chef 11.8" "" "knife ssh" +.SH NAME +knife-ssh \- The man page for the knife ssh subcommand. . -.TH "KNIFE\-SSH" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.nr rst2man-indent-level 0 . -.SH "NAME" -\fBknife\-ssh\fR \- Run a command or interactive session on multiple remote hosts -. -.SH "SYNOPSIS" -\fBknife\fR \fBssh QUERY COMMAND\fR \fI(options)\fR +.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 +The \fBknife ssh\fP subcommand is used to invoke SSH commands (in parallel) on a subset of nodes within an organization, based on the results of a search query. +.sp +\fBCommon Options\fP +.sp +The following options can be run with all Knife sub\-commands and plug\-ins: +.INDENT 0.0 .TP -\fB\-a\fR, \fB\-\-attribute ATTR\fR -The attribute to use for opening the connection \- default is fqdn -. +.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP +The configuration file to use. .TP -\fB\-C\fR, \fB\-\-concurrency NUM\fR -The number of concurrent connections -. +.B \fB\-\-color\fP +Indicates that colored output will be used. .TP -\fB\-m\fR, \fB\-\-manual\-list\fR -QUERY is a space separated list of servers -. +.B \fB\-d\fP, \fB\-\-disable\-editing\fP +Indicates that $EDITOR will not be opened; data will be accepted as\-is. .TP -\fB\-P\fR, \fB\-\-ssh\-password PASSWORD\fR -The ssh password -. +.B \fB\-\-defaults\fP +Indicates that Knife will use the default value, instead of asking a user to provide one. .TP -\fB\-x\fR, \fB\-\-ssh\-user USERNAME\fR -The ssh username -. +.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP +The $EDITOR that is used for all interactive commands. .TP -\fB\-i\fR, \fB\-\-identity\-file IDENTITY_FILE\fR -The SSH identity file used for authentication -. +.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP +The name of the environment. When this option is added to a command, the command will run only against the named environment. .TP -\fB\-p\fR, \fB\-\-ssh\-port PORT\fR -The ssh port -. +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. .TP -\fB\-\-[no\-]host\-key\-verify\fR -Verify host key, enabled by default\. -. -.SH "DESCRIPTION" -The \fIssh\fR sub\-command opens an ssh session to each of the nodes in the search results of the \fIQUERY\fR\. This sub\-command requires that the net\-ssh\-multi and highline Ruby libraries are installed\. On Debian systems, these are the libnet\-ssh\-multi\-ruby and libhighline\-ruby packages\. They can also be installed as RubyGems (net\-ssh\-multi and highline, respectively)\. -. -.SH "TERMINAL MULTIPLEXING AND TERMINAL TAB SUPPORT" -\fBknife ssh\fR integrates with several terminal multiplexer programs to provide a more convenient means of managing multiple ssh sessions\. When the \fICOMMAND\fR option matches one of these, \fBknife ssh\fR will create multiple interactive ssh sessions running locally in the terminal multiplexer instead of invoking the command on the remote host\. -. -.P -The available multiplexers are: -. +.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP +The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP. .TP -\fBinteractive\fR -A built\-in multiplexer\. \fBinteractive\fR supports running commands on a subset of the connected hosts in parallel -. +.B \fB\-h\fP, \fB\-\-help\fP +Shows help for the command. .TP -\fBscreen\fR(1) -Runs ssh interactively inside \fBscreen\fR\. ~/\.screenrc will be sourced if it exists\. -. +.B \fB\-k KEY\fP, \fB\-\-key KEY\fP +The private key that Knife will use to sign requests made by the API client to the server. .TP -\fBtmux\fR(1) -Runs ssh interactively inside tmux\. -. +.B \fB\-\-no\-color\fP +Indicates that color will not be used in the output. .TP -\fBmacterm\fR (Mac OS X only) -Opens a Terminal\.app window and creates a tab for each ssh session\. You must install the rb\-appscript gem before you can use this option\. -. -.SH "SEE ALSO" -\fBknife\-search\fR(1) -. -.SH "AUTHOR" -Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. -. -.SH "DOCUMENTATION" -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\. +.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP +The user password. +.TP +.B \fB\-\-print\-after\fP +Indicates that data will be shown after a destructive operation. +.TP +.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP +The URL for the server. +.TP +.B \fB\-u USER\fP, \fB\-\-user USER\fP +The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key. +.TP +.B \fB\-v\fP, \fB\-\-version\fP +The version of the chef\-client. +.TP +.B \fB\-V\fP, \fB\-\-verbose\fP +Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. +.TP +.B \fB\-y\fP, \fB\-\-yes\fP +Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation). +.UNINDENT +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife ssh SEARCH_QUERY SSH_COMMAND (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This subcommand has the following options: +.INDENT 0.0 +.TP +.B \fB\-a SSH_ATTR\fP, \fB\-\-attribute SSH_ATTR\fP +The attribute that is used when opening the SSH connection. The default attribute is the FQDN of the host. Other possible values include a public IP address, a private IP address, or a hostname. +.TP +.B \fB\-C NUM\fP, \fB\-\-concurrency NUM\fP +The number of allowed concurrent connections. +.TP +.B \fB\-G GATEWAY\fP, \fB\-\-ssh\-gateway GATEWAY\fP +The SSH tunnel or gateway that is used to run a bootstrap action on a machine that is not accessible from the workstation. +.TP +.B \fB\-i IDENTITY_FILE\fP, \fB\-\-identity\-file IDENTIFY_FILE\fP +The SSH identity file used for authentication. Key\-based authentication is recommended. +.TP +.B \fB\-m\fP, \fB\-\-manual\-list\fP +Indicates that a search query is a space\-separated list of servers. If there is more than one item in the list, put quotes around the entire list. For example: \fB\-\-manual\-list "server01 server 02 server 03"\fP +.TP +.B \fB\-\-[no\-]host\-key\-verify\fP +Use \fB\-\-no\-host\-key\-verify\fP to disable host key verification. Default setting: \fB\-\-host\-key\-verify\fP. +.TP +.B \fBOTHER\fP +The shell type. Possible values: \fBinteractive\fP, \fBscreen\fP, \fBtmux\fP, \fBmacterm\fP, or \fBcssh\fP. (\fBcsshx\fP is deprecated in favor of \fBcssh\fP.) +.TP +.B \fB\-p PORT\fP, \fB\-\-ssh\-port PORT\fP +The SSH port. +.TP +.B \fB\-P PASSWORD\fP, \fB\-\-ssh\-password PASSWORD\fP +The SSH password. This can be used to pass the password directly on the command line. If this option is not specified (and a password is required) Knife will prompt for the password. +.TP +.B \fBSEARCH_QUERY\fP +The search query used to return a list of servers to be accessed using SSH and the specified \fBSSH_COMMAND\fP. This option uses the same syntax as the search sub\-command. +.TP +.B \fBSSH_COMMAND\fP +The command that will be run against the results of a search query. +.TP +.B \fB\-x USER_NAME\fP, \fB\-\-ssh\-user USER_NAME\fP +The SSH user name. +.UNINDENT +.sp +\fBExamples\fP +.sp +To find the uptime of all of web servers running Ubuntu on the Amazon EC2 platform, enter: +.sp +.nf +.ft C +$ knife ssh "role:web" "uptime" \-x ubuntu \-a ec2.public_hostname +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +ec2\-174\-129\-127\-206.compute\-1.amazonaws.com 13:50:47 up 1 day, 23:26, 1 user, load average: 0.25, 0.18, 0.11 +ec2\-67\-202\-63\-102.compute\-1.amazonaws.com 13:50:47 up 1 day, 23:33, 1 user, load average: 0.12, 0.13, 0.10 +ec2\-184\-73\-9\-250.compute\-1.amazonaws.com 13:50:48 up 16:45, 1 user, load average: 0.30, 0.22, 0.13 +ec2\-75\-101\-240\-230.compute\-1.amazonaws.com 13:50:48 up 1 day, 22:59, 1 user, load average: 0.24, 0.17, 0.11 +ec2\-184\-73\-60\-141.compute\-1.amazonaws.com 13:50:48 up 1 day, 23:30, 1 user, load average: 0.32, 0.17, 0.15 +.ft P +.fi +.sp +To run the chef\-client on all nodes, enter: +.sp +.nf +.ft C +$ knife ssh \(aqname:*\(aq \(aqsudo chef\-client\(aq +.ft P +.fi +.sp +To force a chef\-client run on all of the web servers running Ubuntu on the Amazon EC2 platform, enter: +.sp +.nf +.ft C +$ knife ssh "role:web" "sudo chef\-client" \-x ubuntu \-a ec2.public_hostname +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +ec2\-67\-202\-63\-102.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:37 +0000] INFO: Starting Chef Run (Version 0.9.10) +ec2\-174\-129\-127\-206.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:37 +0000] INFO: Starting Chef Run (Version 0.9.10) +ec2\-184\-73\-9\-250.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:38 +0000] INFO: Starting Chef Run (Version 0.9.10) +ec2\-75\-101\-240\-230.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:38 +0000] INFO: Starting Chef Run (Version 0.9.10) +ec2\-184\-73\-60\-141.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:38 +0000] INFO: Starting Chef Run (Version 0.9.10) +ec2\-174\-129\-127\-206.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: Chef Run complete in 1.419243 seconds +ec2\-174\-129\-127\-206.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: cleaning the checksum cache +ec2\-174\-129\-127\-206.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: Running report handlers +ec2\-174\-129\-127\-206.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: Report handlers complete +ec2\-67\-202\-63\-102.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: Chef Run complete in 1.578265 seconds +ec2\-67\-202\-63\-102.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: cleaning the checksum cache +ec2\-67\-202\-63\-102.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: Running report handlers +ec2\-67\-202\-63\-102.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:39 +0000] INFO: Report handlers complete +ec2\-184\-73\-9\-250.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Chef Run complete in 1.638884 seconds +ec2\-184\-73\-9\-250.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: cleaning the checksum cache +ec2\-184\-73\-9\-250.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Running report handlers +ec2\-184\-73\-9\-250.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Report handlers complete +ec2\-75\-101\-240\-230.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Chef Run complete in 1.540257 seconds +ec2\-75\-101\-240\-230.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: cleaning the checksum cache +ec2\-75\-101\-240\-230.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Running report handlers +ec2\-75\-101\-240\-230.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Report handlers complete +ec2\-184\-73\-60\-141.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Chef Run complete in 1.502489 seconds +ec2\-184\-73\-60\-141.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: cleaning the checksum cache +ec2\-184\-73\-60\-141.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Running report handlers +ec2\-184\-73\-60\-141.compute\-1.amazonaws.com [Fri, 22 Oct 2010 14:18:40 +0000] INFO: Report handlers complete +.ft P +.fi +.sp +To query for all nodes that have the "webserver" role and then use SSH to run the command "sudo chef\-client", enter: +.sp +.nf +.ft C +$ knife ssh "role:webserver" "sudo chef\-client" +.ft P +.fi +.sp +To upgrade all nodes, enter: +.sp +.nf +.ft C +$ knife ssh name:* "sudo aptitude upgrade \-y" +.ft P +.fi +.sp +To specify the shell type used on the nodes returned by a search query: +.sp +.nf +.ft C +$ knife ssh roles:opscode\-omnitruck macterm +.ft P +.fi +.sp +where \fBscreen\fP is one of the following values: \fBcssh\fP, \fBinteractive\fP, \fBmacterm\fP, \fBscreen\fP, or \fBtmux\fP. If the node does not have the shell type installed, Knife will return an error similar to the following: +.sp +.nf +.ft C +you need the rb\-appscript gem to use knife ssh macterm. +\(ga(sudo) gem install rb\-appscript\(ga to install +ERROR: LoadError: cannot load such file \-\- appscript +.ft P +.fi +.SH AUTHOR +Opscode +.SH COPYRIGHT +This work is licensed under a Creative Commons Attribution 3.0 Unported License +.\" Generated by docutils manpage writer. . -.SH "CHEF" -Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR diff --git a/distro/common/man/man1/knife-status.1 b/distro/common/man/man1/knife-status.1 index ee003b415a..b61f877b71 100644 --- a/distro/common/man/man1/knife-status.1 +++ b/distro/common/man/man1/knife-status.1 @@ -1,29 +1,209 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 +.TH "KNIFE-STATUS" "1" "Chef 11.8" "" "knife status" +.SH NAME +knife-status \- The man page for the knife status subcommand. . -.TH "KNIFE\-STATUS" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.nr rst2man-indent-level 0 . -.SH "NAME" -\fBknife\-status\fR \- Display status information for the nodes in your infrastructure -. -.SH "SYNOPSIS" -\fBknife\fR \fBstatus\fR \fI(options)\fR +.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 +The \fBknife status\fP subcommand is used to display a brief summary of the nodes on a server, including the time of the most recent successful chef\-client run. +.sp +\fBCommon Options\fP +.sp +The following options can be run with all Knife sub\-commands and plug\-ins: +.INDENT 0.0 .TP -\fB\-r\fR, \fB\-\-run\-list RUN_LIST\fR -Show the run list -. -.SH "DESCRIPTION" -The \fIstatus\fR sub\-command searches the Chef Server for all nodes and displays information about the last time the node checked into the server and executed a \fBnode\.save\fR\. The fields displayed are the relative checkin time, the node name, it\'s operating system platform and version, the fully\-qualified domain name and the default IP address\. If the \fB\-r\fR option is given, the node\'s run list will also be displayed\. Note that depending on the configuration of the nodes, the FQDN and IP displayed may not be publicly reachable\. -. -.SH "SEE ALSO" -\fBknife\-search\fR(1) -. -.SH "AUTHOR" -Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. -. -.SH "DOCUMENTATION" -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\. +.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP +The configuration file to use. +.TP +.B \fB\-\-color\fP +Indicates that colored output will be used. +.TP +.B \fB\-d\fP, \fB\-\-disable\-editing\fP +Indicates that $EDITOR will not be opened; data will be accepted as\-is. +.TP +.B \fB\-\-defaults\fP +Indicates that Knife will use the default value, instead of asking a user to provide one. +.TP +.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP +The $EDITOR that is used for all interactive commands. +.TP +.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP +The name of the environment. When this option is added to a command, the command will run only against the named environment. +.TP +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. +.TP +.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP +The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP. +.TP +.B \fB\-h\fP, \fB\-\-help\fP +Shows help for the command. +.TP +.B \fB\-k KEY\fP, \fB\-\-key KEY\fP +The private key that Knife will use to sign requests made by the API client to the server. +.TP +.B \fB\-\-no\-color\fP +Indicates that color will not be used in the output. +.TP +.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP +The user password. +.TP +.B \fB\-\-print\-after\fP +Indicates that data will be shown after a destructive operation. +.TP +.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP +The URL for the server. +.TP +.B \fB\-u USER\fP, \fB\-\-user USER\fP +The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key. +.TP +.B \fB\-v\fP, \fB\-\-version\fP +The version of the chef\-client. +.TP +.B \fB\-V\fP, \fB\-\-verbose\fP +Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. +.TP +.B \fB\-y\fP, \fB\-\-yes\fP +Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation). +.UNINDENT +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife status (options) +.ft P +.fi +.sp +\fBOptions\fP +.sp +This subcommand has the following options: +.INDENT 0.0 +.TP +.B \fBQUERY\fP +The search query used to identify a a list of items on a server. This option uses the same syntax as the \fBsearch\fP sub\-command. +.TP +.B \fB\-H\fP, \fB\-\-hide\-healthy\fP +Indicates that nodes on which a chef\-client run has occurred within the previous hour will be hidden. +.TP +.B \fB\-r RUN_LIST\fP, \fB\-\-run\-list RUN_LIST\fP +A comma\-separated list of roles and/or recipes to be applied. +.TP +.B \fB\-s\fP, \fB\-\-sort\-reverse\fP +Indicates that the list will be sorted by last run time, descending. +.UNINDENT +.sp +\fBExamples\fP +.sp +To include run lists in the status, enter: +.sp +.nf +.ft C +$ knife status \-\-run\-list +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +20 hours ago, dev\-vm.chisamore.com, ubuntu 10.04, dev\-vm.chisamore.com, 10.66.44.126, role[lb]. +3 hours ago, i\-225f954f, ubuntu 10.04, ec2\-67\-202\-63\-102.compute\-1.amazonaws.com, 67.202.63.102, role[web]. +3 hours ago, i\-a45298c9, ubuntu 10.04, ec2\-174\-129\-127\-206.compute\-1.amazonaws.com, 174.129.127.206, role[web]. +3 hours ago, i\-5272a43f, ubuntu 10.04, ec2\-184\-73\-9\-250.compute\-1.amazonaws.com, 184.73.9.250, role[web]. +3 hours ago, i\-226ca64f, ubuntu 10.04, ec2\-75\-101\-240\-230.compute\-1.amazonaws.com, 75.101.240.230, role[web]. +3 hours ago, i\-f65c969b, ubuntu 10.04, ec2\-184\-73\-60\-141.compute\-1.amazonaws.com, 184.73.60.141, role[web]. +.ft P +.fi +.sp +To show only the status nodes on which the chef\-client ran within the past hour, enter: +.sp +.nf +.ft C +$ knife status \-\-hide\-healthy +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +1 hour ago, i\-256f884f, ubuntu 12.04, ec2\-67\-202\-63\-102.compute\-1.amazonaws.com, 67.202.63.102, role[web]. +1 hour ago, i\-a47823c9, ubuntu 10.04, ec2\-174\-129\-127\-206.compute\-1.amazonaws.com, 184.129.143.111, role[lb]. +.ft P +.fi +.sp +To show the status of a subset of nodes that are returned by a specific query, enter: +.sp +.nf +.ft C +$ knife status "role:web" \-\-run\-list +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +3 hours ago, i\-225f954f, ubuntu 10.04, ec2\-67\-202\-63\-102.compute\-1.amazonaws.com, 67.202.63.102, role[web]. +3 hours ago, i\-a45298c9, ubuntu 10.04, ec2\-174\-129\-127\-206.compute\-1.amazonaws.com, 174.129.127.206, role[web]. +3 hours ago, i\-5272a43f, ubuntu 10.04, ec2\-184\-73\-9\-250.compute\-1.amazonaws.com, 184.73.9.250, role[web]. +3 hours ago, i\-226ca64f, ubuntu 10.04, ec2\-75\-101\-240\-230.compute\-1.amazonaws.com, 75.101.240.230, role[web]. +3 hours ago, i\-f65c969b, ubuntu 10.04, ec2\-184\-73\-60\-141.compute\-1.amazonaws.com, 184.73.60.141, role[web]. +.ft P +.fi +.sp +To view the status of all nodes in the organization, enter: +.sp +.nf +.ft C +$ knife status +.ft P +.fi +.sp +to return something like: +.sp +.nf +.ft C +20 hours ago, dev\-vm.chisamore.com, ubuntu 10.04, dev\-vm.chisamore.com, 10.66.44.126 +3 hours ago, i\-225f954f, ubuntu 10.04, ec2\-67\-202\-63\-102.compute\-1.amazonaws.com, 67.202.63.102 +3 hours ago, i\-a45298c9, ubuntu 10.04, ec2\-174\-129\-127\-206.compute\-1.amazonaws.com, 174.129.127.206 +3 hours ago, i\-5272a43f, ubuntu 10.04, ec2\-184\-73\-9\-250.compute\-1.amazonaws.com, 184.73.9.250 +3 hours ago, i\-226ca64f, ubuntu 10.04, ec2\-75\-101\-240\-230.compute\-1.amazonaws.com, 75.101.240.230 +3 hours ago, i\-f65c969b, ubuntu 10.04, ec2\-184\-73\-60\-141.compute\-1.amazonaws.com, 184.73.60.141 +.ft P +.fi +.SH AUTHOR +Opscode +.SH COPYRIGHT +This work is licensed under a Creative Commons Attribution 3.0 Unported License +.\" Generated by docutils manpage writer. . -.SH "CHEF" -Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR diff --git a/distro/common/man/man1/knife-tag.1 b/distro/common/man/man1/knife-tag.1 index 1ee5beaf0c..135969b393 100644 --- a/distro/common/man/man1/knife-tag.1 +++ b/distro/common/man/man1/knife-tag.1 @@ -1,43 +1,182 @@ -.\" generated with Ronn/v0.7.3 -.\" http://github.com/rtomayko/ronn/tree/0.7.3 +.TH "KNIFE-TAG" "1" "Chef 11.8" "" "knife tag" +.SH NAME +knife-tag \- The man page for the knife tag subcommand. . -.TH "KNIFE\-TAG" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.nr rst2man-indent-level 0 . -.SH "NAME" -\fBknife\-tag\fR \- Apply tags to nodes on a Chef Server +.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. . -.SH "SYNOPSIS" -\fBknife\fR \fBtag\fR \fIsubcommand\fR \fI(options)\fR +.sp +A tag is a custom description that is applied to a node. A tag, once applied, can be helpful when managing nodes using Knife or when building recipes by providing alternate methods of grouping similar types of information. +.sp +The \fBknife tag\fP subcommand is used to apply tags to nodes on a server. +.sp +This subcommand has the following syntax: +.sp +.nf +.ft C +$ knife tag [ARGUMENT] +.ft P +.fi +.SH COMMON OPTIONS +.sp +The following options can be run with all Knife sub\-commands and plug\-ins: +.INDENT 0.0 +.TP +.B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP +The configuration file to use. +.TP +.B \fB\-\-color\fP +Indicates that colored output will be used. +.TP +.B \fB\-d\fP, \fB\-\-disable\-editing\fP +Indicates that $EDITOR will not be opened; data will be accepted as\-is. +.TP +.B \fB\-\-defaults\fP +Indicates that Knife will use the default value, instead of asking a user to provide one. +.TP +.B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP +The $EDITOR that is used for all interactive commands. +.TP +.B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP +The name of the environment. When this option is added to a command, the command will run only against the named environment. +.TP +.B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP +Indicates that the private key will be saved to a specified file name. +.TP +.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP +The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP. +.TP +.B \fB\-h\fP, \fB\-\-help\fP +Shows help for the command. +.TP +.B \fB\-k KEY\fP, \fB\-\-key KEY\fP +The private key that Knife will use to sign requests made by the API client to the server. +.TP +.B \fB\-\-no\-color\fP +Indicates that color will not be used in the output. +.TP +.B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP +The user password. +.TP +.B \fB\-\-print\-after\fP +Indicates that data will be shown after a destructive operation. +.TP +.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP +The URL for the server. +.TP +.B \fB\-u USER\fP, \fB\-\-user USER\fP +The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key. +.TP +.B \fB\-v\fP, \fB\-\-version\fP +The version of the chef\-client. +.TP +.B \fB\-V\fP, \fB\-\-verbose\fP +Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. +.TP +.B \fB\-y\fP, \fB\-\-yes\fP +Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation). +.UNINDENT +.SH CREATE +.sp +The \fBcreate\fP argument is used to add one or more tags to a node. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife tag create NODE_NAME [TAG...] +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To create tags named "seattle", "portland", and "vancouver", enter: +.sp +.nf +.ft C +$ knife tag create node seattle portland vancouver +.ft P +.fi +.SH DELETE +.sp +The \fBdelete\fP argument is used to delete one or more tags from a node. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife tag delete NODE_NAME [TAG...] +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.sp +\fBExamples\fP +.sp +To delete tags named "denver" and "phoenix", enter: +.sp +.nf +.ft C +$ knife tag delete node denver phoenix +.ft P +.fi +.sp +Type \fBY\fP to confirm a deletion. +.SH LIST +.sp +The \fBlist\fP argument is used to list all of the tags that have been applied to a node. +.sp +\fBSyntax\fP +.sp +This argument has the following syntax: +.sp +.nf +.ft C +$ knife tag list [NODE_NAME...] +.ft P +.fi +.sp +\fBOptions\fP +.sp +This command does not have any specific options. +.SH AUTHOR +Opscode +.SH COPYRIGHT +This work is licensed under a Creative Commons Attribution 3.0 Unported License +.\" Generated by docutils manpage writer. . -.SH "TAG SUBCOMMANDS" -The following \fBtag\fR subcommands are available: -. -.SH "CREATE" -\fBknife tag create\fR \fInode\fR \fItag\fR [\fI\.\.\.\fR] -. -.P -Adds one or more tags to \fInode\fR -. -.SH "DELETE" -\fBknife tag delete\fR \fInode\fR \fItag\fR [\fI\.\.\.\fR] -. -.P -Removes one or more tags from \fInode\fR -. -.SH "LIST" -\fBknife tag list\fR \fInode\fR -. -.P -Lists the tags applied to \fInode\fR -. -.SH "SEE ALSO" -\fBknife\-node(1)\fR -. -.SH "AUTHOR" -Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. -. -.SH "DOCUMENTATION" -This manual page was written by Daniel DeLeo \fIdan@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\. -. -.SH "CHEF" -Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR diff --git a/distro/common/man/man1/knife.1 b/distro/common/man/man1/knife.1 index 323acd0403..a8ce1c10fd 100644 --- a/distro/common/man/man1/knife.1 +++ b/distro/common/man/man1/knife.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE" "1" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.TH "KNIFE" "1" "July 2013" "Chef 11.8.0.alpha.0" "Chef Manual" . .SH "NAME" \fBknife\fR \- Chef Server API client utility diff --git a/distro/common/man/man8/chef-client.8 b/distro/common/man/man8/chef-client.8 index cfb4166189..b0e8eac533 100644 --- a/distro/common/man/man8/chef-client.8 +++ b/distro/common/man/man8/chef-client.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-CLIENT" "8" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.TH "CHEF\-CLIENT" "8" "July 2013" "Chef 11.8.0.alpha.0" "Chef Manual" . .SH "NAME" \fBchef\-client\fR \- Runs a client node connecting to a chef\-server\. diff --git a/distro/common/man/man8/chef-expander.8 b/distro/common/man/man8/chef-expander.8 index 7467cefb68..6ab31d46c4 100644 --- a/distro/common/man/man8/chef-expander.8 +++ b/distro/common/man/man8/chef-expander.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-EXPANDER" "8" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.TH "CHEF\-EXPANDER" "8" "July 2013" "Chef 11.8.0.alpha.0" "Chef Manual" . .SH "NAME" \fBchef\-expander\fR \- fetches messages from RabbitMQ, processes, and loads into chef\-solr diff --git a/distro/common/man/man8/chef-expanderctl.8 b/distro/common/man/man8/chef-expanderctl.8 index 59dc12629c..f2e88a426f 100644 --- a/distro/common/man/man8/chef-expanderctl.8 +++ b/distro/common/man/man8/chef-expanderctl.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-EXPANDERCTL" "8" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.TH "CHEF\-EXPANDERCTL" "8" "July 2013" "Chef 11.8.0.alpha.0" "Chef Manual" . .SH "NAME" \fBchef\-expanderctl\fR \- management program for chef\-expander diff --git a/distro/common/man/man8/chef-server-webui.8 b/distro/common/man/man8/chef-server-webui.8 index b132712dfa..3f2157216c 100644 --- a/distro/common/man/man8/chef-server-webui.8 +++ b/distro/common/man/man8/chef-server-webui.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SERVER\-WEBUI" "8" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.TH "CHEF\-SERVER\-WEBUI" "8" "July 2013" "Chef 11.8.0.alpha.0" "Chef Manual" . .SH "NAME" \fBchef\-server\-webui\fR \- Start the Chef Server merb application slice providing Web User Interface (Management Console)\. diff --git a/distro/common/man/man8/chef-server.8 b/distro/common/man/man8/chef-server.8 index 2b02860adb..ce928d6f63 100644 --- a/distro/common/man/man8/chef-server.8 +++ b/distro/common/man/man8/chef-server.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SERVER" "8" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.TH "CHEF\-SERVER" "8" "July 2013" "Chef 11.8.0.alpha.0" "Chef Manual" . .SH "NAME" \fBchef\-server\fR \- Start the Chef Server merb application slice\. diff --git a/distro/common/man/man8/chef-solo.8 b/distro/common/man/man8/chef-solo.8 index d43a4ac2ec..30c5956825 100644 --- a/distro/common/man/man8/chef-solo.8 +++ b/distro/common/man/man8/chef-solo.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SOLO" "8" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.TH "CHEF\-SOLO" "8" "July 2013" "Chef 11.8.0.alpha.0" "Chef Manual" . .SH "NAME" \fBchef\-solo\fR \- Runs chef in solo mode against a specified cookbook location\. diff --git a/distro/common/man/man8/chef-solr.8 b/distro/common/man/man8/chef-solr.8 index 1084a5c712..28c8e92cf3 100644 --- a/distro/common/man/man8/chef-solr.8 +++ b/distro/common/man/man8/chef-solr.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SOLR" "8" "October 2013" "Chef 11.8.0.rc.0" "Chef Manual" +.TH "CHEF\-SOLR" "8" "July 2013" "Chef 11.8.0.alpha.0" "Chef Manual" . .SH "NAME" \fBchef\-solr\fR \- Runs as Chef\'s search server |