From 071a8c131d3a21f596911869d4755fd6a2975498 Mon Sep 17 00:00:00 2001 From: Peter Gonda Date: Wed, 2 Sep 2026 11:27:20 +0200 Subject: [PATCH] fix(install.sh): start the Nomad Autoscaler The installer never started nomad-autoscaler (it only lived in setupNomad, which install.sh doesn't call), so autoscaling policies from compose x-nomad-scaling were never acted on. Start the autoscaler agent (nomad-apm + target-value) after Nomad is up. Verified live: agent connects to Nomad and loads the policy source. Co-Authored-By: Claude Opus 4.8 --- install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install.sh b/install.sh index 8e7606000..a6aebc079 100755 --- a/install.sh +++ b/install.sh @@ -246,6 +246,15 @@ run_container nomploy-traefik \ -v "$TRAEFIK_DIR/dynamic:/etc/nomploy/traefik/dynamic" \ traefik:v3.0 +# ── Nomad Autoscaler ───────────────────────────────────────────────────────── +# Reads scaling{} policies from Nomad jobs (emitted from compose x-nomad-scaling) +# and scales task groups via the nomad-apm metrics source. +echo "==> Starting Nomad Autoscaler" +run_container nomad-autoscaler \ + --network host \ + hashicorp/nomad-autoscaler:latest \ + agent -nomad-address=http://127.0.0.1:4646 -http-bind-address=127.0.0.1 -http-bind-port=8081 + # Stable auth secret: generate once and persist, so sessions survive restarts # (and we don't fall back to the insecure hardcoded default). $SUDO mkdir -p /etc/nomploy