Skip to content

help cli

James Nesbitt edited this page Sep 4, 2015 · 8 revisions

CLI Syntax

The standard command line form is:

$/> coach {targets} {global flags} {operation} {operation flags}

An example would be:

$/> coach @db -v pull --force
  • @db : the target
  • -v : a global flag (in this case it sets verbosity)
  • pull : the operation
  • --force : a flag that the operation can interpret (in this case force the pull)

Output

Command output is written to the tty during execution.

Messages currently look like this:

[{object}][{sub-object}].... [DEBUG] {message}

Messages can include:

  • message : a single line informational message about what coach is doing;
  • note: A multiline message, usually used for help messages;
  • warning : an indication that a minor failure has occurred;
  • error: an indication that a significant failure has occurred;
  • debug : debugging message, only visible when verbosity is increased;
  • debugobject : debugging object information, only visible when verbosity is increased.

Verbosity

There are three global flags that can be used to increase verbosity:

  • -v (--verbose) : additional informational messages will be shown.
  • -vv (--debug) : debug level verbosity
  • -vvv (--staaap) : really really really verbose

Targets

Targets are terms that specify which node and node instances should be targeted by the operation.

The format of a target is one of the following:

  • @{node}[.{instance}] : a node, an optionally a particular instance of that node
  • %{node-type} : all nodes of that type

Any number of targets can be added to a coach command, and a union of all target nodes/instances will be used by the operation.

Note that some operations ignore node or instance targets, as they are not relevant. For example:

  • the init operation currently has no need for target information (althought maybe it will be used in the future to dictate which nodes to create)
  • the create/pull/destroy operations apply at the node level only, so all instance targets are ignored, and only node targets are considered.
Clone this wiki locally