So, I'm Tiel Kampeta, leader of Open Printing, and by making a snap package of cups, I've
learned snapping and done and made a lot of experience in snap.
So, I got a snap enthusiast and I'm also working at Canonica and this way came up to giving
also workshops in snap and so on and giving talks about snap.
And here on the first step, I want to tell once what snap is and how it works and second
about an old snap linux distribution Ubuntu Core and Ubuntu Core desktop and to show
that snap gives you something a little bit like how smartphones work and so it makes it
makes it very easy for the end user to maintain their system.
So, what the hell are snaps and why should I use them?
So, if you have an open source project, usually they develop some application and this application
is published as its source code.
For most users, it is much too difficult to download the source code and to compile it.
Usually, they even do not have the compilers installed and do not know what they have to
install to get the compilers.
And so, there are other distributions, they fortunately make distro packages and naturally
there are so many applications that the distributions do not cover everything so you cannot be sure
that you actually get a distro package and also the distributions they make and update
the distro packages until they release the distro version and after that for that distro
version they do not make new versions of that package and so this is a little bit frustrating
for users and this can easily turn users away and so this is a nightmare.
A little bit.
Yes.
And so, there is a solution.
It is when you have probably a smartphone and there you can easily download and install
applications via the Google Play Store or the Apple App Store and you simply and it
will be independent whether you have a Samsung, a Pixel or something else with all somewhat
different Android versions.
It is the same applications which you get from the Google Play Store.
Yes.
And so, and you know also Canonica, they have also created an operating system, Ubuntu Touch,
a smartphone operating system.
They are not doing this anymore but we have a UB port booth because the community continued
and they learned from that.
They did not throw everything or the experience away.
They developed based on starting from the ideas of their click package format, a package
format for computers for embedded and servers in the beginning but later also for desktop
and that is Snap and Snap.
We have a Snap Store and we can install applications on different distros, on different distro
versions.
We have a form of distro independent packaging for computers running Linux as IoT server or
desktop.
And by the way, Snap is 10 years old.
It started in 2014.
And so, we have a sandbox packaging which means every application is in the security
capsule and one application cannot access the space of the other and cannot access the
system.
And it is operating system distribution independent because these snaps, they bring all the dependencies,
the libraries you need and so, so you do not rely on the distribution where you install
it and so, it installs on many different distributions like Ubuntu, Debian, Zoozer,
Quartet, Windows or whatsoever.
And your application, as I say, for the sandbox packaging, we have a security shell.
This means every application is in a capsule made of up armors, sac comp and name spaces
which prevents it from accessing the space of other applications, of other snaps or of
the operating system.
And you need, and you need for intercommunication, you need very well defined interfaces.
You must define when you create a Snap which interfaces for the outside communication you
want to use and only through these interfaces your Snap can communicate.
For example, network Cups or Dnssd, Avahaya or so on.
And so, it is very well defined what is, how the Snap, how the application in the Snap,
the Snap application can communicate with the outside world.
So this gives you security and privacy.
And if there are interfaces which are dangerous, which can modify the outside system for example
or read data which could be private, then these interfaces are considered dangerous
and they can, and you can only put some, when you put such snaps which connect dangerous
interfaces into the Snap Store.
You must have to connect them by hand or you have, or you need a special permission of
the Snap Store for those connecting automatically.
And with this we can trust third party apps.
We are not for a distribution, we are not needing any more that we can only trust our
own distro maintainers and need everything packaged by our own distro maintainers.
We can trust third party packages and so we can access a lot of different applications
like with the Google Play Store and the smartphone.
So and Snap has also some special features which perhaps other sandbox packaging methods
not necessarily have.
And the first thing is don't fear the diamonds.
We are snapping them too.
Snap allows packaging, diamonds and system applications.
And also even what we will see later some kernel boot system desktop environment.
You can snap everything.
And one thing is also packaging can now move from distros to upstream which means instead
of 10 distros all by themselves reinventing the wheel by packaging for themselves the
upstream can package and test once and all distros can use it.
And so employees of distro vendors can concentrate on the core distro.
And we can also and we will also see how it goes into immutable distros all snap distros
in our case all snap distros Ubuntu Core and a snap one can a little bit consider an immutable
application because you have also the file system of the snap and which is also read
only.
And this we will see now.
Now we look into what snap how snaps work.
The snap core the snap file system the applications file system is a compressed GPG signed read
only squash FS image which we simply mount we even do not uncompress it.
Therefore we save a lot of memory, lot of storage and also memory.
And it includes also the metadata of the snap and when we install the snap also a writable
area of a for the file in the file system inside the capsule of the snap is defined.
So that the application can write to somewhere.
And we have five types of different snaps we have apps we have call us snaps we have which
is the operating system call we have forget the snaps which is the boot system we have
kernel snaps and we have desktop session snaps like Gnomok KDE or so.
And we can and when they are updated we can handle binary diffs so that we can much more
much more quickly we can have much quicker downloads.
And they are available for most distros you can install snap D on many distros and they
exist since 14.04 Ubuntu it is default already included snap D since Ubuntu 14.04 10 years.
And as I said security we have the GPG signed read only file system for the application
so it cannot be modified by any malware.
And we have the confinement app armor sec comp and name spaces and the executables are called
for the snap D snap confirm so that the security is enforced.
And the snaps are route safe due to the encapsulation we can run an application as route but it
cannot access it cannot modify anything in the environment because it's in the capsule.
And so damon snaps the damon's one is good.
And so we do not need any special users and special groups.
And they are storage efficient due to the case that when we mount the immutable file
system of them that this file system is not actually uncompressed.
And we have also additional tricks so called content and once the course and the course
that contains the core operating system lip GG lip and all the standard libraries.
So this is mounted into the capsule office map to this course map so that the essential
parts of the operating system system are available for the snap.
And we have content provider snap for example for GNOME with all GNOME libraries for KDE
with all KDE libraries so that this can be shared by the snaps too.
And as I said safe interfaces and dangerous interfaces and interface between snaps or between
the snap and the core system then the snap D snap is the providing snap.
We have slots and plugs yes we have slots and plugs for connecting the snap for connecting
between two snaps or between one snap and the system itself.
And only due to and they are connected plug with slot and this gives a defined connection
for communication to the outside of the snap and you get safe interfaces when you use a
safe interface and upload your snap to the snap store and someone installs it this interface
is connected automatically.
And a dangerous interface when the user downloads a snap which uses a dangerous interface you
usually have the user usually has to connect it by hand or the snap store has given special
permission then this is also connected automatically.
And now for the updating the updating is when you update the snap the new snap is downloaded
and mounted but the old snap is not deleted.
So and the new snap is in a new immutable file system so the new snap is installed and
put in use and if you have any problems with it because the old snap always the previous
one is not deleted you can easily step back.
And so it's not a big problem when a new version introduces a bug and does not work you can
easily step back to the previous one but the previous of the previous that is actually
deleted.
So and a snap started it is it was a part of for Ubuntu core for the Ubuntu core operating
system by IoT.
At Canonica we wanted to have an IoT operating system Ubuntu core and this we have created
already back in 2014 as an immutable operating system with snap as the packaging format.
This is the start of snap and the immutable operating system it has not only one single
core as most others have it has some modules in the operating system itself.
It has the kernel is one snap the gamut which is the boot system and the definition of partitioning
and so on.
This is also a snap and the core operating system these are the base libraries I mentioned
already for the snaps Glib, Libc and whatever is a third snap and these three snaps give
you the operating system which you can boot they come on one image but you can once installed
you can update and replace them separately for example replacing the kernel by a gaming
kernel or so.
And these and onto these where once you have these three you install application snaps.
These are the ones which I mentioned an application which is packaged as snap.
So and this is the Ubuntu core operating system and the Ubuntu core and updates are also modular
like with the application snaps when you update a snap of the Ubuntu core operating system
for example the core snap then the new core snap is loaded and activated but the old
one is not deleted so you can step back and if you update the kernel it can even step
automatically back if the kernel does not succeed to boot.
So when it hangs when it tries to boot and hang somewhere gives a kernel panic then it
automatically steps back and reboots.
So if there's a problem if you update into a bad kernel the boot simply takes longer
and you are back in the old kernel.
And now this Ubuntu core from 2014 in 2023 was extended to Ubuntu core desktop so we
take the Ubuntu core and onto it we put a desktop by an additional snap which is the
Ubuntu desktop session snap.
It is currently at Canonica.
Thank you.
At Canonica it is a wayland with GNOME but as it's an exchangeable snaps for example
Ubuntu 4 can snap KDE for example and all the other flavors can also contribute a desktop
sessions snap and this way we get flavors of Ubuntu core desktop.
And we have the application which this time can be desktop applications and it is distributed
also as an image and usually with the base with gadget kernel and core system but in the
image you have also the desktop session and some initial apps so that you have a complete
desktop the user can start with.
It's all in an image but once the image is installed as usual you can update and replace
everything separately.
A little bit like Lego pieces or like a framework laptop and software.
And now you would think how do I do development on a system where everything is encapsulated
and separated.
What we do there we use LXD containers and do the development in an LXD container.
And so we take an LXD container of operating system we want to develop under and inside
this we compile we want all the tools and so on and test and so on so we do not need
to snap our application which we are developing all the time to be able to test it.
And so this and for this we have a graphical front and named workshop where you can easily
choose which operating system not only Ubuntu but also Rated, R, Suze and whatever and so
you can develop but it needs still some work for example that one can have a snapped IDE
running natively but about working on the containers.
And what we have yes what we have still to be done to make the system perfect and complete
is once for gaming we need NVIDIA proprietary driver support this is still is still in the
works and not not yet ready and for productivity we need to make the printer setup tools work
with the new Cups 3.x what I have mentioned in my first talk today in the morning so that in
as in Ubuntu Core desktop when Cups is encapsulated it cannot access to classic Cups drivers outside
of Cups so it can only access to IPP printers and then we need to change the printer setup tools
we also need to for productivity to introduce scanner applications so that we can add scanner
drivers to Ubuntu Core desktop and we need to improve the development part so that we can have
a snap of an IDE and then this snap can access the files and do the do the operations on the
LXD containers in which we are developing and what still is missing is TPM full disk encryption
needs still to be done and remote remote management of of of leads with canonical landscape is
the secure and modular Ubuntu Core desktop is also an ideal distribution for for for companies who
have many computers and want to have and want to have an easy maintenance of the systems so
so remote remote maintaining is also an important part and then Active Directory login also for
the enterprise desktop and the infrastructure to make it available as a distro that we make
the ISOs that we have testing testing plans and testing scripting CI stable release tracks and
documentation and so on but this is all planned for the next month at Canonica
that these steps will be done so I think I'm also yes
yes I yes I have it now yes that was it you can also see snapcraft.io there you find the snap
there you find everything about snap there we have also a forum for questions and here
are also some links and are there any questions we actually don't have time for questions
that was that was it for you but thank you so much for your talk
thank you and now we have a demo of Ubuntu Core desktop here behind that door
and there you can if you have questions there are there is me there is Philip Kavish community
maintain community manager of Canonica and there we can talk more about snap and Ubuntu Core desktop
fantastic thank you so much
thanks
you