Canonical Voices

Posts tagged with 'snappy'

Michael Hall

Late last year Amazon introduce a new EC2 image customized for Machine Learning (ML) workloads. To make things easier for data scientists and researchers, Amazon worked on including a selection of ML libraries into these images so they wouldn’t have to go through the process of downloading and installing them (and often times building them) themselves.

But while this saved work for the researchers, it was no small task for Amazon’s engineers. To keep offering the latest version of these libraries they had to repeat this work every time there was a new release , which was quite often for some of them. Worst of all they didn’t have a ready-made way to update those libraries on instances that were already running!

By this time they’d heard about Snaps and the work we’ve been doing with them in the cloud, so they asked if it might be a solution to their problems. Normally we wouldn’t Snap libraries like this, we would encourage applications to bundle them into their own Snap package. But these libraries had an unusual use-case: the applications that needed them weren’t mean to be distributed. Instead the application would exist to analyze a specific data set for a specific person. So as odd as it may sound, the application developer was the end user here, and the library was the end product, which made it fit into the Snap use case.

Screenshot from 2017-03-23 16-43-19To get them started I worked on developing a proof of concept based on MXNet, one of their most used ML libraries. The source code for it is part C++, part Python, and Snapcraft makes working with both together a breeze, even with the extra preparation steps needed by MXNet’s build instructions. My snapcraft.yaml could first compile the core library and then build the Python modules that wrap it, pulling in dependencies from the Ubuntu archives and Pypi as needed.

This was all that was needed to provide a consumable Snap package for MXNet. After installing it you would just need to add the snap’s path to your LD_LIBRARY_PATH and PYTHONPATH environment variables so it would be found, but after that everything Just Worked! For an added convenience I provided a python binary in the snap, wrapped in a script that would set these environment variables automatically, so any external code that needed to use MXNet from the snap could simply be called with /snap/bin/mxnet.python rather than /usr/bin/python (or, rather, just mxnet.python because /snap/bin/ is already in PATH).

I’m now working with upstream MXNet to get them building regular releases of this snap package to make it available to Amazon’s users and anyone else. The Amazon team is also seeking similar snap packages from their other ML libraries. If you are a user or contributor to any of these libraries, and you want to make it easier than ever for people to get the latest and greatest versions of them, let’s get together and make it happen! My MXNet example linked to above should give you a good starting point, and we’re always happy to help you with your snapcraft.yaml in #snapcraft on rocket.ubuntu.com.

If you’re just curious to try it out ourself, you can download my snap and then follow along with the MXNet tutorial, using the above mentioned mxnet.python for your interactive python shell.

Read more
Michael Hall

Java is a well established language for developing web applications, in no small part because of it’s industry standard framework for building them: Servlets and JSP.  Another important part of this standard is the Web Archive, or WAR, file format, which defines how to provide a web application’s executables and how they should be run in a way that is independent of the application server that will be running  them.

application-server-market-share-2015WAR files make life easier for developers by separate the web application from the web server. Unfortunately this doesn’t actually make it easier to deploy a webapp, it only shifts some of the burden off of the developers and on to the user, who still needs to setup and configure an application server to host it. One popular option is Apache’s Tomcat webapp server, which is both lightweight and packs enough features to support the needs of most webapps.

And here is where Snaps come in. By combining both the application and the server into a single, installable package you get the best of both, and with a little help from Snapcraft you don’t have to do any extra work.

Snapcraft supports a modular build configuration by having multiple “parts“, each of which provides some aspect of your complete runtime environment in a way that is configurable and reusable. This is extended to a feature called “remote parts” which are pre-defined parts you can easily pull into your snap by name. It’s this combination of reusable and remote parts that are going to make snapping up java web applications incredibly easy.

The remote part we are going to use is the “tomcat” part, which will build the Tomcat application server from upstream source and bundle it in your snap ready to go. All that you, as the web developer, need to provide is your .war file. Below is an simple snapcraft.yaml that will bundle Tomcat’s “sample” war file into a self-contained snap package.

name: tomcat-sample
version: '0.1'
summary: Sample webapp using tomcat part
description: |
 This is a basic webapp snap using the remote Tomcat part

grade: stable
confinement: strict

parts:
  my-part:
    plugin: dump
    source: .
    organize:
      sample.war: ./webapps/sample.war
    after: [tomcat]

apps:
  tomcat:
    command: tomcat-launch
    daemon: simple
    plugs: [network-bind]

The important bits are the ones in bold, let’s go through them one at a time starting with the part named “my-part”. This uses the simple “dump” plugin which is just going to copy everything in it’s source (current directory in this case) into the resulting snap. Here we have just the sample.war file, which we are going to move into a “webapps” directory, because that is where the Tomcat part is going to look for war files.

