You can manage snaps from the web portal for each managed computer in your Landscape account.
View snap information from the Snaps tab
To view snap information for a specific computer:
- Navigate to the Computers page in the header
- Click the computer name that you want to manage snaps on
- Click the Snaps tab
This tab displays the number of installed snaps and provides options for managing snaps.
To view installed snaps, click Installed snaps located after the table or click the number of installed snaps.
To view held snaps, click Held snaps located after the table.
Install snaps for a specific computer
To install snaps for a specific computer, navigate to the Snaps tab and:
- Click Install snaps
- Enter the exact snap name
- Enter the tracking channel and revision if not using the defaults. You can hover your cursor over these fields to view the defaults.
- Select Classic if using classic confinement
- Click + (plus sign) to add any additional snaps, repeating the previous steps
- Specify the delivery information
- Click Submit
Refresh (upgrade), remove or hold snaps for a specific computer
To manage snaps on a specific computer:
- To refresh (upgrade) a snap, click the up arrow icon in the same row and column as the snap name.
- To remove a snap, click the minus sign icon in the same row and column as the snap name.
- To hold a snap, click the package icon directly next to the snap name in the same row and column as the snap name.
- Note: “Holding” a snap prevents the snap from upgrading in the background. It’ll stay locked to that version until you remove the hold, but you can still manually refresh (upgrade) the snap.
- Specify the delivery information located after the table
- Click Apply changes
4 Likes
Is it possible to install a private snap by passing credentials to the GUI? Or adding a configuration file somewhere on the host? Currently I cannot install my own private snaps on a registered host through my own self-hosted Landscape server.
Hi @lazzarello,
This is possible using a script.
The main issue is you have to first get the snap file to the device itself. If it is less than 5mb you can include it with the script as an attachment. If it is larger than that, I would suggest getting the script to download the file using wget or similar to the device before installing. Then you can install the private snap in the usual way.
This snap will then appear in the snaps list in Landscape, but you will not be able to refresh or update as these mechanisms rely on the snap store.
I hope that helps.
MCW
Oh no! I already have my private snaps published in the Snap Store. I assumed a self-hosted Landscape server was capable of installing and managing private snaps. That’s on me for assuming a feature before testing it. I have to change the whole architecture of my project now…
1 Like
Hi @mikec-w
As per my understanding private snaps need to be installed or updated via snapstore only eventhough we local landscape server for the respective deployment. Is my understanding right?
Is this limitation applicable only for private snaps or even for public snaps ?
Hi @codingfreak,
Not necessarily. Let me see if I can clarify for you.
You do not “have to” install or update via a snapstore only. We recommend you do for many reasons as it has many advantages and security features, but you are not forced to. You could use Landscape to deploy the snap files to the device and then install from them.
Some background:
When you install/upgrade a snap from a store, you get sent two files. The snap and an assertion. These are then used to verify the snap and install it.
You can download these files, then at a later date (or on another machine?) installed them with:
sudo snap download hello-world
sudo snap ack hello_world_27.assert
sudo snap install hello-world_27_snap
If you are using a snap you have built locally yourself then you will have the snap package but no assert file. This can still be installed from the CLI without a store using:
sudo snap install --dangerous mysnap.snap
The dangerous flag just says that snapd will not verify the snap package against any assertion or its signatures. i.e. it’s at your own risk.
Does that help? Let me know if you have any further questions.
Thanks for the detailed writeup about private snap @mikec-w. So the magic is all around the assert file for a private snap which authenticates the validity of the private snap.
One last question, in the case of public snap we do not have the assert file ? If there is one how it is being able to be processed ?
The same works for public snaps, you can download an assert with the snap from the store that is distributing the public snap.