Skip to content

Commit 0bc7b02

Browse files
committed
refactor(installer): use Homebrew for macOS dev installs
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
1 parent 6e7a17c commit 0bc7b02

7 files changed

Lines changed: 67 additions & 403 deletions

File tree

.github/workflows/release-dev.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,15 @@ jobs:
753753
openshell-sandbox-aarch64-unknown-linux-gnu.tar.gz > openshell-sandbox-checksums-sha256.txt
754754
cat openshell-sandbox-checksums-sha256.txt
755755
756+
- name: Generate Homebrew formula
757+
run: |
758+
set -euo pipefail
759+
python3 tasks/scripts/release.py generate-homebrew-formula \
760+
--release-tag dev \
761+
--release-dir release \
762+
--output release/openshell.rb
763+
cat release/openshell.rb
764+
756765
- name: Attest VM driver artifacts
757766
uses: actions/attest@v4
758767
with:
@@ -859,6 +868,7 @@ jobs:
859868
release/openshell-driver-vm-aarch64-unknown-linux-gnu.tar.gz
860869
release/openshell-driver-vm-aarch64-apple-darwin.tar.gz
861870
release/*.whl
871+
release/openshell.rb
862872
release/openshell-checksums-sha256.txt
863873
release/openshell-gateway-checksums-sha256.txt
864874
release/openshell-sandbox-checksums-sha256.txt

.github/workflows/release-tag.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -837,15 +837,6 @@ jobs:
837837
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | OPENSHELL_VERSION=${{ env.RELEASE_TAG }} sh
838838
```
839839
840-
### Apple Silicon macOS local gateway via Homebrew
841-
842-
```bash
843-
curl -fsSLo /tmp/openshell.rb https://github.com/NVIDIA/OpenShell/releases/download/${{ env.RELEASE_TAG }}/openshell.rb
844-
brew install /tmp/openshell.rb
845-
brew services restart openshell
846-
openshell gateway add http://127.0.0.1:17670 --local --name local
847-
```
848-
849840
files: |
850841
release/openshell-x86_64-unknown-linux-musl.tar.gz
851842
release/openshell-aarch64-unknown-linux-musl.tar.gz

README.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,11 @@ curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh |
3333
uv tool install -U openshell
3434
```
3535

36-
**Apple Silicon macOS local gateway via Homebrew formula:**
37-
38-
```bash
39-
VERSION=v0.0.10 # replace with the release tag you want
40-
curl -fsSLo /tmp/openshell.rb "https://github.com/NVIDIA/OpenShell/releases/download/${VERSION}/openshell.rb"
41-
brew install /tmp/openshell.rb
42-
brew services restart openshell
43-
openshell gateway add http://127.0.0.1:17670 --local --name local
44-
```
45-
4636
The binary and PyPI methods install the latest stable release by default. To
4737
install a specific version, set `OPENSHELL_VERSION` (binary), pin the version
48-
with `uv tool install openshell==<version>`, or download the matching
49-
`openshell.rb` formula from a tagged release. A
50-
[`dev` release](https://github.com/NVIDIA/OpenShell/releases/tag/dev) is also
51-
available that tracks the latest commit on `main`.
38+
with `uv tool install openshell==<version>`. A [`dev`
39+
release](https://github.com/NVIDIA/OpenShell/releases/tag/dev) is also available
40+
that tracks the latest commit on `main`.
5241

5342
### Create a sandbox
5443

architecture/custom-vm-runtime.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,9 @@ only for the kernel build).
325325

326326
macOS driver binaries produced via osxcross are not codesigned. Development
327327
builds are signed automatically by `tasks/scripts/gateway-vm.sh`
328-
(registered as `mise run gateway:vm`) and by `install-dev.sh` when it installs
329-
the Apple Silicon development tarballs from the selected release. Tagged
330-
releases also publish a generated Homebrew formula that ad-hoc signs the
331-
installed driver in `post_install`. A packaged release needs signing in CI.
328+
(registered as `mise run gateway:vm`) and by the generated Homebrew formula
329+
when `install-dev.sh` installs the selected release on Apple Silicon macOS. A
330+
packaged release needs signing in CI.
332331

333332
## Rollout Strategy
334333

crates/openshell-driver-vm/README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,11 @@ On Linux amd64 and arm64, `install-dev.sh` installs the Debian package from the
182182
selected `OPENSHELL_VERSION` release tag. That package includes
183183
`openshell-gateway` and `openshell-driver-vm`.
184184
185-
On Apple Silicon macOS, `install-dev.sh` installs `openshell`,
186-
`openshell-gateway`, and `openshell-driver-vm` from the selected release
187-
tarballs. It ad-hoc signs `openshell-driver-vm` with the Hypervisor entitlement
188-
before registering the local LaunchAgent gateway.
189-
190-
Tagged releases also publish an `openshell.rb` release asset. Installing that
191-
formula by path lets Homebrew own the binary layout and `brew services` gateway
192-
lifecycle without requiring a tap or cask yet.
185+
On Apple Silicon macOS, `install-dev.sh` installs the generated `openshell.rb`
186+
formula from the selected release. Homebrew installs `openshell`,
187+
`openshell-gateway`, and `openshell-driver-vm`, ad-hoc signs the driver with
188+
the Hypervisor entitlement in `post_install`, and owns the `brew services`
189+
gateway lifecycle.
193190
194191
## Relationship to `openshell-vm`
195192
@@ -198,4 +195,4 @@ lifecycle without requiring a tap or cask yet.
198195
## TODOs
199196
200197
- The gateway still configures the driver via CLI args; this will move to a gRPC bootstrap call so the driver interface is uniform across backends. See the `TODO(driver-abstraction)` notes in `crates/openshell-server/src/lib.rs` and `crates/openshell-server/src/compute/vm.rs`.
201-
- macOS local builds are codesigned by `tasks/scripts/gateway-vm.sh`; `install-dev.sh` and the tagged-release Homebrew formula sign the release tarball driver for local installs.
198+
- macOS local builds are codesigned by `tasks/scripts/gateway-vm.sh`; the generated Homebrew formula signs the release tarball driver for local installs.

docs/get-started/quickstart.mdx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,6 @@ If you prefer [uv](https://docs.astral.sh/uv/):
3333
uv tool install -U openshell
3434
```
3535

36-
Tagged releases also publish a temporary Homebrew formula for Apple Silicon
37-
macOS local gateways:
38-
39-
```shell
40-
VERSION=v0.0.10 # replace with the release tag you want
41-
curl -fsSLo /tmp/openshell.rb "https://github.com/NVIDIA/OpenShell/releases/download/${VERSION}/openshell.rb"
42-
brew install /tmp/openshell.rb
43-
brew services restart openshell
44-
openshell gateway add http://127.0.0.1:17670 --local --name local
45-
```
46-
4736
After installing the CLI, run `openshell --help` in your terminal to see the full CLI reference.
4837

4938
<Tip>

0 commit comments

Comments
 (0)