HashiCorp Nomad Tutorial: Build a 1 Server + 6 Client Cluster
Modern infrastructure requires a reliable workload scheduler that distributes applications across multiple machines.
While many organizations use Kubernetes, a simpler and highly scalable alternative is HashiCorp Nomad.
Nomad is widely used in production environments because it is lightweight, easy to operate, and capable of scheduling thousands of workloads with minimal overhead.
In this tutorial you will learn how to deploy a Nomad cluster with 1 server and 6 client nodes and run distributed workloads across the cluster.
Prerequisites
Before starting ensure you have:
- Linux servers (Ubuntu recommended)
- SSH access to all nodes
- Basic Linux knowledge
- Open network communication between nodes
- Docker installed on client nodes
Nomad Cluster Architecture
Example setup used in this tutorial.
Nomad Server
(Scheduler)
192.168.10.10
|
------------------------------------------
| | | | | |
C1 C2 C3 C4 C5 C6
Server schedules workloads while clients execute tasks.
What You Will Learn
In this guide we will cover:
- What HashiCorp Nomad is
- Nomad architecture
- Nomad vs Kubernetes vs Docker
- Installing Nomad on Linux
- Creating a Nomad cluster (1 server + 6 clients)
- Running a distributed job
- Real-world DevOps use cases
What is HashiCorp Nomad?
Nomad is a workload orchestrator developed by HashiCorp.
It schedules and runs applications across a cluster of machines.
Nomad supports multiple workload types:
- Docker containers
- Standalone binaries
- Java applications
- QEMU virtual machines
- Raw executables
One of the biggest advantages of Nomad is simplicity.
Unlike many orchestration systems, Nomad runs as a single lightweight binary, which makes installation and operations extremely simple.
Nomad Architecture
A Nomad cluster consists of two types of nodes:
Nomad Server
The server node manages the cluster.
Responsibilities:
- scheduling jobs
- maintaining cluster state
- leader election
- workload placement
Usually 3 or 5 servers are used in production.
For this tutorial we use 1 server.
Nomad Client
Client nodes execute workloads scheduled by the server.
Responsibilities:
- run containers
- execute binaries
- report resource usage
- communicate with the server
In this tutorial we will deploy 6 client nodes.
Cluster Architecture
Example cluster setup:
Nomad Server
server1
192.168.10.10
Nomad Clients
client1
client2
client3
client4
client5
client6
The server schedules jobs and distributes them across all client machines.
Install Nomad
Download Nomad binary from HashiCorp.
wget https://releases.hashicorp.com/nomad/1.7.0/nomad_1.7.0_linux_amd64.zip
Unzip and move binary.
unzip nomad_1.7.0_linux_amd64.zip
sudo mv nomad /usr/local/bin/
Verify installation.
nomad version
Configure Nomad Server
Create configuration directory.
sudo mkdir -p /etc/nomad.d
Create server configuration file.
sudo nano /etc/nomad.d/server.hcl
Example configuration:
server {
enabled = true
bootstrap_expect = 1
}
data_dir = "/opt/nomad"
bind_addr = "0.0.0.0"
Start Nomad server.
nomad agent -config=/etc/nomad.d/server.hcl
Configure Nomad Clients
On each client node create:
/etc/nomad.d/client.hcl
Example configuration:
client {
enabled = true
servers = ["SERVER_IP"]
}
data_dir = "/opt/nomad"
Start client agent.
nomad agent -config=/etc/nomad.d/client.hcl
Verify Cluster
Check cluster members.
nomad node status
Example output:
ID Node Name Status
node1 client1 ready
node2 client2 ready
node3 client3 ready
node4 client4 ready
node5 client5 ready
node6 client6 ready
Deploy a Sample Job
Create job file.
example.nomad
Example job configuration:
job "web" {
datacenters = ["dc1"]
group "example" {
task "nginx" {
driver = "docker"
config {
image = "nginx:latest"
ports = ["http"]
}
resources {
cpu = 500
memory = 256
}
}
}
}
Run job.
nomad run example.nomad
Check job status.
nomad job status
Real World Use Cases
Nomad is widely used in modern infrastructure.
CI/CD Pipelines
Nomad can run CI jobs across distributed workers.
Example:
- build containers
- run tests
- deploy artifacts
Blockchain Infrastructure
Nomad can schedule blockchain nodes.
Examples:
- validator nodes
- indexer services
- RPC nodes
Batch Processing
Nomad is ideal for batch workloads.
Examples:
- log processing
- data pipelines
- ETL workloads
AI and GPU Workloads
Nomad supports GPU scheduling.
This is useful for:
- machine learning jobs
- model training
- distributed inference
Nomad vs Kubernetes
| Feature | Nomad | Kubernetes |
|---|---|---|
| Complexity | Simple | Complex |
| Installation | Single binary | Multiple components |
| Resource usage | Low | High |
| Learning curve | Easy | Steep |
Nomad is ideal when you need simple and scalable orchestration without Kubernetes complexity.
Conclusion
HashiCorp Nomad is a powerful workload orchestrator that provides simplicity, scalability, and reliability.
By deploying a cluster with 1 server and 6 clients, you can run distributed workloads efficiently across your infrastructure.
Nomad is particularly useful for:
- DevOps automation
- blockchain infrastructure
- CI/CD pipelines
- distributed computing
- AI workloads
Because it runs as a single binary, Nomad is significantly easier to operate compared to many other orchestration systems.
Next Steps
In future tutorials we will explore:
- Running Nomad with Consul
- Nomad service discovery
- Nomad + Docker production setup
- Nomad autoscaling
- Nomad for blockchain infrastructure