sfos/bootstrap/config/nomad-server-blue.config.hcl

71 lines
1.3 KiB
HCL

leave_on_interrupt = true
leave_on_terminate = true
server {
enabled = true
# Ideally the bootstrap expect value would reflect the number of servers set by `instance_count`, but in the interest
# of not chaning each server's "user data" every time the instance_count changes, we hard code the nomad cluster to
# bootstrap itself whenever 3 nodes are present
bootstrap_expect = 3
server_join {
retry_join = [ "10.0.1.2", "10.0.1.3", "10.0.1.4", "10.0.1.5", "10.0.1.6", "10.0.1.7" ]
}
}
acl {
enabled = true
}
client {
enabled = true
host_volume "letsencrypt" {
path = "/var/www/certbot"
read_only = false
}
host_volume "certbot" {
path = "/etc/certbot"
read_only = false
}
host_network "private" {
cidr = "${ private_network_cidr }"
}
host_network "tailnet" {
cidr = "100.64.0.0/10"
}
}
plugin "docker" {
config {
gc {
image = true
image_delay = "3m"
container = true
dangling_containers {
enabled = true
dry_run = false
period = "5m"
creation_grace = "5m"
}
}
volumes {
enabled = true
selinuxlabel = "z"
}
allow_caps = ["chown", "net_raw"]
allow_privileged = true
}
}
plugin "raw_exec" {
config {
enabled = true
}
}