Offline update of multiple snaps

I know there is a way to update a single snap by downloading it locally with snap download which is described in: Install .snap files offline already. The question is, are there any solutions available to update multiple snaps.

The use-case I am faced is our customers are deployingof devices to environments without internet access. I know there is the concept of a snap-proxy which could be used as an alternative. But in my I case some of the service engineers are running a Windows laptop and dealing with snap proxies is above their technical level

My rough idea is to bundle the snaps + in a zip file. This zip contains all required snaps + .assert files and a script which performs the installation in the correct ordering.

The question is, are there any similar or more advanced approaches available to achieve this? Installing snaps with --dangerous is not an option.

If you install a corporate snap store proxy, the user needs only paste two commands to enable it. This is detailed in the documentation at https://docs.ubuntu.com/snap-store-proxy/en/devices

How is this harder than them doing snap ack and snap install for every snap they install, for every update?

I agree that the proxy is indeed a nice solution. I could imagine it is even possible to put the proxy activation into a snap itself. This snap can be deployed via a USB stick.

The more concerns I have at the moment is that the proxy set-up itself could be challenging. In my opinion this can be made available as a predefined snap in the brand store as-well. Which may need an extra device. Hosting the proxy.

What would be your concept of updating the proxy itself?

The idea with the zip file is that it is self contained with a script which manages the manual steps.

To give you some background, at the moment we do flash a complete flash image with the help of https://github.com/sbabic/swupdate . The current system is based on OpenEmbedded and our customers and their customers are used to deploying software that way.

FYI on the page you have linked above the linke registered Snap Store Proxy. and File a bug are not working.

We have discussed plans to have some first class support to update a device or a set of devices with the same setup via USB/zip file of snaps and assertions.

There would be a way to query a device about it’s current state with regard of installed snaps and their revisions into a machine readable form, or such information could be written manually. Then a tool would create a zip file for consumption based on it on a different online machine. The zip file could then be provided and consumed by the devices to update themselves.

That’s the high-level plan, there are some details to work out.

This has been discussed but is not an immediately upcoming piece of work for the core team.

For now rolling one’s own script(s) is the way forward.

@pedronis That sounds promising. Is there anything I can do to support this effort? Based on my timeline this is nothing I will need in the near term. My question is: Does this need to be included in 20.04 to be supported in the future or is this something which could be added after the 20.04 release?

I think I can answer this question in that almost all snapd features we add show up as soon as snapd gets a release to Ubuntu users (this is due to a feature called re-exec), so a feature like this could be implemented after the 20.04 release, but you would still be able to use it if you are on Ubuntu 20.04.

1 Like