github.com/hernad/nomad@v1.6.112/e2e/servicediscovery/input/nomad_provider.nomad (about) 1 # Copyright (c) HashiCorp, Inc. 2 # SPDX-License-Identifier: MPL-2.0 3 4 job "service_discovery" { 5 datacenters = ["dc1"] 6 type = "service" 7 8 constraint { 9 attribute = "${attr.kernel.name}" 10 value = "linux" 11 } 12 13 group "service_discovery" { 14 15 service { 16 name = "http-api" 17 provider = "nomad" 18 tags = ["foo", "bar"] 19 } 20 21 task "test" { 22 driver = "raw_exec" 23 24 config { 25 command = "bash" 26 args = ["-c", "sleep 15000"] 27 } 28 } 29 } 30 }