stateless systems factory reset golden master systems and
play

Stateless Systems, Factory Reset, Golden Master Systems and systemd - PowerPoint PPT Presentation

Stateless Systems, Factory Reset, Golden Master Systems and systemd LinuxCon Europe, Duesseldorf October 2014 Stateless Systems, Factory Reset, Golden Master Systems and Factory Reset? Stateless Systems, Factory Reset, Golden Master Systems


  1. Stateless Systems, Factory Reset, Golden Master Systems and systemd LinuxCon Europe, Duesseldorf October 2014 Stateless Systems, Factory Reset, Golden Master Systems and

  2. Factory Reset? Stateless Systems, Factory Reset, Golden Master Systems and

  3. Factory Reset? The procedure to bring a system back into the state that is was shipped in. Stateless Systems, Factory Reset, Golden Master Systems and

  4. Stateless System? Stateless Systems, Factory Reset, Golden Master Systems and

  5. Stateless System? A system where every single boot-up is as if a factory reset was just completed. Stateless Systems, Factory Reset, Golden Master Systems and

  6. Golden Master? The one master image a factory reset returns the state to. Stateless Systems, Factory Reset, Golden Master Systems and

  7. Golden Master? The one master image a factory reset returns the state to. The same image is usually shared between a multitude of systems. Stateless Systems, Factory Reset, Golden Master Systems and

  8. Where do you want this? Stateless Systems, Factory Reset, Golden Master Systems and

  9. Where do you want this? Containers, Stateless Systems, Factory Reset, Golden Master Systems and

  10. Where do you want this? Containers, servers, Stateless Systems, Factory Reset, Golden Master Systems and

  11. Where do you want this? Containers, servers, laptops/desktops/tablets, Stateless Systems, Factory Reset, Golden Master Systems and

  12. Where do you want this? Containers, servers, laptops/desktops/tablets, mobile, Stateless Systems, Factory Reset, Golden Master Systems and

  13. Where do you want this? Containers, servers, laptops/desktops/tablets, mobile, embedded Stateless Systems, Factory Reset, Golden Master Systems and

  14. Where do you want this? Containers, servers, laptops/desktops/tablets, mobile, embedded Verifiable setups Stateless Systems, Factory Reset, Golden Master Systems and

  15. Where do you want this? Containers, servers, laptops/desktops/tablets, mobile, embedded Verifiable setups Apps Stateless Systems, Factory Reset, Golden Master Systems and

  16. Tons of prior art: Android, ChromeOS, CoreOS, virtualization infrastructure, and many embedded systems Stateless Systems, Factory Reset, Golden Master Systems and

  17. Our goal with working on this in the systemd context: to solve this in a modular and generic way, for all usecases Stateless Systems, Factory Reset, Golden Master Systems and

  18. Our goal with working on this in the systemd context: to solve this in a modular and generic way, for all usecases Right in the OS itself. Stateless Systems, Factory Reset, Golden Master Systems and

  19. Let’s seperate state from OS resources! Stateless Systems, Factory Reset, Golden Master Systems and

  20. Let’s seperate state from OS resources! /etc: configuration Stateless Systems, Factory Reset, Golden Master Systems and

  21. Let’s seperate state from OS resources! /etc: configuration /var: state Stateless Systems, Factory Reset, Golden Master Systems and

  22. Let’s seperate state from OS resources! /etc: configuration /var: state /usr: vendor OS resources Stateless Systems, Factory Reset, Golden Master Systems and

  23. Let’s seperate state from OS resources! /etc: configuration /var: state /usr: vendor OS resources (after the /usr merge) Stateless Systems, Factory Reset, Golden Master Systems and

  24. Flushing /etc, /var, just keeping /usr: full factory reset Flushing just /var, keeping /usr and /etc: keeping settings, but dropping collected state Stateless Systems, Factory Reset, Golden Master Systems and

  25. Booting with /var empty? Stateless Systems, Factory Reset, Golden Master Systems and

  26. Booting with /var empty? Mostly just works, just a few more tmpfiles rules Stateless Systems, Factory Reset, Golden Master Systems and

  27. Booting with /var empty? Mostly just works, just a few more tmpfiles rules Stateless Systems, Factory Reset, Golden Master Systems and

  28. What’s tmpfiles again? Stateless Systems, Factory Reset, Golden Master Systems and

  29. What’s tmpfiles again? d /var 0755 - - - L /var/run - - - - ../run d /var/log 0755 - - - f /var/log/wtmp 0664 root utmp - f /var/log/btmp 0600 root utmp - d /var/cache 0755 - - - d /var/lib 0755 - - - d /var/spool 0755 - - - Stateless Systems, Factory Reset, Golden Master Systems and

  30. Booting with /etc empty? Stateless Systems, Factory Reset, Golden Master Systems and

  31. Booting with /etc empty? More complex Stateless Systems, Factory Reset, Golden Master Systems and

  32. Booting with /etc empty? More complex Software is more allergic if configuration files in /etc are missing Stateless Systems, Factory Reset, Golden Master Systems and

  33. Booting with /etc empty? More complex Software is more allergic if configuration files in /etc are missing User database! Stateless Systems, Factory Reset, Golden Master Systems and

  34. Booting with /etc empty? More complex Software is more allergic if configuration files in /etc are missing User database! Core OS components shipped by systemd are fixed Stateless Systems, Factory Reset, Golden Master Systems and

  35. Booting with /etc empty? More complex Software is more allergic if configuration files in /etc are missing User database! Core OS components shipped by systemd are fixed Exception in the core OS: dbus, PAM Stateless Systems, Factory Reset, Golden Master Systems and

  36. tmpfiles to the rescue: C /etc/pam.d C /etc/nsswitch.conf Introducing: /usr/share/factory/etc Stateless Systems, Factory Reset, Golden Master Systems and

  37. sysusers to the rescue: u root 0 "Super User" /root u nobody 65534 "Nobody" - g adm - - - g wheel - - - g kmem - - - g lock - - - g tty 5 - - g utmp - - - g audio - - - g cdrom - - - g dialout - - - g disk - - - g input - - - g lp - - - g tape - - - g video - - - g users - - - Stateless Systems, Factory Reset, Golden Master Systems and

  38. systemd-nspawn –volatile=no -b -D /srv/mycontainer Stateless Systems, Factory Reset, Golden Master Systems and

  39. systemd-nspawn –volatile=no -b -D /srv/mycontainer systemd-nspawn –volatile=state -b -D /srv/mycontainer Stateless Systems, Factory Reset, Golden Master Systems and

  40. systemd-nspawn –volatile=no -b -D /srv/mycontainer systemd-nspawn –volatile=state -b -D /srv/mycontainer systemd-nspawn –volatile=yes -b -D /srv/mycontainer Stateless Systems, Factory Reset, Golden Master Systems and

  41. Updating Stateless Systems, Factory Reset, Golden Master Systems and

  42. Updating /usr can be updated offline Stateless Systems, Factory Reset, Golden Master Systems and

  43. Updating /usr can be updated offline On next boot, /etc and /var are updated Stateless Systems, Factory Reset, Golden Master Systems and

  44. Updating /usr can be updated offline On next boot, /etc and /var are updated ConditionNeedsUpdate= Stateless Systems, Factory Reset, Golden Master Systems and

  45. Updating /usr can be updated offline On next boot, /etc and /var are updated ConditionNeedsUpdate= ldconfig, sysusers, udev hwdb, . . . Stateless Systems, Factory Reset, Golden Master Systems and

  46. Updating /usr can be updated offline On next boot, /etc and /var are updated ConditionNeedsUpdate= ldconfig, sysusers, udev hwdb, . . . All atomic Stateless Systems, Factory Reset, Golden Master Systems and

  47. Double Buffering Stateless Systems, Factory Reset, Golden Master Systems and

  48. Double Buffering Multiple /usr trees around! Stateless Systems, Factory Reset, Golden Master Systems and

  49. RPM? Classic Distributions? Stateless Systems, Factory Reset, Golden Master Systems and

  50. Timeframe? Stateless Systems, Factory Reset, Golden Master Systems and

  51. Apps! Stateless Systems, Factory Reset, Golden Master Systems and

  52. Apps! /usr: os, runtime, framework Stateless Systems, Factory Reset, Golden Master Systems and

  53. Apps! /usr: os, runtime, framework /opt/ appname : app Stateless Systems, Factory Reset, Golden Master Systems and

  54. OS: a /usr one can boot up a system with Stateless Systems, Factory Reset, Golden Master Systems and

  55. OS: a /usr one can boot up a system with Runtime: a /usr one can run executables against Stateless Systems, Factory Reset, Golden Master Systems and

  56. OS: a /usr one can boot up a system with Runtime: a /usr one can run executables against Framework: a /usr one can build executables with Stateless Systems, Factory Reset, Golden Master Systems and

  57. OS, Runtime, Framework, Instance, Apps Stateless Systems, Factory Reset, Golden Master Systems and

  58. OS, Runtime, Framework, Instance, Apps All in multiple versions on the same system Stateless Systems, Factory Reset, Golden Master Systems and

  59. OS, Runtime, Framework, Instance, Apps All in multiple versions on the same system btrfs subvolumes Stateless Systems, Factory Reset, Golden Master Systems and

  60. btrfs??? Stateless Systems, Factory Reset, Golden Master Systems and

  61. Clear naming Scheme for subvolumes Stateless Systems, Factory Reset, Golden Master Systems and

  62. Clear naming Scheme for subvolumes usr: vendorid : architecture : version Stateless Systems, Factory Reset, Golden Master Systems and

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend