|
| 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