website: Updating docs

This commit is contained in:
Armon Dadgar 2014-09-01 15:03:37 -07:00
parent a6f5e40eac
commit 2d7be20431
6 changed files with 76 additions and 1 deletions

View File

@ -1209,7 +1209,8 @@ can be specified using the "?dc=" query parameter.
The fire endpoint expects a PUT request, with an optional body.
The body contents are opaque to Consul, and become the "payload"
of the event.
of the event. Any names starting with the "_" prefix should be considered
reserved, and for Consul's internal use.
The `?node=`, `?service=`, and `?tag=` query parameters may optionally
be provided. They respectively provide a regular expression to filter

View File

@ -227,6 +227,9 @@ definitions support being updated during a reload.
* `data_dir` - Equivalent to the `-data-dir` command-line flag.
* `disable_remote_exec` - Disables support for remote execution. When set to true,
the agent will ignore any incoming remote exec requests.
* `dns_config` - This object allows a number of sub-keys to be set which can tune
how DNS queries are perfomed. See this guide on [DNS caching](/docs/guides/dns-cache.html).
The following sub-keys are available:

View File

@ -0,0 +1,62 @@
---
layout: "docs"
page_title: "Commands: Exec"
sidebar_current: "docs-commands-exec"
---
# Consul Exec
Command: `consul exec`
The exec command provides a mechahanism for remote execution. For example,
this can be used to run the `uptime` command across all machines providing
the `web` service.
Remote execution works by specifying a job which is stored in the KV store.
Agent's are informed about the new job using the [event system](/docs/commands/event.html),
which propogates messages via the [gossip protocol](/docs/internals/gossip.html).
As a result, delivery is best-effort, and there is **no guarantee** of execution.
While events are purely gossip driven, remote execution relies on the KV store
as a message broker. As a result, the `exec` command will not be able to
properly function during a Consul outage.
## Usage
Usage: `consul exec [options] [-|command...]`
The only required option is a command to execute. This is either given
as trailing arguments, or by specifying '-', stdin will be read to
completion as a script to evaluate.
The list of available flags are:
* `-http-addr` - Address to the HTTP server of the agent you want to contact
to send this command. If this isn't specified, the command will contact
"127.0.0.1:8500" which is the default HTTP address of a Consul agent.
* `-datacenter` - Datacenter to query. Defaults to that of agent. In version
0.4, that is the only supported value.
* `-prefix` - Key prefix in the KV store to use for storing request data.
Defaults to "_rexec".
* `-node` - Regular expression to filter nodes which should evaluate the event.
* `-service` - Regular expression to filter to only nodes with matching services.
* `-tag` - Regular expression to filter to only nodes with a service that has
a matching tag. This must be used with `-service`. As an example, you may
do "-server mysql -tag slave".
* `-wait` - Specifies the period of time in which no agent's respond before considering
the job finished. This is basically the quiescent time required to assume completion.
This period is not a hard deadline, and the command will wait longer depending on
various heuristics.
* `-wait-repl` - Period to wait after writing the job specification for replication.
This is a heuristic value and enables agents to do a stale read of the job. Defaults
to 200msec.
* `-verbose` - Enables verbose output.

View File

@ -25,6 +25,8 @@ usage: consul [--version] [--help] <command> [<args>]
Available commands are:
agent Runs a Consul agent
event Fire a new event
exec Executes a command on Consul nodes
force-leave Forces a member of the cluster to enter the "left" state
info Provides debugging information for operators
join Tell Consul agent to join cluster

View File

@ -49,6 +49,8 @@ usage: consul [--version] [--help] <command> [<args>]
Available commands are:
agent Runs a Consul agent
event Fire a new event
exec Executes a command on Consul nodes
force-leave Forces a member of the cluster to enter the "left" state
info Provides debugging information for operators
join Tell Consul agent to join cluster
@ -56,6 +58,7 @@ Available commands are:
leave Gracefully leaves the Consul cluster and shuts down
members Lists the members of a Consul cluster
monitor Stream logs from a Consul agent
reload Triggers the agent to reload configuration files
version Prints the Consul version
watch Watch for changes in Consul
```

View File

@ -61,6 +61,10 @@
<li<%= sidebar_current("docs-commands-event") %>>
<a href="/docs/commands/event.html">event</a>
</li>
<li<%= sidebar_current("docs-commands-exec") %>>
<a href="/docs/commands/exec.html">exec</a>
</li>
<li<%= sidebar_current("docs-commands-forceleave") %>>