Nomploy Nomad Packs

← All packs

go-httpbin v0.1.0

Dev tools

go-httpbin — a fast, zero-dependency HTTP request-and-response testing service (an httpbin implementation in Go). Handy for testing clients, proxies and webhooks. Deployed as a single stateless host-networked Nomad service.

nomad-pack run go-httpbin --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- go-httpbin

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

1 task http 8080 image ghcr.io/mccutchen/go-httpbin:latest tracks :latest image bumped today
Variables 7
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run go-httpbin -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "go-httpbin"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The go-httpbin container image. Pin a tag in production.
image = "ghcr.io/mccutchen/go-httpbin:latest"

# Host port for the go-httpbin web UI.
port = 8080

# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# The task resources.
resources = {
    cpu    = 300
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"go-httpbin"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"ghcr.io/mccutchen/go-httpbin:latest"
The go-httpbin container image. Pin a tag in production.
port number
8080
Host port for the go-httpbin web UI.
constraints list
[]
Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 300
    memory = 256
  }
The task resources.
Readme

go-httpbin

go-httpbin — a fast, zero-dependency HTTP request & response testing service, a complete reimplementation of the classic httpbin in Go. Hit endpoints like /get, /status/500, /delay/3, /headers or /anything to exercise HTTP clients, proxies, load balancers and webhooks.

Single stateless host-networked Nomad service (no volume).

Deploy

nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run go-httpbin --registry=nomploy

Configure

Variable Default Description
port 8080 HTTP port (PORT).
image ghcr.io/mccutchen/go-httpbin:latest Container image. Pin a tag in production.
resources { cpu = 300, memory = 256 } Task resources. Very lightweight.

Browse the endpoint list at http://<host>:8080/. Being stateless, it needs no storage and scales horizontally — handy as a stable test target inside your cluster.