From dc28f64154a5aaf20bb48bffb8a8624d31fb9f08 Mon Sep 17 00:00:00 2001 From: Preston Hunter Date: Sun, 28 Dec 2025 23:08:38 -0500 Subject: [PATCH] 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. --- stacks/networking/newt.nomad | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 stacks/networking/newt.nomad diff --git a/stacks/networking/newt.nomad b/stacks/networking/newt.nomad new file mode 100644 index 0000000..d612abc --- /dev/null +++ b/stacks/networking/newt.nomad @@ -0,0 +1,58 @@ +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 + } + } + } +} \ No newline at end of file