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

172 lines
5.7 KiB
Plaintext

<table class="table table-bordered table-striped">
<tr>
<th>Variable</th>
<th>Description</th>
</tr>
<tr>
<td><tt>NOMAD&lowbar;ALLOC&lowbar;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&lowbar;TASK&lowbar;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&lowbar;SECRETS&lowbar;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&lowbar;MEMORY&lowbar;LIMIT</tt></td>
<td>Memory limit in MB for the task</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;CPU&lowbar;LIMIT</tt></td>
<td>CPU limit in MHz for the task</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;ALLOC&lowbar;ID</tt></td>
<td>Allocation ID of the task</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;ALLOC&lowbar;NAME</tt></td>
<td>Allocation name of the task</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;ALLOC&lowbar;INDEX</tt></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><tt>NOMAD&lowbar;TASK&lowbar;NAME</tt></td>
<td>Task's name</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;GROUP&lowbar;NAME</tt></td>
<td>Group's name</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;JOB&lowbar;NAME</tt></td>
<td>Job's name</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;DC</tt></td>
<td>Datacenter in which the allocation is running</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;NAMESPACE</tt></td>
<td>Namespace in which the allocation is running</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;REGION</tt></td>
<td>Region in which the allocation is running</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;META&lowbar;&lt;key&gt;</tt></td>
<td>The metadata value given by <tt>key</tt> on the task's metadata. Note that this is different from [${meta.&lt;key&gt;}](/docs/runtime/interpolation.html#node-variables-) which are keys in the node's metadata.</td>
</tr>
<tr>
<td><tt>VAULT&lowbar;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&lowbar;IP&lowbar;&lt;label&gt;</tt></td>
<td>
Host IP for the given port <tt>label</tt>. See
[here](/docs/job-specification/network.html) for more information.
</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;PORT&lowbar;&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.
Services should bind to this port. See
[here](/docs/job-specification/network.html) for more information.
</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;ADDR&lowbar;&lt;label&gt;</tt></td>
<td>
Host <tt>IP:Port</tt> pair for the given port <tt>label</tt>.
</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;HOST&lowbar;PORT&lowbar;&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&lowbar;IP&lowbar;&lt;task&gt;&lowbar;&lt;label&gt;</tt></td>
<td>
Host IP for the given port <tt>label</tt> and <tt>task</tt> for tasks in
the same task group.
</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;PORT&lowbar;&lt;task&gt;&lowbar;&lt;label&gt;</tt></td>
<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>
<td><tt>NOMAD&lowbar;ADDR&lowbar;&lt;task&gt;&lowbar;&lt;label&gt;</tt></td>
<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>
<td><tt>NOMAD&lowbar;HOST&lowbar;PORT&lowbar;&lt;task&gt;&lowbar;&lt;label&gt;</tt></td>
<td>
Port on the host for the port <tt>label</tt> and <tt>task</tt> for tasks
in the same task group.
</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;UPSTREAM&lowbar;IP&lowbar;&lt;service&gt;</tt></td>
<td>
IP for the given <tt>service</tt> when defined as a Consul Connect
<a href="/docs/job-specification/upstreams.html">upstream</a>.
</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;UPSTREAM&lowbar;PORT&lowbar;&lt;service&gt;</tt></td>
<td>
Port for the given <tt>service</tt> when defined as a Consul Connect
<a href="/docs/job-specification/upstreams.html">upstream</a>.
</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;UPSTREAM&lowbar;ADDR&lowbar;&lt;service&gt;</tt></td>
<td>
Host <tt>IP:Port</tt> for the given <tt>service</tt> when defined as a
Consul Connect <a href="/docs/job-specification/upstreams.html">upstream</a>.
</td>
</tr>
<tr>
<td><tt>NOMAD&lowbar;ENVOY&lowbar;ADMIN&lowbar;ADDR&lowbar;&lt;service&gt;</tt></td>
<td>
Local address <tt>localhost:Port</tt> for the admin port of the envoy sidecar for the
given <tt>service</tt> when defined as a Consul Connect enabled service.
</td>
</tr>
</table>