-
Notifications
You must be signed in to change notification settings - Fork 1
/
hubot.nomad
80 lines (67 loc) · 1.35 KB
/
hubot.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
79
80
job "hubot" {
datacenters = ["dc1"]
type = "service"
update {
max_parallel = 1
min_healthy_time = "10s"
healthy_deadline = "3m"
progress_deadline = "10m"
auto_revert = false
canary = 1
}
migrate {
max_parallel = 2
health_check = "checks"
min_healthy_time = "10s"
healthy_deadline = "1m"
}
group "hubot" {
count = 1
network {
port "db" {
to = 6379
}
port "express" {
to = 8080
}
} // network
service {
name = "hubot"
tags = ["global", "bot"]
port = "express"
check {
name = "alive"
type = "tcp"
interval = "10s"
timeout = "2s"
}
} // hubot service
restart {
# The number of attempts to run the job within the specified interval.
attempts = 1
interval = "5m"
delay = "15s"
mode = "fail"
}
ephemeral_disk {
size = 300
}
task "install" {
lifecycle {
hook = "prestart"
sidecar = false
}
}
task "hubot" {
driver = "exec"
config {
command = "/bin/bash"
args = ["-c", "'sleep infinity'"]
}
constraint {
attribute = "${attr.os.name}"
value = "ubuntu"
}
}
} // Hubot Group
}