Given this example job:
job "docs" {
datacenters = ["dc1"]
group "example" {
task "server" {
driver = "docker"
config {
image = "hashicorp/http-echo"
advertise_ipv6_address = true
args = [
"-listen", ":5678",
"-text", "hello world",
]
}
resources {
network {
mbits = 10
port "http" {
static = "5678"
}
}
}
}
}
is there a way to define multiple of them with different arguments say one as shown with the -text
of “hello world” and another with say “foo bar” and then “goodbye everyone” such that Nomad knows all these 3 jobs are the same thing, because they are they just echo different things.
I plan to create a number of jobs which are all 99% similar bar one or two environment variables which only differentiate where they say output resources to (akin to echo’ing text).
I need this behavior because I need to control how these jobs are scaled en-masse and so need these almost-perfect-replicas of each other to be seen as that.