github.com/hernad/nomad@v1.6.112/e2e/metrics/input/helloworld.nomad (about)

     1  # Copyright (c) HashiCorp, Inc.
     2  # SPDX-License-Identifier: MPL-2.0
     3  
     4  job "helloworld" {
     5    datacenters = ["dc1"]
     6  
     7    constraint {
     8      attribute = "${attr.kernel.name}"
     9      value     = "linux"
    10    }
    11  
    12    group "hello" {
    13      count = 3
    14  
    15      network {
    16        port "web" {}
    17      }
    18  
    19      task "hello" {
    20        driver = "raw_exec"
    21  
    22        config {
    23          command = "local/hello"
    24        }
    25  
    26        artifact {
    27          source      = "https://nomad-community-demo.s3.amazonaws.com/hellov1"
    28          destination = "local/hello"
    29          mode        = "file"
    30        }
    31  
    32        resources {
    33          cpu    = 500
    34          memory = 256
    35        }
    36  
    37        service {
    38          name = "hello"
    39          tags = ["urlprefix-hello/"]
    40          port = "web"
    41  
    42          check {
    43            name     = "alive"
    44            type     = "http"
    45            path     = "/"
    46            interval = "10s"
    47            timeout  = "2s"
    48          }
    49        }
    50      }
    51    }
    52  }