SlideShare a Scribd company logo
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
nicola.lagloria@kynetics.com
Enhance your embedded software
delivery pipeline with Eclipse hawkBit™
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Agenda
❯ About us
❯ Motivations behind our work on the delivery pipeline for
Android and Embedded Linux devices
❯ Manage remote software updates: Eclipse hawkBit
❯ Update Factory, Kynetics’ delivery platform powered by Eclipse
hawkBit
❯ Update Factory DDI Clients for Embedded OS
》 The Android way for managing updates
》 Update Factory Android Client: Service Client and UI Client
》 Embedded Linux Client: SWUpdate
❯ Conclusions
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
About us
❯ Kynetics provides full software stacks for the most popular
embedded application processors focussing in particular on NXP
SoCs.
❯ Kynetics has been working on embedded products, tailoring
Android and Embedded Linux operating systems and applications
for different industries.
❯ We embrace embedded development following the best practices
to create a repeatable, reliable process for releasing
software.
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Taking OS delivery to the next level
❯ Support customers during stage and production for their
medium scale general purpose SOC/SBC based products
❯ Enhance our development lifecycle by building and delivering
OS images upon specific code commits.
❯ Track updates and divide them per device type and use cases
❯ Device Metadata for
》 General device information (OS version, IP on local LAN, etc.)
》 Closing the loop: device “pull back” (sanity checks after deployment,
local target tests)
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Building and Delivery pipeline
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Eclipse hawkBit
The Eclipse Foundation has been very active in promoting numerous projects
for the IoT, in particular under the umbrella of the Eclipse IoT
community.
Eclipse IoT is an ecosystem of companies and individuals that are working
together to establish an Internet of Things based on open technologies.
https://iot.eclipse.org, https://eclipse.org/hawkbit/
One of the (many) projects is hawkBit “to create a domain independent back
end solution for rolling out software updates to constrained edge devices
connected to IP based networking infrastructure”
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
hawkBit in a nutshell
❯ Prepare the update file and upload it
❯ Create a Software Module and add an artifact to it
❯ Create a Distribution
❯ Rollout a distribution to targets
》 Manage rollout by groups
》 Group threshold for partial rollouts
❯ Set Target device metadata:
》 Attributes (i.e HW revision, custom)
》 Tags (for grouping purposes)
》 Others like: device description, what installed, logs, etc..
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
hawkBit overview
❯ User/Applications
》 UI
》 MGMT (API)
❯ Devices
》 DDI
(HTTP/REST/JSON)
》 DMF (AMQP)
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
hawkBit Architecture
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
High Availability
<<VM>>
RabbitMQ
<<Exchange>>
<<VM>> <<VM>> <<VM>>
hawkBit
Node 3
hawkBit
Node 2
hawkBit
Node 1
Caches CachesCaches
request
User action
Storage
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
❯ Update Factory is our OS image and application delivery
platform powered by Eclipse hawkBit™.
❯ Update Factory serves our software delivery pipeline during
development stages.
❯ Update Factory manages software rollout campaigns in
production.
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Update Factory Architecture
❯ Client Service on the embedded device
❯ Update Server featuring hawkBit™
❯ IAM Server (Custom)
❯ Artifact Repository (AWS S3)
❯ Metadata Repository (AWS RDS)
❯ High Availability
》 Clusters IAM and Update Server
》 RDS
》 S3
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Update Factory Target Device Clients
❯ Hawkbit DDI APIs allow to develop clients on the target device
❯ Client implements the server state machine and update
workflow.
❯ A first implementation on Linux Embedded is provided by
SWUpdate Suricata Daemon (GPL2)
❯ An Android complete implementation is provided by Kynetics
(EPL 1.0)
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Device Update: Approaches
❯ Double copy:
》 The devices features two copies
of the Application/OS/RootFS
》 Each copy must contain the
kernel, the root file system,
and each further component that
can be updated
》 Cooperation with the boot
loader is necessary to decide
which copy should be booted
❯ Single copy:
》 A single copy of the system is
present
》 An independent bootable system is
required to manage the update
》 Possible to update the Kernel if
the update environment is
segregated from the regular OS
》 Cooperation with the bootloader is
necessary to boot in update mode
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Double copy
Dual Boot Partition
Bootable system 1
ramdisk
rootfs
kernel
device tree
bootscript
Boot partition 1
rootfs partition 1
Bootable system 2
ramdisk
rootfs
kernel
device tree
bootscript
Boot partition 2
rootfs partition 2
bootloader
bootenv boot selection
Unpartitioned Space
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Double Copy: Pros and Cons
❯ Pros:
》 Fallback in case of failure
》 Pretty easy to implement
❯ Cons:
》 Expensive in terms of storage resources, double the space
》 Requires quite a mechanism to switch between the running and the other copy
if multiple partitions are doubled (e.g. boot, root, cache, etc.)
》 Identify which copy is running
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Single copy
bootloader
bootenv
Unpartitioned Space
ramdisk
kernel
device tree
bootscript
Boot partition
Independent
System
rootfs
rootfs partition
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Single Copy: Pros and Cons
❯ Pros:
》 Requires smaller amount of space
》 “Update mode” lives in RAM
》 Can freely access whole storage (rewrite from scratch, including partition
table)
》 Can be used for factory reset (i.e by accessing external storage)
❯ Cons:
》 No fallback if write fails (e.g. power interruption). Restart recovery mode
to try again
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Android approach to OTA updates
❯ Android uses the single copy approach
❯ Android approach splits the upgrade process in two phases:
》 preparation for the upgrade → performed in the full fledged Regular OS
》 execution of the upgrade → performed in a purpose built Recovery OS
❯ Execution performed by the recovery binary
❯ System is rebooted with the new OS
❯ Update system itself is eventually updated
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Android update: preparation
❯ Device update preparation flow:
》 Usually your phone registers to the manufacturer cloud
》 polls for available updates
》 notifies update is available (Download? Y/n)
》 notifies update is ready to install (Proceed? Y/n)
》 reboot to Recovery OS and apply the update...
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Android update: update execution
❯ Bootloader boots in ramdisk-based Recovery Mode
❯ recovery starts
❯ recovery unpacks the update file provided (signed zip)
❯ update-binary executes actions in the updater-script (edify)
❯ log and result files are written in the partition
❯ reboot to Regular OS
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Recovery Partition
Android update Workflow
Recovery OS
Regular OS
Recovery bin
Bootloader
Update bin
Update script
Reboot
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Android Update: advantages
❯ Single copy update featuring a recovery OS
❯ OTA agent runs in regular OS
》 No need to interrupt normal operation (yet)
》 Network access (e.g. Wifi setup by the user)
》 Interaction with the user (notifications / acknowledgment)
》 Full API access (Wifi or 3G/4G? Low battery?)
❯ Recovery has no need of network access, all artifacts are
pre-fetched
❯ Update script support binary writing (no mount is required)
❯ Recovery environment is RO, minimal, isolated
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Update Factory Android Android Client
uramdisk
kernel
device tree
bootscript
Boot partition
>> Android UF Service
>> Android UF Client App
kernel
device tree

