forked from jippi/hashi-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nomad-ui.nomad
78 lines (61 loc) · 1.43 KB
/
nomad-ui.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Example Nomad jobspec for nomad-ui
job "nomad-ui" {
# Job should run in the US region
region = "global"
# Spread tasks between us-west-1 and us-east-1
datacenters = ["dc1"]
# run this job globally
type = "service"
# Rolling updates should be sequential
update {
stagger = "30s"
max_parallel = 1
}
group "servers" {
# we want one nomad-ui server
count = 1
# create a web front end using a docker image
task "nomad-ui" {
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
driver = "exec"
config {
command = "nomad-ui-linux"
}
artifact {
source = "https://github.com/iverberk/nomad-ui/releases/download/v0.1.0/nomad-ui-linux"
options {
checksum = "sha256:0335ab507a99dff573cb58395ef52a76e25c7361dffed45a92dbd778d9174a1a"
}
}
service {
port = "http"
check {
type = "http"
path = "/"
interval = "10s"
timeout = "2s"
}
}
env {
NOMAD_ADDR = "nomad.service.consul"
NOMAD_PORT = "4646"
}
resources {
cpu = 500
memory = 512
network {
mbits = 10
# request for a static port
port "http" {
static = 3000
}
# use a dynamic port
# port "http" {}
}
}
}
}
}