Files
nomad/stacks/networking/newt.nomad
Preston Hunter dc28f64154 feat(networking): Deploy newt agent as a Nomad service
Introduces a new Nomad job definition (`newt.nomad`) to deploy the `newt` agent as a managed service within the Homelab environment.

This job configures a single `newt-agent` task using the `fosrl/newt:latest` Podman image. The agent is set up with specific environment variables for endpoint, ID, and secret, enabling it to connect to the Pangolin service and establish network connectivity. Resource limits for CPU and memory are also defined.
2025-12-28 23:08:38 -05:00

58 lines
1.1 KiB
HCL

job "networking" {
datacenters = ["Homelab-PTECH-DC"]
region = "home"
type = "service"
update {
max_parallel = 1
min_healthy_time = "10s"
healthy_deadline = "3m"
progress_deadline = "10m"
auto_revert = true
}
group "newt" {
count = 1
network {
mode = "bridge"
dns {
servers = ["192.168.1.133"]
searches = ["service.consul"]
}
}
restart {
interval = "5m"
attempts = 3
delay = "15s"
mode = "fail"
}
reschedule {
delay = "30s"
delay_function = "exponential"
max_delay = "1h"
unlimited = true
}
task "newt-agent" {
driver = "podman"
config {
image = "docker.io/fosrl/newt:latest"
}
env {
PANGOLIN_ENDPOINT = "https://proxy.prestonhunter.space"
NEWT_ID = "jr0r2x7cujxkipq"
NEWT_SECRET = "agj92hbufuoehq8etfbndgt9htkigkr3vnh0imq82xaz591b"
}
resources {
cpu = 200
memory = 256
}
}
}
}