Recovery Partition
Tenant = foo
Id = bar
Url = https://updatefactory.io"
uramdisk
cache partition
.zip



Other default partitions
SoC
Space non partitioned
bootloader
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Update Factory Android Client Resources:
❯ https://github.com/Kynetics/UfAndroidClient
❯ https://github.com/Kynetics/uf-ddiclient
❯ https://docs.updatefactory.io/devices/android/android-client-p
ackages/
❯ https://www.kynetics.com/docs/2018/uf_android_client/
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Update Factory OE Linux Client (OELC)
Update Factory Client for Open Embedded implements all of the
missing bits to have an Android-like OTA mechanism on an Embedded
Linux OS
❯ Device to cloud communication
❯ Bootloader coordination (boot OS selection)
❯ Recovery partition
❯ Recovery bootscript
❯ Recovery ramdisk
❯ Update installation feedback to the cloud
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Update Factory OELC featuring SWUpdate
❯ A good option for building in Linux, a recovery system
“Android Like” is by using SWUpdate as an agent:
》 Written in C by Stefano Babic (Denx) and contributors
》 Runs as Daemon or direct invocation
》 Update files (.swu) based on CPIO format
》 Several handlers (e.g. write raw data, write single file)
》 Signature and encryption
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
SWUpdate: Architecture
Notifier
Installer
Default
Parser
(.swu)
LUA Parser
Handler Manager
UBI MTD RAW ENV LUA
Local
Storage
Remote file
server
Web Server
Custom
protocol
MCU
hawkBit
START, RUN, SUCCESS, FAILURE, DOWLOAD, DONE
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
SWUpdate: update .swu file format
CPIO Header
sw-descriptor
Artifact (1)
Artifact (2)
Artifact (n)
software =
{
version = "0.1.0";
target = {
hardware-compatibility: [ "1.0"];
Images: (
{
filename = “rootfs.ext4.gz”;
device = /dev/mmcblk0p2”;
type = “raw”;
compressed = true;
}
);
scripts:(
{
filename = “installscript.sh”;
type = “schellscript”;
sha256 = “faaaa30c….”;
}
);
}
}
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Update Factory OELC: device to cloud
SWUpdate implements the suricatta daemon mode which polls the
remote update server, hawkBit.
Configuration file:
suricatta :
{
tenant = "AcmeCorp";
id = "device-beep";
url = "https://stage.updatefactory.io";
artifactsstorage = "/recovery/updates";
};
isolated set of data
and configuration
unique device identifier
baseurl for request
URL generation
new option to download
update files (no install)
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Update Factory: Linux Update Anatomy
Bootloader
bootenv boot_mode
Space non partitioned
ramdisk
kernel
device tree
bootscript
Boot partition
rootfs partition
ramdisk
kernel
device tree
bootscript

