Recently, I did an evaluation myself. I'm actually a Nix/NixOS contributor, and former researcher interested in deployment technology.
I have tried to stick myself to the facts as much as possible, but it's probably impossible to remain fully unbiased. To summarize my findings:
Both approaches store packages in isolation. Snappy stores apps and frameworks in folders using the following name convention: /app/name/version.vendor
, whereas Nix uses /nix/store/hash-name-version
.
Nix's naming convention is more powerful, because it uses hash prefixes that are derived from all buildtime dependencies. With Nix you can easily make distinctions between any variant of a package and store them next to each other. Any change (e.g. different build procedure, library upgrade, compiler upgrade) yields a new hash making making it possible to store any possible variant next to each other.
To allow a package to find its dependencies, Nix binds them statically to an executable (e.g. by modifying the RPATH
of an ELF binary) or by wrapping them in scripts that set the appropriate environment variables (e.g. CLASSPATH
, PYTHONPATH
, PERL5LIB
, etc.).
Snappy composes containers in which executables can find their dependencies in their common FHS locations, such as /lib
and /bin
However, Nix also supports Snappy's container approach but this is only used in very rare cases. The most prominent Nix package using a containerized approach is Steam in NixOS, because Steam is a deployment tool itself with conflicting properties.
The Snappy Ubuntu Core uses a so-called "A/B" partitioning scheme to upgrade (and roll back) the base system. It only supports a limited number of versions (typically two) at the time.
In contrast, NixOS (the Nix-based Linux distro) composes the base system out of Nix packages in the Nix store as well and is much more powerful. You can roll back to any previous configuration that has not been garbage collected yet. Moreover, similar system packages among generations can be shared.
Both tools support unprivileged user installations. However, Snappy stores all files in the home directory of the user. If two users happen to install the same package then they are installed twice on the system.
In contrast, Nix packages also allow ordinary users to install packages in the central Nix store so that identical packages can be shared among users. Partly because of the naming convention (using hashing) this can be done in a secure way.
Snappy restricts the runtime behaviour of packages out-of-the-box whereas Nix does not
Snappy does not seem to help users to construct packages from source code. Nix however has a DSL allowing people to do this quite easily and automatically install all buildtime dependencies (compilers, build tools, libraries etc.) when needed
Snappy hardly supports modularization and reuse. In the example packages, all library dependencies are bundled statically consuming much more diskspace and RAM. Moreover, the documentation does not seem to provide any facilities except frameworks. However, frameworks are not meant for reuse according to the documentation
With Nix modularizing packages and safely managing dependencies are some its key features.
The full blog post can be found here: http://sandervanderburg.blogspot.com/2015/04/an-evaluation-and-comparison-of-snappy.html
Hopefully you find it interesting to read and maybe there are some things in it that you find worth thinking about.
apt-get
and other utilities for working with traditional .deb
packages do not work to install and upgrade applications on a Snappy Ubuntu Core system. Instead you use the snappy
utility. See the Snappy Tour for details.
To summarize a couple examples from the Snappy Tour, to install the Docker application you would run:
sudo snappy install docker
And to install updates, you run sudo snappy update-versions
(which corresponds to sudo apt-get update
on a normal Ubuntu system), snappy versions
to see what's newly available, and sudo snappy update ...
to specify packages for updating (put their names in place of ...
).
Because Snappy Ubuntu Core doesn't use .deb
packages, Ubuntu packages created for regular Ubuntu systems will not work--the relationship between regular Ubuntu systems and Snappy Ubuntu Core when it comes to package files is, in effect, the same as the relationship between any two distributions that use totally different package managers. (For example: Ubuntu and Fedora.)
Like in just about any OS, you could manually install programs on Snappy Ubuntu Core provided you have or can obtain all the libraries (and any other dependencies) they need. However, just as the best way to install most software on regular Ubuntu systems is with a .deb
package, the best way to install software on Snappy Ubuntu Core is with specially built snappy packages. Only a handful of these exist so far.
To search for Snappy Ubuntu Core apps from within a Snappy Ubuntu Core system, use:
snappy search search-term
This finds Snappy packages with search-term
in their names. (You'd replace that with whatever you're looking for, of course.)
As for Raspberry Pi, those have ARM processors, which you're right are not the same as the usual 32-bit and 64-bit Intel and AMD processors most of us use on our traditional PCs. However, Raspberry Pi support does not appear to be the main point of Snappy Ubuntu Core. Instead, as you may be aware, the general aim of Snappy is for better speed, stability, and security, in circumstances where a minimal Ubuntu Core system is sufficient and appropriate.
Snappy is cloud-oriented ("Snappy Ubuntu Core is the perfect system for large-scale cloud container deployments..."), and explicitly supports many x86 (i.e., not ARM) platforms--see the list of options under "Try the new, snappy Ubuntu yourself!" on the Snappy home page.
Nonetheless, depending on your needs, Snappy Ubuntu Core may be a reasonable way to get a working Ubuntu Core system on a Raspberry Pi. Depending on which Raspberry Pi board you have, it may or may not support a fuller, more traditional installation of Ubuntu. Note, though, that there are other options that may be more Ubuntu-like in the ways that matter to most users of traditional Ubuntu systems:
- Debian is quite similar to Ubuntu, and provides an experience in many ways more similar to most Ubuntu installations. In particular, like a normal Ubuntu system Debian uses
apt-get
. In fact apt-get
originated in Debian. (Ubuntu is a derivative of Debian.)
- Raspbian is a derivative of Debian made specially for the Raspberry Pi. Like Debian and normal (non-Snappy) Ubuntu systems, uses APT-based package management (i.e., with
apt-get
). The Debian project's page about Debian on Raspberry Pi even says, "Generally, your best bet is to use Raspbian".
See also this list of operating systems for Raspberry Pi.
Best Answer
No. Even though, Snappy is Ubuntu and completely compatible with other Ubuntu installs you will not be able to install and run pre-packaged applications.
Snappy introduces transactional updates and moves away from the repository paradigm. Meaning there are very few packages out there for Snappy currently, given its short existence. It also sports a read-only file-system in two partitions in order to be able to do quick roll-backs.
That is also the only difference between Ubuntu Server and Snappy. Snappy is really only a way to update and/or extend your system, it fills the function of apt-get. Here's Mark's explanation as to what Snappy really is. However, Snappy is mostly released and marketed in connection with Ubuntu Core as a base OS. When you download images referring to Snappy, it will be with Ubuntu Core as a base.
In addition, the arm architecture has even fewer alternatives as of right now (I'm assuming this is relevant to you, if you're going to run it on SBC). On my armhf based install (on a beaglebone) there are currently around 20 different applications available for install. However that is a 15.04 beta install. I am unsure if you are able to install Snappy on older stable Ubuntu Core installs, and whether that will give you more options.
Canonical's Dustin Kirkland has a great write-up about what use-cases Snappy Ubuntu covers here.