Merge pull request #6295 from hashicorp/docs-service-tweaks

docs: mention task field for checks
This commit is contained in:
Mahmood Ali 2019-09-09 12:02:19 -04:00 committed by GitHub
commit 09f0efca1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 14 deletions

View file

@ -1,8 +1,8 @@
## 0.10.0 (Unreleased) ## 0.10.0 (Unreleased)
FEATURES: FEATURES:
* **Consul Connect**: Nomad can register Consul Connect services and manage * **Consul Connect**: Nomad may now register Consul Connect services and
running an Envoy proxy sidecar to provide secured service-to-service manages an Envoy proxy sidecar to provide secured service-to-service
communication. communication.
* **Network Namespaces**: Task Groups may now define a shared network * **Network Namespaces**: Task Groups may now define a shared network
namespace. Each allocation will receive its own network namespace and namespace. Each allocation will receive its own network namespace and

View file

@ -18,11 +18,10 @@ description: |-
</tr> </tr>
</table> </table>
The `service` stanza instructs Nomad to register the task as a service using the The `service` stanza instructs Nomad to register a service with Consul. This
service discovery integration. This section of the documentation will discuss the section of the documentation will discuss the configuration, but please also
configuration, but please also read the read the [Nomad service discovery documentation][service-discovery] for more
[Nomad service discovery documentation][service-discovery] for more detailed detailed information about the integration.
information about the integration.
```hcl ```hcl
job "docs" { job "docs" {
@ -64,12 +63,9 @@ job "docs" {
} }
``` ```
This section of the documentation only covers the job file options for This section of the documentation only cover the job file fields and stanzas
configuring service discovery. For more information on the setup and for service discovery. For more details on using Nomad with Consul please see
configuration to integrate Nomad with service discovery, please see the the [Consul integration documentation][service-discovery].
[Nomad service discovery documentation][service-discovery]. There are steps you
must take to configure Nomad. Simply adding this configuration to your job file
does not automatically enable service discovery.
## `service` Parameters ## `service` Parameters
@ -213,6 +209,11 @@ scripts.
- `protocol` `(string: "http")` - Specifies the protocol for the http-based - `protocol` `(string: "http")` - Specifies the protocol for the http-based
health checks. Valid options are `http` and `https`. health checks. Valid options are `http` and `https`.
- `task` `(string: <required>)` - Specifices the task associated with this
check. Scripts are executed within the task's environment, and
`check_restart` stanzas will apply to the specified task. For `checks` on group
level `services` only.
- `timeout` `(string: <required>)` - Specifies how long Consul will wait for a - `timeout` `(string: <required>)` - Specifies how long Consul will wait for a
health check query to succeed. This is specified using a label suffix like health check query to succeed. This is specified using a label suffix like
"30s" or "1h". This must be greater than or equal to "1s" "30s" or "1h". This must be greater than or equal to "1s"
@ -614,7 +615,6 @@ job "example" {
The `service` and `check` stanzas can both specify the port number to The `service` and `check` stanzas can both specify the port number to
advertise and check directly since Nomad isn't managing any port assignments. advertise and check directly since Nomad isn't managing any port assignments.
- - - - - -
<sup><small>1</small></sup><small> Script checks are not supported for the <sup><small>1</small></sup><small> Script checks are not supported for the

View file

@ -262,6 +262,7 @@ dashes (`-`) are converted to underscores (`_`) in environment variables so
- Only the Docker, exec, and raw exec drivers support network namespaces and - Only the Docker, exec, and raw exec drivers support network namespaces and
Connect. Connect.
- Variable interpolation for group services and checks are not yet supported. - Variable interpolation for group services and checks are not yet supported.
- Consul Connect and network namespaces are only supported on Linux.
[count-dashboard]: /assets/images/count-dashboard.png [count-dashboard]: /assets/images/count-dashboard.png