Browse files

add man page for ``knife search``

  • Loading branch information...
1 parent b9c0c65 commit d8db19d8b94d73025e9cc7c3ec2e82987e7c9c58 jamescott committed Dec 20, 2012
View
BIN man_knife_search/build/.doctrees/environment.pickle
Binary file not shown.
View
BIN man_knife_search/build/.doctrees/index.doctree
Binary file not shown.
View
213 man_knife_search/build/knife-search.1
@@ -0,0 +1,213 @@
+.TH "KNIFE-SEARCH" "1" "December 20, 2012" "0.0.1" "knife-search"
+.SH NAME
+knife-search \- Man page for knife-search.
+.
+.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 Chef server, including data bags (and data bag items), environments, nodes, and roles. Chef has a defined query syntax that supports 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 sub\-command 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 Chef server.
+.sp
+The \fBsearch\fP sub\-command is used run a search query for information that is indexed on a Chef server.
+.sp
+The sub\-command has the following syntax:
+.sp
+.nf
+.ft C
+knife search INDEX SEARCH_QUERY
+.ft P
+.fi
+.sp
+where \fBINDEX\fP is one of \fBclient\fP, \fBenvironment\fP, \fBnode\fP, \fBrole\fP, or the name of a data bag and SEARCH_QUERY is the search query syntax for the query that will be executed.
+.sp
+This sub\-command has the following options:
+.INDENT 0.0
+.TP
+.B \fB\-a ATTR\fP, \fB\-\-attribute ATTR\fP
+Indicates that only a single attribute is shown, as defined by the \fBATTR\fP value.
+.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.
+.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 Chef server. This option uses the same syntax as the \fBsearch\fP sub\-command.
+.UNINDENT
+.sp
+For example, to search for the IDs of all nodes running on the Amazon EC2 platform, enter:
+.sp
+.nf
+.ft C
+$ knife search node \(aqec2:*\(aq \-i
+.ft P
+.fi
+.sp
+to return something like:
+.sp
+.nf
+.ft C
+4 items found
+
+ip\-0A7CA19F.ec2.internal
+
+ip\-0A58CF8E.ec2.internal
+
+ip\-0A58E134.ec2.internal
+
+ip\-0A7CFFD5.ec2.internal
+.ft P
+.fi
+.sp
+To search for the instance type (flavor) of all nodes running on the Amazon EC2 platform, enter:
+.sp
+.nf
+.ft C
+$ knife search node \(aqec2:*\(aq \-a ec2.instance_type
+.ft P
+.fi
+.sp
+to return something like:
+.sp
+.nf
+.ft C
+4 items found
+
+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
+.sp
+To search for all nodes running Ubuntu, enter:
+.sp
+.nf
+.ft C
+$ knife search node \(aqplatform:ubuntu\(aq
+.ft P
+.fi
+.sp
+To search for all nodes running CentOS in the production environment, enter:
+.sp
+.nf
+.ft C
+$ knife search node \(aqchef_environment:production AND platform:centos\(aq
+.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 Chef server environment. When this option is added to a command, the command will run only against the named environment.
+.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 Knife or for a sub\-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 Chef server.
+.TP
+.B \fB\-\-no\-color\fP
+Indicates that color will not be used in the output.
+.TP
+.B \fB\-\-print\-after\fP
+Indicates that data will be shown after a destructive operation.
+.TP
+.B \fB\-\-repo\-mode MODE\fP
+The layout of the local repository. The \fBdefault\fP repository includes cookbooks, data bags, environments, and roles. The \fBeverything\fP repository adds nodes, API client, and users. Default value: \fBdefault\fP.
+.TP
+.B \fB\-s URL\fP, \fB\-\-server\-url URL\fP
+The URL for the Chef server.
+.TP
+.B \fB\-u USER\fP, \fB\-\-user USER\fP
+A user name that Knife will use to sign requests made by the API client to the Chef server. If this option is used, be sure to ensure that the user name matches the private key or authentication will fail.
+.TP
+.B \fB\-v\fP, \fB\-\-version\fP
+Shows the version of Chef.
+.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 "yes" will be the response to all confirmation prompts (and that Knife will not ask a user for confirmation).
+.UNINDENT
+.SH AUTHOR
+Opscode
+.SH COPYRIGHT
+2012, Opscode, Inc
+.\" Generated by docutils manpage writer.
+.

0 comments on commit d8db19d

Please sign in to comment.