github.com/hernad/nomad@v1.6.112/e2e/overlap/testdata/overlap.nomad (about) 1 # Copyright (c) HashiCorp, Inc. 2 # SPDX-License-Identifier: MPL-2.0 3 4 job "overlap" { 5 datacenters = ["dc1", "dc2"] 6 type = "service" 7 8 constraint { 9 attribute = "${attr.kernel.name}" 10 value = "linux" 11 } 12 13 group "overlap" { 14 count = 1 15 16 network { 17 # Reserve a static port so that the subsequent job run is blocked until 18 # the port is freed 19 port "hack" { 20 static = 7234 21 } 22 } 23 24 task "test" { 25 driver = "raw_exec" 26 27 # Delay shutdown to delay next placement 28 shutdown_delay = "8s" 29 30 config { 31 command = "bash" 32 args = ["-c", "sleep 15000"] 33 } 34 35 resources { 36 cpu = "500" 37 memory = "100" 38 } 39 } 40 } 41 } 42