Files
poseidon/environment/default-job.hcl
sirkrypt0 f122dd9376 Split stdout and stderr on interactive execution
When running a command interactively, we previously would get stdout
and stderr both served on stdout by Nomad. To circumvent this issue,
we now start a separate execution inside the allocation to split
both streams.
2021-06-11 08:47:25 +00:00

54 lines
1.1 KiB
HCL

// This is the default job configuration that is used when no path to another default configuration is given
job "python" {
datacenters = ["dc1"]
type = "batch"
group "default-group" {
ephemeral_disk {
migrate = false
size = 10
sticky = false
}
count = 1
scaling {
enabled = true
min = 0
max = 300
}
spread {
// see https://www.nomadproject.io/docs/job-specification/spread#even-spread-across-data-center
// This spreads the load evenly amongst our nodes
attribute = "${node.unique.name}"
weight = 100
}
task "default-task" {
driver = "docker"
kill_timeout = "0s"
kill_signal = "SIGKILL"
config {
image = "drp.codemoon.xopic.de/openhpi/co_execenv_python:3.8"
command = "sleep"
args = ["infinity"]
network_mode = "none"
}
logs {
max_files = 1
max_file_size = 1
}
resources {
cpu = 40
memory = 40
}
restart {
delay = "0s"
}
}
}
}