github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/e2e/consul/input/on_update_2.nomad (about) 1 job "test" { 2 datacenters = ["dc1"] 3 type = "service" 4 5 constraint { 6 attribute = "${attr.kernel.name}" 7 value = "linux" 8 } 9 10 11 group "test" { 12 count = 3 13 14 network { 15 port "db" { 16 to = 6379 17 } 18 } 19 20 update { 21 health_check = "checks" 22 progress_deadline = "45s" 23 healthy_deadline = "30s" 24 } 25 26 service { 27 name = "echo-service" 28 port = "db" 29 30 check { 31 name = "tcp" 32 type = "tcp" 33 port = "db" 34 interval = "10s" 35 timeout = "2s" 36 } 37 38 check { 39 name = "script-check" 40 type = "script" 41 command = "/bin/bash" 42 interval = "30s" 43 timeout = "10s" 44 task = "server" 45 on_update = "ignore" 46 47 args = [ 48 "-c", 49 "echo 'this check errors'; exit 2;", 50 ] 51 52 } 53 } 54 55 task "server" { 56 driver = "docker" 57 58 env { 59 a = "b" 60 } 61 62 config { 63 image = "redis" 64 ports = ["db"] 65 } 66 } 67 } 68 } 69 70