Snap Your IoT Device on Ubuntu
在 Ubuntu 上更快、更便捷地部署物联网设备
Rex Tsai, Technical Architect
1 Sep 2017
Canonical
We are the company behind Ubuntu
Canonical 总部位于英国,2004 年开始开发操作系统
关于 Canonical
FOUNDED EMPLOYEES COUNTRIES
2004 520+ 35+
技术授权与支援服务
产品与服务类型
Hybrid Cloud
基础建设
IoT
软件应用
LXD
云计算维运
Snap
Store
边缘计算
技术授权与支援服务
4
Ubuntu is the #1 Choice for Innovators
3 million +
developers
cloud to edge
Ubuntu ranked as 2nd most used IoT OS by
Eclipse Foundation survey
Ubuntu is powering smart IoT
Smart drone
controllers
Advanced
robotics
Home gateways Industrial
gateways
Digital Signage
≠
Ease of development
Certified platforms
Wealth of libraries
Security
Devops for IoT
MonetizationDevelopment Deployment
IOT Dev Deploy - prototype to production
Difficulties of Building a Platform Business
Security and OTA
maintenance
Devops
for IoT
Ecosystem
building
1 2 3
Snap - a universal Linux package format
Supported distros Example snaps / frameworks
Ubuntu 16.04 LTS
supports snap by
default
A minimal, secure, transactional Ubuntu designed for IoT
Ubuntu Core: Ubuntu optimised for IoT operations
● For production
● Optimised for security
● Small footprint < 256 Mb RAM
● Read only OS / Kernel
● White label appstore
● Contained apps
● Signed apps
● Over the Air updates
● For development
● Optimised for flexibility
● Large footprint
● Read / Write OS & Kernel
● Manual installs
● Un-contained apps
● Unsigned apps
● Manual updates
● Same code, reliability and frequent patches updates
● Same choice of library (Qt, IoT, Robotics, Computer Vision)
● Same packaging system and development environment
What is Ubuntu Core?
A minimal version with the same bits as today’s Ubuntu
Ubuntu Core with transactional updates
Applications confined by technologies lead by Canonical
Safe, reliable, worry free updates with tests and rollback
Amazing developer experience with snapcraft
Easily extensible
Easily create app stores for all your devices
OS IMAGE SIZE
Ubuntu Core
350 MB
829 MB
Ubuntu Server
Minimal footprint
Applications are provided as snaps!
● The snap format is a compressed filesystem with a single
metadata file describing the security profile and desired
integration of the snap.
● That format is shared by everyone in the snap community,
regardless of their choice of store, authentication systems,
licensing or host Linux distribution.
● Decisions taken now by a Technical Oversight Board that
represents a range of communities and companies.
● Easy packaging system, Package it once and be in control of
the version delivery and the software stack
Automatically confines applications
kernel
os
appapp
writable areawritable area
Snaps are confined
and isolated
app
writable area
app
writable area
Legacy Ubuntu Core
Kernel
Kernel
Confined applications packages
as a snap with dependencies
Minimal OS packaged as snap
Clearly defined Kernel and device packaged as snap
OS packageApplication
B
Shared library Device driverApplicatio
n A
Legend:
Modular and simple architecture
Transactional updates
Ubuntu Core apps and Ubuntu Core itself can be
upgraded atomically and rolled back if needed.
Delta change is applied when updating from
different versions. Snaps can be easily
uninstalled (by deleting the snap package)
A bulletproof approach that is perfect for
deployments where predictability and reliability
are paramount. It’s called “transactional” or
“image-based” systems management
Transactional updates: Apps, OS and kernel
Original data
Writable area
Original snap
Upgrade
Modified data
during upgrade
Writable area
Updated snap
Original data
Writable area
Original data is kept
on device
Original snap
Original data
Writable area
Original snap
Rollback
on failure
All Snap Architecture
In a snappy system, all software beyond the
bootloader is distributed as a snap in this
same format.
● The OS snap contains the core operating
system.
● The kernel snap contains the kernel and
hardware-specific drivers.
● The gadget snap is device specific and is
used to configure a particular model of
device.
Ubuntu Core
Kernel 4.4
Confined applications packages
as a snap with dependencies
Minimal OS packaged as snap
Clearly defined Kernel and device packaged as snap
snapcraft.io
Developers from multiple Linux distributions and companies collaborate
on the “snap” universal Linux package format, enabling a single binary
package to work perfectly and securely on any Linux desktop, server,
cloud or device.
Snapcraft lets developers assemble their snap from existing
projects, leveraging different technologies.
Developer tools: Snapcraft
Project A Project B Project C ...
Snapcraft
pull
● Snapcraft supports several technologies through the
current plugins available.
● Snapcraft is extensible and new plugins to leverage existing
technologies can be developed.
● Java, Python, ROS, Go, Maven, QML, NodeJS, make,
kernel are just a few examples of the languages and
technologies that can be used.
● We can reuse deb packages from ubuntu
Developer tools: Snapcraft plugins
商城
build.snapcraft.io
Create an
update
Auto build
and publish
Auto update
and rollback
An app store for new software revenue
A store to manage your devices and updates
Provides identity and update mechanisms for
● Devices
● Software
● Users
$600 drone
(hardware)
Security. Updates. Monetization.
Long Term Support.
Secure revenue generating devices
Case Study
Build your IoT device with Ubuntu & Canonical
i.MX6
Samsung
ARTIK
Qualcomm
DragonBoard
Intel NUC
Intel Joule Raspberry Pi 2/3
Find out more at:
https://developer.ubuntu.com/
Dell Edge Gateway
基于 Ubuntu 的 Dell IOT 智能网关,适合工
业与自动化用途
● 快速成长的 ISV 生态系统
● 同一个硬件提供不同领域的应用场景
● NEXIONA - 建筑物管理
● Technosec+DeOl - 智能工厂
● AZLOGICA - 农业
● Azeti - 设备维运
SnapRoute
SnapRoute 是 2016/06 创立的网路新
创,产品叫做 Flex Switch,提供一个微
服务架构的新型 Switch 控制方案
● 透过 Canonical’s MAAS (‘Metal as
a Service’),轻易从无到有将
Ubuntu 部属到 Switch 硬件上
● 透过 Snap 分发 FlexSwitch 到
Ubuntu 操作平台。
● 支援 Facebook Wedge 100 等白
牌 Switch
Screenly - Digital signage meets IoT & AI
第一个基于 Raspberry Pi 的数字标牌方案。
从 Debian 转移到 Ubuntu Core 操作系统作
為商用方案。
● 超过十万基于 Raspberry Pi 的数字标
牌屏幕
● 超低成本,可以高度自订的 IoT 方
● 对用户与 Screenly 都是容易维运的方
案
http://www.huodongxing.com/event/2398109794800
联系方式
Rex Tsai
http://weibo.com/chihchun
rex.tsai@canonical.com
Ubuntu官方微信 黑客松微信群

如何在 Ubuntu 上更快、更便捷地部署物联网设备

  • 1.
    Snap Your IoTDevice on Ubuntu 在 Ubuntu 上更快、更便捷地部署物联网设备 Rex Tsai, Technical Architect 1 Sep 2017
  • 2.
    Canonical We are thecompany behind Ubuntu
  • 3.
    Canonical 总部位于英国,2004 年开始开发操作系统 关于Canonical FOUNDED EMPLOYEES COUNTRIES 2004 520+ 35+
  • 4.
  • 5.
    Ubuntu is the#1 Choice for Innovators 3 million + developers
  • 6.
  • 7.
    Ubuntu ranked as2nd most used IoT OS by Eclipse Foundation survey
  • 8.
    Ubuntu is poweringsmart IoT Smart drone controllers Advanced robotics Home gateways Industrial gateways Digital Signage
  • 9.
    ≠ Ease of development Certifiedplatforms Wealth of libraries Security Devops for IoT MonetizationDevelopment Deployment IOT Dev Deploy - prototype to production
  • 10.
    Difficulties of Buildinga Platform Business Security and OTA maintenance Devops for IoT Ecosystem building 1 2 3
  • 11.
    Snap - auniversal Linux package format Supported distros Example snaps / frameworks
  • 12.
  • 13.
    A minimal, secure,transactional Ubuntu designed for IoT
  • 14.
    Ubuntu Core: Ubuntuoptimised for IoT operations ● For production ● Optimised for security ● Small footprint < 256 Mb RAM ● Read only OS / Kernel ● White label appstore ● Contained apps ● Signed apps ● Over the Air updates ● For development ● Optimised for flexibility ● Large footprint ● Read / Write OS & Kernel ● Manual installs ● Un-contained apps ● Unsigned apps ● Manual updates ● Same code, reliability and frequent patches updates ● Same choice of library (Qt, IoT, Robotics, Computer Vision) ● Same packaging system and development environment
  • 15.
    What is UbuntuCore? A minimal version with the same bits as today’s Ubuntu Ubuntu Core with transactional updates Applications confined by technologies lead by Canonical Safe, reliable, worry free updates with tests and rollback Amazing developer experience with snapcraft Easily extensible Easily create app stores for all your devices
  • 16.
    OS IMAGE SIZE UbuntuCore 350 MB 829 MB Ubuntu Server Minimal footprint
  • 17.
    Applications are providedas snaps! ● The snap format is a compressed filesystem with a single metadata file describing the security profile and desired integration of the snap. ● That format is shared by everyone in the snap community, regardless of their choice of store, authentication systems, licensing or host Linux distribution. ● Decisions taken now by a Technical Oversight Board that represents a range of communities and companies. ● Easy packaging system, Package it once and be in control of the version delivery and the software stack
  • 18.
    Automatically confines applications kernel os appapp writableareawritable area Snaps are confined and isolated app writable area app writable area
  • 19.
    Legacy Ubuntu Core Kernel Kernel Confinedapplications packages as a snap with dependencies Minimal OS packaged as snap Clearly defined Kernel and device packaged as snap OS packageApplication B Shared library Device driverApplicatio n A Legend: Modular and simple architecture
  • 20.
    Transactional updates Ubuntu Coreapps and Ubuntu Core itself can be upgraded atomically and rolled back if needed. Delta change is applied when updating from different versions. Snaps can be easily uninstalled (by deleting the snap package) A bulletproof approach that is perfect for deployments where predictability and reliability are paramount. It’s called “transactional” or “image-based” systems management
  • 21.
    Transactional updates: Apps,OS and kernel Original data Writable area Original snap Upgrade Modified data during upgrade Writable area Updated snap Original data Writable area Original data is kept on device Original snap Original data Writable area Original snap Rollback on failure
  • 22.
    All Snap Architecture Ina snappy system, all software beyond the bootloader is distributed as a snap in this same format. ● The OS snap contains the core operating system. ● The kernel snap contains the kernel and hardware-specific drivers. ● The gadget snap is device specific and is used to configure a particular model of device. Ubuntu Core Kernel 4.4 Confined applications packages as a snap with dependencies Minimal OS packaged as snap Clearly defined Kernel and device packaged as snap
  • 23.
    snapcraft.io Developers from multipleLinux distributions and companies collaborate on the “snap” universal Linux package format, enabling a single binary package to work perfectly and securely on any Linux desktop, server, cloud or device.
  • 24.
    Snapcraft lets developersassemble their snap from existing projects, leveraging different technologies. Developer tools: Snapcraft Project A Project B Project C ...
  • 25.
    Snapcraft pull ● Snapcraft supportsseveral technologies through the current plugins available. ● Snapcraft is extensible and new plugins to leverage existing technologies can be developed. ● Java, Python, ROS, Go, Maven, QML, NodeJS, make, kernel are just a few examples of the languages and technologies that can be used. ● We can reuse deb packages from ubuntu Developer tools: Snapcraft plugins
  • 26.
  • 27.
  • 28.
    An app storefor new software revenue
  • 29.
    A store tomanage your devices and updates Provides identity and update mechanisms for ● Devices ● Software ● Users
  • 30.
    $600 drone (hardware) Security. Updates.Monetization. Long Term Support. Secure revenue generating devices
  • 31.
  • 32.
    Build your IoTdevice with Ubuntu & Canonical i.MX6 Samsung ARTIK Qualcomm DragonBoard Intel NUC Intel Joule Raspberry Pi 2/3 Find out more at: https://developer.ubuntu.com/
  • 33.
    Dell Edge Gateway 基于Ubuntu 的 Dell IOT 智能网关,适合工 业与自动化用途 ● 快速成长的 ISV 生态系统 ● 同一个硬件提供不同领域的应用场景 ● NEXIONA - 建筑物管理 ● Technosec+DeOl - 智能工厂 ● AZLOGICA - 农业 ● Azeti - 设备维运
  • 34.
    SnapRoute SnapRoute 是 2016/06创立的网路新 创,产品叫做 Flex Switch,提供一个微 服务架构的新型 Switch 控制方案 ● 透过 Canonical’s MAAS (‘Metal as a Service’),轻易从无到有将 Ubuntu 部属到 Switch 硬件上 ● 透过 Snap 分发 FlexSwitch 到 Ubuntu 操作平台。 ● 支援 Facebook Wedge 100 等白 牌 Switch
  • 35.
    Screenly - Digitalsignage meets IoT & AI 第一个基于 Raspberry Pi 的数字标牌方案。 从 Debian 转移到 Ubuntu Core 操作系统作 為商用方案。 ● 超过十万基于 Raspberry Pi 的数字标 牌屏幕 ● 超低成本,可以高度自订的 IoT 方 ● 对用户与 Screenly 都是容易维运的方 案
  • 36.
  • 37.