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
|
job "cassandra" {
datacenters = ["dc1"]
type = "service"
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
}
group "scylladb" {
count = 3
constraint {
operator = "distinct_hosts"
value = "true"
}
// volume + command line
task "scylladb_worker" {
driver = "docker"
config {
image = "scylladb/scylla:3.1.2"
readonly_rootfs = false
port_map {
scylla_port = 9042
scylla_gossip_port = 7000
scylla_jmx_port = 7199
}
args = [
"--seeds=192.168.1.2,192.168.1.3,192.168.1.4",
"--listen-address=0.0.0.0",
"--broadcast-address=${NOMAD_IP_scylla_port}",
"--broadcast-rpc-address=${NOMAD_IP_scylla_port}",
"--developer-mode", "1",
"--overprovisioned", "1",
"--experimental", "0",
"--memory", "200M"
]
volumes = [
"/var/lib/scylla:/var/lib/scylla"
]
}
resources {
memory = 500
network {
port "scylla_port" {
static = "9042"
}
port "scylla_gossip_port" {
static = "7000"
}
port "scylla_jmx_port" {
static = "7199"
}
}
}
service {
tags = ["scylla"]
port = "scylla_port"
address_mode = "host"
name = "scylla"
check {
type = "tcp"
port = "scylla_port"
interval = "60s"
timeout = "5s"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
}
}
}
|