Skip to content

feat(install-vm): install gateway + vm driver, add --driver-dir resolution#887

Merged
drew merged 3 commits intomainfrom
install-vm-gateway-and-driver
Apr 20, 2026
Merged

feat(install-vm): install gateway + vm driver, add --driver-dir resolution#887
drew merged 3 commits intomainfrom
install-vm-gateway-and-driver

Conversation

@drew
Copy link
Copy Markdown
Collaborator

@drew drew commented Apr 19, 2026

Summary

Reworks install-vm.sh to bootstrap a working VM-driver gateway end-to-end, and teaches the gateway how to find helper binaries in a dedicated driver directory so they don't have to sit on PATH. Running the script now leaves you with everything needed to start a gateway that auto-detects the VM compute driver.

Related Issue

N/A — maintenance / install UX.

Changes

install-vm.sh

  • Downloads two binaries instead of one:
    • openshell-gateway from the rolling dev release → OPENSHELL_INSTALL_DIR (default ~/.local/bin).
    • openshell-driver-vm from the rolling vm-dev release → OPENSHELL_DRIVER_DIR (default ~/.local/libexec/openshell), which matches the gateway's new default.
  • Verifies checksums against each release's checksum file.
  • Codesigns only openshell-driver-vm on macOS (it's the process that runs libkrun; the gateway doesn't need the entitlement).
  • Drops the old openshell-vm / OPENSHELL_VM_INSTALL_DIR naming.
  • Prints the exact openshell-gateway --drivers vm … command to start the gateway at the end; omits --driver-dir when the default is in use so the one-liner stays short.

crates/openshell-server

  • New --driver-dir / OPENSHELL_DRIVER_DIR flag on openshell-gateway, default $HOME/.local/libexec/openshell.
  • VmComputeConfig gains a driver_dir: Option<PathBuf> with a default_driver_dir() helper.
  • resolve_compute_driver_bin now searches in order:
    1. Explicit --vm-compute-driver-bin override.
    2. {driver_dir}/openshell-driver-vm.
    3. Sibling of the gateway executable (kept so local cargo run still works).
  • Error message enumerates every searched path and the relevant flags/env vars.
  • Four new unit tests cover each resolution branch and the error case.

Testing

  • mise run pre-commit passes
  • Unit tests added/updated — 4 new tests in compute::vm::tests
  • E2E tests added/updated (not applicable — no runtime behavior change beyond the new flag)

Manual verification:

  • cargo test -p openshell-server --lib compute::vm::tests → 6/6 pass.
  • OPENSHELL_INSTALL_DIR=/tmp/x OPENSHELL_DRIVER_DIR=/tmp/y sh install-vm.sh → both binaries downloaded, checksummed, codesigned on macOS, installed to the requested dirs, and the correct start command is printed.
  • ./target/debug/openshell-gateway --help shows the new --driver-dir flag.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (no architecture doc covers the install script or driver resolution today; happy to add one if preferred)

…ution

install-vm.sh now bootstraps a working VM-driver gateway end-to-end:
downloads openshell-gateway from the dev release and openshell-driver-vm
from vm-dev, installs them into distinct directories, codesigns the
driver on macOS, and prints the start command.

The gateway gains --driver-dir / OPENSHELL_DRIVER_DIR (default
~/.local/libexec/openshell) so operators can keep helper binaries out of
their PATH directory. resolve_compute_driver_bin now searches the
explicit override, then the driver dir, then the sibling-of-exe fallback
used by local dev builds, with an error message that names every
searched path.
@drew drew requested a review from a team as a code owner April 19, 2026 20:38
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Apr 19, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

drew added 2 commits April 19, 2026 13:45
The previous start command was missing --ssh-handshake-secret,
--grpc-endpoint, and a way to locate the driver binary, so pasting it
into a shell produced configuration errors.

Use --vm-compute-driver-bin with the absolute path we just installed so
the command works against every released gateway (including the current
dev build, which predates --driver-dir).
@drew drew merged commit b39f5aa into main Apr 20, 2026
9 checks passed
@drew drew deleted the install-vm-gateway-and-driver branch April 20, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants