diff --git a/python/deploy.py b/python/deploy.py index 1bd922c..1e7f2b1 100644 --- a/python/deploy.py +++ b/python/deploy.py @@ -47,7 +47,9 @@ def preflight(): check(f"cmd:{c}", run_ok(f"which {c}")) check("installer", run_ok(f"curl -fsSL -o /dev/null {AIO_URL} 2>/dev/null"), "meganode") for cloud, host in (("US", "us1.api.wallarm.com"), ("EU", "api.wallarm.com")): - check(f"cloud:{cloud}", run_ok(f"curl -fsSL -o /dev/null https://{host} 2>/dev/null"), host) + reachable = run_ok(f"curl -fsSL --connect-timeout 5 -o /dev/null https://{host} 2>/dev/null") + m = "✅" if reachable else "⚠️ " + print(f" {m} cloud:{cloud} — {host}{' (unreachable, will retry on deploy)' if not reachable else ''}") return ok # ─── Config ──────────────────────────────────────────────────────────── @@ -349,9 +351,15 @@ def remove_menu(): # ─── Main ────────────────────────────────────────────────────────────── def main(): - if len(sys.argv) > 1 and sys.argv[1] == "--version": + if len(sys.argv) > 1 and sys.argv[1] in ("--version", "-v"): print(f"deploy.py v{VERSION}") return + if len(sys.argv) > 1 and sys.argv[1] in ("--help", "-h", "help"): + print(f"deploy.py v{VERSION} — Wallarm Node Manager") + print(" deploy.py Interactive menu") + print(" deploy.py --deploy-all Deploy all nodes from fw.conf") + print(" deploy.py --version Show version") + return if len(sys.argv) > 1 and sys.argv[1] == "--deploy-all": deploy_all() return