A Nomad job is a declarative HCL definition for deploying a collection of container tasks to a Nomad cluster. Jobs contain groups, and groups contain tasks. section 9.2.1 section 9.2.5
A job definition connects deployment requirements to the containers Nomad should run:
- Set a task's Docker driver and container image. section 9.2.5
- Place related tasks in a group and optionally set a task count. section 9.2.5
- Map network ports to container ports and associate tasks with services. section 9.2.5
- Plan, run, stop, and purge jobs through the Nomad server UI. section 9.2.5
Listing 9.8 Nomad job definition
job "a_unique_job_name" {
group "unique_group_per_job" {
task "unique_task_per_group" {
driver = "docker"
config {
image = "codingforentrepreneurs/rk8s-py"
}
}
}
}
Start with one group and one Docker task, then extend the same HCL structure with additional tasks, ports, and services. section 9.2.5
