2017-06-19 23:34:29 +00:00
<table class="table table-bordered table-striped">
<tr>
<th>Variable</th>
<th>Description</th>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_ALLOC_DIR</tt></td>
2017-06-19 23:34:29 +00:00
<td>
The path to the shared <tt>alloc/</tt> directory. See
[here](/docs/runtime/environment.html#task-directories) for more
information.
</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_TASK_DIR</tt></td>
2017-06-19 23:34:29 +00:00
<td>
The path to the task <tt>local/</tt> directory. See
[here](/docs/runtime/environment.html#task-directories) for more
information.
</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_SECRETS_DIR</tt></td>
2017-06-19 23:34:29 +00:00
<td>
Path to the task's secrets directory. See
[here](/docs/runtime/environment.html#task-directories) for more
information.
</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_MEMORY_LIMIT</tt></td>
2017-06-19 23:34:29 +00:00
<td>Memory limit in MB for the task</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_CPU_LIMIT</tt></td>
2017-06-19 23:34:29 +00:00
<td>CPU limit in MHz for the task</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_ALLOC_ID</tt></td>
2017-06-19 23:34:29 +00:00
<td>Allocation ID of the task</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_ALLOC_NAME</tt></td>
2017-06-19 23:34:29 +00:00
<td>Allocation name of the task</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_ALLOC_INDEX</tt></td>
2017-06-19 23:34:29 +00:00
<td>Allocation index; useful to distinguish instances of task groups. From 0 to (count - 1).</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_TASK_NAME</tt></td>
2017-06-19 23:34:29 +00:00
<td>Task's name</td>
</tr>
2017-07-20 23:22:54 +00:00
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_GROUP_NAME</tt></td>
2017-07-20 23:22:54 +00:00
<td>Group's name</td>
</tr>
2017-06-19 23:34:29 +00:00
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_JOB_NAME</tt></td>
2017-06-19 23:34:29 +00:00
<td>Job's name</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_DC</tt></td>
2017-06-19 23:34:29 +00:00
<td>Datacenter in which the allocation is running</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_REGION</tt></td>
2017-06-19 23:34:29 +00:00
<td>Region in which the allocation is running</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_META_<key></tt></td>
2017-12-08 17:44:15 +00:00
<td>The metadata value given by <tt>key</tt> on the task's metadata. Note that this is different from [${meta.<key>}](/docs/runtime/interpolation.html#node-variables-) which are keys in the node's metadata.</td>
2017-06-19 23:34:29 +00:00
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>VAULT_TOKEN</tt></td>
2017-06-19 23:34:29 +00:00
<td>The task's Vault token. See [Vault Integration](/docs/vault-integration/index.html) for more details</td>
</tr>
<tr><th colspan="2">Network-related Variables</th></tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_IP_<label></tt></td>
2017-06-19 23:34:29 +00:00
<td>
2017-06-22 23:16:17 +00:00
Host IP for the given port <tt>label</tt>. See
[here](/docs/job-specification/network.html) for more information.
2017-06-19 23:34:29 +00:00
</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_PORT_<label></tt></td>
2017-06-19 23:34:29 +00:00
<td>
Port for the given port <tt>label</tt>. Driver-specified port when a port
2017-06-22 23:16:17 +00:00
map is used, otherwise the host's static or dynamic port allocation.
Services should bind to this port. See
2017-06-19 23:34:29 +00:00
[here](/docs/job-specification/network.html) for more information.
</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_ADDR_<label></tt></td>
2017-06-19 23:34:29 +00:00
<td>
2017-06-22 23:16:17 +00:00
Host <tt>IP:Port</tt> pair for the given port <tt>label</tt>.
2017-06-19 23:34:29 +00:00
</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_HOST_PORT_<label></tt></td>
2017-06-19 23:34:29 +00:00
<td>
Port on the host for the port <tt>label</tt>. See
2017-10-19 22:35:47 +00:00
[here](/docs/job-specification/network.html#mapped_ports) for more
2017-06-19 23:34:29 +00:00
information.
</td>
</tr>
2017-08-04 20:01:25 +00:00
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_IP_<task>_<label></tt></td>
2017-08-04 20:01:25 +00:00
<td>
Host IP for the given port <tt>label</tt> and <tt>task</tt> for tasks in
the same task group.
</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_PORT_<task>_<label></tt></td>
2017-08-04 20:01:25 +00:00
<td>
Port for the given port <tt>label</tt> and <tt>task</tt> 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.
</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_ADDR_<task>_<label></tt></td>
2017-08-04 20:01:25 +00:00
<td>
Host <tt>IP:Port</tt> pair for the given port <tt>label</tt> and
<tt>task</tt> for tasks in the same task group.
</td>
</tr>
<tr>
2017-10-19 22:35:47 +00:00
<td><tt>NOMAD_HOST_PORT_<task>_<label></tt></td>
2017-08-04 20:01:25 +00:00
<td>
Port on the host for the port <tt>label</tt> and <tt>task</tt> for tasks
in the same task group.
</td>
</tr>
2017-06-19 23:34:29 +00:00
</table>