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.
This commit is contained in:
Seth Hoenig
2022-05-17 10:24:19 -05:00
parent 88e8c22b95
commit d91e4160da
27 changed files with 82 additions and 81 deletions

View File

@@ -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; " +