summaryrefslogtreecommitdiff
path: root/lib/hyperstack/manager.rb
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-26 08:35:41 +0200
committerPaul Buetow <paul@buetow.org>2026-03-26 08:35:41 +0200
commit6bf435511e4a032bc9d8caafe48c586d046f5ab3 (patch)
tree29e146d9dabea0ea7cb4aee738e040fc91a9aac2 /lib/hyperstack/manager.rb
parent6ad780f511f432f3a3881883611892cb7e24afe2 (diff)
hyperstack: fix TOML paths, add live provisioning progress, and auto end-to-end test on create
- cli: introduce REPO_ROOT constant so create-both/delete-both/watch find TOML configs at the repo root instead of lib/hyperstack/ - manager: with_polling prints a heartbeat every 30s so silent waits (SSH, VM ready, etc.) are visibly alive - provisioning: bootstrap_guest streams SSH output in real time so apt-lock waits and setup steps are visible as they happen - provisioning: vLLM wait loop reads docker logs to show the current startup stage (shard loading %, torch.compile, CUDA graphs, API up) instead of a plain "not ready yet" counter - manager: create automatically runs the end-to-end inference test after provisioning completes, removing the manual 'test' step Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'lib/hyperstack/manager.rb')
-rw-r--r--lib/hyperstack/manager.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/hyperstack/manager.rb b/lib/hyperstack/manager.rb
index 0d17b2f..2134c92 100644
--- a/lib/hyperstack/manager.rb
+++ b/lib/hyperstack/manager.rb
@@ -343,15 +343,8 @@ module HyperstackVM
info "VM ready: #{state['public_ip']} (id=#{state['vm_id']})"
print_local_wireguard_summary(state['public_ip'])
- wg_ip = @config.wireguard_gateway_hostname
- if effective_vllm?
- info "Run 'ruby hyperstack.rb test' to verify vLLM."
- info " vLLM: http://#{wg_ip}:#{@config.ollama_port}/v1/models"
- end
- return unless effective_comfyui?
-
- info "Run 'ruby hyperstack.rb test' to verify ComfyUI."
- info " ComfyUI: http://#{wg_ip}:#{@config.comfyui_port}/system_stats"
+ # Run end-to-end tests automatically so the human doesn't need a manual step.
+ test
info " Enhance: ruby photo-enhance.rb --config #{File.basename(@config.path)} --indir ~/Pictures --outdir ~/Pictures/enhanced"
end
@@ -693,12 +686,16 @@ module HyperstackVM
def with_polling(description, timeout: 900, interval: 5)
deadline = Time.now + timeout
+ attempt = 0
loop do
result = yield
return result if result
raise Error, "Timed out waiting for #{description}." if Time.now >= deadline
+ attempt += 1
+ # Print a heartbeat every 30 seconds so the user can see the script hasn't stalled.
+ info(" still waiting for #{description}... (#{attempt * interval}s)") if (attempt % 6).zero?
sleep interval
end
end