Now for the magic, by specifying that “my-part” should come after the “tomcat” part (using after: [tomcat]) which isn’t defined elsewhere in the snapcraft.yaml, we will trigger Snapcraft to look for a remote part by that same name, which conveniently exists for us to use. This remote part will do two things, first it will download and build the Tomcat source code, and then it will generate a “tomcat-launch” shell script that we’ll use later. These two parts, “my-part” and “tomcat” will be combined in the final snap, with the Tomcat server automatically knowing about and installing the sample.war webapp.

The “apps” section of the snapcraft.yaml defines the application to be run. In this simple example all we need to execute is the “tomcat-launch” script that was created for us. This sets up the Tomcat environment variables and runtime directories so that it can run fully confined within the snap. And by declaring it to be a simple daemon we are additionally telling it to auto-start as soon as it’s installed (and after any reboot) which will be handled by systemd.

Now when you run “snapcraft” on this config, you will end up with the file tomcat-sample_0.1_amd64.snap which contains your web application, the Tomcat application server, and a headless Java JRE to run it all. That way the only thing your users need to do to run your app is to “snap install tomcat-sample” and everything will be up and running at http://localhost:8080/sample/ right away, no need to worry about installing dependencies or configuring services.

Screenshot from 2017-03-21 14-16-59

If you have a webapp that you currently deploy as a .war file, you can snap it yourself in just a few minutes, use the snapcraft.yaml defined above and replace the sample data with your own. To learn more about Snaps and Snapcraft in general you can follow this tutorial as well as learning how to publish your new snap to the store.

Read more
ssweeny

My team at work has been focused on snaps this year and one thing we’ve tried to do internally is establish a set of best practices for snap packaging software. Toward that end I’ve been working on a little tool I’m calling snaplint to encode those practices and verify that we’re following them.

