The Nomad provider deploys Ctrl Plane instances as Nomad jobs, supporting Docker, exec, and other Nomad task drivers.
Status01
Interface defined — the package structure exists at provider/nomad and implements the provider.Provider interface. Full implementation is in progress.
Configuration02
import "github.com/xraph/ctrlplane/provider/nomad"
prov, err := nomad.New(nomad.Config{
Address: "http://nomad.service.consul:4646",
Token: os.Getenv("NOMAD_TOKEN"),
Region: "global",
Namespace: "default",
Datacenter: "dc1",
})| Field | Env | Default | Description |
Address | CP_NOMAD_ADDR | http://127.0.0.1:4646 | Nomad API address |
Token | CP_NOMAD_TOKEN | — | ACL token for authentication |
Region | CP_NOMAD_REGION | global | Nomad region |
Namespace | CP_NOMAD_NAMESPACE | default | Nomad namespace |
Datacenter | CP_NOMAD_DATACENTER | dc1 | Target datacenter |
Capabilities03
| Capability | Supported |
provision | Yes |
deploy | Yes |
scale | Yes |
logs | Yes |
exec | Yes |
rolling | Yes |
canary | Yes |
volumes | Via CSI plugins |
Resource mapping04
| Ctrl Plane concept | Nomad resource |
| Instance | Job (service type) |
| Environment variables | Task env block |
| Ports | Network port mapping |
| Resources (CPU/Memory) | Task resources block |
| Health checks | Service check stanza |
| Scaling | Task group count |
| Canary deploy | Update stanza with canary |
How it works05
Provision creates a Nomad service job with a Docker task driver.
Deploy updates the job specification with the new image and triggers a deployment.
Scale adjusts the task group count.
Canary deployments use Nomad's native canary support in the update stanza.
Logs streams from the Nomad allocation filesystem.
Exec uses the Nomad alloc exec API.
When to use06
Teams using the HashiCorp ecosystem (Consul, Vault, Nomad)
Mixed workloads (containers, JVM, binaries) on the same scheduler
Environments where Kubernetes is too heavyweight
Multi-datacenter deployments with Nomad federation