github.com/hernad/nomad@v1.6.112/e2e/isolation/input/cgroup_devices.hcl (about)

     1  # Copyright (c) HashiCorp, Inc.
     2  # SPDX-License-Identifier: MPL-2.0
     3  
     4  job "cgroup_devices" {
     5    type = "service"
     6  
     7    constraint {
     8      attribute = "${attr.kernel.name}"
     9      value     = "linux"
    10    }
    11  
    12    group "group1" {
    13  
    14      task "task1" {
    15        driver = "raw_exec"
    16        config {
    17          command = "/bin/sleep"
    18          args    = ["infinity"]
    19        }
    20        resources {
    21          cpu    = 50
    22          memory = 50
    23        }
    24      }
    25    }
    26  
    27    group "group2" {
    28  
    29      task "task2" {
    30        driver = "raw_exec"
    31        config {
    32          command = "/bin/sleep"
    33          args    = ["infinity"]
    34        }
    35        resources {
    36          cpu    = 50
    37          memory = 50
    38        }
    39      }
    40    }
    41  }