Discover Command Type
The Discover command interact with the Choria Discovery system used to find fleet nodes based on a vast array of possible queries and data sources.
Since this is built into Choria it will simply use your Choria Client configuration for the user executing the command
to find the Choria Brokers and more. It supports the usual override methods such as creating a
choria.conf file in
your project working directory. No connection properties are required or supported.
Before using this command type I suggest reading about the Choria Discovery System.
This feature is only available when hosting App Builder applications within the Choria Server version 0.26.0 or newer
This command supports all the standard properties like Arguments, Flags, Banners and more, below is a simply command that finds apache servers.
name: find description: Finds all machines tagged as Apache Servers type: discover std_filters: true filter: classes: - roles::apache
When run it will show a list of matching nodes, one per line. It also accepts the
--json flag to enable returning a
JSON array of matching nodes.
std_filters option is set the command will also accept additional filters in standard Choria format. Flags
-F, discovery mode selectors and more. User supplied options will be merged/appended with the ones supplied
in the YAML file. By default, none of the standard Choria flags will be added to the CLI.
All the filter values, even arrays and objects, support templating.
The main tunable here is the filter, below a reference of available options. The examples here are a bit short, I suggest you read the Choria Discovery Documentation for a thorough understanding.
|The collective to target, defaults to main collective|
|List of fact filters as passed to |
|List of agent filters as passed to |
|List of Config Management classes to match as passed to |
|List of node identities to match as passed to |
|List of Combined filters as passed to |
|A single Compound filter as passed to |
|A discovery method to use like |
|A set of discovery options, specific to the |
|How long discovery can run, in seconds, as passed to |
|Enables windowed dynamic timeout rather than a set discovery timeout|
|Short cut to use flatfile discovery with a specific file, as passed to |