smartnode icon indicating copy to clipboard operation
smartnode copied to clipboard

[rfc] Add simple snapcraft.yaml to package CLI

Open zsol opened this issue 4 years ago • 2 comments

This PR adds a build config for snapcraft. The package contains the three binaries (CLI, service, pow proxy) plus a curl binary. To build, run snapcraft from the repo root on a box with snapcraft installed. This will produce a developer mode .snap file that can be installed with sudo snap install rocketpool_1.0.0-beta.1+git39.5596c3d_amd64.snap --classic --dangerous, which puts the CLI at /snap/bin/rocketpool.

The main benefit of this approach is that users don't have to manually download binaries from github, make sure checksums match, and set up their environment with $HOME/bin etc.

There are two ways we can proceed:

  1. Keep it simple and just package the CLI and its dependencies (curl and tar with xz support as far as i can tell). If we go this route, I'll remove the pow-proxy and service binaries, and add tar.
  2. Package the CLI and all the stuff it downloads during service install: docker, docker-compose, and the config files. Doing this would mean the entire install/upgrade process can be handled by snap - later on we can isolate the entire rocketpool installation so it can only access certain system resources (like the docker socket)

zsol avatar Apr 13 '21 08:04 zsol

This is nice! I vote for option 2.

kidkal avatar May 01 '21 15:05 kidkal

I also think option 2 would make the most sense. I can make a followup PR to implement it

zsol avatar May 01 '21 20:05 zsol