chaotic
chaotic copied to clipboard
Stress On workload machine in nomad
It would be nice if we generate a load on the client. This is a starting point but I think if we can generate load and nomad clients get high utilized then it should allocate allocation on another workload
see comment https://github.com/ngine-io/chaotic/issues/19#issuecomment-1398081030
job "pumba" {
datacenters = ["dc1"]
type = "sysbatch"
parameterized {
meta_required = ["container_name"]
meta_optional = ["cpu","memory","stress_time","timeout"]
}
group "pumba" {
task "pumba" {
driver = "docker"
config {
args = [
"--random",
"--log-level=info",
"stress",
"-d",
"${NOMAD_META_stress_time}",
"-stressors=--cpu ${NOMAD_META_cpu} --io 2 --vm 1 --vm-bytes ${NOMAD_META_memory} --timeout ${NOMAD_META_timeout}",
"re2:^${NOMAD_META_container_name}"
]
image = "gaiaadm/pumba:latest"
network_mode = "bridge"
volumes = [
# Use absolute paths to mount arbitrary paths on the host
"/var/run/docker.sock:/var/run/docker.sock"
]
}
resources {
cpu = 400
memory = 512
}
}
}
}
this is like I created a job for stress load on the container which is deployed on nodes. Let me know your thoughts