open-nomad/e2e/metrics/input/simpleweb.nomad
Tim Gross e439e927ed
e2e: run client/allocs metrics tests nightly (#6842)
Refactor the metrics end-to-end tests so they can be run with our e2e
test framework. Runs fabio/prometheus and a collection of jobs that
will cause metrics to be measured. We then query Prometheus to ensure
we're publishing those allocation metrics and some metrics from the
clients as well.

Includes adding a placeholder for running the same tests on Windows.
2019-12-12 12:45:16 -05:00

49 lines
776 B
HCL

job "simpleweb" {
datacenters = ["dc1"]
type = "system"
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
group "simpleweb" {
task "simpleweb" {
driver = "docker"
config {
image = "nginx:latest"
port_map {
http = 8080
}
}
resources {
cpu = 256
memory = 128
network {
mbits = 1
port "http"{}
}
}
// TODO(tgross): this isn't passing health checks
service {
port = "http"
name = "simpleweb"
tags = ["simpleweb"]
check {
type = "tcp"
port = "http"
interval = "10s"
timeout = "2s"
}
}
}
}
}