Skip to content

Commit

Permalink
Add Consul clients docs and move client docs to docs folder.
Browse files Browse the repository at this point in the history
Closes #191
  • Loading branch information
jrasell committed Jun 25, 2018
1 parent a04986d commit 5323105
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 13 deletions.
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,9 @@ Levant includes functionality to perform template variables substituion as well

Levant supports a number of command line arguments which provide control over the Levant binary. For detail about each commands and its supported flags, please head over to the [commands](./docs/commands.md) documentation page.

## Nomad Client

The project uses the Nomad [Default API Client](https://github.com/hashicorp/nomad/blob/master/api/api.go#L191) which means the following Nomad client parameters used by Levant are configurable via environment variables:

* **NOMAD_ADDR** - The address of the Nomad server.
* **NOMAD_REGION** - The region of the Nomad servers to forward commands to.
* **NOMAD_NAMESPACE** - The target namespace for queries and actions bound to a namespace.
* **NOMAD_CACERT** - Path to a PEM encoded CA cert file to use to verify the Nomad server SSL certificate.
* **NOMAD_CAPATH** - Path to a directory of PEM encoded CA cert files to verify the Nomad server SSL certificate.
* **NOMAD_CLIENT_CERT** - Path to a PEM encoded client certificate for TLS authentication to the Nomad server.
* **NOMAD_CLIENT_KEY** - Path to an unencrypted PEM encoded private key matching the client certificate from `NOMAD_CLIENT_CERT`.
* **NOMAD_SKIP_VERIFY** - Do not verify TLS certificate.
* **NOMAD_TOKEN** - The SecretID of an ACL token to use to authenticate API requests with.
## Clients

Levant utilises the Nomad and Consul offical clients and configuration can be done via a number of environment variables. For detail about these please read through the [clients](./docs/clients.md) documentation page.

## Contributing

Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Welcome to the Levant documentation. The `docs` directory aims to host detailed

* [Commands](./commands.md) - detail about the Levant CLI and flags assosiated with each command.
* [Templates](./template.md) - detail about Levant's templating engine and functions.
* [Clients](./clients.md) - information on Nomad and Consul client configuration options.

## Contributing

Expand Down
29 changes: 29 additions & 0 deletions docs/clients.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Clients

Levant uses Nomad and Consul clients in order to perform its work. Currently only the HTTP address client parameter can be configured for each client via CLI flags; a choice made to keep the number of flags low. In order to further configure the clients you can use environment variables as detailed below.

### Nomad Client

The project uses the Nomad [Default API Client](https://github.com/hashicorp/nomad/blob/master/api/api.go#L201) which means the following Nomad client parameters used by Levant are configurable via environment variables:

* **NOMAD_ADDR** - The address of the Nomad server.
* **NOMAD_REGION** - The region of the Nomad servers to forward commands to.
* **NOMAD_NAMESPACE** - The target namespace for queries and actions bound to a namespace.
* **NOMAD_CACERT** - Path to a PEM encoded CA cert file to use to verify the Nomad server SSL certificate.
* **NOMAD_CAPATH** - Path to a directory of PEM encoded CA cert files to verify the Nomad server SSL certificate.
* **NOMAD_CLIENT_CERT** - Path to a PEM encoded client certificate for TLS authentication to the Nomad server.
* **NOMAD_CLIENT_KEY** - Path to an unencrypted PEM encoded private key matching the client certificate from `NOMAD_CLIENT_CERT`.
* **NOMAD_SKIP_VERIFY** - Do not verify TLS certificate.
* **NOMAD_TOKEN** - The SecretID of an ACL token to use to authenticate API requests with.

### Consul Client

The project also uses the Consul [Default API Client](https://github.com/hashicorp/consul/blob/master/api/api.go#L282) which means the following Consul client parameters used by Levant are configurable via environment variables:

* **CONSUL_CACERT** - Path to a CA file to use for TLS when communicating with Consul.
* **CONSUL_CAPATH** - Path to a directory of CA certificates to use for TLS when communicating with Consul.
* **CONSUL_CLIENT_CERT** - Path to a client cert file to use for TLS when 'verify_incoming' is enabled.
* **CONSUL_CLIENT_KEY** - Path to a client key file to use for TLS when 'verify_incoming' is enabled.
* **CONSUL_HTTP_ADDR** - The `address` and port of the Consul HTTP agent. The value can be an IP address or DNS address, but it must also include the port.
* **CONSUL_TLS_SERVER_NAME** - The server name to use as the SNI host when connecting via TLS.
* **CONSUL_HTTP_TOKEN** - ACL token to use in the request. If unspecified, the query will default to the token of the Consul agent at the HTTP address.

0 comments on commit 5323105

Please sign in to comment.