Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Jan 11, 2016
1 parent dccbc03 commit 9c6fcdc
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 10 deletions.
11 changes: 9 additions & 2 deletions website/source/docs/drivers/docker.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 8 additions & 1 deletion website/source/docs/drivers/exec.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 8 additions & 1 deletion website/source/docs/drivers/java.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 8 additions & 1 deletion website/source/docs/drivers/raw_exec.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 8 additions & 1 deletion website/source/docs/drivers/rkt.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 20 additions & 4 deletions website/source/docs/jobspec/index.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 9c6fcdc

Please sign in to comment.