Nomad
Nomad is a simple and flexible scheduler and workload orchestrator to deploy and manage containers and non-containerized applications across on-prem and clouds at scale.
Quick Start
Start dev environment
- Start Docker Desktop
-
Start Nomad
-
If you get IPv6 issues on macOS check MacOS Docker Desktop Tricks
For more information, see Dev Environment
Deploy a job
-
Create a
redis.nomad.hcl
file with the following contents -
Deploy it via the CLI
For more information, see Jobs
Pages
- Dev Environment
- Concepts
- Jobs
- Networking
- Data and Volumes
- HCL2
- Task Drivers
- Resources
CLI Commands
Run a Job
Open Web UI
Directories
- Config File (Fedora):
/etc/nomad.d/nomad.hcl
- Data Directory (Fedora):
/opt/nomad/data
Tips
Docker images failing to pull due to timeouts
- Increase the
image_pull_timeout
in the config
Permission denied after mounting host volume into Docker container
Set the user to root
Debugging failed allocations
Set the entrypoint to prevent the container from crashing so it can be exec’d into
task "grafana" {
driver = "docker"
config {
image = "grafana/grafana-oss:latest"
ports = ["grafana-ui"]
entrypoint = ["/bin/sh", "-c", "while true; do sleep 500; done"]
}
}
Debugging Environment Variables
Exec into a container a run printenv
or env
Extending the Garbage Collection threshold for a Job
By default old Jobs are removed after 4 hours, after that time passes all data related to the Job is removed (including logs).
It can be useful to increase this, for example to see logs of failed Jobs in the UI.
Created: June 3, 2023