SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Everything you wanted
to know about
resinHUP*
*but were afraid to ask
Basics
resinHUP = RESIN Host os UPdater
OS System Layout
Operating System
Image A Image B
Balena / Docker
Image C ...
System Layout
Image A Image B
Root BRoot A
Boot
User Data
Super...
Update images
resinHUP
through the
ages
1.x ➞ 1.x updates
2 main software component:
● Update script
○ Shell script
● Dockerized HUP
○ Written in Python
○ Architecture-specific images
1.x ➞ 1.x updates
● Stop supervisor & user application
● Update supervisor
● Pull Updater; Run container
○ Run file system checks
○ Pull resinOS image
○ Extract onto secondary partition
○ Switch boot order
● Post fix: rce/docker migration,...
1.x ➞ 1.x updates schematic
Image A Image B
Root BRoot A
Boot
User Data
Super...
1.x ➞ 1.x updates notes
Can update:
● Earliest 1.0.0-pre ➞
1.26.0/1.30.1
● Supported device types:
○ Raspberry Pi 1/2/3
○ BeagleBone
○ Intel NUC
○ ARTIK5
1.x ➞ 2.x updates considerations
Lots of differences between 1.x/2.x
Update-relevant changes:
● Partition layout / size
● State partition
● File system labels
● BTRFS ➞ Ext4 file system
● Docker storage driver change
1.x ➞ 2.x updates process
● Stop supervisor & user application
● Backup /data (user data)
● Move partitions
● Pull OS image
● Resize Root A / recreate Root B
● Export root and boot content
● Reformat data part, restore /data
aka. “the juggle”...
1.x ➞ 2.x updates schematics
Root BRoot A
Boot
User Data
1.x ➞ 2.x updates
● Updater is a shell script
○ Lightweight
○ If any issue, easy to pick up
from an intermediate state
● Update logs are transient (/tmp)
● Quite slow (`docker export | gz`)
● OS needs to do more work on reboot
● 1.8.0-1.30.1 ➞ 2.2.0-2.4.2
2.x ➞ 2.x updates (v1)
● Updater is a shell script
● Logic similar to 1.x➞1.x updates
○ Stop supervisor & user app
○ Pull resinOS image
○ Export to secondary root
○ Update supervisor
○ Switch boot
○ Reboot
2.x ➞ 2.x updates (v2) - hostapp-update
● Devices boot directly into a
resinOS container (mobynit)
● Root is within the container
● Two root partitions accessible:
○ sysroot/active; sysroot/inactive
● Secondary Balena(Docker):
○ balena-host (docker-host)
● OS update: ~ a “balena pull”
2.x ➞ 2.x updates (v2) - hostapp-update
Image A Image B Image C
inactiveactive
Boot
User Data
Super
2.x ➞ 2.x updates (v2) - hostapp-update
● No need to shut down supervisor &
user application anymore
● Balena deltas for OS updates
● Can create new OS versions by
Dockerfile and `hostapp-update`
● Update hooks do /boot or firmware
changes (with rollback on error)
● 2.5.0 ➞ current
2.x ➞ 2.x updates (v1➞v2)
● Manually set up “balena-host”
● Pull resinOS image
● Export image
● Run resinOS image (update run in
hostapp system)
● Import image to be able to use
hostapp-update within
… aka “the return of the juggle”
From beginning to end
From 1.0.0-pre / 0.0.10 (~2015)
to 2.12.6+rev1 / 7.4.3 (~1 week ago)
● Total time ~2h
● ~4-5 reboots
Running a HUP
Self-service:
● Triggering through the Proxy’s
action server
● Backend logs into device
● Runs the updater script
Manual:
● Log into the device and run script
To The Future
hostapp-updates with custom image
FROM resin/resinos:2.12.6_rev1-intel-nuc
RUN echo "Kilroy was here" > /tagged
Then
$ docker build . -t imrehg/resinos-mod:kilroy
$ docker push imrehg/resinos-mod:kilroy
On the device:
# hostapp-update -i imrehg/resinos-mod:kilroy -r
Device support
Aiming to support all device types
on hostapp-enabled resinOS versions.
For 1.x➞2.x updates we might might
the range of currently supported
versions (Pi, BBB, NUC)
1.x->1.x updates probably won’t be
expanded further
Further Goals
● Easy management of host OS
variants/modifications
● The host being able to update
itself (just as supervisor is
capable to self-update with the
`update-resin-supervisor` service
● Delta updates all around
ResinOS in a container
The same image that used for updates
can now be run as a full-fleded
system:
resin-os/resinos-in-container
(Github)
Host OS updates:
● Run new image w/ existing volumes
OS update
successful,
rebooting...
Addendum
resinHUP repo: https://github.com/resin-os/resinhup
Docs: Update Process ; Self-service Updates
resinOS images: https://hub.docker.com/r/resin/resinos/tags/

Weitere ähnliche Inhalte

Was ist angesagt?

Full system roll-back and systemd in SUSE Linux Enterprise 12
Full system roll-back and systemd in SUSE Linux Enterprise 12Full system roll-back and systemd in SUSE Linux Enterprise 12
Full system roll-back and systemd in SUSE Linux Enterprise 12Gábor Nyers
 
pkgsrc 2013 - the record of the past year
pkgsrc 2013 - the record of the past yearpkgsrc 2013 - the record of the past year
pkgsrc 2013 - the record of the past yearAkio OBATA
 
From printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debuggingFrom printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debuggingThe Linux Foundation
 
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !Pierre-jean Texier
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisAnne Nicolas
 
OpenWrt From Top to Bottom
OpenWrt From Top to BottomOpenWrt From Top to Bottom
OpenWrt From Top to BottomKernel TLV
 
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps ItaliaWhen Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps ItaliaGiovanni Toraldo
 
Kernel Recipes 2015: Kernel packet capture technologies
Kernel Recipes 2015: Kernel packet capture technologiesKernel Recipes 2015: Kernel packet capture technologies
Kernel Recipes 2015: Kernel packet capture technologiesAnne Nicolas
 
Upgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaeseUpgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaeseGratien D'haese
 
Locally run a FIWARE Lab Instance In another Hypervisors
Locally run a FIWARE Lab Instance In another HypervisorsLocally run a FIWARE Lab Instance In another Hypervisors
Locally run a FIWARE Lab Instance In another HypervisorsJosé Ignacio Carretero Guarde
 
Jagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchJagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchlinuxlab_conf
 
RunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edgeRunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edgeStefano Stabellini
 
Linux Kernel Platform Development: Challenges and Insights
 Linux Kernel Platform Development: Challenges and Insights Linux Kernel Platform Development: Challenges and Insights
Linux Kernel Platform Development: Challenges and InsightsGlobalLogic Ukraine
 
Automotive Grade Linux and systemd
Automotive Grade Linux and systemdAutomotive Grade Linux and systemd
Automotive Grade Linux and systemdAlison Chaiken
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageKernel TLV
 

Was ist angesagt? (20)

Full system roll-back and systemd in SUSE Linux Enterprise 12
Full system roll-back and systemd in SUSE Linux Enterprise 12Full system roll-back and systemd in SUSE Linux Enterprise 12
Full system roll-back and systemd in SUSE Linux Enterprise 12
 
pkgsrc 2013 - the record of the past year
pkgsrc 2013 - the record of the past yearpkgsrc 2013 - the record of the past year
pkgsrc 2013 - the record of the past year
 
From printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debuggingFrom printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debugging
 
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysis
 
OpenWrt From Top to Bottom
OpenWrt From Top to BottomOpenWrt From Top to Bottom
OpenWrt From Top to Bottom
 
Linux Kernel Debugging
Linux Kernel DebuggingLinux Kernel Debugging
Linux Kernel Debugging
 
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps ItaliaWhen Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
 
Docker / Ansible
Docker / AnsibleDocker / Ansible
Docker / Ansible
 
Systemd cheatsheet
Systemd cheatsheetSystemd cheatsheet
Systemd cheatsheet
 
Kernel Recipes 2015: Kernel packet capture technologies
Kernel Recipes 2015: Kernel packet capture technologiesKernel Recipes 2015: Kernel packet capture technologies
Kernel Recipes 2015: Kernel packet capture technologies
 
First steps on CentOs7
First steps on CentOs7First steps on CentOs7
First steps on CentOs7
 
Upgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaeseUpgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaese
 
Locally run a FIWARE Lab Instance In another Hypervisors
Locally run a FIWARE Lab Instance In another HypervisorsLocally run a FIWARE Lab Instance In another Hypervisors
Locally run a FIWARE Lab Instance In another Hypervisors
 
From zero to Docker
From zero to DockerFrom zero to Docker
From zero to Docker
 
Jagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchJagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratch
 
RunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edgeRunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edge
 
Linux Kernel Platform Development: Challenges and Insights
 Linux Kernel Platform Development: Challenges and Insights Linux Kernel Platform Development: Challenges and Insights
Linux Kernel Platform Development: Challenges and Insights
 
Automotive Grade Linux and systemd
Automotive Grade Linux and systemdAutomotive Grade Linux and systemd
Automotive Grade Linux and systemd
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast Storage
 

Ähnlich wie Everything you wanted to know about resin hup

Evolution of ota_update_in_the_io_t_world
Evolution of ota_update_in_the_io_t_worldEvolution of ota_update_in_the_io_t_world
Evolution of ota_update_in_the_io_t_worldStefano Babic
 
Docker SQL Continuous Integration Flow
Docker SQL Continuous Integration FlowDocker SQL Continuous Integration Flow
Docker SQL Continuous Integration FlowAndrii Podanenko
 
Creating new Tizen profiles using the Yocto Project
Creating new Tizen profiles  using the Yocto ProjectCreating new Tizen profiles  using the Yocto Project
Creating new Tizen profiles using the Yocto ProjectLeon Anavi
 
Scale Big With Docker — Moboom 2014
Scale Big With Docker — Moboom 2014Scale Big With Docker — Moboom 2014
Scale Big With Docker — Moboom 2014Jérôme Petazzoni
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tipsSamuel Chow
 
OpenNebulaConf 2014 - CentOS, QA and OpenNebula - Christoph Galuschka
OpenNebulaConf 2014 - CentOS, QA and OpenNebula - Christoph GaluschkaOpenNebulaConf 2014 - CentOS, QA and OpenNebula - Christoph Galuschka
OpenNebulaConf 2014 - CentOS, QA and OpenNebula - Christoph GaluschkaOpenNebula Project
 
Infrastructure = Code
Infrastructure = CodeInfrastructure = Code
Infrastructure = CodeGeorg Sorst
 
LinuxKit Deep Dive
LinuxKit Deep DiveLinuxKit Deep Dive
LinuxKit Deep DiveDocker, Inc.
 
Master Docker - first meetup
Master Docker - first meetupMaster Docker - first meetup
Master Docker - first meetupAyoub Benaissa
 
Docker4Drupal 2.1 for Development
Docker4Drupal 2.1 for DevelopmentDocker4Drupal 2.1 for Development
Docker4Drupal 2.1 for DevelopmentWebsolutions Agency
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned RightScale
 
Orchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxOrchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxKynetics
 
Orchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxOrchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxNicolaLaGloria
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesJérôme Petazzoni
 
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...NLJUG
 
OpenShift_Installation_Deep_Dive_Robert_Bohne.pdf
OpenShift_Installation_Deep_Dive_Robert_Bohne.pdfOpenShift_Installation_Deep_Dive_Robert_Bohne.pdf
OpenShift_Installation_Deep_Dive_Robert_Bohne.pdfssuser9e06a61
 

Ähnlich wie Everything you wanted to know about resin hup (20)

Evolution of ota_update_in_the_io_t_world
Evolution of ota_update_in_the_io_t_worldEvolution of ota_update_in_the_io_t_world
Evolution of ota_update_in_the_io_t_world
 
Docker SQL Continuous Integration Flow
Docker SQL Continuous Integration FlowDocker SQL Continuous Integration Flow
Docker SQL Continuous Integration Flow
 
Creating new Tizen profiles using the Yocto Project
Creating new Tizen profiles  using the Yocto ProjectCreating new Tizen profiles  using the Yocto Project
Creating new Tizen profiles using the Yocto Project
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Scale Big With Docker — Moboom 2014
Scale Big With Docker — Moboom 2014Scale Big With Docker — Moboom 2014
Scale Big With Docker — Moboom 2014
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tips
 
OpenNebulaConf 2014 - CentOS, QA and OpenNebula - Christoph Galuschka
OpenNebulaConf 2014 - CentOS, QA and OpenNebula - Christoph GaluschkaOpenNebulaConf 2014 - CentOS, QA and OpenNebula - Christoph Galuschka
OpenNebulaConf 2014 - CentOS, QA and OpenNebula - Christoph Galuschka
 
Infrastructure = Code
Infrastructure = CodeInfrastructure = Code
Infrastructure = Code
 
LinuxKit Deep Dive
LinuxKit Deep DiveLinuxKit Deep Dive
LinuxKit Deep Dive
 
Master Docker - first meetup
Master Docker - first meetupMaster Docker - first meetup
Master Docker - first meetup
 
Sw update elce2017
Sw update elce2017Sw update elce2017
Sw update elce2017
 
Docker4Drupal 2.1 for Development
Docker4Drupal 2.1 for DevelopmentDocker4Drupal 2.1 for Development
Docker4Drupal 2.1 for Development
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
Learning Docker with Thomas
Learning Docker with ThomasLearning Docker with Thomas
Learning Docker with Thomas
 
Orchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxOrchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded Linux
 
Orchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxOrchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded Linux
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
 
Introducing Docker
Introducing DockerIntroducing Docker
Introducing Docker
 
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
 
OpenShift_Installation_Deep_Dive_Robert_Bohne.pdf
OpenShift_Installation_Deep_Dive_Robert_Bohne.pdfOpenShift_Installation_Deep_Dive_Robert_Bohne.pdf
OpenShift_Installation_Deep_Dive_Robert_Bohne.pdf
 

Mehr von Balena

Balena Hackathon 2021 - Welcome and Getting Started
Balena Hackathon 2021 - Welcome and Getting StartedBalena Hackathon 2021 - Welcome and Getting Started
Balena Hackathon 2021 - Welcome and Getting StartedBalena
 
IoT Fleet Management and Scaling
IoT Fleet Management and ScalingIoT Fleet Management and Scaling
IoT Fleet Management and ScalingBalena
 
Fold For Covid
Fold For CovidFold For Covid
Fold For CovidBalena
 
The Things Network Madrid
The Things Network MadridThe Things Network Madrid
The Things Network MadridBalena
 
San Francisco Raspberry Pi Meetup
San Francisco Raspberry Pi MeetupSan Francisco Raspberry Pi Meetup
San Francisco Raspberry Pi MeetupBalena
 
Develop, deploy and manage your IoT Fleet with Balena - IoT Portugal Meetup
Develop, deploy and manage your IoT Fleet with Balena - IoT Portugal MeetupDevelop, deploy and manage your IoT Fleet with Balena - IoT Portugal Meetup
Develop, deploy and manage your IoT Fleet with Balena - IoT Portugal MeetupBalena
 
Balena: a Moby-based container engine for IoT
Balena: a Moby-based container engine for IoT Balena: a Moby-based container engine for IoT
Balena: a Moby-based container engine for IoT Balena
 
Introducing resinOS: An Operating System Tailored for Containers and Built fo...
Introducing resinOS: An Operating System Tailored for Containers and Built fo...Introducing resinOS: An Operating System Tailored for Containers and Built fo...
Introducing resinOS: An Operating System Tailored for Containers and Built fo...Balena
 
Scaling IoT Deployments: DevOps for the Internet of Things
Scaling IoT Deployments: DevOps for the Internet of ThingsScaling IoT Deployments: DevOps for the Internet of Things
Scaling IoT Deployments: DevOps for the Internet of ThingsBalena
 
Resin.io overview (2016 July)
Resin.io overview (2016 July)Resin.io overview (2016 July)
Resin.io overview (2016 July)Balena
 

Mehr von Balena (10)

Balena Hackathon 2021 - Welcome and Getting Started
Balena Hackathon 2021 - Welcome and Getting StartedBalena Hackathon 2021 - Welcome and Getting Started
Balena Hackathon 2021 - Welcome and Getting Started
 
IoT Fleet Management and Scaling
IoT Fleet Management and ScalingIoT Fleet Management and Scaling
IoT Fleet Management and Scaling
 
Fold For Covid
Fold For CovidFold For Covid
Fold For Covid
 
The Things Network Madrid
The Things Network MadridThe Things Network Madrid
The Things Network Madrid
 
San Francisco Raspberry Pi Meetup
San Francisco Raspberry Pi MeetupSan Francisco Raspberry Pi Meetup
San Francisco Raspberry Pi Meetup
 
Develop, deploy and manage your IoT Fleet with Balena - IoT Portugal Meetup
Develop, deploy and manage your IoT Fleet with Balena - IoT Portugal MeetupDevelop, deploy and manage your IoT Fleet with Balena - IoT Portugal Meetup
Develop, deploy and manage your IoT Fleet with Balena - IoT Portugal Meetup
 
Balena: a Moby-based container engine for IoT
Balena: a Moby-based container engine for IoT Balena: a Moby-based container engine for IoT
Balena: a Moby-based container engine for IoT
 
Introducing resinOS: An Operating System Tailored for Containers and Built fo...
Introducing resinOS: An Operating System Tailored for Containers and Built fo...Introducing resinOS: An Operating System Tailored for Containers and Built fo...
Introducing resinOS: An Operating System Tailored for Containers and Built fo...
 
Scaling IoT Deployments: DevOps for the Internet of Things
Scaling IoT Deployments: DevOps for the Internet of ThingsScaling IoT Deployments: DevOps for the Internet of Things
Scaling IoT Deployments: DevOps for the Internet of Things
 
Resin.io overview (2016 July)
Resin.io overview (2016 July)Resin.io overview (2016 July)
Resin.io overview (2016 July)
 

Kürzlich hochgeladen

在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一uodye
 
Point of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryPoint of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryoyebolasonuga14
 
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证ehyxf
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证tufbav
 
Jual Obat Aborsi Samarinda ( No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
Jual Obat Aborsi Samarinda (  No.1 ) 088980685493 Obat Penggugur Kandungan Cy...Jual Obat Aborsi Samarinda (  No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
Jual Obat Aborsi Samarinda ( No.1 ) 088980685493 Obat Penggugur Kandungan Cy...Obat Aborsi 088980685493 Jual Obat Aborsi
 
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一ougvy
 
Vashi Affordable Call Girls ,07506202331,Vasai Virar Charming Call Girl
Vashi Affordable Call Girls ,07506202331,Vasai Virar Charming Call GirlVashi Affordable Call Girls ,07506202331,Vasai Virar Charming Call Girl
Vashi Affordable Call Girls ,07506202331,Vasai Virar Charming Call GirlPriya Reddy
 
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURELANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHUREF2081syahirahliyana
 
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证wpkuukw
 
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证ehyxf
 
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证ehyxf
 
Mass storage systems presentation operating systems
Mass storage systems presentation operating systemsMass storage systems presentation operating systems
Mass storage systems presentation operating systemsnight1ng4ale
 
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理uodye
 
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证ehyxf
 
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...gajnagarg
 
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理uodye
 

Kürzlich hochgeladen (20)

在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
 
Point of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryPoint of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratory
 
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
 
Jual Obat Aborsi Samarinda ( No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
Jual Obat Aborsi Samarinda (  No.1 ) 088980685493 Obat Penggugur Kandungan Cy...Jual Obat Aborsi Samarinda (  No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
Jual Obat Aborsi Samarinda ( No.1 ) 088980685493 Obat Penggugur Kandungan Cy...
 
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
 
Vashi Affordable Call Girls ,07506202331,Vasai Virar Charming Call Girl
Vashi Affordable Call Girls ,07506202331,Vasai Virar Charming Call GirlVashi Affordable Call Girls ,07506202331,Vasai Virar Charming Call Girl
Vashi Affordable Call Girls ,07506202331,Vasai Virar Charming Call Girl
 
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURELANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
 
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pillsIn Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
 
Critical Commentary Social Work Ethics.pptx
Critical Commentary Social Work Ethics.pptxCritical Commentary Social Work Ethics.pptx
Critical Commentary Social Work Ethics.pptx
 
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
 
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
 
Abortion pills in Dammam +966572737505 Buy Cytotec
Abortion pills in Dammam +966572737505 Buy CytotecAbortion pills in Dammam +966572737505 Buy Cytotec
Abortion pills in Dammam +966572737505 Buy Cytotec
 
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
 
Mass storage systems presentation operating systems
Mass storage systems presentation operating systemsMass storage systems presentation operating systems
Mass storage systems presentation operating systems
 
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
 
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
 
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
 
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In Palghar [ 7014168258 ] Call Me For Genuine Models W...
 
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
 

Everything you wanted to know about resin hup

  • 1. Everything you wanted to know about resinHUP* *but were afraid to ask
  • 2. Basics resinHUP = RESIN Host os UPdater
  • 3. OS System Layout Operating System Image A Image B Balena / Docker Image C ...
  • 4. System Layout Image A Image B Root BRoot A Boot User Data Super...
  • 7. 1.x ➞ 1.x updates 2 main software component: ● Update script ○ Shell script ● Dockerized HUP ○ Written in Python ○ Architecture-specific images
  • 8. 1.x ➞ 1.x updates ● Stop supervisor & user application ● Update supervisor ● Pull Updater; Run container ○ Run file system checks ○ Pull resinOS image ○ Extract onto secondary partition ○ Switch boot order ● Post fix: rce/docker migration,...
  • 9. 1.x ➞ 1.x updates schematic Image A Image B Root BRoot A Boot User Data Super...
  • 10. 1.x ➞ 1.x updates notes Can update: ● Earliest 1.0.0-pre ➞ 1.26.0/1.30.1 ● Supported device types: ○ Raspberry Pi 1/2/3 ○ BeagleBone ○ Intel NUC ○ ARTIK5
  • 11. 1.x ➞ 2.x updates considerations Lots of differences between 1.x/2.x Update-relevant changes: ● Partition layout / size ● State partition ● File system labels ● BTRFS ➞ Ext4 file system ● Docker storage driver change
  • 12. 1.x ➞ 2.x updates process ● Stop supervisor & user application ● Backup /data (user data) ● Move partitions ● Pull OS image ● Resize Root A / recreate Root B ● Export root and boot content ● Reformat data part, restore /data aka. “the juggle”...
  • 13. 1.x ➞ 2.x updates schematics Root BRoot A Boot User Data
  • 14. 1.x ➞ 2.x updates ● Updater is a shell script ○ Lightweight ○ If any issue, easy to pick up from an intermediate state ● Update logs are transient (/tmp) ● Quite slow (`docker export | gz`) ● OS needs to do more work on reboot ● 1.8.0-1.30.1 ➞ 2.2.0-2.4.2
  • 15. 2.x ➞ 2.x updates (v1) ● Updater is a shell script ● Logic similar to 1.x➞1.x updates ○ Stop supervisor & user app ○ Pull resinOS image ○ Export to secondary root ○ Update supervisor ○ Switch boot ○ Reboot
  • 16. 2.x ➞ 2.x updates (v2) - hostapp-update ● Devices boot directly into a resinOS container (mobynit) ● Root is within the container ● Two root partitions accessible: ○ sysroot/active; sysroot/inactive ● Secondary Balena(Docker): ○ balena-host (docker-host) ● OS update: ~ a “balena pull”
  • 17. 2.x ➞ 2.x updates (v2) - hostapp-update Image A Image B Image C inactiveactive Boot User Data Super
  • 18. 2.x ➞ 2.x updates (v2) - hostapp-update ● No need to shut down supervisor & user application anymore ● Balena deltas for OS updates ● Can create new OS versions by Dockerfile and `hostapp-update` ● Update hooks do /boot or firmware changes (with rollback on error) ● 2.5.0 ➞ current
  • 19. 2.x ➞ 2.x updates (v1➞v2) ● Manually set up “balena-host” ● Pull resinOS image ● Export image ● Run resinOS image (update run in hostapp system) ● Import image to be able to use hostapp-update within … aka “the return of the juggle”
  • 20. From beginning to end From 1.0.0-pre / 0.0.10 (~2015) to 2.12.6+rev1 / 7.4.3 (~1 week ago) ● Total time ~2h ● ~4-5 reboots
  • 21. Running a HUP Self-service: ● Triggering through the Proxy’s action server ● Backend logs into device ● Runs the updater script Manual: ● Log into the device and run script
  • 23. hostapp-updates with custom image FROM resin/resinos:2.12.6_rev1-intel-nuc RUN echo "Kilroy was here" > /tagged Then $ docker build . -t imrehg/resinos-mod:kilroy $ docker push imrehg/resinos-mod:kilroy On the device: # hostapp-update -i imrehg/resinos-mod:kilroy -r
  • 24. Device support Aiming to support all device types on hostapp-enabled resinOS versions. For 1.x➞2.x updates we might might the range of currently supported versions (Pi, BBB, NUC) 1.x->1.x updates probably won’t be expanded further
  • 25. Further Goals ● Easy management of host OS variants/modifications ● The host being able to update itself (just as supervisor is capable to self-update with the `update-resin-supervisor` service ● Delta updates all around
  • 26. ResinOS in a container The same image that used for updates can now be run as a full-fleded system: resin-os/resinos-in-container (Github) Host OS updates: ● Run new image w/ existing volumes
  • 28. Addendum resinHUP repo: https://github.com/resin-os/resinhup Docs: Update Process ; Self-service Updates resinOS images: https://hub.docker.com/r/resin/resinos/tags/

Hinweis der Redaktion

  1. It’s indeed a lot of information, and can be quite involved. Will skip over some technical details to keep things focus, nevertheless feel free to ask questions any time!
  2. “git push to devices” is one of our earlier motto (even though it’s changing) - everyone’s familiar with application update, but we are managing the entire device - including the host OS. The “host OS” is the minimal system that mainly gets docker up and running (plus vpn, time management, Anyone who hasn’t done a device update on the team before? (Why?)
  3. This is the conceptual diagram of resinOS layout that is often quoted. OS + Balena on that + Application images within balena.
  4. A slightly modified version for explanation. Dual root partition (enables os updates) Boot partition (storing config.json, config.txt, uEnv, device trees….) Rest is pretty much bundled Images, user data, supervisor are all currently part of the same “data” section of the OS This is not directly mapped onto partitions, there’s a bit more of that, but this is the nutshell.
  5. The updates are packaged as docker images, and posted on Docker Hub (currently) They contain the root fs, but also specific locations for the files that go to the boot (kernel, firmware, device trees) and additional scripts (hooks)
  6. This section goes through how updates were done historically from earlier versions to latest ones, to appreciate changes.
  7. The original setup of host OS updates The shell script coordinates the update steps, while HUP is mainly for the host-os part of the update
  8. 3-4 docker pulls for the entire process (supervisor, updater, OS image, migrator (for pre-1.10 Docker))
  9. Of course the switch can work from Root B ➞ Root A too,, if the device was updated before already. The angled arrow means, that in the pull, the intermediate data is stored on the same partition as the user data.
  10. Partition layout / size: increased rootA/rootB, state partition, moved data partition File system labels: resin-rootA, resin-rootB labels for the two roots Docker storage driver: btrfs ➞ aufs (overlay2 in some versions on resinOS, but fortunately those devices are not updated 1.x➞2.x)
  11. A simplified version of what’s going on, but still… Root B is recreated elsewhere on the disk, so the system has to run from Root A for this to work. If not, the partition is switched and redone.
  12. gz is very slow on some devices (like Pi, even Pi 3) Updates can be ~5 minutes on a NUC, to ~20-30 minutes on Pi (slower on PiZero, eg.), on fast network even Extra OS work: the supervisor starting up after reboot will need to pull the new supervisor image, and that new supervisor will have to repull the user application The ranges of updates vary between devices (e.g. BBB needs latest 1.x to update, while Pi can do updates) Still have a bit below 900 devices on 1.x.
  13. Faster, though, as 1 less pulls
  14. Mobynit is part of balena: bootable containers (original PR is linked) The two root partitions are there to use with the secondary, host balena: active where the currently running system’s balena storage, while the inactive is where the update would land if run, currently empty
  15. The pull is directly to inactive, maybe using the active as delta
  16. We are working on this sort of updates be a central part of the platform (the actual “hostapps”). In the meantime it might be handy for hacking. Note, that when building an image, to use RUN, have to build on a compatible architecture. On incompatible ones can only use COPY (for example building a modified Raspberry Pi image on an x86 work machine).
  17. For 2.x➞2.x updates that are not hostapp-enabled, we will add support if it’s low hanging fruit, if has any issues, some updates will be exempted. For 1.x➞2.x updates it depends on the number of provisioned devices we have on 1.x for a given device type, that gains 2.x release. Also, if there’s no intermediate non-hostapp version, then it cannot have such update at the moment.
  18. The variants and modifications can be tools added to the host OS (extra binaries one needs), or convenience (adding extra authorized_keys) - many of these what people would do could be later part of the platform too, this is a good way to prototype. Supervisor updates - run once every 24h (and ~15m after device start to kick off), queries the API and pulls an update if needed. Delta updates should reduce the amount of data moved, so in line with our theme of “getting more and more lightweight) - just like the update is using less and less data, reduced HUP container, then done away with completely, smaller and smaller supervisor….
  19. When running resinOS in a container, the boot, state and data partitions are added volumes.
  20. This os delivering over the air updates... Anyone who wants to go and do an update now?