Right now you can run snaplint against your snapcraft project directory
and it will scan the prime subdirectory for the following things:

  • copyright (basically that you included usr/share/doc/*copyright*) for
    any stage-packages
  • developer cruft (things like header and object files or static libs
    that might have made their way into your snap)
  • libraries (examine the ELF files in your snap and look for libraries
    which aren’t used)

The next things I’m planning on adding are:

  • checking for copyright info from apps/parts themselves.
  • checking for mixing of incompatible licenses

I would love to hear suggestions on further improvements.

You can find the source at https://github.com/ssweeny/snaplint

And, of course if you’re running Ubuntu 16.04 or later you can try it on your own machine with:
$ snap install snaplint
$ snaplint path/to/your/project

Read more
bmichaelsen

Meist scheint manches auf den ersten Blick unmöglich.
Manches ist es auch, doch es wäre tödlich, das selbst zu glauben solange noch nichts feststeht
und die Party zu verlassen, bevor sie losgeht.

— Die Sterne, Stell die Verbindung her

Yesterday, two nice things happened: For one, LibreOffice 5.2.3 has been released and secondly Ubuntu Core 16 has been released. But beyond that, something in the middle between these two has happened: LibreOffice 5.2.3 has been released to the stable channel of the snap store at the same day. Now LibreOffice has been in the snap store for some time — and has also been on the stable channel since the Ubuntu 16.10 release. But this is the first time the LibreOffice snap is released in sync with The Document Foundation announcing the general availability of the final downloads. This was possible even though I was on vacation yesterday: LibreOffice snap packages are now being build on launchpad, which simplifies a lot, and launchpad can be asked to populate the edge channel of the store. This is making life very easy. Having smoketested the amd64 build from that channel before, to release LibreOffice 5.2.3 to the beta/candidate/stable channels too all I had to do was push three buttons on a web interface and it was available to all.

Building on launchpad, I also had the opportunity to create builds for armhf and i386 along with the usual amd64 builds with little extra effort. If you are adventurous you are encouraged to test these builds too: Be aware though that these so far aren’t even smoketested, I havent looked at them at all yet, so use them at your own risk.

All in all, this is great progress: LibreOffice 5.2.3 is available to users of Ubuntu 16.10 and Ubuntu 16.04 LTS as a snap on the day of the upstream release. And beyond that on all other distributions where snap is available — quite a few these days.

Update: ICYMI here is how to get the LibreOffice snap: http://www.libreoffice.org/download/snap/ — although strictly speaking you dont need the --channel=beta option anymore now. I will fix that soon.


Read more
Victor Palau

Ok, ok.. sorry for the click-bait headline – but It is mainly true.. I recently got a Nextcloud box , it was pretty easy to set up and here are some great instructions.

But this box is not just a Nextcloud box, it is  a box of unlimited possibilities. In just a few hours I added to my personal cloud  a WIFI access point and  chat server.   So here are some amazing facts you should know about Ubuntu and snaps:

Amazing fact #1 – One box, many apps

With snaps you can transform you single function device, into a box of tricks. You can add software to extend its functionality after you have made it. In this case I created an WIFI access point and added a Rocketchat server to it.

You can release a drone without autonomous capabilities, and once you are sure that you have nailed, you can publish a new app for it… or even sale a pro-version autopilot snap.

You can add an inexpensive Zigbee and Bluetooth module to your home router, and partner with a security firm to provide home surveillance services.. The possibilities are endless.

Amazing fact #2 – Many boxes, One heart

Maybe an infinite box of tricks is attractive to a geek like me,  but what it is interesting is product makers is :make one hardware, ship many products.

Compute parts (cpu,memory,storage) make a large part of  bill of materials of any smart device. So does validation and integration of this components with your software base… and then you need to provide updates for the OS and the kernel for years to come.

What if I told you could build (or buy) a single multi-function core – pre-integrated with a Linux OS  and use it to make drones, home routers, digital advertisement signs, industrial and home automation hubs, base stations, DSLAMs, top-of-rack switches,…

This is the real power of Ubuntu Core, with the OS and kernel being their own snaps – you can be sure the nothing has changes in them across these devices, and that you can reliably update of them.  You not only are able to share validation and maintenance cost across multiple projects, you would be able to increase the volume of your part order and get a better price.

20160927_101912

How was the box of tricks made:

Ingredients for the WIFI ap:

 

I also installed the Rocketchat server  snap for the store.

 


Read more
Michael Hall

KDE Neon developer Harald Sitter was able to package up the KDE calculator, kcalc, in a snap that weighs in at a mere 320KB! How did he do it?

KCalc and KDE Frameworks snaps

Like most applications in KDE, kcalc depends on several KDE Frameworks (though not all), sets of libraries and services that provide the common functionality and shared UI/UX found in KDE and it’s suite of applications. This means that, while kcalc is itself a small application, it’s dependency chain is not. In the past, any KDE application snap had to include many megabytes of platforms dependencies, even for the smallest app.

Recently I introduced the new “content” interface that has been added to snapd. I used this interface to share plugin code with a text editor, but Harald has taken it even further and created a KDE Frameworks snap that can share the entire platform with applications that are built on it!

While still in the very early stages of development, this approach will allow the KDE project to deliver all of their applications as independent snaps, while still letting them all share the one common set of Frameworks that they depend on. The end result will be that you, the user, will get the very latest stable (or development!) version of the KDE platform and applications, direct from KDE themselves, even if you’re on a stable/LTS release of your distro.

If you are running a snap-capable distro, you can try these experimental packages yourself by downloading kde-frameworks-5_5.26_amd64.snap and kcalc_0_amd64.snap from Neon’s build servers, and installing them with “snap install –devmode –force-dangerous <snap_file>”. To learn more about how he did this, and to help him build more KDE application snaps, you can find Harald as <sitter> on #kde-neon on Freenode IRC.

Read more
Michael Hall

Snaps are a great way to get the most up to date applications on your desktop without putting the security or stability or your system at risk. I’ve been snapping up a bunch of things lately and the potential this new paradigm offers is going to be revolutionary. Unfortunately nothing comes for free, and the security of snaps comes with some necessary tradeoffs like isolation and confinement, which reduces some of the power and flexibility we’ve become used to as Linux users.

But now the developers of the snappy system (snapd, snap-confine and snapcraft) are giving us back some of that missing flexibility in the form of a new “content” interface which allows you to share files (executables, libraries, or data) between the snap packages that you develop. I decided to take this new interface for a test drive using one of the applications I had recently snapped: Geany, my editor of choice. Geany has the ability to load plugins to extend it’s functionality, and infact has a set of plugins available in a separate Github repository from the application itself.

I already had a working snap for Geany, so the next thing I had to do was create a snap for the plugins. Like Geany itself, the plugins are hosted on GitHub and have a nice build configuration already, so turning it into a snap was pretty trivial. I used the autotools plugin in Snapcraft to pull the git source and build all of the available plugins. Because my Geany snap was built with Gtk+ 3, I had to build the plugins for the same toolkit, but other than that I didn’t have to do anything special.

parts:
 all-plugins:
 plugin: autotools
 source: git@github.com:geany/geany-plugins.git
 source-type: git
 configflags: [--enable-gtk3=yes --enable-all-plugins]

Now that I had a geany.snap and geany-plugins.snap, the next step was to get them working together. Specifically I wanted Geany to be able to see and load the plugin files from the plugins snap, so it was really just a one-way sharing. To do this I had to create both a slot and a plug using the content interface. Usually when you’re building snap you only use plugs, such as network or x11, because you are consuming services provided by the core OS. In those cases also you just have to provide the interface name in the list of plugs, because the interface and the plug have the same name.

But with the content interface you need to do more than that. Because different snaps will provide different content, and a single snap can provide multiple kinds of content, you have to define a new name that is specific to what content you are sharing. So in my geany-plugins snapcraft.yaml I defined a new kind of content that I called geany-plugins-all (because it contains all the geany plugins in the snap), and I put that into a slot called geany-plugins-slot which is how we will refer to it later. I told snapcraft that this new slot was using the content interface, and then finally told it what content to share across that interface, which for geany-plugins was the entire snap’s content.

slots:
 geany-plugins-slot:
 content: geany-plugins-all
 interface: content
 read:
 - /

With that I had one half of the content interface defined. I had a geany-plugins.snap that was able to share all of it’s content with another snap. The next step was to implement the plug half of the interface in my existing geany.snap. This time instead of using a slots: section I would define a plugs: section, with a new plug named geany-plugins-plug and again specifying the interface to be content just like in the slot. Here again I had to specify the content by name, which had to match the geany-plugins-all that was used in the slot. The names of the plug and slot are only relevant to the user who needs to connect them, it’s this content name that snapd uses to make sure they can be connected in the first place. Finally I had to give the plug a target directory for where the shared content will be put. I chose a directory called plugins, and when the snaps are connected the geany-plugins.snap content will be bind-mounted into this directory in the geany.snap

plugs:
 geany-plugins-plug:
 content: geany-plugins-all
 default-provider: geany-plugins
 interface: content
 target: plugins

Lastly I needed to tell snapcraft which app would use this interface. Since the Geany snap only has one, I added it there.

apps:
 geany:
 command: gtk-launch geany
 plugs: [x11, unity7, home, geany-plugins-plug]

Once the snaps were built, I could install them and the new plug and slot were automatically connected

$ snap interfaces
Slot                             Plug
geany-plugins:geany-plugins-slot geany:geany-plugins-plug

Now that put the plugins into the application’s snap space, but it wasn’t enough for Geany to actually find them. To do that I used Geany’s Extra plugin path preferences to point it to the location of the shared plugin files.

Screenshot from 2016-08-30 16-27-12

After doing that, I could open the Plugin manager and see all of the newly shared plugins. Not all of them work, and some assume specific install locations or access to other parts of the filesystem that they won’t have being in a snap. The Geany developers warned me about that, but the ones I really wanted appear to work.

Screenshot from 2016-08-30 16-29-54

Read more
deviceguy

Sensors are an important part of IoT. Phones, robots and drones all have a slurry of sensors. Sensor chips are everywhere, doing all kinds of jobs to help and entertain us. Modern games and game consoles can thank sensors for some wonderfully active games.

Since I became involved with sensors and wrote QtSensorGestures as part of the QtSensors team at Nokia, sensors have only gotten cheaper and more prolific.

I used Ubuntu Server, snappy, a raspberry pi 3, and the senseHAT sensor board to create a senseHAT sensors snap. Of course, this currently only runs in devmode on raspberry pi3 (and pi2 as well) .

To future proof this, I wanted to get sensor data all the way up to QtSensors, for future QML access.

I now work at Canonical. Snappy is new and still in heavy development so I did run into a few issues. First up was QFactoryLoader which finds and loads plugins, was not looking in the correct spot. For some reason, it uses $SNAP/usr/bin as it's QT_PLUGIN_PATH. I got around this for now by using a wrapper script and setting QT_PLUGIN_PATH to $SNAP/usr/lib/arm-linux-gnueabihf/qt5/plugins

Second issue was that QSensorManager could not see it's configuration file in /etc/xdg/QtProject which is not accessible to a snap. So I used the wrapper script to set up  XDG_CONFIG_DIRS as $SNAP/etc/xdg

[NOTE] I just discovered there is a part named "qt5conf" that can be used to setup Qt's env vars by using the included command qt5-launch  to run your snap's commands.

Since there is no libhybris in Ubuntu Core, I had to decide what QtSensor backend to use. I could have used sensorfw, or maybe iio-sensor-proxy but RTIMULib already worked for senseHAT. It was easier to write a QtSensors plugin that used RTIMULib, as opposed to adding it into sensorfw. iio-sensor-proxy is more for laptop like machines and lacks many sensors.
RTIMULib uses a configuration file that needs to be in a writable area, to hold additional device specific calibration data. Luckily, one of it's functions takes a directory path to look in. Since I was creating the plugin, I made it use a new variable SENSEHAT_CONFIG_DIR so I could then set that up in the wrapper script.

This also runs in confinement without devmode, but involves a simple sensors snapd interface.
One of the issues I can already see with this is that there are a myriad ways of accessing the sensors. Different kernel interfaces - iio,  sysfs, evdev, different middleware - android SensorManager/hybris, libhardware/hybris, sensorfw and others either I cannot speak of or do not know about.

Once the snap goes through a review, it will live here https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/sensehat, but for now, there is working code is at my sensehat repo.

Next up to snapify, the Matrix Creator sensor array! Perhaps I can use my sensorfw snap or iio-sensor-proxy snap for that.

Read more
Daniel Holbach

Next week on Tuesday, 5th July, we want to have our next Snappy Playpen event. As always we are going to work together on snapping software for our repository on github. Whatever app, service or piece of software you bring is welcome.

The focus of last week was ironing out issues and documenting what we currently have. Some outcomes of this were:

We want to continue this work, but add a new side to this: upstreaming our work. It is great that we get snaps working, but it is much better if the upstream project in question can take over the ownership of snaps themselves. Having snapcraft.yaml in their source tree will make this a lot easier. To kick off this work, we started some documentation on how to best do that and track this effort.

You are all welcome to the event and we look forward to work together with you. Coordination is happening on #snappy on Freenode and Gitter. We will make sure all our experts are around to help you if you have questions.

Looking forward to seeing you there!

Read more
Daniel Holbach

Ubuntu 16.04 LTS is out of the door, we started work on the Yakkety Yak already, now it’s time for the Ubuntu Online Summit. It’s all happening 3-5 May 14-20 UTC. This is where we discuss upcoming features, get feedback and demo all the good work which happened recently.

If you want to join the event, just head to the registration page and check out the UOS 16.05 schedule afterwards. You can star (☆) sessions and mark them as important to you and thus plan your attendance for the event.

Now let’s take a look on the bits which are in one way or another related to Ubuntu Core at UOS:

  • Snappy Ubuntu 16 – what’s new
    16.04 has landed and with it came big changes in the world of snapd and friends. Some of them are still in the process of landing, so you’re in for more goodness coming down the pipe for Ubuntu 16.04 LTS.
  • The Snapcraft roadmap
    Publishing software through snaps is super easy and snapcraft is the tool to use for this. Let’s take a look at the roadmap together and see which exciting features are going to come up next.
  • Snappy interfaces
    Interfaces in Ubuntu Core allow snaps to communicate or share resources, so it’s important we figure out how interfaces work, which ones we’d like to implement next and which open questions there are.
  • Playpen – Snapping software together
    Some weeks ago the Community team set up a small branch in which we collaborated on snapping software. It was good fun, we worked on things together, learnt from each other and quickly worked out common issues. We’d like to extend the project and get more people involved. Let’s discuss the project and workflow together.
  • How to snap your software
    If you wanted to start snapping software (yours or somebody else’s) and wanted to see a presentation of snapcraft and a few demos, this is exactly the session you’ve been looking for.
  • Snappy docs – next steps
    Snappy and snapcraft docs are luckily being written by the developers as part of the development process, but we should take a look at the docs together again and see what we’re missing, no matter if it’s updates, more coherence, more examples or whatever else.
  • Demo: Snaps on the desktop
    Here’s the demo on how to get yourself set up as a user or developer of snaps on your regular Ubuntu desktop.

I’m looking forward to see you in all these sessions!

Read more
Daniel Holbach

Ubuntu 16.04 is out!

Ubuntu 16.04 – yet another LTS?

Ubuntu 16.04 LTS, aka the Xenial Xerus, has just been released. It’s incredible that it’s already the 24th Ubuntu release and the 6th LTS release. If you have been around for a while and need a blast from the past, check out this video:

Click here to view it on youtube. It’s available in /usr/share/example-content on a default desktop install as well.

You would think that after such a long time releases get somewhat inflationary and less important and while I’d very likely always say on release day “yes, this one is the best of all so far”, Ubuntu 16.04 is indeed very special to me.

Snappy snappy snappy

Among the many pieces of goodness to come to your way is the snapd package. It’s installed by default on many flavours of Ubuntu including Ubuntu Desktop and is your snappy connection to myApps.

Snappy Ubuntu Core 2.0 landing just in time for the 16.04 LTS release only happened due to the great and very hard work of many teams and individuals. I also see it as the implementation of lots of feedback we have been getting from third party app developers, ISVs and upstream projects over the years. Basically what all of them wanted was in a nutshell: a solid Ubuntu base, flexibility in handling their app and the relevant stack, independence from distro freezes, dead-simple packaging, bullet-proof upgrades and rollbacks, and an app store model established with the rise of the smartphones. Snappy Ubuntu Core is exactly that and more. What it also brings to Ubuntu is a clear isolation between apps and a universal trust model.

As most of you know, I’ve been trying to teach people how to do packaging for Ubuntu for years and it continued to improve and get easier, but all in all, it still is hard to get right. snapcraft makes this so much easier. It’s just beautiful. If you have been doing some packaging in the past, just take a look at some of the examples.

Landing a well-working and stable snapd with clear-cut and stable set of APIs was the most important aspect, especially considering that almost everyone will be basing their work on 16.04 LTS, which is going to be supported for five years. This includes being able to use snapcraft on the LTS.

Today you can build a snap, upload it to the store using snapcraft upload, having it automatically reviewed and published by the store and Desktop users can install it on their system. This brings you in a position where you can easily share your software with millions of users, without having to wait for somebody to upload it to the distro for you, without having your users add yet another PPA, etc.

So, what’s still missing? Quite a few things actually. Because you have to bundle your dependencies, packages are still quite big. This will change as soon as the specifics of OS and library snaps are figured out. Apart from that many new interfaces will need to be added to make Ubuntu Core really useful and versatile. There are also still a few bugs which need figuring out.

If you generally like what you’re reading here, come and talk to us. Introduce yourselves, talk to us and we’ll figure out if anything you need it still missing.

If you’re curious you can also check out some blog posts written by people who worked on this relentlessly in the last weeks:

Thanks a lot everyone – I thoroughly enjoyed working with you on this and I’m looking forward to all the great things we are going to deliver together!

Bring your friends, bring your questions!

The Community team moved the weekly Ubuntu Community Q&A to be tomorrow, Friday 2016-04-22 15:00 UTC on https://ubuntuonair.com as usual. If you have questions, tune in and bring your friends as well!

Read more
Daniel Holbach

ubucon

I’m very excited about UbuCon Summit which will bring many many Ubuntu people from all parts of its community together in January. David Planella did a great job explaining why this event is going to be just fantastic.

I look forward to meeting everyone and particularly look forward to what we’ve got to show in terms of Snappy Ubuntu Core.

Manik Taneja and Sergio Schvezov

We are going to have Manik Taneja and Sergio Schvezov there who are going to give the following talk:

Internet of Things gets ‘snappy’ with Ubuntu Core

Snappy Ubuntu Core is the new rendition of Ubuntu, designed from the ground up to power the next generation of IoT devices. The same Ubuntu and its vast ecosystem, but delivered in a leaner form, with state-of-the art security and reliable update mechanisms to ensure devices and apps are always up-to-date.

This talk will introduce Ubuntu Core, the technologies of its foundations and the developer experience with Snapcraft. We will also discuss how public and branded stores can kickstart a thriving app ecosystem and how Ubuntu meets the needs of connected device manufacturers, entrepreneurs and innovators.

And there’s more! Sergio Schvezov will also give the following workshop:

Hands-on demo: creating Ubuntu snaps with Snapcraft

Overview the snapcraft features and demo how easily a snap can be created using multiple parts from different sources. We will also show how to create a plugin for unhandled source types.

In addition to that we are going to have a few nice things at our booth, so we can show give you a Snappy experience there as well.

If you want to find out more, like check the entire schedule or register for the event, do it at ubucon.org.

I’m looking forward to seeing you there! </p>
            <a href=Read more

Daniel Holbach

It’s been a while since our last Snappy Clinic (here’s a link to all videos) and since Ubuntu Online Summit a lot of great things happened in Snapcraft:

Among the changes: a nil plugin, support of pip packages, support globs in the copy plugin, a nodejs plugin, add go-packages to the go plugin, countless bugfixes and tests, a more beautiful interface and more documentation.

The above and to get Sergio Schvezov on camera are reasons enough for us to have another Snappy Clinic

See you later! </p>
            <a href=Read more

Daniel Holbach

Ubuntu Online Summit featured more than 70 sessions this time around and quite a big turnout. You can find the full schedule with links to session videos and session notes in summit.ubuntu.com.

Here’s a quick summary of what happened in Snappy Ubuntu Core land:

  • Testing Snappy: In this Show & Tell session Leo Arias showcased a lot of the QA work which has been done on Ubuntu Core along with many useful techniques to run tests and easily bring up Snappy in a number of different scenario.
  • Creating more Snappy frameworks: Frameworks are an effective way to bring functionality to Ubuntu Core which can then be shared by apps. The session attracted quite a few users of Snappy who wanted to know if their use-case could be addressed by a framework. We discussed some more technical difficulties, possible solutions and learned that bluetooth and connectivity (based on network-manager) frameworks are in the works.
  • Snappy Clinic: bringing ROS apps to Snappy Ubuntu Core: Ted Gould showed off the great work which has been put into the catkin plugin of Snapcraft. Taking a simple ROS app and bringing it to Ubuntu Core is very easy. The interest from members of the ROS community was great to see and their feedback will help us improve the support even further.
  • Snap packages for phone and desktop apps: Alejandro Cura and Kyle Fazzari brought up their analysis of snappy on the phone/desktop and discussed a plan on what would need to land to make snappy apps on the Ubuntu desktop and phone a reality.
  • Your feedback counts: the Snappy onboarding experience: This session brought together a number of different users of Snappy who shared their experience and what they would like to do. The feedback was great and will be factored into our upcoming documentation plans.
  • Snappy Developer Community Resources: In this session Thibaut Rouffineau and I had a chat about our online support options and community resources. We gathered a number of ideas and will look into creating workshop and presentation materials this cycle as well.
  • Porting popular apps/software to Snappy: Many interesting apps and appliances exist for a variety of boards, most notably the Raspberry Pi. We put together a plan on how we could start a community initiative for bringing them over to Snappy Ubuntu Core.

Thanks to everyone who participated and helped to make this such a great UOS!

Read more
Daniel Holbach

With Ubuntu Online Summit happening 3-5 November, it is really just around the corner. Time to check out the schedule and see what’s planned.

UOS is our online planning and show-and-tell event. We use a mix of Hangouts-on-Air, IRC and Etherpad to organise ourselves. It’s a great opportunity to get to know people, have your say and find out what’s planned the next weeks and months.

Register for the event at http://summit.ubuntu.com/.

This is also where you find the schedule for all the individual tracks and if you click on the sessions themselves, you can register your attendance as well, that will make it easy for you to see “your schedule” on the site and help you plan your days.

Here is a quick roundup of the sessions coming straight from the world of Snappy Ubuntu Core:

  1. 2015-11-03 15:00 UTC Testing Snappy
    Leo and Federico will cover both automated and manual approaches to testing snappy, and the work that goes into making sure each new version of snappy is ready to release. They will also offer advice on how you can help make snappy
    better!
  2. 2015-11-03 16:00 UTC Creating more Snappy frameworks
    Frameworks extend the functionality of Snappy Ubuntu Core systems in a vary practical way. Let’s discuss how we can bring more services to Snappy Ubuntu Core.
  3. 2015-11-03 18:00 UTC Snappy Clinic: bringing ROS apps to Snappy Ubuntu Core
    Snapcraft integrates building and packaging software and is what we recommend to bring software to Snappy Ubuntu Core. Snapcraft has recently seen the addition of a catkin plugin. This will make it very easy to bring ROS applications to Snappy Ubuntu Core. Check out this demo by Sergio and Ted and you’ll see just how easy it is.
  4. 2015-11-05 14:00 UTC Your feedback counts: the Snappy onboarding experience
    In this session we want your feedback on your Snappy and Snapcraft onboarding experience:
    – How were you welcomed into the world of Snappy? Was the documentation sufficient? Were you able to find your way around?
    – We are planning some changes to the documentation and would like to present them and get feedback.
    – If you are a device builder, we would specifically like to get your input as well, so we can improve our device builder documentation.
  5. 2015-11-05 15:00 UTC Snappy Developer Community Resources
    In this session we want to figure out how the Snappy developer community can interact and get support, particularly:
    – support of askubuntu/stackoverflow
    – which G+ communities/Twitter/etc to use
    – which presentation and workshop materials we want to create and share
    – how we can support people who want to represent Snappy Ubuntu Core at events/hackathons/workshops
  6. 2015-11-05 16:00 UTC Porting popular apps/software to Snappy
    With hardware becoming cheaper (ie Raspberry Pi, etc.) a number of apps and appliances were built, which are very popular today. It’d be great if it was easy for app developers to bring their apps to Snappy Ubuntu Core as well. Let’s figure out how developers can port them over and we can get feedback about what should be easier.

Please note: there might be last-minute changes to the schedule, so make sure stay up to date. If you have any questions, let me know.

Read more
Daniel Holbach

As announced earlier, we had a Ubuntu Snappy Core Clinic yesterday and we had a great time. Sergio Schvezov, Ted Gould and I talked about snapcraft in general, what’s new in the 0.3 release and showed off a couple of examples how to package software for Ubuntu Snappy Core. As you can see in the video, none of the snapcraft.yaml files length exceeded 30 lines (and this file is all that’s required); compared to what packaging on various platforms usually looks like that’s just beautiful.

We are going to have these clinics more regularly now. They will always revolve around the world of Snappy Ubuntu Core and there will always be room for questions, requests, feedback and what your want them to be.

ROS people might be interested in the one: we are very likely going to talk about snapcraft’s catkin plugin.

If you have missed the show yesterday, here it is in full length:

You might be wondering why I’m posting two videos. Unfortunately I accidentally pressed the “stop broadcast” button when I was actually looking for “stop screensharing”. Once I hit the button, we couldn’t find a way to resume the broadcast and we had to start a new one. I’m sorry about that.

If anyone of you knows a browser plugin which shows a “are you sure you want to stop the broadcast” warning, that would be fantastic. I could imagine I’m not the only one who might have confused the two when they were busy doing a demo, getting feedback on IRC and were busy talking. </p>
            <a href=Read more

Shuduo

After Victor Palau wrote a new blog for his PiGlow API snap, I tried to operate PiGlow LED and learnt following ways to interact with it.

a. Use python:

python3 -c 'from urllib.request import urlopen; print(urlopen("http://REALIP:8000/v1/on", data=b""))'

b. Use curl:

curl -i -X POST "http://REALIP:8000/v1/on"

c. Use html web page in web browser

<head>
<title>test piglow</title>
</head>
<body>
<form action="http://192.168.0.151:8000/v1/flare" method="post">
<input type=submit value=flare>
</form>
</body>

Read more
Daniel Holbach

I have some very exciting news, but wanted to share some thoughts I had earlier today.

Since I joined the Ubuntu community I’ve always had to do with people who want to ship their software in Ubuntu and as I’m a generally excitable guy I always thought “finally, it became so much easier – we’re there”! Over the past years we got better documentation, PPAs in Launchpad, the dh command, bzr-builddeb, daily builds in Launchpad, pkgme, the ARB process, translated documentation and lots of other initiatives which always felt like we made the world a better place for ISVs, third party app developers, upstream developers and whoever else wanted their software to be in Ubuntu.

Fast-forward to Ubuntu on the phone and click. Suddenly it became SUPER easy, even easier to ship software. Write a manifest, run “click build“, upload it to the store where it gets auto-reviewed and you’re golden. This was possible because apparmor and friends were so tightly integrated into the phone experience and confinement fully worked, so we could trust apps to be safe and trust our automatic reviews. Finally!

snappy

snappy, the evolution of click, has a much broader scope and is finally moving into the center of attention of many and will at some stage also get on the phone and elsewhere. It shares the concept of a central software store with confined apps but brings atomic upgrades, rollbacks and lots of other goodness.

From the point of view of somebody who’s shipping software some things were still missing though. How do you easily do repeatable builds, especially if they involve bundling other software?

Enter snapcraft. A thing of beauty. Finally you can specify all relevant meta-data in one file, define which parts make up your app and snapcraft’s plugins (Go, Java, autotools, etc.) will take care of pulling and building sources and binaries, which files to ship exactly and everything else. It’s magic.

We just shipped 0.2 of snapcraft and the amount of new tests, bug fixes and goodness which landed is staggering. Even more importantly: the syntax of snapcraft.yaml is now very likely going to be stable.

I have more good news:

we are going to have our first of many Ubuntu Snappy Clinics brought to you by Sergio Schvezov, Michael Vogt and myself. The topics of these clinics are going to change, but will always be centered around snappy and the technologies around it and will give enough opportunities to ask your questions and work on things together.

Now is a brilliant time to involved with snapcraft.

Read more
Daniel Holbach

In the flurry of uploads for the C++ ABI transition and other frantic work (Thursday is Feature Freeze day) this gem maybe went unnoticed:

snapcraft (0.1) wily; urgency=low

  * Initial release

What this means? If you’re on wily, you can easily try out snapcraft and get started turning software into snaps. We have some initial docs available on the developer site which should help you find your way around.

This is a 0.1 release, so there are bugs and there might be bigger changes coming your way, but there will also be more docs, more plugins and more good stuff in general. If you’re curious, you might want to sign up for the daily build (just add the ppa:snappy-dev/snapcraft-daily PPA).

Here’s a brilliant example of what snapcraft can do for you: packaging a Java app was never this easy.

If you’re more into client apps, check out Ted’s article on how to create a QML snap.

As you can easily see: the future is on its way and upstreams and app developer will have a much easier time sharing their software.

As I said above: snapcraft is still a 0.1 release. If you want to let us know your feedback and find bugs or propose merges, you can find snapcraft in Launchpad.

Read more