Introduction
We’ve been working pretty hard on improving the LXD snap package.
Our goal was to make it to the point where we’re comfortable with users running it in production and can support it in the same way we support people using native packages.
With LXD 2.17, this should now be the case and we expect the LXD experience to be identical whether you’re using our snap package or a native package from your distribution.
However before we start updating documentation and push more people towards the snap, we’d like to get some user feedback.
Why a snap?
The snap packaging format lets us as the upstream publish a tested, blessed build of LXD and anything that it needs which can be used on a wide range of Linux distributions.
This makes it easy to get the exact same experience regardless of Linux distribution and greatly simplifies support on our end as we can reproduce bit for bit any installation.
Moving forward, we will be phasing out our Ubuntu PPAs and then our backports to older Ubuntu releases. Both of those use cases will be transitioned over to the snap.
This will significantly reduce the amount of time we have to spend on building and testing all of those packages and the machinery used to publish them.
Channels and tracks
For the LXD snap, we use the following channels:
- edge: Automatically built from upstream “git” after automated CI
- candidate: Staging area for stable, usually about a 24h delay
- stable: Latest LXD release
The default track is “latest” which means the latest LXD feature release (2.17 at time of writing).
We also have a second track called “2.0” which contains builds of the LXD 2.0 LTS release.
This track won’t be production ready with the snap until LXD 2.0.11 is released.
The only channels we’ll be officially supporting are our “stable” channels.
Installing the snap
First you’ll want to make sure that you don’t have an old LXD installation around.
Wipe your existing LXD installation clean, then remove its packages from your system.
Then install snapd for your Linux distribution, you can find instructions here.
Once everything is clean, you can install LXD with:
snap install lxd
After a few seconds (LXD needs to generate some certificates), you can then run:
lxd init
And then start using LXD.
Snap specific configuration
The LXD snap has a few configuration options which you can set through “snap set”.
- daemon.debug [default=“false”]: If set to “true”, enables LXD debug logging
- daemon.group [default=“lxd”]: What group should be allowed to interact with LXD
- ceph.builtin [default=“false”]: If set to “true”, a separate ceph configuration directory will be used for the snap
- openvswitch.builtin [default=“false”]: If set to “true”, spawn a LXD-specific Open vSwitch daemon
For example, to enable debugging, do:
snap set lxd daemon.debug=true
systemctl reload snap.lxd.daemon
Next steps
Our plan for the next few weeks/months regarding the snap is:
- Get the “2.0” track to production ready state too (with the upcoming LXD 2.0.11).
- Slowly get our PPA users to move to the snap too.
- Deprecated our PPAs, saving us quite a bit of effort in maintaining those.
- Slowly get our backports users to move the snap too.
The transition from deb to snap will be done through a script which will let you move your existing environment to the snap without loosing anything. We’ll initially just prompt users on package upgrade, suggesting that they switch to the snap. Then after a few months of that, will just auto-transition the remaining users before we deprecate the deb package.
For those using LXD in Ubuntu and who aren’t using our PPA or backports, nothing will change. We are committed to supporting those packages until the Ubuntu release reaches its end of life.
Feedback
Tell us how your snap experience felt.
Either by choosing one of the options below, or by replying to this post with your experience.
- Worked perfectly
- Worked but needed some adjustments
- Started but couldn’t launch containers
- Installed but wouldn’t start
- Failed to install
0 voters
Useful information to include in a comment:
- Linux distribution (lsb_release -a)
- Architecture (uname -a)
- Version of snapd (snap version)
- Version of the LXD snap (snap list)
- Storage backend(s) in use
- Content of /var/snap/lxd/common/lxd/logs/lxd.log
Thanks!