github.com/hernad/nomad@v1.6.112/e2e/example/input/sleep.hcl (about)

     1  # Copyright (c) HashiCorp, Inc.
     2  # SPDX-License-Identifier: MPL-2.0
     3  
     4  # This "sleep" job simply invokes 'sleep infinity' using raw_exec. It is great
     5  # for demonstrating features of the Nomad e2e suite with a trivial job spec.
     6  
     7  job "sleep" {
     8  
     9    constraint {
    10      attribute = "${attr.kernel.name}"
    11      value     = "linux"
    12    }
    13  
    14    group "group" {
    15  
    16      update {
    17        min_healthy_time = "2s"
    18      }
    19  
    20      reschedule {
    21        attempts  = 0
    22        unlimited = false
    23      }
    24  
    25      restart {
    26        attempts = 0
    27        mode     = "fail"
    28      }
    29  
    30      task "task" {
    31        user   = "nobody"
    32        driver = "raw_exec"
    33  
    34        config {
    35          command = "sleep"
    36          args    = ["infinity"]
    37        }
    38  
    39        resources {
    40          cpu    = 10
    41          memory = 10
    42        }
    43      }
    44    }
    45  }