-
Notifications
You must be signed in to change notification settings - Fork 1
/
memcached.nomad
65 lines (57 loc) · 1.19 KB
/
memcached.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
variable "memcached_version" {
type = string
default = "1.6.23-alpine"
}
job "memcached" {
datacenters = ["dc1"]
type = "service"
name = "memcached"
priority = 100
update {
max_parallel = 1
health_check = "checks"
min_healthy_time = "5s"
healthy_deadline = "300s"
progress_deadline = "10m"
auto_revert = true
auto_promote = true
canary = 1
}
migrate {
max_parallel = 2
health_check = "checks"
min_healthy_time = "10s"
healthy_deadline = "5m"
}
group "server" {
count = 1
network {
port "memcached" {
to = 11211
}
}
service {
name = "memcached-server"
port = "memcached"
on_update = "require_healthy"
check {
name = "memcached_ready"
type = "tcp"
port = "memcached"
interval = "10s"
timeout = "3s"
}
}
task "server" {
driver = "docker"
config {
image = "docker.io/memcached:${var.memcached_version}"
ports = ["memcached"]
}
resources {
cpu = 1000
memory = 200
}
}
}
}