Documentation

This commit is contained in:
Alex Dadgar 2016-01-11 11:12:09 -08:00
parent 6d157a0337
commit e41435e272
6 changed files with 61 additions and 10 deletions

View file

@ -37,8 +37,15 @@ The following options are available for use in the job specification.
* `command` - (Optional) The command to run when starting the container.
* `args` - (Optional) A list of arguments to the optional `command`. If no
`command` is present, `args` are ignored.
* `args` - (Optional) A list of arguments to the optional `command`. If no
`command` is present, `args` are ignored. References to environment variables
or any [intepretable Nomad
variables](/docs/jobspec/index.html#interpreted_vars) will be interpreted
before launching the task. For example:
```
args = ["$nomad.ip", "$MY_ENV", $meta.foo"]
```
* `labels` - (Optional) A key/value map of labels to set to the containers on
start.

View file

@ -32,7 +32,14 @@ The `exec` driver supports the following configuration in the job spec:
is supplied and does not match the downloaded artifact, the driver will fail
to start
* `args` - (Optional) A list of arguments to the `command`.
* `args` - (Optional) A list of arguments to the optional `command`.
References to environment variables or any [intepretable Nomad
variables](/docs/jobspec/index.html#interpreted_vars) will be interpreted
before launching the task. For example:
```
args = ["$nomad.ip", "$MY_ENV", $meta.foo"]
```
## Client Requirements

View file

@ -27,7 +27,14 @@ The `java` driver supports the following configuration in the job spec:
is supplied and does not match the downloaded artifact, the driver will fail
to start
* `args` - (Optional) A list of arguments to the `java` command.
* `args` - (Optional) A list of arguments to the optional `command`.
References to environment variables or any [intepretable Nomad
variables](/docs/jobspec/index.html#interpreted_vars) will be interpreted
before launching the task. For example:
```
args = ["$nomad.ip", "$MY_ENV", $meta.foo"]
```
* `jvm_options` - (Optional) A list of JVM options to be passed while invoking
java. These options are passed not validated in any way in Nomad.

View file

@ -30,7 +30,14 @@ The `raw_exec` driver supports the following configuration in the job spec:
is supplied and does not match the downloaded artifact, the driver will fail
to start
* `args` - (Optional) A list of arguments to the `command`.
* `args` - (Optional) A list of arguments to the optional `command`.
References to environment variables or any [intepretable Nomad
variables](/docs/jobspec/index.html#interpreted_vars) will be interpreted
before launching the task. For example:
```
args = ["$nomad.ip", "$MY_ENV", $meta.foo"]
```
## Client Requirements

View file

@ -24,7 +24,14 @@ The `rkt` driver supports the following configuration in the job spec:
* `command` - (Optional) A command to execute on the ACI.
* `args` - (Optional) A list of arguments to the image.
* `args` - (Optional) A list of arguments to the optional `command`.
References to environment variables or any [intepretable Nomad
variables](/docs/jobspec/index.html#interpreted_vars) will be interpreted
before launching the task. For example:
```
args = ["$nomad.ip", "$MY_ENV", $meta.foo"]
```
* `trust_prefix` - (Optional) The trust prefix to be passed to rkt. Must be
reachable from the box running the nomad agent. If not specified, the image is

View file

@ -240,8 +240,20 @@ The `task` object supports the following keys:
task transitons to the dead state. [Click
here](/docs/jobspec/servicediscovery.html) to learn more about services.
* `env` - A map of key/value representing environment variables that
will be passed along to the running process.
* `env` - A map of key/value representing environment variables that
will be passed along to the running process. Nomad variables are
interpreted when set in the environment variable values. See the table of
interpreted variables [here](#interpreted_vars).
For example the below environment map will be reinterpreted:
```
env {
// The value will be interpreted by the client and set to the
// correct value.
NODE_CLASS = "$nomad.class"
}
```
* `resources` - Provides the resource requirements of the task.
See the resources reference for more details.
@ -336,7 +348,7 @@ restart {
The `constraint` object supports the following keys:
* `attribute` - Specifies the attribute to examine for the
constraint. See the table of attributes below.
constraint. See the table of attributes [below](#interpreted_vars).
* `operator` - Specifies the comparison operator. Defaults to equality,
and can be `=`, `==`, `is`, `!=`, `not`, `>`, `>=`, `<`, `<=`. The
@ -368,7 +380,11 @@ The `constraint` object supports the following keys:
Tasks within a task group are always co-scheduled.
Below is a table documenting the variables that can be interpreted:
### Interpreted Variables <a id="interpreted_vars"></a>
Certain Nomad variables are interpretable for use in constraints, task
environment variables and task arguments. Below is a table documenting the
variables that can be interpreted:
<table class="table table-bordered table-striped">
<tr>