-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.nomad
48 lines (40 loc) · 900 Bytes
/
example.nomad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Sample job to verify 'privileged' containers and consul integration
job "http-echo-dynamic-service" {
datacenters = ["dc1"]
group "echo" {
count = 1
task "server" {
driver = "docker"
config {
image = "hashicorp/http-echo:latest"
privileged = true
args = [
"-listen",
":${NOMAD_PORT_http}",
"-text",
"Hello and welcome to ${NOMAD_IP_http} running on port ${NOMAD_PORT_http}",
]
}
resources {
network {
mbits = 10
port "http"{}
}
}
service {
name = "http-echo"
port = "http"
tags = [
"example",
"urlprefix-/http-echo",
]
check {
type = "http"
path = "/health"
interval = "2s"
timeout = "2s"
}
}
}
}
}