2019-12-12 17:45:16 +00:00
|
|
|
job "helloworld" {
|
2019-03-08 17:56:02 +00:00
|
|
|
datacenters = ["dc1"]
|
|
|
|
|
2019-11-25 18:31:00 +00:00
|
|
|
constraint {
|
|
|
|
attribute = "${attr.kernel.name}"
|
|
|
|
value = "linux"
|
|
|
|
}
|
|
|
|
|
2019-03-08 17:56:02 +00:00
|
|
|
group "hello" {
|
|
|
|
count = 3
|
|
|
|
|
2020-09-14 17:00:55 +00:00
|
|
|
network {
|
|
|
|
port "web" {}
|
|
|
|
}
|
|
|
|
|
2019-03-08 17:56:02 +00:00
|
|
|
task "hello" {
|
2019-03-11 04:50:21 +00:00
|
|
|
driver = "raw_exec"
|
2019-03-08 17:56:02 +00:00
|
|
|
|
|
|
|
config {
|
|
|
|
command = "local/hello"
|
|
|
|
}
|
|
|
|
|
|
|
|
artifact {
|
2019-10-11 12:00:05 +00:00
|
|
|
source = "https://nomad-community-demo.s3.amazonaws.com/hellov1"
|
2019-03-08 17:56:02 +00:00
|
|
|
destination = "local/hello"
|
2019-10-11 12:00:05 +00:00
|
|
|
mode = "file"
|
2019-03-08 17:56:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 500
|
|
|
|
memory = 256
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
name = "hello"
|
2019-03-27 16:02:44 +00:00
|
|
|
tags = ["urlprefix-hello/"]
|
2019-03-08 17:56:02 +00:00
|
|
|
port = "web"
|
2019-10-11 12:00:05 +00:00
|
|
|
|
2019-03-08 17:56:02 +00:00
|
|
|
check {
|
|
|
|
name = "alive"
|
|
|
|
type = "http"
|
|
|
|
path = "/"
|
|
|
|
interval = "10s"
|
|
|
|
timeout = "2s"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-05-06 14:39:51 +00:00
|
|
|
}
|