Skip to content

Instantly share code, notes, and snippets.

@akhenakh

akhenakh/mapd.nomad

Created Nov 11, 2019
Embed
What would you like to do?
Example Nomad deployment
job "mapd" {
datacenters = ["dc1"]
type = "service"
constraint {
operator = "distinct_hosts"
value = "true"
}
update {
max_parallel = 1
min_healthy_time = "10s"
healthy_deadline = "3m"
progress_deadline = "10m"
auto_revert = false
canary = 0
}
migrate {
max_parallel = 1
health_check = "checks"
min_healthy_time = "10s"
healthy_deadline = "5m"
}
group "mapd" {
count = 2
restart {
attempts = 3
interval = "1m"
delay = "5s"
mode = "fail"
}
volume "tiles" {
type = "host"
source = "tiles"
}
task "mapd" {
driver = "docker"
config {
image = "rk0.privdocker:5000/mapd:9e287b5"
port_map {
http = 9201
metrics = 8888
}
}
env {
"TILESPATH" = "/data/planet11.mbtiles"
"TILESURL" = "https://map.dev.mydomain"
"KEY" = "mykey"
"ALLOWORIGIN" = "*"
}
volume_mount {
volume = "tiles"
destination = "/data"
read_only = true
}
resources {
cpu = 400
memory = 128
network {
mbits = 10
port "http" {}
port "metrics" {}
}
}
service {
name = "mapd"
tags = [
"global",
"vuta",
"traefik.tags=service",
"traefik.frontend.rule=Host:map.dev.mydomain",
]
port = "http"
check {
name = "alive"
type = "http"
path = "/"
interval = "10s"
timeout = "2s"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.