You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 02e80eb
Browse filesBrowse the repository at this point in the historyBrowse files
|`crates/openshell-isolation/`| Isolation backend contract | RFC 0012 `IsolationBackend` trait + types; the supervisor-facing runtime contract for the boundary |
36
+
|`crates/openshell-isolation-vm/`| VM isolation transport | Shared authenticated host/guest boundary transport and portable process leaf for VM drivers |
Copy file name to clipboardExpand all lines: architecture/compute-runtimes.md
+24-8Lines changed: 24 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,12 @@ Compute runtimes create, stop, start, delete, and watch sandbox workloads for th
4
4
gateway. They do not replace sandbox policy enforcement. Every runtime starts a
5
5
workload that runs the `openshell-sandbox` supervisor, and the supervisor
6
6
enforces the sandbox contract locally.
7
+
Compute runtimes create, stop, delete, and watch sandbox workloads for the
8
+
gateway. They do not replace sandbox policy enforcement. Container runtimes run
9
+
the logical `openshell-sandbox` supervisor in the workload boundary. VM runtimes
10
+
may instead run it on the host and use an authenticated process leaf inside the
11
+
guest. In both placements the logical supervisor owns policy and the gateway
12
+
session.
7
13
8
14
## Driver Contract
9
15
@@ -16,6 +22,9 @@ Each runtime receives a sandbox spec from the gateway and is responsible for:
16
22
- Forwarding the exact canonical main-process argv and TTY mode without shell
17
23
reconstruction. The sandbox-level environment and policy workspace apply to
18
24
the main process.
25
+
- Injecting sandbox identity and the admitted topology descriptor.
26
+
- Supplying TLS or secret material only to the logical supervisor placement.
27
+
- Providing the logical supervisor and any boundary-local process leaf.
19
28
- Reporting lifecycle and platform events back to the gateway.
20
29
- Cleaning up runtime-owned resources.
21
30
@@ -207,6 +216,8 @@ delete, reconciliation removes the row; otherwise it can remain `Deleting`.
207
216
| Kubernetes | Cluster deployment through Helm. | Pod plus nested sandbox namespace. | Uses Kubernetes API objects, service accounts, secrets, PVC-backed workspace storage, and GPU resources. |
208
217
| VM | Experimental microVM isolation. | Per-sandbox libkrun VM. | Managed endpoint-backed driver. The gateway spawns `openshell-driver-vm`, waits for its Unix socket, and then consumes it through the same remote `compute_driver.proto` path used by unmanaged endpoint drivers. The VM driver boots a cached bootstrap `rootfs.ext4`, prepares requested OCI images inside a bootstrap VM with `umoci`, attaches the prepared image disk read-only, and gives each sandbox a writable `overlay.ext4` for merged-root changes and runtime material. The driver persists each accepted launch request beside the overlay and restarts those VMs on driver startup without recreating the overlay. |
209
218
| Extension | Out-of-tree drivers operated alongside the gateway. | Whatever boundary the driver implements. | Selected by a custom `compute_drivers = ["<name>"]` entry with `[openshell.drivers.<name>].socket_path`, or at launch time by pairing `--drivers <name>` with `--compute-driver-socket=<path>`. A launch-time endpoint may use a canonical built-in name to preserve its driver-config key while replacing in-process construction. The gateway connects to an operator-provisioned UDS, snapshots `GetCapabilities`, and dispatches all sandbox lifecycle calls through `compute_driver.proto`. The driver process and socket lifecycle are operator-owned; the gateway does not spawn, supervise, or remove unmanaged extension drivers. The trust boundary is the socket's filesystem permissions: the operator must ensure only the gateway uid can read/write it. |
219
+
| VM | Experimental host-supervised microVM isolation. | Per-sandbox libkrun VM with a portable guest process leaf. | Managed endpoint-backed driver. The gateway spawns `openshell-driver-vm`; the driver starts a native logical supervisor and connects it to the guest over authenticated virtio-vsock. The guest has no gateway credentials. The existing custom kernel, cached bootstrap `rootfs.ext4`, in-VM `umoci` preparation, read-only image disk, writable `overlay.ext4`, and restart persistence remain unchanged. |
220
+
| Extension | Out-of-tree drivers operated alongside the gateway. | Whatever boundary the driver implements. | Selected by a non-reserved custom `compute_drivers = ["<name>"]` entry with `[openshell.drivers.<name>].socket_path`, or at launch time by pairing `--drivers <name>` with `--compute-driver-socket=<path>`. Reserved built-in names such as `vm`, `docker`, `podman`, and `kubernetes` cannot be used as unmanaged socket endpoints. The gateway connects to a UDS the operator already provisioned, runs `GetCapabilities`, logs the advertised `driver_name`, and dispatches all sandbox lifecycle calls through `compute_driver.proto`. The driver process and socket lifecycle are operator-owned; the gateway does not spawn, supervise, or remove unmanaged extension drivers. The trust boundary is the socket's filesystem permissions: the operator must ensure only the gateway uid can read/write it. |
210
221
211
222
Per-sandbox CPU and memory values currently enter the driver layer through
212
223
template resource limits. Docker and Podman apply them as runtime limits.
@@ -255,25 +266,29 @@ Runtime-specific implementation notes belong in the driver crate README:
255
266
-`crates/openshell-driver-kubernetes/README.md`
256
267
-`crates/openshell-driver-vm/README.md`
257
268
258
-
The combined VM topology runs `openshell-sandbox` as guest PID 1. libkrun
259
-
executes the driver-owned guest bootstrap as PID 1, and the bootstrap preserves
260
-
that identity when it execs the supervisor after mounting and network setup.
269
+
The VM topology is delegated. libkrun executes the driver-owned guest bootstrap
270
+
as PID 1; after mounting and network setup it execs `openshell-sandbox vm-guest`
271
+
as the portable process leaf. The native host supervisor drives RFC 0012 over a
0 commit comments