Months after unleashing the containerized application functionality of its Snappy technology, Ubuntu has announced that Snaps have been ported to other Linux distributions – in a move that is good news for software developers looking at expansive IoT rollouts.
Canonical’s founder, Mark Shuttleworth, said that he was in the weird position of gleefully announcing a way for developers to not use Ubuntu – which he says is the most widely deployed Linux distro, with about 1/3 of all Linux boxes exposed to the web using the OS.
Shuttleworth noted that the announcement was all about Linux. In the few months since Ubuntu announced that snaps would be its platform moving forward, the developers have successfully ported the technology. He said that this was only possible thanks to the collaborative nature of open-source.
The snap format was developed by Canonical, Ubuntu’s owner, and hosted under the snapd project on GitHub. Canonical said that porting snapd to the other distros has been straightforward. The snapcraft tool can be used to convert existing packages, but most developers start from scratch. The snaps will also run across the different silicon architectures, from x86 servers down to ARM-based MCUs.
Snaps are a new way of deploying an application that runs on Ubuntu, and now, many of the other popular Linux distros. In the old model, a system would have to install libraries and repositories of code before an application could be run.
This meant that installing was a multi-step process, and support for the application once it was deployed had to accommodate for changes in the third-party libraries. Snaps are entirely self-contained, effectively moving the content of those libraries inside the application itself.
Consequently, the application can be installed in one step, and developers don’t have to worry about the impact that changes in third-party codebases might have on their applications.
There are also siginificant security improvements to be found in the design, which is similar to the way in which containers work in server and cloud deployments – where an app is self-contained and therefore can’t infect other components of the system if it contains a security vulnerable, or more importantly, won’t brick an entire server if it hangs or crashes.
Due to the multiple different variants, developing a single app for Linux was impossible. Multiple versions had to be written and maintained, and the sometimes arbitrary, sometimes extremely political, differences in the underlying code meant that developers were overworked.
But now, the Snappy approach and adoption means that developers can legitimately create one version of a Linux app, and as long as the underlying OS supports Snaps, then the app will be cross-Linux-platform. This is important, given that surveys seem to show that around 80% of IoT projects use open-source components, and for more complicated devices, a Linux desktop or server OS is a strong candidate.
On the announcement call, we asked how bandwidth-constrained devices might benefit from the snap update process, and were told that deltas could be used to only download the relevant files – although that system is currently a proof of concept, but could be implemented.
Shuttleworth added that the downloaded snaps themselves are typically the size of a smartphone app. The update process is also entirely transactional, so that updates can be rolled back if needed, and updates can also be rolled out in batches and monitored for success, which would allow a developer to cancel a rollout if problems are spotted.
The full list of distros to support snaps natively reads: Arch, Debian, Fedora, Kubuntu, Lubuntu, Ubuntu GNOMA, Ubuntu Kylin, Ubuntu MATE, Ubuntu Unity, and Xubuntu. Also in validation are CentOS, Elementary, Gentoo, Mint, OpenSUSE, OpenWRT, and Red Hat (RHEL).
“We believe snaps address the security risks and manageability challenges associated with deploying and running multiple third party applications on a single IoT Gateway,” said Jason Shepherd, Dell’s Director of IoT Strategy and Partnerships. “This trusted and universal app format is essential for Dell, our IoT Solutions Partners and commercial customers to build a scalable, IT-ready, and vibrant ecosystem of IoT applications.”