PlanktoScope / forklift

Composable, reprovisionable, decentralized management of apps & configs on Raspberry Pis and other embedded Linux systems
Apache License 2.0
6 stars 0 forks source link

updates: Enable air-gapped updating via a USB drive #235

Open ethanjli opened 1 month ago

ethanjli commented 1 month ago

Devices without an internet connection need a way to get software updates via a USB drive. This would mean updating the local pallet (in a way that the updated pallet is still customizable) and all of its dependencies, which would include:

If we deliver the archive of everything needed as a custom OCI artifact or as an OCI container image (I prefer the latter, for compatibility with skopeo and crane), then we could use cosign to authenticate our archives (e.g. as in this example).

If it's reasonably simple to rehydrate things from a pallet bundle into our caches, e.g. by providing container images and file downloads from an optional cache subdirectory in the bundle and providing some additional metadata in a caches section of the bundle manifest (or maybe having the manifest's caches section record where each exported download file should be copied to in the downloads cache), that may be a really elegant approach - because then the bundle could also be dropped directly into the stage store for use even if the cache files aren't loaded into the Forklift cache. Such a bundle would be fully self-contained for deployment anywhere (assuming a compatible CPU architecture, Forklift version, Docker, etc.). And then on systems where user customization isn't important (e.g. a fleet of uniform devices) and we don't need to run plt subcommands, we would just drop bundles into Forklift's stage store with a stage import-bundle subcommand without having a local pallet or caches.

Ideally, the subcommands for air-gapped updates would look like:

Ideally, the subcommands for making update bundles would look like:

We should probably establish a convention that the bundle should be named {pallet path}@{version or pseudoversion with a "dirty" indicator}.pallet-bundle.tar.gz

ethanjli commented 1 month ago

For delivery of container images, here are some leads:

For authentication of update payloads, here are some leads: