Files
nomad/website/source/docs/config/index.html.md

2.2 KiB

layout, page_title, sidebar_current, description
layout page_title sidebar_current description
docs Server Configuration docs-config Nomad server configuration reference.

Nomad Configuration

Outside of development mode, Nomad servers are configured using a file. The format of this file is HCL or JSON. An example configuration is shown below:

TODO: Document Nomad configuration. Examples below stolen from Vault.

backend "consul" {
  address = "127.0.0.1:8500"
  path = "vault"
}

listener "tcp" {
  address = "127.0.0.1:8200"
  tls_disable = 1
}

telemetry {
  statsite_address = "127.0.0.1:8125"
  disable_hostname = true
}

After the configuration is written, use the -config flag with vault server to specify where the configuration is.

Reference

  • backend (required) - Configures the storage backend where Nomad data is stored. There are multiple options available for storage backends, and they're documented below.

  • listener (required) - Configures how Nomad is listening for API requests. "tcp" is currently the only option available. A full reference for the inner syntax is below.

  • disable_mlock (optional) - A boolean. If true, this will disable the server from executing the mlock syscall to prevent memory from being swapped to disk. This is not recommended in production (see below).

  • telemetry (optional) - Configures the telemetry reporting system (see below).

  • default_lease_duration (optional) - Configures the default lease duration for tokens and secrets, specified in hours. Default value is 30 days. This value cannot be larger than max_lease_duration.

  • max_lease_duration (optional) - Configures the maximum possible lease duration for tokens and secrets, specified in hours. Default value is 30 days.

In production, you should only consider setting the disable_mlock option on Linux systems that only use encrypted swap or do not use swap at all. Nomad does not currently support memory locking on Mac OS X and Windows and so the feature is automatically disabled on those platforms. To give the Nomad executable access to the mlock syscall on Linux systems:

sudo setcap cap_ipc_lock=+ep $(readlink -f $(which vault))