From aae61695f520334724f44fa8844f3492608f8e7b Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Mon, 1 Apr 2019 22:28:18 -0500 Subject: [PATCH] added cpu/disk/memory stress jobs for e2e tests --- e2e/metrics/input/cpustress.nomad | 33 ++++++++++++++++++++++++++++++ e2e/metrics/input/diskstress.nomad | 32 +++++++++++++++++++++++++++++ e2e/metrics/input/memstress.nomad | 32 +++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 e2e/metrics/input/cpustress.nomad create mode 100644 e2e/metrics/input/diskstress.nomad create mode 100644 e2e/metrics/input/memstress.nomad diff --git a/e2e/metrics/input/cpustress.nomad b/e2e/metrics/input/cpustress.nomad new file mode 100644 index 000000000..74ff0e992 --- /dev/null +++ b/e2e/metrics/input/cpustress.nomad @@ -0,0 +1,33 @@ +job "cpustress" { + datacenters = ["dc1", "dc2"] + type = "batch" + group "cpustress" { + count = 1 + restart { + mode = "fail" + attempts = 0 + } + reschedule { + attempts = 3 + interval = "10m" + unlimited = false + } + task "cpustress" { + driver = "docker" + + config { + image = "progrium/stress" + args = [ + "-c", "4", + "-t", "300" + ] + + } + + resources { + cpu = 4096 + memory = 256 + } + } + } +} \ No newline at end of file diff --git a/e2e/metrics/input/diskstress.nomad b/e2e/metrics/input/diskstress.nomad new file mode 100644 index 000000000..b937efb7e --- /dev/null +++ b/e2e/metrics/input/diskstress.nomad @@ -0,0 +1,32 @@ +job "diskstress" { + datacenters = ["dc1", "dc2"] + type = "batch" + group "diskstress" { + count = 1 + restart { + mode = "fail" + attempts = 0 + } + reschedule { + attempts = 3 + interval = "10m" + unlimited = false + } + task "diskstress" { + driver = "docker" + + config { + image = "progrium/stress" + args = [ + "-d", "2", + "-t", "30" + ] + + } + resources { + cpu = 4096 + memory = 256 + } + } + } +} \ No newline at end of file diff --git a/e2e/metrics/input/memstress.nomad b/e2e/metrics/input/memstress.nomad new file mode 100644 index 000000000..5ee8c152a --- /dev/null +++ b/e2e/metrics/input/memstress.nomad @@ -0,0 +1,32 @@ +job "memstress" { + datacenters = ["dc1", "dc2"] + type = "batch" + group "memstress" { + count = 1 + restart { + mode = "fail" + attempts = 0 + } + reschedule { + attempts = 3 + interval = "10m" + unlimited = false + } + task "memstress" { + driver = "docker" + + config { + image = "progrium/stress" + args = [ + "-m", "2", + "-t", "60" + ] + + } + resources { + cpu = 4096 + memory = 1024 + } + } + } +} \ No newline at end of file