2023-04-10 15:36:59 +00:00
|
|
|
# Copyright (c) HashiCorp, Inc.
|
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2022-04-06 17:17:05 +00:00
|
|
|
job "nomad_provider_service" {
|
|
|
|
datacenters = ["dc1"]
|
|
|
|
type = "service"
|
|
|
|
|
|
|
|
constraint {
|
|
|
|
attribute = "${attr.kernel.name}"
|
|
|
|
value = "linux"
|
|
|
|
}
|
|
|
|
|
|
|
|
group "nomad_provider_service" {
|
|
|
|
|
|
|
|
service {
|
|
|
|
name = "${NOMAD_NAMESPACE}-nomad-provider-service-primary"
|
|
|
|
provider = "nomad"
|
|
|
|
tags = ["foo", "bar"]
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
name = "${NOMAD_NAMESPACE}-nomad-provider-service-secondary"
|
|
|
|
provider = "nomad"
|
|
|
|
tags = ["baz", "buz"]
|
|
|
|
}
|
|
|
|
|
|
|
|
task "test" {
|
|
|
|
driver = "raw_exec"
|
|
|
|
|
|
|
|
config {
|
|
|
|
command = "bash"
|
|
|
|
args = ["-c", "sleep 15000"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|