-
Notifications
You must be signed in to change notification settings - Fork 1k
feat(snap): add snap install method to install.sh when available
#2250
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
576cf94
5886877
4bd8a05
22525a2
dc778b4
8db6072
c91aea9
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 |
|---|---|---|
|
|
@@ -16,7 +16,10 @@ Install OpenShell with a single command: | |
| curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | sh | ||
| ``` | ||
|
|
||
| The script detects your operating system and installs the OpenShell CLI and gateway with your native package manager. It then starts the local gateway server so you can begin creating sandboxes. | ||
| The script detects your operating system and installs the OpenShell CLI and | ||
| gateway. On Linux, the Snap path is preferred when `snapd` is available; | ||
| otherwise the script uses the native DEB or RPM package. The gateway then | ||
| starts automatically so you can begin creating sandboxes. | ||
|
|
||
| You can also download release artifacts directly from the [OpenShell GitHub Releases](https://github.com/NVIDIA/OpenShell/releases) page. | ||
|
|
||
|
|
@@ -51,9 +54,15 @@ brew services restart openshell | |
|
|
||
| ## Linux | ||
|
|
||
| On distributions that ship with `snapd`, the install script uses the Snap path | ||
| described below, unless one of the following is true: | ||
|
|
||
| - `snapd` is not present | ||
| - a native (non-snap) Docker package is present (the `openshell` snap requires the `docker` snap, until snapd 2.77 is released to the `latest/stable` channel) | ||
|
|
||
| On Fedora and RHEL, the install script uses RPM packages. The RPM installs the `openshell` CLI, the `openshell-gateway` daemon, and a systemd user service. | ||
|
|
||
| On Debian and Ubuntu, the install script uses a Debian package. The Debian package installs the `openshell` CLI, the `openshell-gateway` daemon, VM sandbox support, and a systemd user service. | ||
| On Debian and Ubuntu (where the snap is not applicable), the install script uses a Debian package. The Debian package installs the `openshell` CLI, the `openshell-gateway` daemon, VM sandbox support, and a systemd user service. | ||
|
|
||
| Linux packages require glibc 2.28 or newer. The installer checks libc before downloading packages and exits with an error on older glibc versions, Alpine, musl-based distributions, or unknown libc environments. | ||
|
|
||
|
|
@@ -77,7 +86,12 @@ sudo loginctl enable-linger $USER | |
|
|
||
| ## Snap | ||
|
|
||
| Install the OpenShell snap from the Snap Store: | ||
| On Linux distributions that ship with `snapd`, the install script installs | ||
| OpenShell from the Snap Store. The OpenShell snap bundles the CLI, the terminal | ||
| UI, and a managed gateway daemon. `snapd` handles upgrades and rollback; the | ||
| gateway runs as a system service inside the snap. | ||
|
|
||
| You can also install the snap directly: | ||
|
|
||
| ```shell | ||
| sudo snap install openshell | ||
|
|
@@ -94,19 +108,24 @@ typically `~/snap/openshell/common`. Gateway registrations live under | |
| `$SNAP_USER_COMMON/.config/openshell/gateways/` instead of | ||
| `~/.config/openshell/gateways/`. | ||
|
|
||
| ### Snap store installs | ||
|
|
||
| When installing from the Snap Store, snapd automatically connects the `home`, | ||
| `network`, and `network-bind` plugs. The `docker` plug still | ||
| requires manual connection: | ||
| The OpenShell snap requires the Docker snap, which you can install with: | ||
|
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. If the OpenShell snap requires the Docker snap, does that also mean it cannot be used with Podman? I'm wondering what this means for auto-detection, which prefers Podman over Docker. It seems like we need to document this limitation of the snap more clearly, if that's the case. I'd expect to see the docs say very clearly that the snap only works with Docker and you should configure Docker as the openshell driver explicitly to avoid issues if you also have Podman running. |
||
|
|
||
| ```shell | ||
| sudo snap connect openshell:docker docker:docker-daemon | ||
| sudo snap install docker | ||
| ``` | ||
|
|
||
| The snap declares `default-provider: docker` on the Docker plug so snapd will | ||
| offer to install the Docker snap, but the connection itself must be made | ||
| manually. | ||
| ### Snap store installs | ||
|
|
||
| When installing from the Snap Store, snapd automatically connects the `docker`, | ||
| `home`, `log-observe`, `network`, `network-bind`, and `system-observe plugs. | ||
|
|
||
| The `docker` interface is used to connect the `openshell` snap's `docker` plug | ||
| to the `docker` snap's `docker-daemon` slot; the `openshell` snap does not yet | ||
| work with a host-installed Docker Engine. The installer runs this and the other | ||
| interface connections for you after installing the `openshell` snap; run them | ||
| by hand if you install the snap manually. The installer is best-effort: if a | ||
| connect fails (for example because the `docker` snap is not yet running), the | ||
| snap still installs and the installer prints a warning. | ||
|
|
||
| ### Locally built snap packages | ||
|
|
||
|
|
@@ -127,6 +146,26 @@ to read logs and inspect system processes. The `docker` plug requires the | |
| `docker:docker-daemon` slot from the Docker snap and does not work with | ||
| system-installed Docker. | ||
|
|
||
| ### Verify the gateway | ||
|
|
||
| The snap-managed gateway service is `openshell.gateway`. Inspect it with: | ||
|
|
||
| ```shell | ||
| snap services openshell | ||
| snap logs -n 100 openshell.gateway | ||
| ``` | ||
|
|
||
| Register the gateway with the CLI: | ||
|
|
||
| ```shell | ||
| openshell gateway add http://127.0.0.1:17670 --local --name openshell | ||
| openshell status | ||
| ``` | ||
|
|
||
| The gateway listens on `http://127.0.0.1:17670` and stores its state under | ||
| `/var/snap/openshell/common/`. Override gateway settings by creating | ||
| `/var/snap/openshell/common/gateway.toml`. | ||
|
|
||
| ### Gateway service | ||
|
|
||
| The gateway runs as a snap daemon with `refresh-mode: endure`, meaning snapd | ||
|
|
@@ -138,6 +177,17 @@ a snap refresh when you need the updated binary: | |
| sudo systemctl restart snap.openshell.gateway | ||
| ``` | ||
|
|
||
| ### When to choose Snap | ||
|
|
||
| Use the `openshell` snap when `snapd` is available and no native Docker Engine | ||
| is installed, and you want atomic upgrades and rollback, a single self-contained | ||
| and sandboxed install, or a desktop launcher that surfaces the OpenShell | ||
| terminal UI in the application menu. | ||
|
|
||
| Use the `openshell` `.deb` or `.rpm` file when `snapd` is unavailable or when | ||
| you already run Docker from a non-snap source. The installer falls back to | ||
| these methods on hosts with native Docker. | ||
|
|
||
| ## Kubernetes | ||
|
|
||
| Kubernetes deployments use the OpenShell Helm chart. For step-by-step installation, refer to [Kubernetes Setup](/kubernetes/setup). For chart values and packaging details, refer to the [Helm chart README](https://github.com/NVIDIA/OpenShell/blob/main/deploy/helm/openshell/README.md). | ||
|
|
||
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.
Is this line required? I would have expected gateway auto-detection of Docker to work.