From 418c76d8bb2eebb4a8a85bd76c005c040d3afad8 Mon Sep 17 00:00:00 2001 From: Brian Shumate Date: Tue, 6 Dec 2016 14:46:26 -0500 Subject: [PATCH] updates based on feedback --- .../commands/environment-variables.html.md | 80 +++++++++++++++++++ .../source/docs/commands/environment.html.md | 48 ----------- 2 files changed, 80 insertions(+), 48 deletions(-) create mode 100644 website/source/docs/commands/environment-variables.html.md delete mode 100644 website/source/docs/commands/environment.html.md diff --git a/website/source/docs/commands/environment-variables.html.md b/website/source/docs/commands/environment-variables.html.md new file mode 100644 index 0000000000..889227414f --- /dev/null +++ b/website/source/docs/commands/environment-variables.html.md @@ -0,0 +1,80 @@ +--- +layout: "docs" +page_title: "Environment Variables" +sidebar_current: "docs-commands-environment-variables" +description: |- + Consul's behavior can be modified by certain environment variables. +--- + +# Environment variables + +In addition to CLI flags, Consul reads environment variables for behavior +defaults. CLI flags always take precedence over environment variables, but it +is often helpful to use environment variables to configure the Consul agent, +particularly with configuration management and init systems. + +The following table describes these variables: + +## `CONSUL_HTTP_ADDR` + +This is the HTTP API address to the *local* Consul agent +(not the remote server) specified as a URI: + +``` +CONSUL_HTTP_ADDR=127.0.0.1:8500 +``` + +or as a Unix socket path: + +``` +CONSUL_HTTP_ADDR=unix://var/run/consul_http.sock +``` + +## `CONSUL_HTTP_TOKEN` + +This is the API access token required when access control lists (ACLs) +are enabled, for example: + +``` +CONSUL_HTTP_TOKEN=aba7cbe5-879b-999a-07cc-2efd9ac0ffe +``` + +## `CONSUL_HTTP_AUTH` + +This specifies HTTP Basic access credentials as a username:password pair: + +``` +CONSUL_HTTP_AUTH=operations:JPIMCmhDHzTukgO6 +``` + +## `CONSUL_HTTP_SSL` + +This is a boolean value (default is false) that enables the HTTPS URI +scheme and SSL connections to the HTTP API: + +``` +CONSUL_HTTP_SSL=true +``` + +## `CONSUL_HTTP_SSL_VERIFY` + +This is a boolean value (default true) to specify SSL certificate verification; setting this value to `false` is not recommended for production use. Example +for development purposes: + +``` +CONSUL_HTTP_SSL_VERIFY=false +``` + +## `CONSUL_RPC_ADDR` + +This is the RPC interface address for the local agent specified as a URI: + +``` +CONSUL_RPC_ADDR=127.0.0.1:8300 +``` + +or as a Unix socket path: + +``` +CONSUL_RPC_ADDR=unix://var/run/consul_rpc.sock +``` diff --git a/website/source/docs/commands/environment.html.md b/website/source/docs/commands/environment.html.md deleted file mode 100644 index 40536897f8..0000000000 --- a/website/source/docs/commands/environment.html.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -layout: "docs" -page_title: "Environment" -sidebar_current: "docs-commands-environment" -description: |- - Consul's behavior can be modified by certain environment variables. ---- - -# Environment variables - -The Consul CLI will read the following environment variables to set -behavioral defaults. These can be overridden in all cases using -command-line arguments; see the -[Consul Commands documentation](https://www.consul.io/docs/commands/index.html) -for details. - -The following table describes these variables: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Variable nameValue
CONSUL_HTTP_ADDRThe HTTP API address as a host:port pair or path to Unix socket, for example 127.0.0.1:8500 or unix:///var/run/consul_http.sock
CONSUL_HTTP_TOKENThe API access token required when access control lists (ACLs) are enabled
CONSUL_HTTP_AUTHThe HTTP Basic access credentials as a username:password pair
CONSUL_HTTP_SSLBoolean (default False) to specify HTTPS connections
CONSUL_HTTP_SSL_VERIFYBoolean (default True) to specify SSL certificate verification
CONSUL_RPC_ADDRThe RPC interface address as a host:port pair or path to Unix socket, for example 127.0.0.1:8300 or unix:///var/run/consul_rpc.sock