aboutsummaryrefslogtreecommitdiff
path: root/nomad/cassandra.hcl
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2020-01-15 16:56:53 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2020-01-15 16:56:53 +0100
commit541d42e460dc0bea2fc8d593b1654e4126194703 (patch)
tree2faba60b8ca52fd266b26d8010e04423a5831201 /nomad/cassandra.hcl
parentc69d64fa2dffa469951e571ebb319d690b569a7d (diff)
downloadinfrastructure-541d42e460dc0bea2fc8d593b1654e4126194703.tar.gz
infrastructure-541d42e460dc0bea2fc8d593b1654e4126194703.zip
Rename cassandra
Diffstat (limited to 'nomad/cassandra.hcl')
-rw-r--r--nomad/cassandra.hcl79
1 files changed, 79 insertions, 0 deletions
diff --git a/nomad/cassandra.hcl b/nomad/cassandra.hcl
new file mode 100644
index 0000000..3e3dc9e
--- /dev/null
+++ b/nomad/cassandra.hcl
@@ -0,0 +1,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
+ }
+ }
+ }
+ }
+ }
+}
+