e439e927ed
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.
51 lines
852 B
HCL
51 lines
852 B
HCL
job "helloworld" {
|
|
datacenters = ["dc1"]
|
|
|
|
constraint {
|
|
attribute = "${attr.kernel.name}"
|
|
value = "linux"
|
|
}
|
|
|
|
group "hello" {
|
|
count = 3
|
|
|
|
task "hello" {
|
|
driver = "raw_exec"
|
|
|
|
config {
|
|
command = "local/hello"
|
|
}
|
|
|
|
artifact {
|
|
source = "https://nomad-community-demo.s3.amazonaws.com/hellov1"
|
|
destination = "local/hello"
|
|
mode = "file"
|
|
}
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 256
|
|
|
|
network {
|
|
mbits = 10
|
|
port "web" {}
|
|
}
|
|
}
|
|
|
|
service {
|
|
name = "hello"
|
|
tags = ["urlprefix-hello/"]
|
|
port = "web"
|
|
|
|
check {
|
|
name = "alive"
|
|
type = "http"
|
|
path = "/"
|
|
interval = "10s"
|
|
timeout = "2s"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|