From effd6cf439b22c4bb02fe57944469ba12f7b7077 Mon Sep 17 00:00:00 2001 From: Preetha Appan <460133+preetapan@users.noreply.github.com> Date: Sun, 8 Sep 2019 22:39:30 -0500 Subject: [PATCH] Start of docs for group level service and network stanza. --- .../docs/job-specification/network.html.md | 45 ++++++++++++++++++- .../docs/job-specification/service.html.md | 9 ++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/website/source/docs/job-specification/network.html.md b/website/source/docs/job-specification/network.html.md index e0ce32531..973ab67c8 100644 --- a/website/source/docs/job-specification/network.html.md +++ b/website/source/docs/job-specification/network.html.md @@ -4,7 +4,9 @@ page_title: "network Stanza - Job Specification" sidebar_current: "docs-job-specification-network" description: |- The "network" stanza specifies the networking requirements for the task, - including the minimum bandwidth and port allocations. + including the minimum bandwidth and port allocations. The network stanza + can be specified at the task group level to enable all tasks in the task + group to share the same network namespace. --- # `network` Stanza @@ -12,6 +14,12 @@ description: |-
| Placement | +
+ job -> group -> **network**
+ |
+
|---|---|
| Placement |
job -> group -> task -> resources -> **network**
|
@@ -25,6 +33,15 @@ and services. Because you don't know in advance what host your job will be
provisioned on, Nomad will provide your tasks with network configuration when
they start up.
+Nomad 0.10 enables support for the `network` stanza at the task group level. When
+the `network` stanza is defined at the group level with `bridge` as the networking mode,
+all tasks in the task group share the same network namespace. This is a prerequisite for
+[Consul Connect](/guides/integrations/consul-connect/index.html). Tasks running within a
+network namespace are not visible to applications outside the namespace on the same host.
+This allows [Connect][] enabled applications to bind only to localhost within the shared network stack,
+and use the proxy for ingress and egress traffic.
+
+
Note that this document only applies to services that want to _listen_ on a
port. Batch jobs or services that only make outbound connections do not need to
allocate ports, since they will use any available interface to make an outbound
@@ -57,10 +74,17 @@ job "docs" {
- `port` Placement | +
+ job -> group -> **service**
+ |
+
([Check](#check-parameters): nil) - Specifies a health
@@ -628,3 +636,4 @@ system of a task for that driver.
[network]: /docs/job-specification/network.html "Nomad network Job Specification"
[qemu]: /docs/drivers/qemu.html "Nomad qemu Driver"
[restart_stanza]: /docs/job-specification/restart.html "restart stanza"
+[Connect]: /docs/job-specification/connect.html "Nomad Consul Connect Integration"