summaryrefslogtreecommitdiff
path: root/lib/hyperstack/cli.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/cli.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/cli.rb')
-rw-r--r--lib/hyperstack/cli.rb16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/hyperstack/cli.rb b/lib/hyperstack/cli.rb
index f575b59..8568474 100644
--- a/lib/hyperstack/cli.rb
+++ b/lib/hyperstack/cli.rb
@@ -4,9 +4,13 @@ require 'optparse'
module HyperstackVM
class CLI
+ # Repo root is two levels above this file (lib/hyperstack/ → lib/ → repo root).
+ # All TOML config files live at the repo root, not alongside this library file.
+ REPO_ROOT = File.expand_path(File.join(__dir__, '..', '..'))
+
def initialize(argv)
@argv = argv.dup
- @config_path = File.join(__dir__, 'hyperstack-vm.toml')
+ @config_path = File.join(REPO_ROOT, 'hyperstack-vm.toml')
@config_explicit = false
end
@@ -212,9 +216,9 @@ module HyperstackVM
candidates = [
@config_path,
- File.join(__dir__, 'hyperstack-vm1-gptoss.toml'),
- File.join(__dir__, 'hyperstack-vm2.toml'),
- File.join(__dir__, 'hyperstack-vm-photo.toml')
+ File.join(REPO_ROOT, 'hyperstack-vm1-gptoss.toml'),
+ File.join(REPO_ROOT, 'hyperstack-vm2.toml'),
+ File.join(REPO_ROOT, 'hyperstack-vm-photo.toml')
].uniq.select { |path| File.exist?(path) }
loaders = candidates.map { |path| ConfigLoader.load(path) }
@@ -224,8 +228,8 @@ module HyperstackVM
def pair_config_loaders
[
- ConfigLoader.load(File.join(__dir__, 'hyperstack-vm1-gptoss.toml')),
- ConfigLoader.load(File.join(__dir__, 'hyperstack-vm2.toml'))
+ ConfigLoader.load(File.join(REPO_ROOT, 'hyperstack-vm1-gptoss.toml')),
+ ConfigLoader.load(File.join(REPO_ROOT, 'hyperstack-vm2.toml'))
]
end