open-nomad/website/source/docs/runtime/_envvars.html.md.erb

152 lines
4.5 KiB
Plaintext
Raw Normal View History

<table class="table table-bordered table-striped">
<tr>
<th>Variable</th>
<th>Description</th>
</tr>
<tr>
<td><tt>NOMAD_ALLOC_DIR</tt></td>
<td>
The path to the shared <tt>alloc/</tt> directory. See
[here](/docs/runtime/environment.html#task-directories) for more
information.
</td>
</tr>
<tr>
<td><tt>NOMAD_TASK_DIR</tt></td>
<td>
The path to the task <tt>local/</tt> directory. See
[here](/docs/runtime/environment.html#task-directories) for more
information.
</td>
</tr>
<tr>
<td><tt>NOMAD_SECRETS_DIR</tt></td>
<td>
Path to the task's secrets directory. See
[here](/docs/runtime/environment.html#task-directories) for more
information.
</td>
</tr>
<tr>
<td><tt>NOMAD_MEMORY_LIMIT</tt></td>
<td>Memory limit in MB for the task</td>
</tr>
<tr>
<td><tt>NOMAD_CPU_LIMIT</tt></td>
<td>CPU limit in MHz for the task</td>
</tr>
<tr>
<td><tt>NOMAD_ALLOC_ID</tt></td>
<td>Allocation ID of the task</td>
</tr>
<tr>
<td><tt>NOMAD_ALLOC_NAME</tt></td>
<td>Allocation name of the task</td>
</tr>
<tr>
<td><tt>NOMAD_ALLOC_INDEX</tt></td>
<td>Allocation index; useful to distinguish instances of task groups. From 0 to (count - 1).</td>
</tr>
<tr>
<td><tt>NOMAD_TASK_NAME</tt></td>
<td>Task's name</td>
</tr>
<tr>
<td><tt>NOMAD_JOB_NAME</tt></td>
<td>Job's name</td>
</tr>
<tr>
<td><tt>NOMAD_DC</tt></td>
<td>Datacenter in which the allocation is running</td>
</tr>
<tr>
<td><tt>NOMAD_REGION</tt></td>
<td>Region in which the allocation is running</td>
</tr>
<tr>
<td><tt>NOMAD_META_&lt;key&gt;</tt></td>
<td>The metadata value given by <tt>key</tt> on the task's metadata</td>
</tr>
<tr>
<td><tt>VAULT_TOKEN</tt></td>
<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>
<td><tt>NOMAD_IP_&lt;label&gt;</tt></td>
<td>
IP for the given port <tt>label</tt>. Driver-specified IP when available,
otherwise the host's IP. See [here](/docs/job-specification/network.html)
for more information.
</td>
</tr>
<tr>
<td><tt>NOMAD_PORT_&lt;label&gt;</tt></td>
<td>
Port for the given port <tt>label</tt>. Driver-specified port when a port
map is used, otherwise the host's static or dynamic port allocation. See
[here](/docs/job-specification/network.html) for more information.
</td>
</tr>
<tr>
<td><tt>NOMAD_ADDR_&lt;label&gt;</tt></td>
<td>
*Deprecated:* The <tt>ip:port</tt> pair for the given port
<tt>label</tt>. For backward compatibility it always uses the host's IP
but will use the drvier's port if a port map is used. Use the
corresponding `HOST` or `DRIVER` variables instead as they have explicit
predictable values.
</td>
</tr>
<tr>
<td><tt>NOMAD_HOST_IP_&lt;label&gt;</tt></td>
<td>
IP of the host for the port <tt>label</tt>. See
[here](/docs/job-specification/network.html#mapped_ports) for more
information.
</td>
</tr>
<tr>
<td><tt>NOMAD_HOST_PORT_&lt;label&gt;</tt></td>
<td>
Port on the host for the port <tt>label</tt>. See
[here](/docs/job-specification/network.html#mapped_ports) for more
information.
</td>
</tr>
<tr>
<td><tt>NOMAD_HOST_ADDR_&lt;label&gt;</tt></td>
<td>
The host's <tt>ip:port</tt> pair for the given port <tt>label</tt>. See
[here](/docs/job-specification/network.html#mapped_ports) for more
information.
</td>
</tr>
<tr>
<td><tt>NOMAD_DRIVER_IP_&lt;label&gt;</tt></td>
<td>
IP from the driver for the port <tt>label</tt> if the driver configured
an IP. Not available until after the task is started. See
[here](/docs/job-specification/network.html#mapped_ports) for more
information.
</td>
</tr>
<tr>
<td><tt>NOMAD_DRIVER_PORT_&lt;label&gt;</tt></td>
<td>
Port in the driver for the port <tt>label</tt> if a port map is
configured. See [here](/docs/job-specification/network.html#mapped_ports)
for more information.
</td>
</tr>
<tr>
<td><tt>NOMAD_DRIVER_ADDR_&lt;label&gt;</tt></td>
<td>
The driver's <tt>ip:port</tt> pair for the given port <tt>label</tt> if
the driver configured an IP and port. See
[here](/docs/job-specification/network.html#mapped_ports) for more
information.
</td>
</tr>
</table>