From 9701d292ce44c50ff45a1247a41f09910a0e9e1f Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Tue, 2 Feb 2021 08:54:07 -0500 Subject: [PATCH] docs: remove mbits examples from documentation --- .../docs/drivers/external/containerd.mdx | 3 -- website/content/docs/drivers/external/rkt.mdx | 1 - website/content/docs/drivers/podman.mdx | 15 +++---- .../docs/job-specification/service.mdx | 43 ++++++++----------- 4 files changed, 24 insertions(+), 38 deletions(-) diff --git a/website/content/docs/drivers/external/containerd.mdx b/website/content/docs/drivers/external/containerd.mdx index 7e89e88aa..20f19012f 100644 --- a/website/content/docs/drivers/external/containerd.mdx +++ b/website/content/docs/drivers/external/containerd.mdx @@ -74,9 +74,6 @@ job "redis" { resources { cpu = 500 memory = 256 - network { - mbits = 10 - } } } } diff --git a/website/content/docs/drivers/external/rkt.mdx b/website/content/docs/drivers/external/rkt.mdx index 38da283a6..8e947c8dd 100644 --- a/website/content/docs/drivers/external/rkt.mdx +++ b/website/content/docs/drivers/external/rkt.mdx @@ -152,7 +152,6 @@ task "redis" { resources { network { - mbits = 10 port "app" { static = 12345 } diff --git a/website/content/docs/drivers/podman.mdx b/website/content/docs/drivers/podman.mdx index b82e81c39..ade411d18 100644 --- a/website/content/docs/drivers/podman.mdx +++ b/website/content/docs/drivers/podman.mdx @@ -59,6 +59,11 @@ Due to Podman's similarity to Docker, the example job created by [`nomad init -s ```hcl job "example" { datacenters = ["dc1"] + network { + port "db" { + to = 6379 + } + } group "cache" { task "redis" { @@ -66,20 +71,12 @@ job "example" { config { image = "docker://redis:3.2" - - port_map { - db = 6379 - } + ports = ["db"] } resources { cpu = 500 memory = 256 - - network { - mbits = 10 - port "db" {} - } } } } diff --git a/website/content/docs/job-specification/service.mdx b/website/content/docs/job-specification/service.mdx index b55752b63..f57ebbcdb 100644 --- a/website/content/docs/job-specification/service.mdx +++ b/website/content/docs/job-specification/service.mdx @@ -355,11 +355,8 @@ This example must be accompanied by a [`network`][network] stanza which defines a static or dynamic port labeled "lb". For example: ```hcl -resources { - network { - mbits = 10 - port "lb" {} - } +network { + port "lb" {} } ``` @@ -500,6 +497,13 @@ configuration: ```hcl job "example" { datacenters = ["dc1"] + + network { + port "db" { + to = 6379 + } + } + group "cache" { task "redis" { @@ -508,18 +512,12 @@ job "example" { config { image = "redis:3.2" network_mode = "weave" - port_map { - db = 6379 - } + ports = ["db"] } resources { cpu = 500 # 500 MHz memory = 256 # 256MB - network { - mbits = 10 - port "db" {} - } } service { @@ -571,9 +569,6 @@ job "example" { resources { cpu = 500 # 500 MHz memory = 256 # 256MB - network { - mbits = 10 - } } service { @@ -620,24 +615,25 @@ job "example" { datacenters = ["dc1"] group "cache" { + network { + port "db" { + to = 6379 + } + } + + task "redis" { driver = "docker" config { image = "redis:3.2" advertise_ipv6_address = true - port_map { - db = 6379 - } + ports = ["db"] } resources { cpu = 500 # 500 MHz memory = 256 # 256MB - network { - mbits = 10 - port "db" {} - } } service { @@ -676,9 +672,6 @@ job "example" { resources { cpu = 500 # 500 MHz memory = 256 # 256MB - network { - mbits = 10 - } } service {