Skip to content

Commit 5323105

Browse files
committed
Add Consul clients docs and move client docs to docs folder.
Closes #191
1 parent a04986d commit 5323105

File tree

3 files changed

+33
-13
lines changed

3 files changed

+33
-13
lines changed

README.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,9 @@ Levant includes functionality to perform template variables substituion as well
3737

3838
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.
3939

40-
## Nomad Client
41-
42-
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:
43-
44-
* **NOMAD_ADDR** - The address of the Nomad server.
45-
* **NOMAD_REGION** - The region of the Nomad servers to forward commands to.
46-
* **NOMAD_NAMESPACE** - The target namespace for queries and actions bound to a namespace.
47-
* **NOMAD_CACERT** - Path to a PEM encoded CA cert file to use to verify the Nomad server SSL certificate.
48-
* **NOMAD_CAPATH** - Path to a directory of PEM encoded CA cert files to verify the Nomad server SSL certificate.
49-
* **NOMAD_CLIENT_CERT** - Path to a PEM encoded client certificate for TLS authentication to the Nomad server.
50-
* **NOMAD_CLIENT_KEY** - Path to an unencrypted PEM encoded private key matching the client certificate from `NOMAD_CLIENT_CERT`.
51-
* **NOMAD_SKIP_VERIFY** - Do not verify TLS certificate.
52-
* **NOMAD_TOKEN** - The SecretID of an ACL token to use to authenticate API requests with.
40+
## Clients
41+
42+
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.
5343

5444
## Contributing
5545

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Welcome to the Levant documentation. The `docs` directory aims to host detailed
66

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

1011
## Contributing
1112

docs/clients.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Clients
2+
3+
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.
4+
5+
### Nomad Client
6+
7+
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:
8+
9+
* **NOMAD_ADDR** - The address of the Nomad server.
10+
* **NOMAD_REGION** - The region of the Nomad servers to forward commands to.
11+
* **NOMAD_NAMESPACE** - The target namespace for queries and actions bound to a namespace.
12+
* **NOMAD_CACERT** - Path to a PEM encoded CA cert file to use to verify the Nomad server SSL certificate.
13+
* **NOMAD_CAPATH** - Path to a directory of PEM encoded CA cert files to verify the Nomad server SSL certificate.
14+
* **NOMAD_CLIENT_CERT** - Path to a PEM encoded client certificate for TLS authentication to the Nomad server.
15+
* **NOMAD_CLIENT_KEY** - Path to an unencrypted PEM encoded private key matching the client certificate from `NOMAD_CLIENT_CERT`.
16+
* **NOMAD_SKIP_VERIFY** - Do not verify TLS certificate.
17+
* **NOMAD_TOKEN** - The SecretID of an ACL token to use to authenticate API requests with.
18+
19+
### Consul Client
20+
21+
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:
22+
23+
* **CONSUL_CACERT** - Path to a CA file to use for TLS when communicating with Consul.
24+
* **CONSUL_CAPATH** - Path to a directory of CA certificates to use for TLS when communicating with Consul.
25+
* **CONSUL_CLIENT_CERT** - Path to a client cert file to use for TLS when 'verify_incoming' is enabled.
26+
* **CONSUL_CLIENT_KEY** - Path to a client key file to use for TLS when 'verify_incoming' is enabled.
27+
* **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.
28+
* **CONSUL_TLS_SERVER_NAME** - The server name to use as the SNI host when connecting via TLS.
29+
* **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 commit comments

Comments
 (0)