Recovery Partition
.swu
cache partition
surricata =
{
Tenant = “foo”;
Id = “bar”;
Url = "
https://stage.updatefactory.io";
};
Regular OS Recovery OS
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Update Factory OE Linux Client Resources:
❯ https://github.com/Kynetics/meta-updatefactory
❯ https://docs.updatefactory.io/devices/linux/update-files/
❯ https://sbabic.github.io/swupdate
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Conclusions
❯ We needed a building block for our delivery pipeline.
❯ hawkBit is architected and designed with proven technologies
and frameworks.
❯ hawkBit’s deployment model uses docker containers for its
evaluation. Easy to evaluate.
❯ Kynetics built Update Factory as its delivery platform on top
of hawkBit update server.
❯ We provide an Android client implementation upon DDI APIs.
❯ We provide a Linux client based on SWUpdate which embraces the
Android update philosophy.
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Other Links
❯ https://www.kynetics.com/update-factory
❯ https://docs.updatefactory.io/
❯ http://warpx.io/blog/tutorial/easy-os-upgrades-swupdate
❯ https://eclipse.org/hawkbit/
This presentation: https://www.slideshare.net/kynetics/
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Thanks:
Diego Rondini, Andrea Zoleo, Will Martindale,
Daniele Sergio, Roberto Sartori, Eric Nelson,
Gary Bisson (Boundary Devices), Gabriel Huau
(witekio), Benjamin Cabe’ and Roxanne Joncas
from the Eclipse Foundation.
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Contacts:
USA
Kynetics LLC
2040 Martin Ave, Santa Clara CA 95050
Ph: +1 (408) 475 7760
Italy
Kynetics Srl
Via G. Longhin 23, Padova (PD) 35129
Ph: +39 (049) 781 1091
info@kynetics.com | www.kynetics.com
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Thanks!
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Security
❯ SWUpdate combines signed sw-description with the verification
of hashes for each single image.
》 RSA PKCS#1 (public/private)
》 CMS PKCS#7 (certificates)
❯ This means that only signed sw-description, generated by a
verified source, can be trusted by the installer.
》 sw-description.sig
》 Public.pem or public.key can be passed to SWUpdate daemon (on the device)
❯ sw-description contains hashes for each sub-image to verify
that each delivered subimage really belongs to the release.
》 Each image inside sw-description must have the attribute “sha256”
Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara
Android Device Deployment
Space non partitioned
uramdisk
kernel
device tree
bootscript
Boot partition
kernel
device tree

Recovery Partition
uramdisk
cache partition
.zip



Other default partitions
SoC
bootloader

More Related Content

PDF
Eclipsecon 2017 presentation
PPTX
Docker EE 2.0 Choice, Security & Agility
PPTX
DevOps at FSOFT as BOI | Nguyễn Hoài Nam, Vũ Xuân Lộc
PPTX
Neo4J with Docker and Azure - GraphConnect 2015
PPTX
Kubernetes in Higher Education
PDF
Building a Secure and Resilient Foundation for Banking at Intesa Sanpaolo wit...
PDF
Docker Birthday #5 Meetup Cluj - Presentation
PPTX
Using Open Source and Open Standards in the Platform game
Eclipsecon 2017 presentation
Docker EE 2.0 Choice, Security & Agility
DevOps at FSOFT as BOI | Nguyễn Hoài Nam, Vũ Xuân Lộc
Neo4J with Docker and Azure - GraphConnect 2015
Kubernetes in Higher Education
Building a Secure and Resilient Foundation for Banking at Intesa Sanpaolo wit...
Docker Birthday #5 Meetup Cluj - Presentation
Using Open Source and Open Standards in the Platform game

What's hot (20)

PPTX
Container as a Service with Docker
PPTX
Opening words at DockerCon Europe by Ben Golub
PDF
Docker Birthday #3 Slides - Overview
PPTX
DockerCon EU 2015: Sparebank; a journey towards Docker
PPTX
ASI202 Everything you want to know about Windows Azure but were afraid to ask
PDF
Bringing Docker to the Cloud
PDF
What's New in Docker
PDF
Webinar: Code Faster on Kubernetes
PDF
Implementing Microservices with Jakarta EE and MicroProfile
PPTX
Codecamp 2020 microservices made easy workshop
PDF
Enabling NFV features in kubernetes
PDF
Platform for a Connected World
PPTX
App catalog (Vancouver)
PPTX
DockerCon 16 General Session Day 2
PDF
DevOps Indonesia #5 - The Future of Containers
PPT
TransitioningToMicroServonDocker_MS
PPTX
Docker Container As A Service - March 2016
PPTX
Weave User Group Talk - DockerCon 2017 Recap
PPTX
Accelerating the Next 10,000 Clouds by Michael Kadera, Intel
PPTX
GWT – The Java Advantage
Container as a Service with Docker
Opening words at DockerCon Europe by Ben Golub
Docker Birthday #3 Slides - Overview
DockerCon EU 2015: Sparebank; a journey towards Docker
ASI202 Everything you want to know about Windows Azure but were afraid to ask
Bringing Docker to the Cloud
What's New in Docker
Webinar: Code Faster on Kubernetes
Implementing Microservices with Jakarta EE and MicroProfile
Codecamp 2020 microservices made easy workshop
Enabling NFV features in kubernetes
Platform for a Connected World
App catalog (Vancouver)
DockerCon 16 General Session Day 2
DevOps Indonesia #5 - The Future of Containers
TransitioningToMicroServonDocker_MS
Docker Container As A Service - March 2016
Weave User Group Talk - DockerCon 2017 Recap
Accelerating the Next 10,000 Clouds by Michael Kadera, Intel
GWT – The Java Advantage
Ad

Similar to Eclipse Iot Day 2018 Presentation (20)

PDF
Linaro Connect 2017 - Presentation - Kynetics
PDF
Software update for IoT Embedded World 2017
PDF
Software update for IoT: the current state of play
PDF
ELC2019 - Poster - Update Anything
PDF
Software Updates for Connected Devices - OSCON 2018
PDF
The ultimate guide to software updates on embedded linux devices
PDF
Orchestrated Android-Style System Upgrades for Embedded Linux
PDF
Orchestrated Android-Style System Upgrades for Embedded Linux
PDF
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
 
