# 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`](stacks/networking/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: 1. Ensure you have a Nomad cluster running with a client node that has Podman installed. 2. You will need to obtain your `NEWT_ID` and `NEWT_SECRET` from the Project Newt service. 3. Update the `NEWT_ID` and `NEWT_SECRET` environment variables in the [`newt.nomad`](stacks/networking/newt.nomad) file with your specific values. 4. Execute the following command on your Nomad server (or a machine with Nomad CLI access configured to connect to your server): ```bash 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](https://www.nomadproject.io/)**: A workload orchestrator. - **[Project Newt](https://github.com/fosrl/newt)**: A project for secure and resilient overlay networking. - **[Podman](https://podman.io/)**: A daemonless container engine.