Ubuntu / Linux news and application reviews.

Canonical announced "snappy" Ubuntu Core yesterday, a new cloud-optimized Ubuntu edition that uses transactional updates.

Below you can watch the snappy Ubuntu Core introductory video in which Ubuntu and Canonical founder Mark Shuttleworth explains how snappy Ubuntu Core works:

(direct video link)

But what exactly is snappy Ubuntu Core? This new Ubuntu cloud flavor uses Ubuntu Core (a minimalist version of Ubuntu) as it base, which runs on a read-only system partition and uses "snappy" instead of apt-get or debs.

Snappy is an adaptation of the click packaging system developed for the Ubuntu Phone. A snappy package consists of a tarball with all the files needed to run an application or framework, with no imposed directory structure, no dependencies, and a single metadata file which contains the package name, version and binary file paths.

The snappy system and applications are confined by the AppArmor kernel security system, keeping each part of Ubuntu in a separate, read-only file. This ensures that all the installed applications are completely isolated from each other, similar to what Canonical is doing on the mobile phone.

Thanks to this, snappy applications don't need to be reviewed, so developers can deliver their applications faster.

Furthermore, snappy uses a "transactional" (or "image-based") update mechanism (for both the system and applications), which means that each update can either completely succeed or completely fail, without "partial failures". Before each update, snappy backs up the data and rolls back if the update fails, so the system is never in a broken / incomplete state.

On top of that, updates on Ubuntu Core are smaller than regular package updates because only the difference between the old and the new version is downloaded (delta updates), instead of getting the whole package.

"All of that is designed for Docker, because it gives you a transactional base for transactional application ecosystem. And so, the very first snappy application we're shipping is Docker itself", says Mark Shuttleworth.

This should bring faster, more reliable and of course, more secure updates, solving issues like the recent ownCloud removal from the Ubuntu repositories (ownCloud had to be removed from the Ubuntu repositories because it was very complicated to update and, being a community package, no one from the community stepped up to update it), with an easy way of rolling back if something goes wrong.

Also, although not new, snappy should also fix the broken dependencies and maintainer scripts (postinst, etc.) problems which, even though not common for packages in the official Ubuntu repositories, can occur with third-party packages.

So how exactly is snappy different from other existing transactional systems? On his blog, Mark Shuttleworth writes:

"There have been interesting developments in the transaction systems field over the past few years. ChromeOS is updated transactionally, when you turn it on, it makes sure it’s running the latest version of the OS. CoreOS brought aspects of Chrome OS and Gentoo to the cloud, Red Hat has a beta of Atomic as a transactional version of RHEL, and of course Docker is a way of delivering apps transactionally too (it combines app and system files very neatly). Ubuntu Core raises the bar for certainty, extensibility and security in the transactional systems game. What I love about Ubuntu Core is the way it embraces transactional updates not just for the base system but for applications on top of the system as well. The system is just one layer that can be updated transactionally, and so are each of the apps on the system. You get an extensible platform that retains the lovely properties of transactionality but lets you choose exactly the capabilities you want for yourself, rather than having someone else force you to use a particular tool".

More on Mark's blog blog

Try snappy Ubuntu Core

Snappy Ubuntu Core (currently in alpha) is available on the Microsoft Azure cloud and as KVM images which can be downloaded for local Linux desktop development however, it should available on more certified clouds in the coming weeks.

If you want to give snappy Ubuntu Core a try, either as a KVM image for local development on Ubuntu or as a cloud image on Azure, you'll find complete instructions HERE.

References / more information: