This is a beginners guide on how to learn [[02 - Ressources/Software/Tools/Programming tools/Containerization/Nomad|Nomad]]. ## 🎬 Introduction **HashiCorp Nomad** is a simple, lightweight orchestrator that helps you **run code**—from containers to executables—on your machine or across servers. No need for heavy Kubernetes setups. In this guide, you’ll: 1. Install Nomad locally. 2. Run a Nomad cluster in “dev” mode. 3. Deploy your first “Hello World” app. 4. Explore the web UI. --- ## đŸ§© Requirements Make sure you have: - A system running **Linux**, **macOS**, or **Windows** - **Terminal/command‑line** experience - **[[Podman]] installed** (for container tasks) --- ## 🚀 1. Install Nomad ### ✅ Linux (using apt) bash ```bash curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" sudo apt update && sudo apt install nomad ``` ### ✅ macOS ```bash brew tap hashicorp/tap brew install nomad ``` ### ✅ Windows - Download the ZIP for Windows from HashiCorp’s releases page, unzip, and add `nomad.exe` to your `PATH` [HashiCorp Developer+13Medium+13Udemy+13](https://medium.com/%40williamwarley/mastering-hashicorp-nomad-a-comprehensive-guide-for-deploying-and-managing-workloads-aa8720c2620b?utm_source=chatgpt.com)[YouTube+11HashiCorp Developer+11HashiCorp Developer+11](https://developer.hashicorp.com/nomad/install?utm_source=chatgpt.com)[DEV Community](https://dev.to/thenjdevopsguy/quickstart-getting-started-with-hashicorp-nomad-2f30?utm_source=chatgpt.com). --- ## 🔧 2. Start a Local Dev Cluster In your terminal, run: ```bash nomad agent -dev ``` This starts a Nomad "agent" in development mode—combining server & client so you can experiment without extra configuration [FAUN — Developer Community+3HashiCorp Developer+3Medium+3](https://developer.hashicorp.com/nomad/docs/install/quickstart?utm_source=chatgpt.com). --- ## 📩 3. Deploy Your First App Create a file named `example.nomad` with: ```hcl job "hello" { datacenters = ["dc1"] group "web" { count = 1 task "hello" { driver = "docker" config { image = "nginxdemos/hello" ports = ["http"] } resources { cpu = 100 memory = 128 } network { port "http" { static = 8080 } } } } } ``` Then run: ```bash nomad job run example.nomad ``` Nomad schedules the `hello` job, pulls the Docker image, and runs it on port 8080 [Develeap+11DEV Community+11mpolinowski.github.io+11](https://dev.to/thenjdevopsguy/quickstart-getting-started-with-hashicorp-nomad-2f30?utm_source=chatgpt.com). --- ## 🌐 4. Explore the Web UI Access the UI at: `http://localhost:4646/ui` - See **jobs**, **nodes**, **allocations**, and **logs** - Great for visual learners (also offers CLI access) [Blag | manicminer](https://manicminer.io/posts/getting-started-with-hashicorp-nomad/?utm_source=chatgpt.com)[Udemy+10Develeap+10Medium+10](https://www.develeap.com/Introduction-to-HashiCorp-Nomad-A-Beginners-Guide/?utm_source=chatgpt.com)[HashiCorp Developer](https://developer.hashicorp.com/nomad/tutorials/get-started?utm_source=chatgpt.com) --- ## 🧠 5. Next Steps - Try updating the job file: scale `count` higher, change memory, and re-run `nomad job run`. - Explore more tutorials in the Nomad docs, like multi-node clusters or Consul integration [FAUN — Developer Community+13HashiCorp Developer+13HashiCorp Developer+13](https://developer.hashicorp.com/nomad/tutorials/get-started?utm_source=chatgpt.com). - Tear things down easily with: ```bash nomad job stop hello ```