Skip to content

Commit 4bd8a05

Browse files
committed
docs(installation): update installation docs to for snap installation
Adjust the wording of the installation docs for the `openshell` snap. In particular, clarify when the snap will be installed, how it currently requires the docker snap, and how to override the installation method. Also, prune some of the manual interface connections, as these have since been granted autoconnection via snap store assertions. See: https://forum.snapcraft.io/t/please-update-snap-declaration-assertion-for-openshell/51762 Signed-off-by: Oliver Calder <oliver.calder@canonical.com>
1 parent 5886877 commit 4bd8a05

2 files changed

Lines changed: 21 additions & 41 deletions

File tree

‎docs/about/installation.mdx‎

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,10 @@ brew services restart openshell
5555
## Linux
5656

5757
On distributions that ship with `snapd`, the install script uses the Snap path
58-
described below, provided no non-snap Docker is detected. If a native Docker
59-
package is present, the installer silently falls back to DEB or RPM. On hosts
60-
without `snapd` (or with
61-
`OPENSHELL_INSTALL_METHOD=classic` set), the script falls back to the classic
62-
package manager.
58+
described below, unless one of the following is true:
59+
- a native (non-snap) Docker package is present (the `openshell` snap requires the `docker` snap, for now)
60+
- `snapd` is not present
61+
- `OPENSHELL_INSTALL_METHOD=classic` is set in the environment
6362

6463
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.
6564

@@ -89,7 +88,7 @@ sudo loginctl enable-linger $USER
8988

9089
On Linux distributions that ship with `snapd`, the install script installs
9190
OpenShell from the Snap Store. The OpenShell snap bundles the CLI, the terminal
92-
UI, and a managed gateway daemon. snapd handles upgrades and rollback; the
91+
UI, and a managed gateway daemon. `snapd` handles upgrades and rollback; the
9392
gateway runs as a system service inside the snap.
9493

9594
You can also install the snap directly:
@@ -109,34 +108,24 @@ typically `~/snap/openshell/common`. Gateway registrations live under
109108
`$SNAP_USER_COMMON/.config/openshell/gateways/` instead of
110109
`~/.config/openshell/gateways/`.
111110

112-
The snap requires the Docker snap. `default-provider: docker` on the OpenShell
113-
snap installs the Docker snap automatically on first use, but you can install
114-
it up front with:
111+
The OpenShell snap requires the Docker snap, which you can install with:
115112

116113
```shell
117114
sudo snap install docker
118115
```
119116

120117
### Snap store installs
121118

122-
When installing from the Snap Store, snapd automatically connects the `home`
123-
`network`, and `network-bind` plugs. The remaining plugs — `docker`,
124-
`log-observe`, and `system-observe` — still require manual connection:
119+
When installing from the Snap Store, snapd automatically connects the `docker`,
120+
`home`, `log-observe`, `network`, `network-bind`, and `system-observe plugs.
125121

126-
```shell
127-
sudo snap connect openshell:docker docker:docker-daemon
128-
sudo snap connect openshell:log-observe
129-
sudo snap connect openshell:system-observe
130-
```
131-
132-
The Docker slot is the Docker snap's `docker-daemon` slot; OpenShell does not
133-
work with a host-installed Docker Engine. The snap declares `default-provider:
134-
docker` on the Docker plug so snapd will offer to install the Docker snap, but
135-
the connection itself must be made manually. The installer runs these
136-
connections for you on Snap installs; run them by hand if you install the snap
137-
manually. The installer is best-effort: if a connect fails (for example because
138-
the Docker snap is not yet running), the snap still installs and the installer
139-
prints a warning.
122+
The `docker` interface is used to connect the `openshell` snap's `docker` plug
123+
to the `docker` snap's `docker-daemon` slot; the `openshell` snap does not yet
124+
work with a host-installed Docker Engine. The installer runs this and the other
125+
interface connections for you after installing the `openshell` snap; run them
126+
by hand if you install the snap manually. The installer is best-effort: if a
127+
connect fails (for example because the `docker` snap is not yet running), the
128+
snap still installs and the installer prints a warning.
140129

141130
### Locally built snap packages
142131

@@ -190,14 +179,14 @@ sudo systemctl restart snap.openshell.gateway
190179

191180
### When to choose Snap
192181

193-
Use Snap when `snapd` is available and no native Docker Engine is installed,
194-
and you want atomic upgrades and rollback, a single self-contained install that
195-
bundles the Docker provider, or a desktop launcher that surfaces the OpenShell
182+
Use the `openshell` snap when `snapd` is available and no native Docker Engine
183+
is installed, and you want atomic upgrades and rollback, a single self-contained
184+
and sandboxed install, or a desktop launcher that surfaces the OpenShell
196185
terminal UI in the application menu.
197186

198-
Use DEB or RPM when `snapd` is unavailable or when you already run Docker Engine
199-
from a non-snap source. The installer falls back to DEB or RPM on hosts with
200-
native Docker.
187+
Use the `openshell` `.deb` or `.rpm` file when `snapd` is unavailable or when
188+
you already run Docker from a non-snap source. The installer falls back to
189+
these methods on hosts with native Docker.
201190

202191
Set `OPENSHELL_INSTALL_METHOD=classic` to force the classic package on hosts
203192
that also have `snapd` available.

‎install.sh‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -990,15 +990,6 @@ install_linux_snap() {
990990
info "installing openshell snap..."
991991
as_root snap install openshell
992992

993-
# Connect required interfaces. Network and network-bind auto-connect
994-
# on install; the remaining plugs need explicit connection. snap connect
995-
# is idempotent — it succeeds whether the connection was just made or
996-
# already existed.
997-
as_root snap connect openshell:docker docker:docker-daemon
998-
as_root snap connect openshell:log-observe
999-
as_root snap connect openshell:system-observe
1000-
as_root snap connect openshell:ssh-keys
1001-
1002993
info "installed openshell snap from Snap Store"
1003994
info "registering local gateway as ${TARGET_USER}..."
1004995
register_local_gateway_snap

0 commit comments

Comments
 (0)