Dear Nomad community,
I have a job like this
job "slurm-cn" {
datacenters = ["dc1"]
type = "system"
group "slurm-cn" {
task "zypper" {
lifecycle {
hook = "prestart"
sidecar = false
}
driver = "raw_exec"
user = "root"
config {
command = "zypper"
args = ["install", "-y", "slurm=${NOMAD_META_version}", "slurm-slurmctld=${NOMAD_META_version}", "slurm-perlapi=${NOMAD_META_version}", "slurm-slurmpmi=${NOMAD_META_version}", "slurm-devel=${NOMAD_META_version}"]
}
}
task "slurmd" {
driver = "raw_exec"
user = "root"
config {
command = "/usr/sbin/slurmd"
args = ["-D", "-Z", "--conf-server", "nid002584"]
}
}
service {
provider = "nomad"
name = "slurmd"
port = "slurmd"
check {
name = "slurmd"
type = "tcp"
interval = "9s"
timeout = "3s"
}
}
network {
port "slurmd" {
static = 6818 # host linked port to TCP 6818
}
}
}
}
The goal is to have a job that installs and starts a service, the problem is I need to parameterize the version of the package to install, nomad documentation says only batch and sysbatch jobs have this feature.
How can I send params to a job like this?
thank you