This repository has been archived on 2023-03-15. You can view files and clone it, but cannot push or open issues or pull requests.
infrastructure/nomad/core.hcl

44 lines
769 B
HCL
Raw Normal View History

2020-05-23 14:50:30 +00:00
job "core" {
datacenters = ["dc1"]
type = "system"
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
}
update {
max_parallel = 1
2020-07-13 17:56:45 +00:00
stagger = "1m"
2020-05-23 14:50:30 +00:00
}
group "network" {
task "diplonat" {
driver = "docker"
config {
2020-07-13 17:56:45 +00:00
image = "darkgallium/amd64_diplonat:v2"
2020-05-23 14:50:30 +00:00
network_mode = "host"
readonly_rootfs = true
2020-07-13 17:56:45 +00:00
privileged = true
2020-05-23 14:50:30 +00:00
}
template {
data = <<EOH
DIPLONAT_PRIVATE_IP={{ env "attr.unique.network.ip-address" }}
DIPLONAT_REFRESH_TIME=60
DIPLONAT_EXPIRATION_TIME=300
DIPLONAT_CONSUL_NODE_NAME={{ env "attr.unique.hostname" }}
RUST_LOG=debug
EOH
destination = "secrets/env"
env = true
}
resources {
memory = 40
}
}
}
}