github.com/smithx10/nomad@v0.9.1-rc1/e2e/metrics/input/redis.nomad (about)

     1  job "redis" {
     2    datacenters = ["dc1", "dc2"]
     3  
     4    group "cache" {
     5      count = 4
     6      update {
     7        max_parallel = 1
     8        min_healthy_time = "5s"
     9        healthy_deadline = "30s"
    10        progress_deadline = "1m"
    11      }
    12      restart {
    13        mode = "fail"
    14        attempts = 0
    15      }
    16      reschedule {
    17        attempts = 3
    18        interval = "10m"
    19        unlimited = false
    20      }
    21      task "redis" {
    22        driver = "docker"
    23  
    24        config {
    25          image = "redis:4.0"
    26          port_map {
    27            db = 6379
    28          }
    29        }
    30  
    31        resources {
    32          cpu    = 500
    33          memory = 256
    34          network {
    35            mbits = 10
    36            port "db" {}
    37          }
    38        }
    39  
    40        service {
    41          name = "redis-cache"
    42          tags = ["global", "cache"]
    43          port = "db"
    44          check {
    45            name     = "alive"
    46            type     = "tcp"
    47            interval = "10s"
    48            timeout  = "2s"
    49          }
    50        }
    51      }
    52    }
    53  }