docs: remove mbits examples from documentation

This commit is contained in:
Tim Gross 2021-02-02 08:54:07 -05:00
parent 4693d8f65c
commit 9701d292ce
4 changed files with 24 additions and 38 deletions

View File

@ -74,9 +74,6 @@ job "redis" {
resources { resources {
cpu = 500 cpu = 500
memory = 256 memory = 256
network {
mbits = 10
}
} }
} }
} }

View File

@ -152,7 +152,6 @@ task "redis" {
resources { resources {
network { network {
mbits = 10
port "app" { port "app" {
static = 12345 static = 12345
} }

View File

@ -59,6 +59,11 @@ Due to Podman's similarity to Docker, the example job created by [`nomad init -s
```hcl ```hcl
job "example" { job "example" {
datacenters = ["dc1"] datacenters = ["dc1"]
network {
port "db" {
to = 6379
}
}
group "cache" { group "cache" {
task "redis" { task "redis" {
@ -66,20 +71,12 @@ job "example" {
config { config {
image = "docker://redis:3.2" image = "docker://redis:3.2"
ports = ["db"]
port_map {
db = 6379
}
} }
resources { resources {
cpu = 500 cpu = 500
memory = 256 memory = 256
network {
mbits = 10
port "db" {}
}
} }
} }
} }

View File

@ -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: a static or dynamic port labeled "lb". For example:
```hcl ```hcl
resources { network {
network { port "lb" {}
mbits = 10
port "lb" {}
}
} }
``` ```
@ -500,6 +497,13 @@ configuration:
```hcl ```hcl
job "example" { job "example" {
datacenters = ["dc1"] datacenters = ["dc1"]
network {
port "db" {
to = 6379
}
}
group "cache" { group "cache" {
task "redis" { task "redis" {
@ -508,18 +512,12 @@ job "example" {
config { config {
image = "redis:3.2" image = "redis:3.2"
network_mode = "weave" network_mode = "weave"
port_map { ports = ["db"]
db = 6379
}
} }
resources { resources {
cpu = 500 # 500 MHz cpu = 500 # 500 MHz
memory = 256 # 256MB memory = 256 # 256MB
network {
mbits = 10
port "db" {}
}
} }
service { service {
@ -571,9 +569,6 @@ job "example" {
resources { resources {
cpu = 500 # 500 MHz cpu = 500 # 500 MHz
memory = 256 # 256MB memory = 256 # 256MB
network {
mbits = 10
}
} }
service { service {
@ -620,24 +615,25 @@ job "example" {
datacenters = ["dc1"] datacenters = ["dc1"]
group "cache" { group "cache" {
network {
port "db" {
to = 6379
}
}
task "redis" { task "redis" {
driver = "docker" driver = "docker"
config { config {
image = "redis:3.2" image = "redis:3.2"
advertise_ipv6_address = true advertise_ipv6_address = true
port_map { ports = ["db"]
db = 6379
}
} }
resources { resources {
cpu = 500 # 500 MHz cpu = 500 # 500 MHz
memory = 256 # 256MB memory = 256 # 256MB
network {
mbits = 10
port "db" {}
}
} }
service { service {
@ -676,9 +672,6 @@ job "example" {
resources { resources {
cpu = 500 # 500 MHz cpu = 500 # 500 MHz
memory = 256 # 256MB memory = 256 # 256MB
network {
mbits = 10
}
} }
service { service {