github.com/hernad/nomad@v1.6.112/e2e/consul/input/service_reversion.nomad (about)

     1  # Copyright (c) HashiCorp, Inc.
     2  # SPDX-License-Identifier: MPL-2.0
     3  
     4  variable "service" {
     5    type = string
     6  }
     7  
     8  job "service-reversion" {
     9    datacenters = ["dc1"]
    10    type        = "service"
    11  
    12    constraint {
    13      attribute = "${attr.kernel.name}"
    14      value     = "linux"
    15    }
    16  
    17    group "sleep" {
    18  
    19      service {
    20        name = "${var.service}"
    21      }
    22  
    23      task "busybox" {
    24        driver = "docker"
    25  
    26        config {
    27          image   = "busybox:1"
    28          command = "sleep"
    29          args    = ["infinity"]
    30        }
    31  
    32        resources {
    33          cpu    = 16
    34          memory = 32
    35          disk   = 64
    36        }
    37      }
    38    }
    39  }