Skip to content

packaging(snap): ship the VM driver in the snap package #4625

Open

Description

@olivercalder

User Story

As an Ubuntu user, I want to be able to install the openshell snap and have it just work, without extra dependencies like Docker or Podman. The VM driver provided by OpenShell doesn't require any additional services to be preinstalled, only access to /dev/kvm. VMs are also more secure than containers. Thus, I want to be able to install the openshell snap and use it immediately via the VM driver.

Problem Statement

Currently, the OpenShell snap only supports the Docker driver, which means it is more restrictive than the other packaging formats, and it requires the user to have preinstalled the Docker daemon. Other packaging formats have broader driver support: the .rpm depends on the podman package, so the user always gets a working setup based on podman at install time; the .deb ships the VM driver directly, though it doesn't actually work by default unless the user sets compute_driver = vm in the TOML config file. If the snap ships the VM driver and can use it by default, then the OpenShell snap will work out-of-the-box on most systems without any external requirements or restrictions around Docker.

Impact / Why This Matters

Without the VM driver, users must have already installed the Docker daemon, otherwise install.sh will bail out if it tries to install the snap. The snap should be a turn-key solution for end users, without prerequisite setup or dependencies.

Proposed Design

The VM driver should be bundled in the snap, and the OpenShell gateway in the snap should fall back to using it so that there are not other required dependencies such as a Docker daemon. In particular, the flow should be:

  1. If OPENSHELL_COMPUTE_DRIVER is set in the environment, pass it through to the gateway when starting it via the snap gateway wrapper
  2. If the TOML configuration file defines compute_driver = <something>, don't set OPENSHELL_COMPUTE_DRIVER
  3. Otherwise, the snap gateway wrapper should set OPENSHELL_COMPUTE_DRIVER=vm when launching the gateway service.

The install.sh script can check whether the user has access to /dev/kvm and warn them if they do not, suggesting to either add the user to the kvm group or set a different compute driver in the TOML configuration file.

Then, all the special checks for Docker and caveats about snap support can be removed, as the snap should work out-of-the-box with the VM driver in nearly all cases, and users are able to choose a different compute driver via the config file if desired.

Acceptance Criteria

  • The OpenShell snap works out of the box without requiring Docker
  • The install.sh script no longer requires a Docker daemon to be accessible if trying to install the snap

Alternatives Considered

We could instead auto-installing docker or podman via install.sh, but then there are additional extra side-effects on the user's machine, and there are many ways to install either of these systems, so it's not clear for any given platform what the desired way is. It's better to have a reasonable default which requires no external dependencies, and then give the user the option to choose an external compute provider if desired.

Agent Investigation

No response

Checklist

  • I've reviewed existing issues and the published docs
  • This is a design proposal, not a "please build this" request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-neededOpened without agent diagnostics and needs triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions