Snap application packaging

Canonical offers to package your IoT applications in snap containers within the scope of SMART START. Canonical packages up to 3 applications as snaps and train your engineers to do so on their own.

What is a snap?

Snaps are a secure and scalable way to embed applications on Linux devices. Applications containerised in snaps are installed with all dependencies in a single command on any device running Linux. What’s more, with snaps, software updates are automatic and resilient. Applications run fully isolated in their own sandbox, thus minimising security risks.

Packaging IoT applications as snaps bring the flowing benefits:

Security Snaps are tamper-proof and run isolated in their own sandbox
Modularity Snaps are reusable, they enable a loosely-coupled software architecture for embedded software
Efficiency Software updates are automatic and differential with snaps
Robustness Snaps roll back automatically in case of a failed update

Building snaps

Snapcraft is the developer tool available for creating, building, releasing and updating snaps on any Linux workstation. A detailed training is offered to engineering teams within the scope of SMART START.

Snaps are built in 3 simple steps:

  1. Model

    Identify the software modules, libraries and dependencies that make up your application in a yaml file.

  2. Build

    Use the Snapcraft build tool to package your application in a snap in a virtual machine on your host computer.

  3. Release

    Publish your snap to the public (snap store) or private repository for snaps (IoT app store). Alternatively, the snap can be used locally on the host machine.

Maintaining snaps

Snapcraft integrates with CI/CD tools to build and release apps automatically upon software commits.

When released, snaps are published to a track in the public or private repository they are hosted in. There are fours channels in each track, each reflects a level of software maturity:

  • stable: production-ready
  • candidate: for testing purposes prior to production deployment
  • beta: for testing of the latest development features
  • edge: closely tracks development, often auto built and released

Helpful resources