Brussels / 3 & 4 February 2018


diskimage-builder: Building Linux Images for Cloud / Virtualization / Container

diskimage-builder: Building Linux Images for Cloud / Virtualization / Container

Each virtualization, cloud or container platform needs images as base. There are many (specialized) tools to generate them. If your organization needs a set of e.g. different distributions with the same packages installed and the same configuration, diskimage-builder might be the tool to choose: it can generate a wide range of different distributions (e.g. RedHat/CentOS, Ubuntu, Debian, OpenSuse, Gentoo, ...) as a virtual machine or even docker images for a couple of architectures. Images are known to run on a wide range of virtualization and cloud services, like OpenStack, VmWare, AWS EC2, OTC, KVM, docker (and even bare metal). diskimage-builder is highly configurable by means of 'elements': predefined and/or easy to write extensions.

The talk is a general (technical) introduction to diskimage-builder with a short in-depth chapter about the new block device layer like: images, loop devices, partitioning, lvm, mounting, fs, and fstab handling.

1: OS Images What are OS images?

2: Building OS Images Traditionally each environment / distribution introduces its own image creation procedure / tool. Example: debootstrap for Debian, kickstart configuration for RedHat based systems, …

3: Many to Many Relation The problem: each tool must be configured or adapted to your needs. Diagram: Many configuration files -> Many tools -> Many images Problem: much work; unclear: resulting images might differ in functionality

4: One to Rule Them All diskimage-builder solves this problem: you can see it as an abstraction layer. One configuration -> Images for different OS / distributions / architectures

5: Examples

6: Features Supported architectures: arm64, i386, amd64/x86_64, powerpc Supported distributions: Debian, Ubuntu, Fedora, RedHat, Centos, OpenSuse, Gentoo (typically the stable and the last-stable version) Tested environments: VmWare, OpenStack, KVM, AWS EC2, Docker.

7: "Elements": Batteries Included There are many (~100) predefined (so called) elements for configuration / adaption. Additional are available in the Internet, e.g. ready to use element for building a Raspberry Pi Image. Example: disk-image-create debian-minimal vm puppet-master Example elements

8: Short introduction: What is an "Element"

10: In Depth: New Block Device Layer A. Concept (layer) B. How it works. C. Configuration example. D. Block Device Layer’s MBR Module Why parted could not be used. No other usable library available.

11: Development Insights SLOW development cycle (CI slow / no developers / mostly no reviewers) Many developers want exactly their features / bug-fix and mostly never review other. Reality vs. Ideal world

12: Advantages / Disadvantages + Speed + Universal configuration

  • Only limited set of functions / systems are tested during CI
  • Large docker images with some unused packages

13: Best Practice

14: Resources / Contact diskimage-builder: IRC / Mailing List / Links / GIT My Name / Email Address


Photo of Andreas Florath Andreas Florath