PPTX
IoT Developer Survey 2017
PDF
Evolution of ota_update_in_the_io_t_world
PDF
IoT Developer Survey 2015
PPTX
IoT Developer Survey 2015
PDF
Update Strategies for the Edge, by Kat Cosgrove
PDF
The Crucial Component of IoT Products by Aravinth Panchadcharam [ Senior Embe...
PDF
Atmosphere 2016 - Arvid Picciani - Continuous Deployment for Massive Scale Em...
PDF
Sw update elce2017
PDF
Software update for embedded systems - elce2014
PDF
IoT Developer Survey 2016
PDF
2019.02 Eclipse Foundation and Eclipse IoT presentation at Eclipse IoT Day Gr...
Linaro Connect 2017 - Presentation - Kynetics
Software update for IoT Embedded World 2017
Software update for IoT: the current state of play
ELC2019 - Poster - Update Anything
Software Updates for Connected Devices - OSCON 2018
The ultimate guide to software updates on embedded linux devices
Orchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded Linux
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
 
IoT Developer Survey 2017
Evolution of ota_update_in_the_io_t_world
IoT Developer Survey 2015
IoT Developer Survey 2015
Update Strategies for the Edge, by Kat Cosgrove
The Crucial Component of IoT Products by Aravinth Panchadcharam [ Senior Embe...
Atmosphere 2016 - Arvid Picciani - Continuous Deployment for Massive Scale Em...
Sw update elce2017
Software update for embedded systems - elce2014
IoT Developer Survey 2016
2019.02 Eclipse Foundation and Eclipse IoT presentation at Eclipse IoT Day Gr...
Ad

More from Kynetics (8)

PDF
Can we adopt Eclipse IoT projects on Android Embedded Devices_.pdf
PDF
Eclipse Hara, Updating Embedded Devices with hawkBit Made Easy
PDF
Deploy Eclipse hawBit in Production
PDF
Heterogeneous multiprocessing on androd and i.mx7
PDF
AMP Kynetics - ELC 2018 Portland
PDF
Using Java on Wearable Devices featuring an Hybrid Architecture.
PDF
Deploy Small IoT Embedded SOC Devices and a Back-End Platform with Java, usin...
PDF
Reactive IoT, Java One 2016
Can we adopt Eclipse IoT projects on Android Embedded Devices_.pdf
Eclipse Hara, Updating Embedded Devices with hawkBit Made Easy
Deploy Eclipse hawBit in Production
Heterogeneous multiprocessing on androd and i.mx7
AMP Kynetics - ELC 2018 Portland
Using Java on Wearable Devices featuring an Hybrid Architecture.
Deploy Small IoT Embedded SOC Devices and a Back-End Platform with Java, usin...
Reactive IoT, Java One 2016

Recently uploaded (20)

PPTX
UNIT 4 Total Quality Management .pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
DOCX
573137875-Attendance-Management-System-original
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
Sustainable Sites - Green Building Construction
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
PPT on Performance Review to get promotions
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Artificial Intelligence
PPTX
Construction Project Organization Group 2.pptx
UNIT 4 Total Quality Management .pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Fundamentals of safety and accident prevention -final (1).pptx
573137875-Attendance-Management-System-original
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
Geodesy 1.pptx...............................................
Sustainable Sites - Green Building Construction
CYBER-CRIMES AND SECURITY A guide to understanding
Safety Seminar civil to be ensured for safe working.
PPT on Performance Review to get promotions
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
III.4.1.2_The_Space_Environment.p pdffdf
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
A SYSTEMATIC REVIEW OF APPLICATIONS IN FRAUD DETECTION
R24 SURVEYING LAB MANUAL for civil enggi
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Artificial Intelligence
Construction Project Organization Group 2.pptx

Eclipse Iot Day 2018 Presentation

  • 1. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara nicola.lagloria@kynetics.com Enhance your embedded software delivery pipeline with Eclipse hawkBit™
  • 2. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Agenda ❯ About us ❯ Motivations behind our work on the delivery pipeline for Android and Embedded Linux devices ❯ Manage remote software updates: Eclipse hawkBit ❯ Update Factory, Kynetics’ delivery platform powered by Eclipse hawkBit ❯ Update Factory DDI Clients for Embedded OS 》 The Android way for managing updates 》 Update Factory Android Client: Service Client and UI Client 》 Embedded Linux Client: SWUpdate ❯ Conclusions
  • 3. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara About us ❯ Kynetics provides full software stacks for the most popular embedded application processors focussing in particular on NXP SoCs. ❯ Kynetics has been working on embedded products, tailoring Android and Embedded Linux operating systems and applications for different industries. ❯ We embrace embedded development following the best practices to create a repeatable, reliable process for releasing software.
  • 4. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Taking OS delivery to the next level ❯ Support customers during stage and production for their medium scale general purpose SOC/SBC based products ❯ Enhance our development lifecycle by building and delivering OS images upon specific code commits. ❯ Track updates and divide them per device type and use cases ❯ Device Metadata for 》 General device information (OS version, IP on local LAN, etc.) 》 Closing the loop: device “pull back” (sanity checks after deployment, local target tests)
  • 5. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Building and Delivery pipeline
  • 6. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Eclipse hawkBit The Eclipse Foundation has been very active in promoting numerous projects for the IoT, in particular under the umbrella of the Eclipse IoT community. Eclipse IoT is an ecosystem of companies and individuals that are working together to establish an Internet of Things based on open technologies. https://iot.eclipse.org, https://eclipse.org/hawkbit/ One of the (many) projects is hawkBit “to create a domain independent back end solution for rolling out software updates to constrained edge devices connected to IP based networking infrastructure”
  • 7. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara hawkBit in a nutshell ❯ Prepare the update file and upload it ❯ Create a Software Module and add an artifact to it ❯ Create a Distribution ❯ Rollout a distribution to targets 》 Manage rollout by groups 》 Group threshold for partial rollouts ❯ Set Target device metadata: 》 Attributes (i.e HW revision, custom) 》 Tags (for grouping purposes) 》 Others like: device description, what installed, logs, etc..
  • 8. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara hawkBit overview ❯ User/Applications 》 UI 》 MGMT (API) ❯ Devices 》 DDI (HTTP/REST/JSON) 》 DMF (AMQP)
  • 9. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara hawkBit Architecture
  • 10. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara High Availability <<VM>> RabbitMQ <<Exchange>> <<VM>> <<VM>> <<VM>> hawkBit Node 3 hawkBit Node 2 hawkBit Node 1 Caches CachesCaches request User action Storage
  • 11. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara ❯ Update Factory is our OS image and application delivery platform powered by Eclipse hawkBit™. ❯ Update Factory serves our software delivery pipeline during development stages. ❯ Update Factory manages software rollout campaigns in production.
  • 12. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Update Factory Architecture ❯ Client Service on the embedded device ❯ Update Server featuring hawkBit™ ❯ IAM Server (Custom) ❯ Artifact Repository (AWS S3) ❯ Metadata Repository (AWS RDS) ❯ High Availability 》 Clusters IAM and Update Server 》 RDS 》 S3
  • 13. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Update Factory Target Device Clients ❯ Hawkbit DDI APIs allow to develop clients on the target device ❯ Client implements the server state machine and update workflow. ❯ A first implementation on Linux Embedded is provided by SWUpdate Suricata Daemon (GPL2) ❯ An Android complete implementation is provided by Kynetics (EPL 1.0)
  • 14. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Device Update: Approaches ❯ Double copy: 》 The devices features two copies of the Application/OS/RootFS 》 Each copy must contain the kernel, the root file system, and each further component that can be updated 》 Cooperation with the boot loader is necessary to decide which copy should be booted ❯ Single copy: 》 A single copy of the system is present 》 An independent bootable system is required to manage the update 》 Possible to update the Kernel if the update environment is segregated from the regular OS 》 Cooperation with the bootloader is necessary to boot in update mode
  • 15. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Double copy Dual Boot Partition Bootable system 1 ramdisk rootfs kernel device tree bootscript Boot partition 1 rootfs partition 1 Bootable system 2 ramdisk rootfs kernel device tree bootscript Boot partition 2 rootfs partition 2 bootloader bootenv boot selection Unpartitioned Space
  • 16. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Double Copy: Pros and Cons ❯ Pros: 》 Fallback in case of failure 》 Pretty easy to implement ❯ Cons: 》 Expensive in terms of storage resources, double the space 》 Requires quite a mechanism to switch between the running and the other copy if multiple partitions are doubled (e.g. boot, root, cache, etc.) 》 Identify which copy is running
  • 17. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Single copy bootloader bootenv Unpartitioned Space ramdisk kernel device tree bootscript Boot partition Independent System rootfs rootfs partition
  • 18. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Single Copy: Pros and Cons ❯ Pros: 》 Requires smaller amount of space 》 “Update mode” lives in RAM 》 Can freely access whole storage (rewrite from scratch, including partition table) 》 Can be used for factory reset (i.e by accessing external storage) ❯ Cons: 》 No fallback if write fails (e.g. power interruption). Restart recovery mode to try again
  • 19. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Android approach to OTA updates ❯ Android uses the single copy approach ❯ Android approach splits the upgrade process in two phases: 》 preparation for the upgrade → performed in the full fledged Regular OS 》 execution of the upgrade → performed in a purpose built Recovery OS ❯ Execution performed by the recovery binary ❯ System is rebooted with the new OS ❯ Update system itself is eventually updated
  • 20. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Android update: preparation ❯ Device update preparation flow: 》 Usually your phone registers to the manufacturer cloud 》 polls for available updates 》 notifies update is available (Download? Y/n) 》 notifies update is ready to install (Proceed? Y/n) 》 reboot to Recovery OS and apply the update...
  • 21. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Android update: update execution ❯ Bootloader boots in ramdisk-based Recovery Mode ❯ recovery starts ❯ recovery unpacks the update file provided (signed zip) ❯ update-binary executes actions in the updater-script (edify) ❯ log and result files are written in the partition ❯ reboot to Regular OS
  • 22. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Recovery Partition Android update Workflow Recovery OS Regular OS Recovery bin Bootloader Update bin Update script Reboot
  • 23. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Android Update: advantages ❯ Single copy update featuring a recovery OS ❯ OTA agent runs in regular OS 》 No need to interrupt normal operation (yet) 》 Network access (e.g. Wifi setup by the user) 》 Interaction with the user (notifications / acknowledgment) 》 Full API access (Wifi or 3G/4G? Low battery?) ❯ Recovery has no need of network access, all artifacts are pre-fetched ❯ Update script support binary writing (no mount is required) ❯ Recovery environment is RO, minimal, isolated
  • 24. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Update Factory Android Android Client uramdisk kernel device tree bootscript Boot partition >> Android UF Service >> Android UF Client App kernel device tree Recovery Partition Tenant = foo Id = bar Url = https://updatefactory.io" uramdisk cache partition .zip Other default partitions SoC Space non partitioned bootloader
  • 25. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Update Factory Android Client Resources: ❯ https://github.com/Kynetics/UfAndroidClient ❯ https://github.com/Kynetics/uf-ddiclient ❯ https://docs.updatefactory.io/devices/android/android-client-p ackages/ ❯ https://www.kynetics.com/docs/2018/uf_android_client/
  • 26. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Update Factory OE Linux Client (OELC) Update Factory Client for Open Embedded implements all of the missing bits to have an Android-like OTA mechanism on an Embedded Linux OS ❯ Device to cloud communication ❯ Bootloader coordination (boot OS selection) ❯ Recovery partition ❯ Recovery bootscript ❯ Recovery ramdisk ❯ Update installation feedback to the cloud
  • 27. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Update Factory OELC featuring SWUpdate ❯ A good option for building in Linux, a recovery system “Android Like” is by using SWUpdate as an agent: 》 Written in C by Stefano Babic (Denx) and contributors 》 Runs as Daemon or direct invocation 》 Update files (.swu) based on CPIO format 》 Several handlers (e.g. write raw data, write single file) 》 Signature and encryption
  • 28. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara SWUpdate: Architecture Notifier Installer Default Parser (.swu) LUA Parser Handler Manager UBI MTD RAW ENV LUA Local Storage Remote file server Web Server Custom protocol MCU hawkBit START, RUN, SUCCESS, FAILURE, DOWLOAD, DONE
  • 29. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara SWUpdate: update .swu file format CPIO Header sw-descriptor Artifact (1) Artifact (2) Artifact (n) software = { version = "0.1.0"; target = { hardware-compatibility: [ "1.0"]; Images: ( { filename = “rootfs.ext4.gz”; device = /dev/mmcblk0p2”; type = “raw”; compressed = true; } ); scripts:( { filename = “installscript.sh”; type = “schellscript”; sha256 = “faaaa30c….”; } ); } }
  • 30. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Update Factory OELC: device to cloud SWUpdate implements the suricatta daemon mode which polls the remote update server, hawkBit. Configuration file: suricatta : { tenant = "AcmeCorp"; id = "device-beep"; url = "https://stage.updatefactory.io"; artifactsstorage = "/recovery/updates"; }; isolated set of data and configuration unique device identifier baseurl for request URL generation new option to download update files (no install)
  • 31. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Update Factory: Linux Update Anatomy Bootloader bootenv boot_mode Space non partitioned ramdisk kernel device tree bootscript Boot partition rootfs partition ramdisk kernel device tree bootscript Recovery Partition .swu cache partition surricata = { Tenant = “foo”; Id = “bar”; Url = " https://stage.updatefactory.io"; }; Regular OS Recovery OS
  • 32. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Update Factory OE Linux Client Resources: ❯ https://github.com/Kynetics/meta-updatefactory ❯ https://docs.updatefactory.io/devices/linux/update-files/ ❯ https://sbabic.github.io/swupdate
  • 33. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Conclusions ❯ We needed a building block for our delivery pipeline. ❯ hawkBit is architected and designed with proven technologies and frameworks. ❯ hawkBit’s deployment model uses docker containers for its evaluation. Easy to evaluate. ❯ Kynetics built Update Factory as its delivery platform on top of hawkBit update server. ❯ We provide an Android client implementation upon DDI APIs. ❯ We provide a Linux client based on SWUpdate which embraces the Android update philosophy.
  • 34. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Other Links ❯ https://www.kynetics.com/update-factory ❯ https://docs.updatefactory.io/ ❯ http://warpx.io/blog/tutorial/easy-os-upgrades-swupdate ❯ https://eclipse.org/hawkbit/ This presentation: https://www.slideshare.net/kynetics/
  • 35. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Thanks: Diego Rondini, Andrea Zoleo, Will Martindale, Daniele Sergio, Roberto Sartori, Eric Nelson, Gary Bisson (Boundary Devices), Gabriel Huau (witekio), Benjamin Cabe’ and Roxanne Joncas from the Eclipse Foundation.
  • 36. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Contacts: USA Kynetics LLC 2040 Martin Ave, Santa Clara CA 95050 Ph: +1 (408) 475 7760 Italy Kynetics Srl Via G. Longhin 23, Padova (PD) 35129 Ph: +39 (049) 781 1091 info@kynetics.com | www.kynetics.com
  • 37. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Thanks!
  • 38. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Security ❯ SWUpdate combines signed sw-description with the verification of hashes for each single image. 》 RSA PKCS#1 (public/private) 》 CMS PKCS#7 (certificates) ❯ This means that only signed sw-description, generated by a verified source, can be trusted by the installer. 》 sw-description.sig 》 Public.pem or public.key can be passed to SWUpdate daemon (on the device) ❯ sw-description contains hashes for each sub-image to verify that each delivered subimage really belongs to the release. 》 Each image inside sw-description must have the attribute “sha256”
  • 39. Nicola La Gloria, www.kynetics.com2018 Eclipse IoT Day, Santa Clara Android Device Deployment Space non partitioned uramdisk kernel device tree bootscript Boot partition kernel device tree Recovery Partition uramdisk cache partition .zip Other default partitions SoC bootloader