From 94c10e29322d235da0d6c047cdaf08dfb49cf473 Mon Sep 17 00:00:00 2001 From: jeremy Date: Wed, 4 Feb 2026 10:00:37 -0600 Subject: [PATCH] Add HashiCorp deployment --- nomad-jobs/whoami.nomad.hcl | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 nomad-jobs/whoami.nomad.hcl diff --git a/nomad-jobs/whoami.nomad.hcl b/nomad-jobs/whoami.nomad.hcl new file mode 100644 index 0000000..d575ee2 --- /dev/null +++ b/nomad-jobs/whoami.nomad.hcl @@ -0,0 +1,50 @@ +# Simple test service to verify Traefik + Consul integration +# Deploy: nomad job run whoami.nomad.hcl + +job "whoami" { + datacenters = ["hf-dc1"] + type = "service" + + group "whoami" { + count = 2 # Run 2 instances for load balancing demo + + network { + port "http" { + to = 80 + } + } + + service { + name = "whoami" + port = "http" + + tags = [ + "traefik.enable=true", + "traefik.http.routers.whoami.rule=Host(`whoami.hobbs.farm`)", + "traefik.http.routers.whoami.entrypoints=websecure", + "traefik.http.routers.whoami.tls.certresolver=letsencrypt", + ] + + check { + type = "http" + path = "/health" + interval = "10s" + timeout = "2s" + } + } + + task "whoami" { + driver = "docker" + + config { + image = "traefik/whoami:latest" + ports = ["http"] + } + + resources { + cpu = 50 + memory = 32 + } + } + } +}