From d91e4160da87a89781ce06e52895a30bf6429e60 Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Tue, 17 May 2022 10:24:19 -0500 Subject: [PATCH 1/2] cli: update default redis and use nomad service discovery Closes #12927 Closes #12958 This PR updates the version of redis used in our examples from 3.2 to 7. The old version is very not supported anymore, and we should be setting a good example by using a supported version. The long-form example job is now fixed so that the service stanza uses nomad as the service discovery provider, and so now the job runs without a requirement of having Consul running and configured. --- api/jobs_test.go | 4 +- .../taskrunner/task_runner_test.go | 2 +- command/assets/example-short.nomad | 2 +- command/assets/example.nomad | 13 ++-- command/testdata/example-short-bad.json | 2 +- command/testdata/example-short.json | 2 +- demo/csi/digitalocean/volume-job.nomad | 2 +- demo/csi/hostpath/redis.nomad | 2 +- drivers/docker/config_test.go | 8 +-- drivers/docker/driver_test.go | 6 +- .../docker/reconciler_containers_list.json | 2 +- helper/pluginutils/hclutils/util_test.go | 62 +++++++++---------- scripts/example_weave.bash | 2 +- ui/stories/components/diff-viewer.stories.js | 4 +- website/content/api-docs/allocations.mdx | 4 +- website/content/api-docs/evaluations.mdx | 2 +- website/content/api-docs/jobs.mdx | 10 +-- website/content/api-docs/json-jobs.mdx | 2 +- website/content/api-docs/volumes.mdx | 2 +- website/content/docs/commands/job/plan.mdx | 2 +- website/content/docs/commands/job/revert.mdx | 6 +- website/content/docs/drivers/docker.mdx | 4 +- .../docs/job-specification/scaling.mdx | 2 +- .../docs/job-specification/service.mdx | 8 +-- .../content/docs/job-specification/volume.mdx | 2 +- .../content/docs/runtime/interpolation.mdx | 2 +- .../content/plugins/drivers/community/rkt.mdx | 4 +- 27 files changed, 82 insertions(+), 81 deletions(-) diff --git a/api/jobs_test.go b/api/jobs_test.go index 00dff79eee05..1dcb872a4307 100644 --- a/api/jobs_test.go +++ b/api/jobs_test.go @@ -576,7 +576,7 @@ func TestJobs_Canonicalize(t *testing.T) { Name: "redis", Driver: "docker", Config: map[string]interface{}{ - "image": "redis:3.2", + "image": "redis:7", "port_map": []map[string]int{{ "db": 6379, }}, @@ -708,7 +708,7 @@ func TestJobs_Canonicalize(t *testing.T) { Name: "redis", Driver: "docker", Config: map[string]interface{}{ - "image": "redis:3.2", + "image": "redis:7", "port_map": []map[string]int{{ "db": 6379, }}, diff --git a/client/allocrunner/taskrunner/task_runner_test.go b/client/allocrunner/taskrunner/task_runner_test.go index 15b025b2d5f3..bfedf6396df2 100644 --- a/client/allocrunner/taskrunner/task_runner_test.go +++ b/client/allocrunner/taskrunner/task_runner_test.go @@ -681,7 +681,7 @@ func TestTaskRunner_TaskEnv_Image(t *testing.T) { task := alloc.Job.TaskGroups[0].Tasks[0] task.Driver = "docker" task.Config = map[string]interface{}{ - "image": "redis:3.2-alpine", + "image": "redis:7-alpine", "network_mode": "none", "command": "sh", "args": []string{"-c", "echo $NOMAD_ALLOC_DIR; " + diff --git a/command/assets/example-short.nomad b/command/assets/example-short.nomad index 4c5e0f2bb5ef..4bb349c818b7 100644 --- a/command/assets/example-short.nomad +++ b/command/assets/example-short.nomad @@ -12,7 +12,7 @@ job "example" { driver = "docker" config { - image = "redis:3.2" + image = "redis:7" ports = ["db"] auth_soft_fail = true } diff --git a/command/assets/example.nomad b/command/assets/example.nomad index 36249171389f..2d72fa6c8575 100644 --- a/command/assets/example.nomad +++ b/command/assets/example.nomad @@ -157,8 +157,8 @@ job "example" { } # The "service" stanza instructs Nomad to register this task as a service - # in the service discovery engine, which is currently Consul. This will - # make the service addressable after Nomad has placed it on a host and + # in the service discovery engine, which is currently Nomad or Consul. This + # will make the service discoverable after Nomad has placed it on a host and # port. # # For more information and examples on the "service" stanza, please see @@ -167,9 +167,10 @@ job "example" { # https://www.nomadproject.io/docs/job-specification/service # service { - name = "redis-cache" - tags = ["global", "cache"] - port = "db" + name = "redis-cache" + tags = ["global", "cache"] + port = "db" + provider = "nomad" # The "check" stanza instructs Nomad to create a Consul health check for # this service. A sample check is provided here for your convenience; @@ -302,7 +303,7 @@ job "example" { # are specific to each driver, so please see specific driver # documentation for more information. config { - image = "redis:3.2" + image = "redis:7" ports = ["db"] # The "auth_soft_fail" configuration instructs Nomad to try public diff --git a/command/testdata/example-short-bad.json b/command/testdata/example-short-bad.json index bce7e6d0dc0d..81a65ceee566 100644 --- a/command/testdata/example-short-bad.json +++ b/command/testdata/example-short-bad.json @@ -23,7 +23,7 @@ "Lifecycle": null, "Config": { "auth_soft_fail": true, - "image": "redis:3.2", + "image": "redis:7", "ports": [ "db" ] diff --git a/command/testdata/example-short.json b/command/testdata/example-short.json index 74bad66782fe..a62b33b6405a 100644 --- a/command/testdata/example-short.json +++ b/command/testdata/example-short.json @@ -26,7 +26,7 @@ "Lifecycle": null, "Config": { "auth_soft_fail": true, - "image": "redis:3.2", + "image": "redis:7", "ports": [ "db" ] diff --git a/demo/csi/digitalocean/volume-job.nomad b/demo/csi/digitalocean/volume-job.nomad index a5909e330924..2d082b49ebfe 100644 --- a/demo/csi/digitalocean/volume-job.nomad +++ b/demo/csi/digitalocean/volume-job.nomad @@ -13,7 +13,7 @@ job "example" { driver = "docker" config { - image = "redis:3.2" + image = "redis:7" port_map { db = 6379 diff --git a/demo/csi/hostpath/redis.nomad b/demo/csi/hostpath/redis.nomad index 38d0c01fc907..e33a275723ea 100644 --- a/demo/csi/hostpath/redis.nomad +++ b/demo/csi/hostpath/redis.nomad @@ -24,7 +24,7 @@ job "example" { driver = "docker" config { - image = "redis:3.2" + image = "redis:7" ports = ["db"] } diff --git a/drivers/docker/config_test.go b/drivers/docker/config_test.go index d5f1acafc959..f0aebef0c61f 100644 --- a/drivers/docker/config_test.go +++ b/drivers/docker/config_test.go @@ -21,10 +21,10 @@ func TestConfig_ParseHCL(t *testing.T) { { "basic image", `config { - image = "redis:3.2" + image = "redis:7" }`, &TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", Devices: []DockerDevice{}, Mounts: []DockerMount{}, MountsList: []DockerMount{}, @@ -196,7 +196,7 @@ func TestConfig_ParseAllHCL(t *testing.T) { cfgStr := ` config { - image = "redis:3.2" + image = "redis:7" image_pull_timeout = "15m" advertise_ipv6_address = true args = ["command_arg1", "command_arg2"] @@ -342,7 +342,7 @@ config { }` expected := &TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", ImagePullTimeout: "15m", AdvertiseIPv6Addr: true, Args: []string{"command_arg1", "command_arg2"}, diff --git a/drivers/docker/driver_test.go b/drivers/docker/driver_test.go index 7503e75ddca5..a670dd765ac4 100644 --- a/drivers/docker/driver_test.go +++ b/drivers/docker/driver_test.go @@ -2292,7 +2292,7 @@ func TestDockerDriver_AuthConfiguration(t *testing.T) { AuthConfig: nil, }, { - Repo: "redis:3.2", + Repo: "redis:7", AuthConfig: &docker.AuthConfiguration{ Username: "test", Password: "1234", @@ -2301,7 +2301,7 @@ func TestDockerDriver_AuthConfiguration(t *testing.T) { }, }, { - Repo: "quay.io/redis:3.2", + Repo: "quay.io/redis:7", AuthConfig: &docker.AuthConfiguration{ Username: "test", Password: "5678", @@ -2310,7 +2310,7 @@ func TestDockerDriver_AuthConfiguration(t *testing.T) { }, }, { - Repo: "other.io/redis:3.2", + Repo: "other.io/redis:7", AuthConfig: &docker.AuthConfiguration{ Username: "test", Password: "abcd", diff --git a/drivers/docker/test-resources/docker/reconciler_containers_list.json b/drivers/docker/test-resources/docker/reconciler_containers_list.json index 50e3086b75f5..fadb0596d6db 100644 --- a/drivers/docker/test-resources/docker/reconciler_containers_list.json +++ b/drivers/docker/test-resources/docker/reconciler_containers_list.json @@ -4,7 +4,7 @@ "Names": [ "/redis-72bfa388-024e-a903-45b8-2bc28b74ed69" ], - "Image": "redis:3.2", + "Image": "redis:7", "ImageID": "sha256:87856cc39862cec77541d68382e4867d7ccb29a85a17221446c857ddaebca916", "Command": "docker-entrypoint.sh redis-server", "Created": 1568383081, diff --git a/helper/pluginutils/hclutils/util_test.go b/helper/pluginutils/hclutils/util_test.go index b7d1e621eade..1e09d76b9a52 100644 --- a/helper/pluginutils/hclutils/util_test.go +++ b/helper/pluginutils/hclutils/util_test.go @@ -38,11 +38,11 @@ func TestParseHclInterface_Hcl(t *testing.T) { name: "single string attr", config: hclutils.HclConfigToInterface(t, ` config { - image = "redis:3.2" + image = "redis:7" }`), spec: dockerDecSpec, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", Devices: []docker.DockerDevice{}, Mounts: []docker.DockerMount{}, MountsList: []docker.DockerMount{}, @@ -56,12 +56,12 @@ func TestParseHclInterface_Hcl(t *testing.T) { config: hclutils.JsonConfigToInterface(t, ` { "Config": { - "image": "redis:3.2" + "image": "redis:7" } }`), spec: dockerDecSpec, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", Devices: []docker.DockerDevice{}, Mounts: []docker.DockerMount{}, MountsList: []docker.DockerMount{}, @@ -74,12 +74,12 @@ func TestParseHclInterface_Hcl(t *testing.T) { name: "number attr", config: hclutils.HclConfigToInterface(t, ` config { - image = "redis:3.2" + image = "redis:7" pids_limit = 2 }`), spec: dockerDecSpec, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", PidsLimit: 2, Devices: []docker.DockerDevice{}, Mounts: []docker.DockerMount{}, @@ -94,13 +94,13 @@ func TestParseHclInterface_Hcl(t *testing.T) { config: hclutils.JsonConfigToInterface(t, ` { "Config": { - "image": "redis:3.2", + "image": "redis:7", "pids_limit": "2" } }`), spec: dockerDecSpec, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", PidsLimit: 2, Devices: []docker.DockerDevice{}, Mounts: []docker.DockerMount{}, @@ -114,12 +114,12 @@ func TestParseHclInterface_Hcl(t *testing.T) { name: "number attr interpolated", config: hclutils.HclConfigToInterface(t, ` config { - image = "redis:3.2" + image = "redis:7" pids_limit = "${2 + 2}" }`), spec: dockerDecSpec, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", PidsLimit: 4, Devices: []docker.DockerDevice{}, Mounts: []docker.DockerMount{}, @@ -134,13 +134,13 @@ func TestParseHclInterface_Hcl(t *testing.T) { config: hclutils.JsonConfigToInterface(t, ` { "Config": { - "image": "redis:3.2", + "image": "redis:7", "pids_limit": "${2 + 2}" } }`), spec: dockerDecSpec, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", PidsLimit: 4, Devices: []docker.DockerDevice{}, Mounts: []docker.DockerMount{}, @@ -154,12 +154,12 @@ func TestParseHclInterface_Hcl(t *testing.T) { name: "multi attr", config: hclutils.HclConfigToInterface(t, ` config { - image = "redis:3.2" + image = "redis:7" args = ["foo", "bar"] }`), spec: dockerDecSpec, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", Args: []string{"foo", "bar"}, Devices: []docker.DockerDevice{}, Mounts: []docker.DockerMount{}, @@ -174,13 +174,13 @@ func TestParseHclInterface_Hcl(t *testing.T) { config: hclutils.JsonConfigToInterface(t, ` { "Config": { - "image": "redis:3.2", + "image": "redis:7", "args": ["foo", "bar"] } }`), spec: dockerDecSpec, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", Args: []string{"foo", "bar"}, Devices: []docker.DockerDevice{}, Mounts: []docker.DockerMount{}, @@ -194,14 +194,14 @@ func TestParseHclInterface_Hcl(t *testing.T) { name: "multi attr variables", config: hclutils.HclConfigToInterface(t, ` config { - image = "redis:3.2" + image = "redis:7" args = ["${NOMAD_META_hello}", "${NOMAD_ALLOC_INDEX}"] pids_limit = "${NOMAD_ALLOC_INDEX + 2}" }`), spec: dockerDecSpec, vars: vars, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", Args: []string{"world", "2"}, PidsLimit: 4, Devices: []docker.DockerDevice{}, @@ -217,13 +217,13 @@ func TestParseHclInterface_Hcl(t *testing.T) { config: hclutils.JsonConfigToInterface(t, ` { "Config": { - "image": "redis:3.2", + "image": "redis:7", "args": ["foo", "bar"] } }`), spec: dockerDecSpec, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", Args: []string{"foo", "bar"}, Devices: []docker.DockerDevice{}, Mounts: []docker.DockerMount{}, @@ -237,7 +237,7 @@ func TestParseHclInterface_Hcl(t *testing.T) { name: "port_map", config: hclutils.HclConfigToInterface(t, ` config { - image = "redis:3.2" + image = "redis:7" port_map { foo = 1234 bar = 5678 @@ -245,7 +245,7 @@ func TestParseHclInterface_Hcl(t *testing.T) { }`), spec: dockerDecSpec, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", PortMap: map[string]int{ "foo": 1234, "bar": 5678, @@ -263,7 +263,7 @@ func TestParseHclInterface_Hcl(t *testing.T) { config: hclutils.JsonConfigToInterface(t, ` { "Config": { - "image": "redis:3.2", + "image": "redis:7", "port_map": [{ "foo": 1234, "bar": 5678 @@ -272,7 +272,7 @@ func TestParseHclInterface_Hcl(t *testing.T) { }`), spec: dockerDecSpec, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", PortMap: map[string]int{ "foo": 1234, "bar": 5678, @@ -289,7 +289,7 @@ func TestParseHclInterface_Hcl(t *testing.T) { name: "devices", config: hclutils.HclConfigToInterface(t, ` config { - image = "redis:3.2" + image = "redis:7" devices = [ { host_path = "/dev/sda1" @@ -304,7 +304,7 @@ func TestParseHclInterface_Hcl(t *testing.T) { }`), spec: dockerDecSpec, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", Devices: []docker.DockerDevice{ { HostPath: "/dev/sda1", @@ -327,7 +327,7 @@ func TestParseHclInterface_Hcl(t *testing.T) { name: "docker_logging", config: hclutils.HclConfigToInterface(t, ` config { - image = "redis:3.2" + image = "redis:7" network_mode = "host" dns_servers = ["169.254.1.1"] logging { @@ -339,7 +339,7 @@ func TestParseHclInterface_Hcl(t *testing.T) { }`), spec: dockerDecSpec, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", NetworkMode: "host", DNSServers: []string{"169.254.1.1"}, Logging: docker.DockerLogging{ @@ -361,7 +361,7 @@ func TestParseHclInterface_Hcl(t *testing.T) { config: hclutils.JsonConfigToInterface(t, ` { "Config": { - "image": "redis:3.2", + "image": "redis:7", "devices": [ { "host_path": "/dev/sda1", @@ -377,7 +377,7 @@ func TestParseHclInterface_Hcl(t *testing.T) { }`), spec: dockerDecSpec, expected: &docker.TaskConfig{ - Image: "redis:3.2", + Image: "redis:7", Devices: []docker.DockerDevice{ { HostPath: "/dev/sda1", @@ -565,7 +565,7 @@ func TestParseInvalid(t *testing.T) { }{ { "invalid_field", - `config { image = "redis:3.2" bad_key = "whatever"}`, + `config { image = "redis:7" bad_key = "whatever"}`, }, } diff --git a/scripts/example_weave.bash b/scripts/example_weave.bash index 376185f8a10a..13893e22dcdc 100755 --- a/scripts/example_weave.bash +++ b/scripts/example_weave.bash @@ -42,7 +42,7 @@ job "weave-example" { task "redis" { driver = "docker" config { - image = "redis:3.2" + image = "redis:7" port_map { db = 6379 } diff --git a/ui/stories/components/diff-viewer.stories.js b/ui/stories/components/diff-viewer.stories.js index 4a13e5eeb08a..32cddd5c38c4 100644 --- a/ui/stories/components/diff-viewer.stories.js +++ b/ui/stories/components/diff-viewer.stories.js @@ -187,7 +187,7 @@ export let DiffViewerWithManyChanges = () => { Annotations: null, Name: 'image', New: 'redis:3.4', - Old: 'redis:3.2', + Old: 'redis:7', Type: 'Edited', }, { @@ -595,7 +595,7 @@ export let DiffViewerWithManyChanges = () => { { Annotations: null, Name: 'image', - New: 'redis:3.2', + New: 'redis:7', Old: '', Type: 'Added', }, diff --git a/website/content/api-docs/allocations.mdx b/website/content/api-docs/allocations.mdx index a258d13b49da..786abdcdb39c 100644 --- a/website/content/api-docs/allocations.mdx +++ b/website/content/api-docs/allocations.mdx @@ -299,7 +299,7 @@ $ curl \ "db": 6379 } ], - "image": "redis:3.2" + "image": "redis:7" }, "Env": null, "Services": [ @@ -506,7 +506,7 @@ $ curl \ "VaultError": "", "TaskSignalReason": "", "TaskSignal": "", - "DriverMessage": "Downloading image redis:3.2" + "DriverMessage": "Downloading image redis:7" }, { "Type": "Started", diff --git a/website/content/api-docs/evaluations.mdx b/website/content/api-docs/evaluations.mdx index bd501342e3f2..bea826da6529 100644 --- a/website/content/api-docs/evaluations.mdx +++ b/website/content/api-docs/evaluations.mdx @@ -298,7 +298,7 @@ $ curl \ "VaultError": "", "TaskSignalReason": "", "TaskSignal": "", - "DriverMessage": "Downloading image redis:3.2" + "DriverMessage": "Downloading image redis:7" }, { "Type": "Started", diff --git a/website/content/api-docs/jobs.mdx b/website/content/api-docs/jobs.mdx index 34669e18574c..427f823e2b26 100644 --- a/website/content/api-docs/jobs.mdx +++ b/website/content/api-docs/jobs.mdx @@ -168,7 +168,7 @@ The table below shows this endpoint's support for "Tasks": [ { "Config": { - "image": "redis:3.2", + "image": "redis:7", "ports": ["db"] }, "Driver": "docker", @@ -667,7 +667,7 @@ $ curl \ "Artifacts": null, "CSIPluginConfig": null, "Config": { - "image": "redis:3.2", + "image": "redis:7", "ports": ["db"] }, "Constraints": null, @@ -881,7 +881,7 @@ $ curl \ "Artifacts": null, "CSIPluginConfig": null, "Config": { - "image": "redis:3.2", + "image": "redis:7", "ports": [ "db" ] @@ -1049,7 +1049,7 @@ $ curl \ "Artifacts": null, "CSIPluginConfig": null, "Config": { - "image": "redis:3.2", + "image": "redis:7", "ports": [ "db" ] @@ -1259,7 +1259,7 @@ $ curl \ "VaultError": "", "TaskSignalReason": "", "TaskSignal": "", - "DriverMessage": "Downloading image redis:3.2" + "DriverMessage": "Downloading image redis:7" }, { "Type": "Started", diff --git a/website/content/api-docs/json-jobs.mdx b/website/content/api-docs/json-jobs.mdx index 1aa1a7bd90dd..0223d38887ec 100644 --- a/website/content/api-docs/json-jobs.mdx +++ b/website/content/api-docs/json-jobs.mdx @@ -77,7 +77,7 @@ $ nomad job run -output example.nomad "User": "", "Lifecycle": null, "Config": { - "image": "redis:3.2", + "image": "redis:7", "ports": [ "db" ] diff --git a/website/content/api-docs/volumes.mdx b/website/content/api-docs/volumes.mdx index 0b5348e42e69..352437b8fd5b 100644 --- a/website/content/api-docs/volumes.mdx +++ b/website/content/api-docs/volumes.mdx @@ -220,7 +220,7 @@ $ curl \ "VaultError": "", "TaskSignalReason": "", "TaskSignal": "", - "DriverMessage": "Downloading image redis:3.2" + "DriverMessage": "Downloading image redis:7" }, { "Type": "Started", diff --git a/website/content/docs/commands/job/plan.mdx b/website/content/docs/commands/job/plan.mdx index 5f9114d656ad..852a11fe4d08 100644 --- a/website/content/docs/commands/job/plan.mdx +++ b/website/content/docs/commands/job/plan.mdx @@ -138,7 +138,7 @@ $ nomad job plan example.nomad +/- Task Group: "cache" (3 create/destroy update) +/- Task: "redis" (forces create/destroy update) +/- Config { - +/- image: "redis:2.8" => "redis:3.2" + +/- image: "redis:2.8" => "redis:7" port_map[0][db]: "6379" } diff --git a/website/content/docs/commands/job/revert.mdx b/website/content/docs/commands/job/revert.mdx index 732b6a038eb2..0fc2d79a7721 100644 --- a/website/content/docs/commands/job/revert.mdx +++ b/website/content/docs/commands/job/revert.mdx @@ -71,7 +71,7 @@ Diff = +/- Task Group: "cache" +/- Task: "redis" +/- Config { - +/- image: "redis:3.2" => "redis:4.0" + +/- image: "redis:7" => "redis:4.0" port_map[0][db]: "6379" } @@ -96,7 +96,7 @@ Diff = +/- Task Group: "cache" +/- Task: "redis" +/- Config { - +/- image: "redis:4.0" => "redis:3.2" + +/- image: "redis:4.0" => "redis:7" port_map[0][db]: "6379" } @@ -108,7 +108,7 @@ Diff = +/- Task Group: "cache" +/- Task: "redis" +/- Config { - +/- image: "redis:3.2" => "redis:4.0" + +/- image: "redis:7" => "redis:4.0" port_map[0][db]: "6379" } diff --git a/website/content/docs/drivers/docker.mdx b/website/content/docs/drivers/docker.mdx index 1c84c9b04ef6..3e22f0ef9272 100644 --- a/website/content/docs/drivers/docker.mdx +++ b/website/content/docs/drivers/docker.mdx @@ -22,7 +22,7 @@ task "webservice" { driver = "docker" config { - image = "redis:3.2" + image = "redis:7" labels { group = "webservice-cache" } @@ -42,7 +42,7 @@ The `docker` driver supports the following configuration in the job spec. Only ```hcl config { - image = "https://hub.docker.internal/redis:3.2" + image = "https://hub.docker.internal/redis:7" } ``` diff --git a/website/content/docs/job-specification/scaling.mdx b/website/content/docs/job-specification/scaling.mdx index fc6373699406..d7a16801fd5f 100644 --- a/website/content/docs/job-specification/scaling.mdx +++ b/website/content/docs/job-specification/scaling.mdx @@ -57,7 +57,7 @@ job "example" { driver = "docker" config { - image = "redis:3.2" + image = "redis:7" } resources { diff --git a/website/content/docs/job-specification/service.mdx b/website/content/docs/job-specification/service.mdx index e00338a9bf64..9bcb3ce78dbc 100644 --- a/website/content/docs/job-specification/service.mdx +++ b/website/content/docs/job-specification/service.mdx @@ -620,7 +620,7 @@ job "example" { driver = "docker" config { - image = "redis:3.2" + image = "redis:7" network_mode = "weave" ports = ["db"] } @@ -671,7 +671,7 @@ job "example" { driver = "docker" config { - image = "redis:3.2" + image = "redis:7" network_mode = "weave" # No port map required. } @@ -736,7 +736,7 @@ job "example" { driver = "docker" config { - image = "redis:3.2" + image = "redis:7" advertise_ipv6_address = true ports = ["db"] } @@ -775,7 +775,7 @@ job "example" { driver = "docker" config { - image = "redis:3.2" + image = "redis:7" advertise_ipv6_address = true # No port map required. } diff --git a/website/content/docs/job-specification/volume.mdx b/website/content/docs/job-specification/volume.mdx index b33c0536b301..d30949a3b6c0 100644 --- a/website/content/docs/job-specification/volume.mdx +++ b/website/content/docs/job-specification/volume.mdx @@ -147,7 +147,7 @@ job "example" { task "redis" { driver = "docker" config { - image = "redis:3.2" + image = "redis:7" ports = ["db"] } resources { diff --git a/website/content/docs/runtime/interpolation.mdx b/website/content/docs/runtime/interpolation.mdx index a1c28f1c79db..3c211412471b 100644 --- a/website/content/docs/runtime/interpolation.mdx +++ b/website/content/docs/runtime/interpolation.mdx @@ -334,7 +334,7 @@ syntax: task "redis" { driver = "docker" config { - image = "redis:3.2" + image = "redis:7" labels { label1 = "${env["invalid...name"]}" label2 = "${env["valid.name"]}" diff --git a/website/content/plugins/drivers/community/rkt.mdx b/website/content/plugins/drivers/community/rkt.mdx index 4f2d7259004c..0f690023019a 100644 --- a/website/content/plugins/drivers/community/rkt.mdx +++ b/website/content/plugins/drivers/community/rkt.mdx @@ -28,7 +28,7 @@ task "webservice" { driver = "rkt" config { - image = "redis:3.2" + image = "redis:7" } } ``` @@ -40,7 +40,7 @@ The `rkt` driver supports the following configuration in the job spec: ```hcl config { - image = "https://hub.docker.internal/redis:3.2" + image = "https://hub.docker.internal/redis:7" } ``` From 089e2a067bc30fb8b2265fd46c110b6df1eca817 Mon Sep 17 00:00:00 2001 From: Seth Hoenig Date: Tue, 17 May 2022 10:35:08 -0500 Subject: [PATCH 2/2] cl: update changelog --- .changelog/13044.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/13044.txt diff --git a/.changelog/13044.txt b/.changelog/13044.txt new file mode 100644 index 000000000000..7f051f87adbc --- /dev/null +++ b/.changelog/13044.txt @@ -0,0 +1,3 @@ +```release-note:improvement +cli: update default redis and use nomad service discovery +```