github.com/smithx10/nomad@v0.9.1-rc1/e2e/consul/input/consul_example.nomad (about) 1 job "consul-example" { 2 datacenters = ["dc1"] 3 type = "service" 4 5 update { 6 max_parallel = 1 7 min_healthy_time = "10s" 8 healthy_deadline = "3m" 9 progress_deadline = "10m" 10 auto_revert = false 11 canary = 0 12 } 13 14 migrate { 15 max_parallel = 1 16 health_check = "checks" 17 min_healthy_time = "10s" 18 healthy_deadline = "5m" 19 } 20 group "cache" { 21 count = 3 22 23 restart { 24 attempts = 2 25 interval = "30m" 26 delay = "15s" 27 mode = "fail" 28 } 29 30 ephemeral_disk { 31 size = 300 32 } 33 34 task "redis" { 35 driver = "docker" 36 config { 37 image = "redis:3.2" 38 port_map { 39 db = 6379 40 } 41 } 42 resources { 43 cpu = 500 # 500 MHz 44 memory = 256 # 256MB 45 network { 46 mbits = 10 47 port "db" {} 48 } 49 } 50 51 service { 52 name = "redis-cache" 53 tags = ["global", "cache"] 54 port = "db" 55 check { 56 name = "alive" 57 type = "tcp" 58 interval = "10s" 59 timeout = "2s" 60 } 61 } 62 } 63 } 64 }