diff --git a/command/job_dispatch.go b/command/job_dispatch.go index 763260ec8..c6a334e98 100644 --- a/command/job_dispatch.go +++ b/command/job_dispatch.go @@ -33,10 +33,11 @@ General Options: Dispatch Options: -meta = - Meta takes a key/value pair seperated by "=". The metadata key will be - injected into the job's metadata. The flag can be provided more than - once to inject multiple metadata key/value pairs. Arbitrary injection is not - allowed. The parameterized job must allow the key to be injected. + Meta takes a key/value pair seperated by "=". The metadata key will be + merged into the job's metadata. The job may define a default value for the + key which is overriden when dispatching. The flag can be provided more than + once to inject multiple metadata key/value pairs. Arbitrary keys are not + allowed. The parameterized job must allow the key to be merged. -detach Return immediately instead of entering monitor mode. After job dispatch, diff --git a/website/source/docs/commands/job-dispatch.html.md.erb b/website/source/docs/commands/job-dispatch.html.md.erb index cce195491..cbd17f640 100644 --- a/website/source/docs/commands/job-dispatch.html.md.erb +++ b/website/source/docs/commands/job-dispatch.html.md.erb @@ -15,8 +15,8 @@ page.](https://releases.hashicorp.com/nomad/0.5.3-rc1/) The `job dispatch` command is used to create new instances of a [parameterized job]. The parameterized job captures a job's configuration and runtime requirements in a generic way and `dispatch` is used to provide the input for -the job to run against. One can think of the parameterized job as a function -definition and dispatch is used to invoke the function. +the job to run against. A parameterized job is similar to a function definition, +and dispatch is used to invoke the function. Each time a job is dispatched, a unique job ID is generated. This allows a caller to track the status of the job, much like a future or promise in some @@ -33,6 +33,8 @@ dispatched instance can be provided via stdin by using "-" for the input source or by specifiying a path to a file. Metadata can be supplied by using the meta flag one or more times. +The payload has a **size limit of 16KiB**. + Upon successfully creation, the dispatched job ID will be printed and the triggered evaluation will be monitored. This can be disabled by supplying the detach flag. @@ -49,9 +51,10 @@ client connection issues or internal errors, are indicated by exit code 1. ## Run Options * `-meta`: Meta takes a key/value pair seperated by "=". The metadata key will - be injected into the job's metadata. The flag can be provided more than once - to inject multiple metadata key/value pairs. Arbitrary injection is not - allowed. The parameterized job must allow the key to be injected. + be merged into the job's metadata. The job may define a default value for the + key which is overriden when dispatching. The flag can be provided more than + once to inject multiple metadata key/value pairs. Arbitrary keys are not + allowed. The parameterized job must allow the key to be merged. * `-detach`: Return immediately instead of monitoring. A new evaluation ID will be output, which can be used to examine the evaluation using the diff --git a/website/source/docs/http/job.html.md b/website/source/docs/http/job.html.md index ee48655ab..dfdc01c65 100644 --- a/website/source/docs/http/job.html.md +++ b/website/source/docs/http/job.html.md @@ -355,7 +355,7 @@ region is used; another region can be specified using the `?region=` query param
  • Payload optional - A `[]byte` array encoded as a base64 string. + A `[]byte` array encoded as a base64 string with a maximum size of 16KiB.
  • Meta diff --git a/website/source/docs/http/json-jobs.html.md b/website/source/docs/http/json-jobs.html.md index ed279db5a..7d8cc3bbe 100644 --- a/website/source/docs/http/json-jobs.html.md +++ b/website/source/docs/http/json-jobs.html.md @@ -219,11 +219,12 @@ The `Job` object supports the following keys: * `Payload` - Specifies the requirement of providing a payload when dispatching against the parameterized job. The options for this field are - "optional", "required" and "forbidden" + "optional", "required" and "forbidden". The default value is "optional". * `Payload` - The payload may not be set when submitting a job but may appear in a dispatched job. The `Payload` will be a base64 encoded string containing the - payload that the job was dispatched with. + payload that the job was dispatched with. The `payload` has a **maximum size + of 16 KiB**. * `Priority` - Specifies the job priority which is used to prioritize scheduling and access to resources. Must be between 1 and 100 inclusively, diff --git a/website/source/docs/job-specification/parameterized.html.md b/website/source/docs/job-specification/parameterized.html.md index 2aff51470..6d0cb126c 100644 --- a/website/source/docs/job-specification/parameterized.html.md +++ b/website/source/docs/job-specification/parameterized.html.md @@ -73,7 +73,8 @@ job "docs" { must be provided when dispatching against the job. - `payload` `(string: "optional")` - Specifies the requirement of providing a - payload when dispatching against the parameterized job. The options for this + payload when dispatching against the parameterized job. The **maximum size of a + `payload` is 16 KiB**. The options for this field are: - `"optional"` - A payload is optional when dispatching against the job.