Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Overview of Package Management in openSUSE MicroOS

Yuki Otsuka
November 04, 2024
13

Overview of Package Management in openSUSE MicroOS

talked about aspects of package-management components in MicroOS and an overview of transactional-update in openSUSE.Asia Summit 2024.

Yuki Otsuka

November 04, 2024
Tweet

Transcript

  1. About me - Name : Yuki Otsuka - University student

    in Japan - University : Open University of Japan - Currently enrolled at 42Tokyo, a franchise school of 42. - My Open-Source Activities - Japan openSUSE User Group (2 ~ 3 years) - Open Source Summit Japan Volunteer (2023, 2024)
  2. About me My PC Environment: openSUSE MicroOS Favorite Technologies: Linux,

    BSD, compilers, compiler’s type system (especially interested in programming language theory as a student) Today, I’ll be presenting on openSUSE MicroOS, focusing on aspects that piqued my interest through daily use.
  3. What is openSUSE MicroOS Introduction Package Management on openSUSE Mechanism

    of transactional-update Tukit, libtukit in transactional-update Snapper in transactional-update Figure of transactional-update The Benefits of Atomic Updates for Desktop Use with MicroOS Conclusion Agenda
  4. What is openSUSE MicroOS openSUSE MicroOS is a variant within

    the openSUSE distribution. It comes with desktop environments, including:
  5. What is openSUSE MicroOS openSUSE MicroOS is a variant within

    the openSUSE distribution. It comes with desktop environments, including: openSUSE Aeon → GNOME Desktop on MicroOS openSUSE Kalpa → KDE Plasma Desktop on MicroOS
  6. What is openSUSE MicroOS openSUSE MicroOS is a variant within

    the openSUSE distribution. It comes with desktop environments, including: openSUSE Aeon → GNOME Desktop on MicroOS openSUSE Kalpa → KDE Plasma Desktop on MicroOS
  7. What is openSUSE MicroOS openSUSE MicroOS is a variant within

    the openSUSE distribution. It comes with desktop environments, including: openSUSE Aeon → GNOME Desktop on MicroOS openSUSE Kalpa → KDE Plasma Desktop on MicroOS
  8. What is openSUSE MicroOS By default, immediately after installation, all

    directories except /home and /var —such as /, /usr, /lib, /etc, and others , under the root—are mounted as read-only.
  9. What is openSUSE MicroOS By default, immediately after installation, all

    directories except /home and /var —such as /, /usr, /lib, /etc, and others , under the root—are mounted as read-only. This setup allows changes only via transactional-update, making update management more secure.
  10. What is openSUSE MicroOS By default, immediately after installation, all

    directories except /home and /var —such as /, /usr, /lib, /etc, and others , under the root—are mounted as read-only. This setup allows changes only via transactional-update, making update management more secure. For this reason, MicroOS is often referred to as an "immutable" OS.
  11. What is openSUSE MicroOS By default, immediately after installation, all

    directories except /home and /var —such as /, /usr, /lib, /etc, and others , under the root—are mounted as read-only. This setup allows changes only via transactional-update, making update management more secure. For this reason, MicroOS is often referred to as an "immutable" OS.
  12. What is openSUSE MicroOS With each system update, openSUSE MicroOS

    leverages certain package manager functions to capture update deltas and create backups.
  13. What is openSUSE MicroOS With each system update, openSUSE MicroOS

    leverages certain package manager functions to capture update deltas and create backups. And MicroOS terminology, these update deltas are treated as atomic transactions for update operations.
  14. What is openSUSE MicroOS With each system update, openSUSE MicroOS

    leverages certain package manager functions to capture update deltas and create backups. And MicroOS terminology, these update deltas are treated as atomic transactions for update operations. In this presentation, we’ll provide an overview of the package manager’s functionality in MicroOS and explore scenarios where the MicroOS update strategy is particularly advantageous.
  15. Introduction Package Management on openSUSE Before introducing the package management

    in MicroOS, let’s review how it works in Leap and Tumbleweed.
  16. Introduction Package Management on openSUSE Before introducing the package management

    in MicroOS, let’s review how it works in Leap and Tumbleweed. In openSUSE, system updates are typically managed via the “zypper” command (though “YaST” users may have a different experience).
  17. Introduction Package Management on openSUSE zypper can be used as

    follows: (please check manpage for details) - zypper in <package name> # shorthand for `zypper install` - zypper re <package name> # shorthand for `zypper remove` - zypper se # shorthand for `zypper search` - zypper up # shorthand for `zypper update` - zypper dup # performs a full system dist-upgrade
  18. Introduction Package Management on openSUSE zypper can be used as

    follows: (please check manpage for details) - zypper in <package name> # shorthand for `zypper install` - zypper re <package name> # shorthand for `zypper remove` - zypper se # shorthand for `zypper search` - zypper up # shorthand for `zypper update` - zypper dup # performs a full system dist-upgrade
  19. Introduction Package Management on MicroOS In MicroOS, package updates are

    managed not directly by zypper but through a wrapper command called transactional-update. This transactional-update command combines zypper with several openSUSE tools to create a new "generation" of the system after each update. A generation is treated as an update transaction.
  20. Introduction Package Management on MicroOS transactional-update can be used as

    follows: (please check manpage) - transactional-update # updates the system - transactional-update pkg in <package name> # installs a package from available repositories via zypper - transactional-update apply # mounts the next generation with system changes applied - transactional-update shell # chroots into the next generation
  21. Introduction Package Management on MicroOS transactional-update can be used as

    follows: (please check manpage) - transactional-update # updates the system - transactional-update pkg in <package name> # installs a package from available repositories via zypper - transactional-update apply # mounts the next generation with system changes applied - transactional-update shell # chroots into the next generation
  22. Introduction Package Management on MicroOS transactional-update can be used as

    follows: (please check manpage) - transactional-update # updates the system - transactional-update pkg in <package name> # installs a package from available repositories via zypper - transactional-update apply # mounts the next generation with system changes applied - transactional-update shell # chroots into the next generation
  23. Introduction Package Management on MicroOS transactional-update can be used as

    follows: (please check manpage) - transactional-update # updates the system - transactional-update pkg in <package name> # installs a package from available repositories via zypper - transactional-update apply # mounts the next generation with system changes applied - transactional-update shell # chroots into the next generation
  24. Introduction Package Management on MicroOS Each "generation" created by transactional-update

    stores the system update deltas, enabling rollbacks by restoring these changes. In the following section, we’ll introduce the tools used to create and restore these deltas.
  25. Mechanism of “Transactional-update” Like zypper and YaST, transactional-update requires root

    privileges. After running a command, a system reboot or `transactional- update apply` is necessary.
  26. Mechanism of “Transactional-update” Like zypper and YaST, transactional-update requires root

    privileges. After running a command, a system reboot or `transactional- update apply` is necessary. This is because updates create a new environment, which then needs to be mounted by the system to apply the update deltas.
  27. Mechanism of “Transactional-update” Is the Post-Update Environment Fully Managed by

    transactional- update? A. No. Within transactional-update, functionalities are effectively separated to handle different aspects of the update process.
  28. Tukit, libtukit in transactional-update transactional-update includes a C++ library called

    libtukit and a tool named tukit. This tool primarily handles the creation and application of transactions.
  29. Tukit, libtukit in transactional-update transactional-update includes a C++ library called

    libtukit and a tool named tukit. This tool primarily handles the creation and application of transactions. transactional-update hooks the functions available in libtukit into the package manager.
  30. Tukit, libtukit in transactional-update transactional-update includes a C++ library called

    libtukit and a tool named tukit. This tool primarily handles the creation and application of transactions. transactional-update hooks the functions available in libtukit into the package manager. The transaction creation functionality in tukit dependencies on snapper, a backup tool in openSUSE, for managing snapshots.
  31. Snapper in transactional-update Snapper, maintained by the openSUSE team, is

    a helper tool that simplifies snapshot creation on filesystems like LVM-managed ext4 and CoW-based filesystems like btrfs, which support subvolume management.
  32. Snapper in transactional-update Snapper, maintained by the openSUSE team, is

    a helper tool that simplifies snapshot creation on filesystems like LVM-managed ext4 and CoW-based filesystems like btrfs, which support subvolume management. tukit uses Snapper to create each "generation" with every update operation, defining the transactional units of updates.
  33. Snapper in transactional-update MicroOS manages system rollbacks by mounting filesystem

    delta images created by Snapper. Specifically, transactional-update performs update operations and uses the abstract interface(c library) tukit to handle pre- and post-processing steps, calling Snapper to create generations.
  34. Snapper in transactional-update MicroOS manages system rollbacks by mounting filesystem

    delta images created by Snapper. Specifically, transactional-update performs update operations and uses the abstract interface(c library) tukit to handle pre- and post-processing steps, calling Snapper to create generations. These filesystem images can then be applied or rolled back as needed (and there are also cleanup subcommand for removing old generations).
  35. Figure of transactional-update generation generation zypper zypper rollback libtukit libtukit

    snapper snapper transactional-update transactional-update Btrfs (CoW FS) subvolume Btrfs (CoW FS) subvolume Ext4 on LVM Ext4 on LVM rollback rollback
  36. The Benefits of Atomic update transaction for Desktop Use with

    MicroOS I've overviewed the components of the MicroOS package management system and introduced the update mechanisms in MicroOS. Finally , I’ll share insights from the perspective of a general end- user of openSUSE MicroOS (typically using Aeon) on cases where the transactional-update system provides noticeable benefits.
  37. The Two Main Benefits of MicroOS I’ve Experienced: - Start

    with a minimal environment, managing only essential packages and tracking updates across generations. - In the case of Aeon, this begins with a minimal GNOME setup. - Separation of concerns between package updates and desktop applications: transactional-update’s manage packages with rollback capabilities, while Flatpak keeps desktop apps up-to-date, allowing for streamlined management. The Benefits of Atomic update transaction for Desktop Use with MicroOS
  38. Another advantage of MicroOS on Desktop use: Is MicroOS access

    to a wide range of up-to-date packages, as it leverages package resources from the Tumbleweed codebase repository. This can be a key differentiator from Leap Micro (not covered in this presentation). The Benefits of Atomic update transaction for Desktop Use with MicroOS
  39. Conclusion - I’ve explored how MicroOS differs from other openSUSE

    distributions, with its unique system and update strategy.
  40. Conclusion - I’ve explored how MicroOS differs from other openSUSE

    distributions, with its unique system and update strategy. - The transactional-update tool plays a key role, supported by libraries like libtukit and linked with snapper for effective snapshot management.
  41. Conclusion - I’ve explored how MicroOS differs from other openSUSE

    distributions, with its unique system and update strategy. - The transactional-update tool plays a key role, supported by libraries like libtukit and linked with snapper for effective snapshot management. - MicroOS leverages filesystem features to enable system rollbacks and robust update handling.
  42. Conclusion - I’ve explored how MicroOS differs from other openSUSE

    distributions, with its unique system and update strategy. - The transactional-update tool plays a key role, supported by libraries like libtukit and linked with snapper for effective snapshot management. - MicroOS leverages filesystem features to enable system rollbacks and robust update handling. - I shared personal insights on using MicroOS for desktop use cases.