2020-02-06 23:45:31 +00:00
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Variable</th>
|
|
|
|
<th>Description</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_ALLOC_DIR</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
The path to the shared <code>alloc/</code> directory. See
|
2021-10-18 10:21:05 +00:00
|
|
|
<a href="/docs/runtime/environment#task-directories"> here</a> for more information.
|
2020-02-06 23:45:31 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_TASK_DIR</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
The path to the task <code>local/</code> directory. See
|
2021-10-18 10:21:05 +00:00
|
|
|
<a href="/docs/runtime/environment#task-directories"> here</a> for more information.
|
2020-02-06 23:45:31 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_SECRETS_DIR</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-02-05 13:20:33 +00:00
|
|
|
Path to the task's secrets directory. See
|
2021-10-18 10:21:05 +00:00
|
|
|
<a href="/docs/runtime/environment#task-directories"> here</a> for more information.
|
2020-02-06 23:45:31 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_MEMORY_LIMIT</code>
|
|
|
|
</td>
|
|
|
|
<td>Memory limit in MB for the task</td>
|
|
|
|
</tr>
|
2021-05-05 16:09:56 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_MEMORY_MAX_LIMIT</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
The maximum memory limit the task may use if client has excess memory
|
|
|
|
capacity, in MB. Omitted if task isn't configured with memory oversubscription.
|
|
|
|
</td>
|
|
|
|
</tr>
|
2020-02-06 23:45:31 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_CPU_LIMIT</code>
|
|
|
|
</td>
|
|
|
|
<td>CPU limit in MHz for the task</td>
|
|
|
|
</tr>
|
2022-04-07 13:52:07 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_CPU_CORES</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
The specific CPU cores reserved for the task in cpuset list notation.
|
|
|
|
Omitted if the the task does not request cpu cores. E.g. <code>0-2,7,12-14</code>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2020-02-06 23:45:31 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_ALLOC_ID</code>
|
|
|
|
</td>
|
|
|
|
<td>Allocation ID of the task</td>
|
|
|
|
</tr>
|
2022-04-20 08:30:48 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_SHORT_ALLOC_ID</code>
|
|
|
|
</td>
|
|
|
|
<td>The first 8 characters of the allocation ID of the task</td>
|
|
|
|
</tr>
|
2020-02-06 23:45:31 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_ALLOC_NAME</code>
|
|
|
|
</td>
|
|
|
|
<td>Allocation name of the task</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_ALLOC_INDEX</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
Allocation index; useful to distinguish instances of task groups. From 0
|
|
|
|
to (count - 1). The index is unique within a given version of a job, but
|
|
|
|
canaries or failed tasks in a deployment may reuse the index.
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_TASK_NAME</code>
|
|
|
|
</td>
|
2021-02-05 13:20:33 +00:00
|
|
|
<td>Task's name</td>
|
2020-02-06 23:45:31 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_GROUP_NAME</code>
|
|
|
|
</td>
|
2021-02-05 13:20:33 +00:00
|
|
|
<td>Group's name</td>
|
2020-02-06 23:45:31 +00:00
|
|
|
</tr>
|
2020-10-23 14:49:58 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_JOB_ID</code>
|
|
|
|
</td>
|
2020-12-07 22:04:11 +00:00
|
|
|
<td>
|
2021-02-05 13:20:33 +00:00
|
|
|
Job's ID, which is equal to the Job name when submitted through
|
2020-12-07 22:04:11 +00:00
|
|
|
CLI but can be different when using the API
|
|
|
|
</td>
|
2020-10-23 14:49:58 +00:00
|
|
|
</tr>
|
2020-02-06 23:45:31 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_JOB_NAME</code>
|
|
|
|
</td>
|
2021-02-05 13:20:33 +00:00
|
|
|
<td>Job's name</td>
|
2020-02-06 23:45:31 +00:00
|
|
|
</tr>
|
2020-10-23 14:49:58 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_JOB_PARENT_ID</code>
|
|
|
|
</td>
|
2021-02-05 13:20:33 +00:00
|
|
|
<td>ID of the Job's parent if it has one</td>
|
2020-10-23 14:49:58 +00:00
|
|
|
</tr>
|
2020-02-06 23:45:31 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_DC</code>
|
|
|
|
</td>
|
|
|
|
<td>Datacenter in which the allocation is running</td>
|
|
|
|
</tr>
|
2022-03-29 00:33:01 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_PARENT_CGROUP</code>
|
|
|
|
</td>
|
|
|
|
<td>The parent cgroup used to contain task cgroups (Linux only)</td>
|
|
|
|
</tr>
|
2020-02-06 23:45:31 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_NAMESPACE</code>
|
|
|
|
</td>
|
|
|
|
<td>Namespace in which the allocation is running</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_REGION</code>
|
|
|
|
</td>
|
|
|
|
<td>Region in which the allocation is running</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_META_<key></code>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-02-05 13:20:33 +00:00
|
|
|
The metadata value given by <code>key</code> on the task's
|
2020-06-01 21:48:25 +00:00
|
|
|
metadata. Note that this is different from
|
2020-02-06 23:45:31 +00:00
|
|
|
<a href="/docs/runtime/interpolation#node-variables-">
|
|
|
|
<code>${meta.<key>}</code>
|
|
|
|
</a>
|
2021-02-05 13:20:33 +00:00
|
|
|
which are keys in the node's metadata.
|
2020-02-06 23:45:31 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>VAULT_TOKEN</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-02-05 13:20:33 +00:00
|
|
|
The task's Vault token. See
|
2021-10-18 10:21:05 +00:00
|
|
|
<a href="/docs/vault-integration"> Vault Integration </a>
|
2020-02-06 23:45:31 +00:00
|
|
|
for more details
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2022-04-20 08:30:48 +00:00
|
|
|
<th colSpan="2">Network-related Variables</th>
|
2020-02-06 23:45:31 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_IP_<label></code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
Host IP for the given port <code>label</code>. See
|
2021-10-18 10:21:05 +00:00
|
|
|
<a href="/docs/job-specification/network"> here for more</a> information.
|
2020-02-06 23:45:31 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_PORT_<label></code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
Port for the given port <code>label</code>. Driver-specified port when a
|
2021-02-05 13:20:33 +00:00
|
|
|
port map is used, otherwise the host's static or dynamic port
|
2020-02-06 23:45:31 +00:00
|
|
|
allocation. Services should bind to this port. See
|
2021-10-18 10:21:05 +00:00
|
|
|
<a href="/docs/job-specification/network"> here for more</a> information.
|
2020-02-06 23:45:31 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_ADDR_<label></code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
Host <code>IP:Port</code> pair for the given port <code>label</code>.
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_HOST_PORT_<label></code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
Port on the host for the port <code>label</code>. See
|
2021-10-18 10:21:05 +00:00
|
|
|
<a href="/docs/job-specification/network#mapped-ports"> here</a> for more
|
2020-02-06 23:45:31 +00:00
|
|
|
information.
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_IP_<task>_<label></code>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-11-25 11:58:32 +00:00
|
|
|
<b>Deprecated</b>. Host IP for the given port <code>label</code>
|
|
|
|
and <code>task</code> for tasks in the same task group. Only available
|
|
|
|
when setting ports via the task resource network port mapping.
|
2020-02-06 23:45:31 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_PORT_<task>_<label></code>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-11-25 11:58:32 +00:00
|
|
|
<b>Deprecated</b>. Port for the given port <code>label</code> and
|
|
|
|
<code>task</code> for tasks in the same task group. Driver-specified port
|
|
|
|
when a port map is used, otherwise the host's static or dynamic port
|
|
|
|
allocation. Services should bind to this port. Only available when setting
|
|
|
|
ports via the task resource network port mapping.
|
2020-02-06 23:45:31 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_ADDR_<task>_<label></code>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-11-25 11:58:32 +00:00
|
|
|
<b>Deprecated</b>. Host <code>IP:Port</code> pair for the given port
|
|
|
|
<code>label</code> and <code>task</code> for tasks in the same task group.
|
|
|
|
Only available when setting ports via the task resource network port
|
|
|
|
mapping.
|
2020-02-06 23:45:31 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_HOST_PORT_<task>_<label></code>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-11-25 11:58:32 +00:00
|
|
|
<b>Deprecated</b>. Port on the host for the port <code>label</code> and
|
|
|
|
<code>task</code> for tasks in the same task group. Only available when
|
|
|
|
setting ports via the task resource network port mapping.
|
2020-02-06 23:45:31 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_UPSTREAM_IP_<service></code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
IP for the given <code>service</code> when defined as a Consul Connect
|
2021-10-18 10:21:05 +00:00
|
|
|
<a href="/docs/job-specification/upstreams"> upstream</a>.
|
2020-02-06 23:45:31 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_UPSTREAM_PORT_<service></code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
Port for the given <code>service</code> when defined as a Consul Connect
|
2021-10-18 10:21:05 +00:00
|
|
|
<a href="/docs/job-specification/upstreams"> upstream</a>.
|
2020-02-06 23:45:31 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_UPSTREAM_ADDR_<service></code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
Host <code>IP:Port</code> for the given <code>service</code> when
|
|
|
|
defined as a Consul Connect
|
2021-10-18 10:21:05 +00:00
|
|
|
<a href="/docs/job-specification/upstreams"> upstream</a>.
|
2020-02-06 23:45:31 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_ENVOY_ADMIN_ADDR_<service></code>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-07-09 18:44:02 +00:00
|
|
|
Local address <code>127.0.0.2:Port</code> for the admin port of the
|
2020-02-06 23:45:31 +00:00
|
|
|
envoy sidecar for the given <code>service</code> when defined as a
|
2021-07-09 18:44:02 +00:00
|
|
|
Consul Connect enabled service. Envoy runs inside the group network
|
|
|
|
namespace unless configured for host networking.
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>NOMAD_ENVOY_READY_ADDR_<service></code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
Local address <code>127.0.0.1:Port</code> for the ready port of the
|
|
|
|
envoy sidecar for the given <code>service</code> when defined as a
|
|
|
|
Consul Connect enabled service. Envoy runs inside the group network
|
|
|
|
namespace unless configured for host networking.
|
|
|
|
</td>
|
|
|
|
</tr>
|
2021-03-26 17:16:19 +00:00
|
|
|
<tr>
|
2022-04-20 08:30:48 +00:00
|
|
|
<th colSpan="2">Consul-related Variables (only set for connect native tasks)</th>
|
2021-03-26 17:16:19 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>CONSUL_HTTP_ADDR</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-06-23 19:04:10 +00:00
|
|
|
Specifies the address to the local Consul agent. Will be automatically
|
|
|
|
set to a unix domain socket in bridge networking mode, or a tcp address in
|
|
|
|
host networking mode.
|
2021-03-26 17:16:19 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>CONSUL_HTTP_TOKEN</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-06-23 19:04:10 +00:00
|
|
|
Specifies the Consul ACL token used to authorize with Consul. Will be
|
|
|
|
automatically set to a generated Connect service identity token specific
|
|
|
|
to the service instance if Consul ACLs are enabled.
|
2021-03-26 17:16:19 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>CONSUL_HTTP_SSL</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-06-23 19:04:10 +00:00
|
|
|
Specifies whether HTTPS should be used when communicating with consul. Will
|
|
|
|
be automatically set to true if Nomad is configured to communicate with
|
|
|
|
Consul using TLS.
|
2021-03-26 17:16:19 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>CONSUL_HTTP_SSL_VERIFY</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-06-23 19:04:10 +00:00
|
|
|
Specifies whether the HTTPS connection with Consul should be mutually
|
|
|
|
verified. Will be automatically set to true if Nomad is configured to
|
|
|
|
verify TLS certificates.
|
2021-03-26 17:16:19 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>CONSUL_CACERT</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
Specifies the path to the CA certificate used for Consul communication.
|
2021-06-23 19:04:10 +00:00
|
|
|
Will be automatically set if Nomad is configured with the <code>consul.share_ssl</code>
|
|
|
|
option.
|
2021-03-26 17:16:19 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>CONSUL_CLIENT_CERT</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-06-23 19:04:10 +00:00
|
|
|
Specifies the path to the Client certificate used for Consul communication.
|
|
|
|
Will be automatically set if Nomad is configured with the <code>consul.share_ssl</code>
|
|
|
|
option.
|
2021-03-26 17:16:19 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>CONSUL_CLIENT_KEY</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-06-23 19:04:10 +00:00
|
|
|
Specifies the path to the CLient Key certificate used for Consul communication.
|
|
|
|
Will be automatically set if Nomad is configured with the <code>consul.share_ssl</code>
|
|
|
|
option.
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<code>CONSUL_TLS_SERVER_NAME</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
Specifies the server name to use as the SNI host for Consul communication.
|
|
|
|
Will be automatically set if Consul is configured to use TLS and the task
|
|
|
|
is in a group using bridge networking mode.
|
2021-03-26 17:16:19 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2020-02-06 23:45:31 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|