feat: use internal wrapper for consul registration
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 41s

This commit is contained in:
2026-02-07 18:14:19 -08:00
parent a10a50a6ea
commit 41874f0ace
14 changed files with 196 additions and 263 deletions

34
scan.nomad Normal file
View File

@@ -0,0 +1,34 @@
job "port-discovery" {
datacenters = ["dc1"]
type = "batch"
group "scan" {
count = 1
constraint {
attribute = "${attr.unique.hostname}"
value = "odroid6"
}
task "scan" {
driver = "docker"
config {
image = "busybox"
network_mode = "host"
command = "sh"
args = ["local/scan.sh"]
}
template {
data = <<EOF
#!/bin/sh
TARGET="192.168.4.227"
for p in 8085 8086 8087; do
echo "Testing $p..."
nc -zv -w 3 $TARGET $p 2>&1 | grep -q "refused" && echo "MATCH: $p is AVAILABLE (Refused)"
nc -zv -w 3 $TARGET $p 2>&1 | grep -q "succeeded" && echo "BUSY: $p is IN USE"
done
EOF
destination = "local/scan.sh"
}
}
}
}