DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Coding
  3. Frameworks
  4. A Guide to Ubuntu Core and Snaps

A Guide to Ubuntu Core and Snaps

Learn about Ubuntu Core's role in IoT development and how Snaps, as a packaging system, augment Linux, containers, and IoT.

Chris Ward user avatar by
Chris Ward
CORE ·
Oct. 03, 17 · Analysis
Like (5)
Save
Tweet
Share
12.11K Views

Join the DZone community and get the full member experience.

Join For Free

Despite being a Mac user for nearly 20 years, I have always had a soft spot for Ubuntu. Whilst they have not always been successful, I have respected their attempts to pull Linux into the mainstream and try new ideas and paradigms with it. They have weathered the storm of Ubuntu phone and Unity and are meeting success with two newer projects, The lean Ubuntu Core, and their universal Linux packaging format, snaps.

I spoke with Dustin Kirkland, VP of product development and Jamie Bennett, VP of Devices and IoT Engineering at Canonical to understand more the strategy behind the projects. Listen to the interview, and when you’re finished return here for a brief introduction.

Ubuntu Core

Ubuntu Core is a tiny, transactional version of Ubuntu designed for IoT devices and large container deployments. I’ve met Canonical staff at a variety of conferences and seen Core running on robots, signage, and IoT devices. With a total base size of less than 350Mb, Core is somewhere in the middle of container OS sizes, with CentOS Atomic over 700Mb, and Alpine under 150Mb.

Everything is Ubuntu Core is a ‘snap’, including the Linux Kernel and the minimal OS, meaning you can customize your installation to what you need. What is a snap? I’m glad you asked.

Snaps, the Universal Linux Packaging System

As a casual Linux user, I have always wondered if the different packaging formats are harmful to user experience. As the core of each distribution overlaps, and there are common development frameworks, doesn’t the need to support more than one distribution restrict a potential audience? Whilst creating packages for multiple distributions isn’t too complex, desktop Linux usage is already a small percentage, with poor support from a lot of large application vendors. Linux is a tinkerer's OS, and a lot of users are comfortable building from source, but still, new users unable to find an application package for their distribution is a detraction.

Snaps aims to solve this issue, but also, packaging applications for Linux running on IoT devices, containers, and other slim, non-desktop installations.

Create Your Own

The Ubuntu website has a comprehensive getting started tutorial, and I won’t repeat that here, but point out useful points that explain the overarching concepts of Snaps.

As is common with packaging formats, the magic that ties a snap together is a snapcraft.yaml file that details the build steps and metadata.

name: Dzone
version:'1.0'
# A string, so can be a number or text
summary: The Dzone Snap
description: The latest articles from Dzone
grade: devel
# stable or devel, which keeps snap out of distribution channels
confinement: devmode
# devmode during development and strict when you are ready to release


Snaps consist of ‘parts’, which you can think of as logical areas of your application, in each part you describe where the code comes from, how to build it, and the commands associated with them. You can pull code from Git, Bazaar, Mercurial and SVN, or Tar and Zip files over FTP. Snaps support applications written in Java, Python, Node, Go and Rust, and supports building with Kbuild, make, qmake, autotools, cmake, scons, meson, and waf. When you build the snap or a user installs it, snapcraft (the full product name) will handle dependencies.

If you’re looking for a more seamless process that fits a development workflow, then the Snapcraft build service might be what you’re looking for. It watches for changes in GitHub (hopefully other version control systems later), tests, builds and releases your snaps based on those changes.

Image from here.

SNAP (programming language) ubuntu

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Create Spider Chart With ReactJS
  • Key Elements of Site Reliability Engineering (SRE)
  • Master Spring Boot 3 With GraalVM Native Image
  • Strategies for Kubernetes Cluster Administrators: Understanding Pod Scheduling

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: