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 239405c
Browse filesBrowse the repository at this point in the historyBrowse files
feat(install): install the snap package by default when supported
- `install.sh` now selects snap when the `snap` command exists and
`OPENSHELL_VERSION` is unset or `dev`.
- Explicit `OPENSHELL_INSTALL_METHOD=snap|deb|rpm` still takes
precedence.
- Exact releases and prereleases continue to use native packages during
automatic selection.
- Docker-related snap errors now mention DEB/RPM overrides.
- Installer selection tests cover default snap selection, native
fallbacks, overrides, pinned releases, and prereleases.
- Snap canary jobs no longer force `OPENSHELL_INSTALL_METHOD=snap`, so
they test automatic selection.
- Updated installation, VM driver, release canary, CI, and test guest
documentation.
- Fixed some leftover "Snap" language which should be "snap"
Signed-off-by: Oliver Calder <oliver.calder@canonical.com>
Copy file name to clipboardExpand all lines: .agents/skills/test-release-canary/SKILL.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,8 @@ The Release Canary (`.github/workflows/release-canary.yml`) smoke-tests the arti
16
16
|`macos`|`macos-latest-xlarge`| Installs the dev Homebrew artifacts, reaches the VM gateway, and creates, executes in, and deletes a sandbox. |
17
17
|`ubuntu-deb`|`ubuntu-latest`| Installs the dev Debian package, reaches the Docker gateway, and creates, executes in, and deletes a sandbox. |
18
18
|`fedora`|`fedora:latest` container | Installs the dev RPM packages, reaches the Podman gateway, and creates, executes in, and deletes a sandbox. |
19
-
|`ubuntu-snap-system-docker`|`ubuntu-latest`|Uses `install.sh`to install the snap from `latest/edge`, reuses system Docker, verifies the packaged prover version and a local policy boundary check, reaches the Docker gateway, creates, executes in, and deletes a sandbox, and verifies that the Docker snap is not installed. |
20
-
|`ubuntu-snap-docker-preflight`|`ubuntu-latest`| Verifies that `install.sh` rejects the OpenShell Snap path when Docker is absent or supplied by the Docker snap, without installing OpenShell. |
19
+
|`ubuntu-snap-system-docker`|`ubuntu-latest`|Verifies that `install.sh`selects the snap automatically when the `snap` command is available, installs it from `latest/edge`, reuses system Docker, verifies the packaged prover version and a local policy boundary check, reaches the Docker gateway, creates, executes in, and deletes a sandbox, and verifies that the Docker snap is not installed. |
20
+
|`ubuntu-snap-docker-preflight`|`ubuntu-latest`| Verifies that automatic snap selection rejects installation when Docker is absent or supplied by the Docker snap, without installing OpenShell. |
21
21
|`kubernetes`|`ubuntu-latest` + kind | Installs the dev Helm chart, reaches the in-cluster gateway, and creates, executes in, and deletes a sandbox using the published runtime images. |
22
22
23
23
All canary jobs disable anonymous OpenShell telemetry. Host package jobs inject
@@ -26,11 +26,13 @@ Kubernetes job installs with `server.telemetryEnabled=false`, so smoke traffic
26
26
does not contribute to product usage metrics.
27
27
28
28
The workflow sets `OPENSHELL_VERSION=dev` for every `install.sh` job. Positive
29
-
jobs consume the rolling dev release produced by the triggering workflow. The
30
-
system-Docker Snap lane tracks `latest/edge`; the missing-Docker lane exits
31
-
before installing a snap. The Debian and Kubernetes CLI lanes remove snapd so
32
-
they continue to exercise the dev Debian package. Kubernetes pins the matching
33
-
`0.0.0-dev` chart and `:dev` images.
29
+
jobs consume the rolling dev release produced by the triggering workflow. Both
30
+
snap lanes rely on the installed `snap` command to exercise automatic snap
31
+
selection without setting `OPENSHELL_INSTALL_METHOD`. The system-Docker lane
32
+
tracks `latest/edge`; the missing-Docker lane exits before installing a snap.
33
+
The Debian and Kubernetes CLI lanes remove snapd so they continue to exercise
34
+
the dev Debian package. Kubernetes pins the matching `0.0.0-dev` chart and
35
+
`:dev` images.
34
36
35
37
RPM package installation also has tmachine conformance coverage in
36
38
`Branch E2E Checks` (with `test:e2e`), `Release Dev`, and `Release Tag`. Those
@@ -141,10 +143,10 @@ Loopback registration auto-derives the gateway name to `openshell` if `--name` i
141
143
| Symptom | Likely cause | Where to look |
142
144
|---|---|---|
143
145
| `macos`/`ubuntu-deb`/`fedora` job fails on `install.sh` | Dev release missing an asset, checksum mismatch, or `install.sh` regression on this branch. | Job log around the `curl … install.sh \| sh` step. |
144
-
| Sandbox create or exec fails | Published sandbox and supervisor artifacts are missing, incompatible, or cannot establish the protected runtime channel. | Gateway logs plus Docker, Podman, VM, Snap, or Kubernetes runtime diagnostics for the job. |
146
+
| Sandbox create or exec fails | Published sandbox and supervisor artifacts are missing, incompatible, or cannot establish the protected runtime channel. | Gateway logs plus Docker, Podman, VM, snap, or Kubernetes runtime diagnostics for the job. |
145
147
| `macos`/`ubuntu-deb`/`fedora` job fails on `openshell status` | Local gateway service did not start (systemd/brew/podman). Often a driver issue. | Service logs in the job log; `OPENSHELL_COMPUTE_DRIVER` env in the "Ensure …" step. |
146
148
| `ubuntu-snap-system-docker` fails during `install.sh` | System Docker was unavailable to the runner user, the edge revision or automatic interfaces were unavailable, or the user gateway did not become reachable. | Failure diagnostics dump system Docker, snap service/connection/change state, user and legacy gateway journals, snap logs, and port 17670 listeners. |
147
-
| `ubuntu-snap-system-docker` fails during the prover checks | The prover artifact is missing or packaged for the wrong architecture, `openshell.prover` is not exposed or confined to read the test policies, or its solver linkage is not runnable. | The `Verify Snap installation` and `Check a policy boundary with the Snap prover` steps, plus `snap info openshell` and `snap connections openshell`. |
149
+
| `ubuntu-snap-system-docker` fails during the prover checks | The prover artifact is missing or packaged for the wrong architecture, `openshell.prover` is not exposed or confined to read the test policies, or its solver linkage is not runnable. | The `Install and check status` and `Check a policy boundary with the snap prover` steps, plus `snap info openshell` and `snap connections openshell`. |
148
150
| `ubuntu-snap-docker-preflight` unexpectedly succeeds | The installer no longer fails before installing the OpenShell snap when Docker is absent or supplied by the Docker snap. | Inspect `install.log`, `docker-snap.log`, `snap list`, and snapd changes. |
149
151
| `kubernetes` job fails on `helm install --wait` | Chart did not deploy in 5 min — usually image pull failure or readiness probe failing. | "Diagnostics on failure" step dumps `helm status`, manifest, pod describe, pod logs. |
150
152
| `kubernetes` job fails on `kubectl wait` | Gateway pod stuck `CrashLoopBackOff` or `ImagePullBackOff`. | Diagnostics dump; check `:dev` image existence at `ghcr.io/nvidia/openshell/gateway`. |
Copy file name to clipboardExpand all lines: CI.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -541,9 +541,9 @@ These workflows run after merge to publish dev/tagged artifacts and verify them.
541
541
|---|---|
542
542
| `.github/workflows/release-dev.yml` | Publishes the rolling `dev` build on every push to `main`. Builds gateway, sandbox, and supervisor images and binaries, packages, wheels, and pushes the Helm chart as `oci://ghcr.io/nvidia/openshell/helm-chart:0.0.0-dev` (plus an immutable `0.0.0-dev.<sha>` pin). Also dispatchable manually. |
543
543
| `.github/workflows/release-tag.yml` | Publishes tagged stable releases and manually dispatched pre-releases. Its automatic tag trigger excludes `-pre.*`. Both require the currently implemented qualification profile to pass before publication; the summary identifies the remaining RFC 0014 coverage. Failed candidates retain build artifacts and evidence in Actions storage. Source-SHA OCI images remain available as qualification inputs. |
544
-
| `.github/workflows/snap-package.yml` | Builds Snap and component artifacts for Release Dev and Release Tag without Store credentials or publication. |
545
-
| `.github/workflows/snap-publish.yml` | Uploads existing Snap and component artifacts to the Store without rebuilding. Release Dev calls it directly for `latest/edge` after Snap builds and requires it to succeed before creating the dev release. Release Tag calls it for `latest/stable` only for stable releases, after qualification and release assembly succeed. |
546
-
| `.github/workflows/release-canary.yml` | Smoke-tests published dev artifacts in the `macos`, `ubuntu-deb`, `ubuntu-snap-system-docker`, `fedora`, and `kubernetes` (kind + Helm) jobs. Each job reaches its gateway and creates, exercises, and deletes a sandbox. The `ubuntu-snap-system-docker` job verifies a compatible system Docker lifecycle, while `ubuntu-snap-docker-preflight` tests fail-fast behavior when Docker is absent or supplied by the Docker snap. The positive Snap lane also runs a local policy containment check with the packaged prover. It runs automatically after `Release Dev` succeeds and supports manual dispatch (`gh workflow run release-canary.yml --ref <branch>`). See the `test-release-canary` skill for the playbook and local kind reproduction. |
544
+
| `.github/workflows/snap-package.yml` | Builds snap and component artifacts for Release Dev and Release Tag without Store credentials or publication. |
545
+
| `.github/workflows/snap-publish.yml` | Uploads existing snap and component artifacts to the Store without rebuilding. Release Dev calls it directly for `latest/edge` after snap builds and requires it to succeed before creating the dev release. Release Tag calls it for `latest/stable` only for stable releases, after qualification and release assembly succeed. |
546
+
| `.github/workflows/release-canary.yml` | Smoke-tests published dev artifacts in the `macos`, `ubuntu-deb`, `ubuntu-snap-system-docker`, `fedora`, and `kubernetes` (kind + Helm) jobs. Each job reaches its gateway and creates, exercises, and deletes a sandbox. The snap jobs verify that `install.sh` selects the snap automatically when the `snap` command is available. The `ubuntu-snap-system-docker` job verifies a compatible system Docker lifecycle, while `ubuntu-snap-docker-preflight` tests fail-fast behavior when Docker is absent or supplied by the Docker snap. The positive snap lane also runs a local policy containment check with the packaged prover. It runs automatically after `Release Dev` succeeds and supports manual dispatch (`gh workflow run release-canary.yml --ref <branch>`). See the `test-release-canary` skill for the playbook and local kind reproduction. |
Copy file name to clipboardExpand all lines: docs/about/installation.mdx
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,9 +86,11 @@ The gateway reads `~/.config/openshell/gateway.toml` if it exists, otherwise the
86
86
87
87
## Linux
88
88
89
-
The script installs a Debian package on Debian and Ubuntu or an RPM package on Fedora and RHEL. Set `OPENSHELL_INSTALL_METHOD=snap` to install the [Snap](#snap) package instead; hosts that already have the OpenShell snap keep refreshing it. Linux packages require glibc 2.28 or newer.
89
+
When the `snap` command is available, the script installs the [snap](#snap) package for the latest stable release or the rolling `dev` release. Otherwise, it installs a Debian package on Debian and Ubuntu or RPM packages on Fedora and RHEL. During automatic selection, prereleases and explicit release tags use native packages so the installer can select the exact release artifacts. Explicit `OPENSHELL_INSTALL_METHOD=snap` supports only an unset version or `OPENSHELL_VERSION=dev`.
90
90
91
-
The gateway runs as a systemd user service at `https://127.0.0.1:17670` and reads `~/.config/openshell/gateway.toml`.
91
+
Set `OPENSHELL_INSTALL_METHOD=deb` or `OPENSHELL_INSTALL_METHOD=rpm` to select a native package explicitly. Native Linux packages require glibc 2.28 or newer.
92
+
93
+
For Debian and RPM installations, the gateway runs as a systemd user service at `https://127.0.0.1:17670` and reads `~/.config/openshell/gateway.toml`.
92
94
93
95
Both Debian and RPM load `~/.config/openshell/gateway.env` for configuration
94
96
preflight and gateway startup. Use it to select exact trusted runtime artifacts
The snap requires Docker Engine installed from your distribution or Docker's package repository. The Docker snap is not compatible.
124
+
The snap requires Docker Engine installed from your distribution or Docker's package repository. The Docker snap is not compatible. To use Podman or the VM driver instead, select a native package with `OPENSHELL_INSTALL_METHOD=deb` or `OPENSHELL_INSTALL_METHOD=rpm`.
123
125
124
-
The snap does not migrate existing Debian, RPM, or Homebrew installs. Remove any existing installation first, then either rerun the `install.sh` script with `OPENSHELL_INSTALL_METHOD=snap OPENSHELL_ACK_BREAKING_UPGRADE=1`, or install the snap directly:
126
+
The snap does not migrate existing Debian, RPM, or Homebrew installs. If the script detects an existing native installation while selecting the snap, it stops before making changes. To update the existing native installation instead, rerun it with `OPENSHELL_INSTALL_METHOD=deb` or `OPENSHELL_INSTALL_METHOD=rpm`. To migrate, remove the existing installation after backing up any state you need, then rerun the script with `OPENSHELL_ACK_BREAKING_UPGRADE=1`, or install the snap directly:
125
127
126
128
```shell
127
129
sudo snap install openshell
@@ -142,7 +144,7 @@ openshell status
142
144
143
145
Existing installations upgraded from the former `openshell.gateway` service retain their state under `/var/snap/openshell/common` through `openshell.system-gateway`. Existing HTTPS registrations continue to work because the endpoint and TLS identity do not change.
144
146
145
-
If this user still has an old HTTP registration, or has not previously been enrolled, wait for the system gateway to be active, copy its client credentials into the user's Snap state, and register its HTTPS endpoint:
147
+
If this user still has an old HTTP registration, or has not previously been enrolled, wait for the system gateway to be active, copy its client credentials into the user's snap state, and register its HTTPS endpoint:
Set `old_registration` to the name shown by `openshell gateway list`, and omit the variable assignment and `openshell gateway remove` when no registration exists. Older direct Snap instructions may have used `openshell-gateway`, while the install script uses `openshell`.
166
+
Set `old_registration` to the name shown by `openshell gateway list`, and omit the variable assignment and `openshell gateway remove` when no registration exists. Older direct snap instructions may have used `openshell-gateway`, while the install script uses `openshell`.
165
167
166
-
### Change the Snap gateway mode
168
+
### Change the snap gateway mode
167
169
168
170
The user and system gateways have separate configuration, databases, and cryptographic identities. Changing modes does not migrate gateway or sandbox state and interrupts active sandbox sessions. Back up any state you need and delete active sandboxes before changing modes.
Copy file name to clipboardExpand all lines: install.sh
+13-14Lines changed: 13 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@
4
4
#
5
5
# Install OpenShell from a GitHub release.
6
6
#
7
-
# Linux installs either the Debian or RPM packages from the selected release.
7
+
# Linux automatically installs the snap when the snap command is available and
8
+
# the version is unset or dev; exact releases and prereleases use native packages.
8
9
# Apple Silicon macOS installs the generated Homebrew formula, so Homebrew owns
9
10
# the binary layout and launchd service lifecycle.
10
11
#
@@ -63,19 +64,19 @@ ENVIRONMENT VARIABLES:
63
64
pre-v0.0.37 or non-snap installation.
64
65
OPENSHELL_INSTALL_METHOD
65
66
Linux package to install: snap, deb, or rpm. Unset
66
-
selects deb or rpm from the host package manager.
67
+
selects snap when available, otherwise deb or rpm.
67
68
68
69
NOTES:
69
70
When OPENSHELL_VERSION is unset, this resolves the latest tagged release
70
71
from ${GITHUB_URL}/releases/latest.
71
72
72
-
Linux installs the Debian package on amd64/arm64 or the RPM packages on
73
-
x86_64/aarch64, depending on the host package manager. Set
74
-
OPENSHELL_INSTALL_METHOD=snap to install the OpenShell snap instead; hosts
75
-
that already have the OpenShell snap keep refreshing it. Snap installs use
76
-
latest/stable by default and latest/edge for dev, and do not support
77
-
explicit release tags or prereleases. The OpenShell snap requires a running
78
-
Docker Engine installed from a system package or Docker's package
73
+
Linux installs the OpenShell snap when the snap command is available and
74
+
OPENSHELL_VERSION is unset or dev. Snap installs use latest/stable by
75
+
default and latest/edge for dev. Explicit release tags and prereleases use
76
+
the Debian package on amd64/arm64 or the RPM packages on x86_64/aarch64,
77
+
depending on the host package manager. Set OPENSHELL_INSTALL_METHOD=deb or
78
+
rpm to select a native package explicitly. The OpenShell snap requires a
79
+
running Docker Engine installed from a system package or Docker's package
79
80
repository. The Docker snap is not currently compatible with OpenShell.
80
81
macOS installs the release Homebrew formula on Apple Silicon and starts a
81
82
brew services-backed local gateway.
@@ -668,11 +669,9 @@ linux_package_method() {
668
669
*) error "unsupported OPENSHELL_INSTALL_METHOD=${OPENSHELL_INSTALL_METHOD}; use snap, deb, or rpm" ;;
669
670
esac
670
671
671
-
# Keep refreshing an existing snap install instead of adding a second
672
-
# gateway on the same port.
673
672
case"${OPENSHELL_VERSION:-}"in
674
673
'' | dev)
675
-
if has_cmd snap&& snap list openshell >/dev/null 2>&1;then
674
+
if has_cmd snap;then
676
675
echo"snap"
677
676
return 0
678
677
fi
@@ -1467,11 +1466,11 @@ install_linux_snap() {
1467
1466
1468
1467
if snap list docker >/dev/null 2>&1;then
1469
1468
error "the Docker snap is not currently compatible with OpenShell because its AppArmor confinement prevents OpenShell's hardened containers from starting.
1470
-
Remove the Docker snap and install Docker Engine from a system package or Docker's package repository, then rerun this installer."
1469
+
Remove the Docker snap and install Docker Engine from a system package or Docker's package repository, then rerun this installer. To use a native OpenShell package instead, set OPENSHELL_INSTALL_METHOD=deb or OPENSHELL_INSTALL_METHOD=rpm."
1471
1470
fi
1472
1471
if! has_cmd docker;then
1473
1472
error "Docker is required before installing the OpenShell snap.
1474
-
Install Docker Engine from a system package or Docker's package repository, then rerun this installer. The Docker snap is not currently compatible with OpenShell."
1473
+
Install Docker Engine from a system package or Docker's package repository, then rerun this installer. The Docker snap is not currently compatible with OpenShell. To use a native OpenShell package instead, set OPENSHELL_INSTALL_METHOD=deb or OPENSHELL_INSTALL_METHOD=rpm."
0 commit comments