Repository navigation
feat(bundle): Make hull the runtime when the bundle carries it #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -186,32 +186,32 @@ $ curl -fsSL https://raw.githubusercontent.com/NOFireAI/brig-standalone-linux/ma | |
| [docs/rootless.md](docs/rootless.md) has the detail, including the two things | ||
| that still need root once per host, and what a home install gives up. | ||
|
|
||
| ### hull beside nerdctl | ||
| ### hull and nerdctl | ||
|
|
||
| nerdctl is brig's runtime here. The bundle also carries hull, the runtime brig | ||
| drives on macOS, built for Linux: a containerd client that boots the same urunc, | ||
| monitors and guest assets. `BRIG_RUNTIME=hull` selects it, and the launcher then | ||
| points brig at the bundle's hull rather than its nerdctl: | ||
| hull is brig's runtime here, and needs the brig in the bundle to be v0.6.0 or | ||
| later: an older brig refuses the shipped profiles on hull. It is the runtime | ||
| brig drives on macOS, built for Linux: a containerd client that boots the same urunc, monitors and guest assets, | ||
| and puts each networked sandbox on a network gateway of its own, which enforces | ||
| the egress policy and serves routes and published ports. nerdctl stays in the | ||
| bundle, and `BRIG_RUNTIME=nerdctl` selects it, for instance for an image whose | ||
| `USER` is a name, which hull on Linux refuses: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let;s just also mention here that this requires brig v0.6.0 as the comment at
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done in f56ad86: the README says hull as the runtime needs the brig in the bundle to be v0.6.0 or later, and the launcher's comment says the same. |
||
|
|
||
| ```console | ||
| $ BRIG_RUNTIME=hull brig doctor | ||
| $ BRIG_RUNTIME=nerdctl brig doctor | ||
| ``` | ||
|
|
||
| It needs a brig that drives hull on Linux, which the `v0.5.0` in this bundle | ||
| does not. Even then, hull on Linux boots a sandbox on the shared bridge or with | ||
| no network, and brig refuses what it cannot enforce there yet: an egress policy, | ||
| a route, `network: isolated` and a published port. The shipped agent profiles | ||
| ask for an isolated network, so they stay on nerdctl for now. Every value the | ||
| launcher sets still defers to the environment, so `BRIG_RUNTIME_BIN` points brig | ||
| at another hull. | ||
| A sandbox stays on the runtime that booted it, so one booted on nerdctl before | ||
| this release needs `BRIG_RUNTIME=nerdctl` until `brig rm` removes it. Every value | ||
| the launcher sets still defers to the environment, so `BRIG_RUNTIME_BIN` points | ||
| brig at another hull. | ||
|
|
||
| The launcher works out the binary each time it is sourced. A shell that has run | ||
| `eval "$(brig-ctl env)"` has the bundle's `bin/` first on its `PATH`, so `brig` | ||
| there is the binary itself and nothing sources the launcher again: set | ||
| `BRIG_RUNTIME` before the eval, or run the eval again after changing it. | ||
|
|
||
| ```console | ||
| # export BRIG_RUNTIME=hull | ||
| # export BRIG_RUNTIME=nerdctl | ||
| # eval "$(/var/lib/brig/data/bin/brig-ctl env)" | ||
| ``` | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the test that sources the launcher twice now covers only a switch from hull to nerdctl. It previously tested nerdctl to hull, the case the binary reset was written for. Keep both directions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, that was the case the reset was written for. Both directions are back in f56ad86: hull to nerdctl, and nerdctl to hull.