github.com/smintz/nomad@v0.8.3/website/source/docs/runtime/_envvars.html.md.erb (about) 1 <table class="table table-bordered table-striped"> 2 <tr> 3 <th>Variable</th> 4 <th>Description</th> 5 </tr> 6 <tr> 7 <td><tt>NOMAD_ALLOC_DIR</tt></td> 8 <td> 9 The path to the shared <tt>alloc/</tt> directory. See 10 [here](/docs/runtime/environment.html#task-directories) for more 11 information. 12 </td> 13 </tr> 14 <tr> 15 <td><tt>NOMAD_TASK_DIR</tt></td> 16 <td> 17 The path to the task <tt>local/</tt> directory. See 18 [here](/docs/runtime/environment.html#task-directories) for more 19 information. 20 </td> 21 </tr> 22 <tr> 23 <td><tt>NOMAD_SECRETS_DIR</tt></td> 24 <td> 25 Path to the task's secrets directory. See 26 [here](/docs/runtime/environment.html#task-directories) for more 27 information. 28 </td> 29 </tr> 30 <tr> 31 <td><tt>NOMAD_MEMORY_LIMIT</tt></td> 32 <td>Memory limit in MB for the task</td> 33 </tr> 34 <tr> 35 <td><tt>NOMAD_CPU_LIMIT</tt></td> 36 <td>CPU limit in MHz for the task</td> 37 </tr> 38 <tr> 39 <td><tt>NOMAD_ALLOC_ID</tt></td> 40 <td>Allocation ID of the task</td> 41 </tr> 42 <tr> 43 <td><tt>NOMAD_ALLOC_NAME</tt></td> 44 <td>Allocation name of the task</td> 45 </tr> 46 <tr> 47 <td><tt>NOMAD_ALLOC_INDEX</tt></td> 48 <td>Allocation index; useful to distinguish instances of task groups. From 0 to (count - 1).</td> 49 </tr> 50 <tr> 51 <td><tt>NOMAD_TASK_NAME</tt></td> 52 <td>Task's name</td> 53 </tr> 54 <tr> 55 <td><tt>NOMAD_GROUP_NAME</tt></td> 56 <td>Group's name</td> 57 </tr> 58 <tr> 59 <td><tt>NOMAD_JOB_NAME</tt></td> 60 <td>Job's name</td> 61 </tr> 62 <tr> 63 <td><tt>NOMAD_DC</tt></td> 64 <td>Datacenter in which the allocation is running</td> 65 </tr> 66 <tr> 67 <td><tt>NOMAD_REGION</tt></td> 68 <td>Region in which the allocation is running</td> 69 </tr> 70 <tr> 71 <td><tt>NOMAD_META_<key></tt></td> 72 <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> 73 </tr> 74 <tr> 75 <td><tt>VAULT_TOKEN</tt></td> 76 <td>The task's Vault token. See [Vault Integration](/docs/vault-integration/index.html) for more details</td> 77 </tr> 78 <tr><th colspan="2">Network-related Variables</th></tr> 79 <tr> 80 <td><tt>NOMAD_IP_<label></tt></td> 81 <td> 82 Host IP for the given port <tt>label</tt>. See 83 [here](/docs/job-specification/network.html) for more information. 84 </td> 85 </tr> 86 <tr> 87 <td><tt>NOMAD_PORT_<label></tt></td> 88 <td> 89 Port for the given port <tt>label</tt>. Driver-specified port when a port 90 map is used, otherwise the host's static or dynamic port allocation. 91 Services should bind to this port. See 92 [here](/docs/job-specification/network.html) for more information. 93 </td> 94 </tr> 95 <tr> 96 <td><tt>NOMAD_ADDR_<label></tt></td> 97 <td> 98 Host <tt>IP:Port</tt> pair for the given port <tt>label</tt>. 99 </td> 100 </tr> 101 <tr> 102 <td><tt>NOMAD_HOST_PORT_<label></tt></td> 103 <td> 104 Port on the host for the port <tt>label</tt>. See 105 [here](/docs/job-specification/network.html#mapped_ports) for more 106 information. 107 </td> 108 </tr> 109 <tr> 110 <td><tt>NOMAD_IP_<task>_<label></tt></td> 111 <td> 112 Host IP for the given port <tt>label</tt> and <tt>task</tt> for tasks in 113 the same task group. 114 </td> 115 </tr> 116 <tr> 117 <td><tt>NOMAD_PORT_<task>_<label></tt></td> 118 <td> 119 Port for the given port <tt>label</tt> and <tt>task</tt> for tasks in 120 the same task group. Driver-specified port when a port 121 map is used, otherwise the host's static or dynamic port allocation. 122 Services should bind to this port. 123 </td> 124 </tr> 125 <tr> 126 <td><tt>NOMAD_ADDR_<task>_<label></tt></td> 127 <td> 128 Host <tt>IP:Port</tt> pair for the given port <tt>label</tt> and 129 <tt>task</tt> for tasks in the same task group. 130 </td> 131 </tr> 132 <tr> 133 <td><tt>NOMAD_HOST_PORT_<task>_<label></tt></td> 134 <td> 135 Port on the host for the port <tt>label</tt> and <tt>task</tt> for tasks 136 in the same task group. 137 </td> 138 </tr> 139 </table>