2.2 KiB
Networking (Newt Agent) Nomad Job
This Nomad job defines the deployment for a Newt Agent, which is part of the Project Newt networking solution. It registers a Newt agent on a Nomad client.
What is this file?
The newt.nomad file is a HashiCorp Nomad job specification written in HCL. It describes how to deploy and manage the Newt Agent service.
Key configurations:
job "networking": The main job definition.datacenters = ["Homelab-PTECH-DC"]: Specifies the datacenter where this job should run.group "newt": Defines a group of tasks.network { mode = "bridge" }: Configures the network for the task to use bridge mode.task "newt-agent": The actual task running the Newt Agent container.driver = "podman": Uses Podman to run the container.config { image = "docker.io/fosrl/newt:latest" }: Uses the latest Newt Agent Docker image.env: Environment variables for the Newt Agent:PANGOLIN_ENDPOINT = "https://proxy.prestonhunter.space": The endpoint for the Pangolin proxy.NEWT_ID = "jr0r2x7cujxkipq":NEWT_SECRET = "agj92hbufuoehq8etfbndgt9htkigkr3vnh0imq82xaz591b":
How to use it
To deploy the Newt Agent:
-
Ensure you have a Nomad cluster running with a client node that has Podman installed.
-
You will need to obtain your
NEWT_IDandNEWT_SECRETfrom the Project Newt service. -
Update the
NEWT_IDandNEWT_SECRETenvironment variables in thenewt.nomadfile with your specific values. -
Execute the following command on your Nomad server (or a machine with Nomad CLI access configured to connect to your server):
nomad job run stacks/networking/newt.nomad
After deployment, the Newt Agent will register with the Pangolin endpoint, allowing it to participate in the Project Newt network.
Projects Involved
- HashiCorp Nomad: A workload orchestrator.
- Project Newt: A project for secure and resilient overlay networking.
- Podman: A daemonless container engine.