whoami — a tiny HTTP service that echoes back the request (headers, client IP, hostname). Handy for testing ingress/routing, load balancing, and service discovery. Deployed as a stateless host-networked Nomad service.
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "whoami"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The whoami container image.
image = "traefik/whoami:latest"
# Host port whoami listens on.
port = 8097
# Number of instances (stateless — >1 is useful for testing load balancing across replicas).
count = 1
# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []
# The task resources.
resources = {
cpu = 100
memory = 32
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "whoami" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "traefik/whoami:latest" | The whoami container image. |
| port | number | 8097 | Host port whoami listens on. |
| count | number | 1 | Number of instances (stateless — >1 is useful for testing load balancing across replicas). |
| constraints | list | [] | Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". |
| resources | object | {
cpu = 100
memory = 32
} | The task resources. |
No variables match.
whoami — a tiny HTTP service that echoes the request back (hostname, client IP, headers, TLS info). It's the go-to for testing ingress/routing, load balancing, and service discovery on a cluster. Stateless host-networked Nomad service.
nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run whoami --registry nomploy
In nomploy: create a Compose service, type Nomad Pack, pack whoami, custom registry
github.com/Nomploy/nomad-packs, then Deploy.
curl http://<node-ip>:8097
| Variable | Default | Notes |
|---|---|---|
image |
traefik/whoami:latest |
Pin a tag in production. |
port |
8097 |
Listen port. |
count |
1 |
Set >1 to test load balancing (the Hostname line varies per replica). |
constraints |
[] |
Placement. |
resources |
cpu 100 / mem 32 |
Tiny. |