IPA-builder

Introduction


Dmitry Tantsur (Principal Software Engineer, Red Hat)

Twitter: @creepy_owlet

Slides: owlet.today/talks/ipa-builder-intro

Ironic ramdisks: history

How to run operations inside a machine?

  • Bash script [*] injected in dracut
  • Debian tarball run by CoreOS
  • Normal OS built with DIB [**] and packed into initramfs
  • TinyCoreLinux with IPA from source

[*] this wasn't even IPA!
[**] diskimage-builder

Ironic ramdisks: history

Current state of things:

  • Bash script injected in dracut
  • Debian tarball run by CoreOS
  • Normal OS built with DIB and packed into initramfs
  • TinyCoreLinux with IPA from source

IPA-builder: history

IPA-builder [*] appeared by merging two existing parts:

  1. Scripts to build tinyIPA[**] from IPA source tree
  2. Element to build a normal IPA image from DIB source tree

[*] ironic-python-agent-builder
[**] TinyCoreLinux + IPA

tinyIPA

Goal: minimal image for using in the CI.

cd tinyipa && make

Based on TinyCoreLinux and does not have many things you would expect from a production image

… such as firmware for some hardware.

IPA + DIB

Goal: production-quality image made of a real OS.

ironic-python-agent-builder -o ~/dest/path centos

IPA is started as a systemd service after network is up.

Customizable via DIB elements.

diskimage-builder

Unpacks a cloud image in chroot and applies elements to it:

  1. extra-data.d
  2. pre-install.d*
  3. install.d*
  4. post-install.d*
  5. pre-finalise.d
  6. finalise.d*
  7. cleanup.d

The list is incomplete; * - runs inside chroot

DIB elements

Each element is one or more scripts for each stage, as well as dependencies on other elements and their configuration.

Scripts from each stage of all elements are executed sequentially (and thus are usually prefixed with a number).

Every functionality in DIB is an element, even operating systems.

Tutorial

owlet.today/posts/deploy-steps-tutorial#building-ramdisk

Explains how to build a ramdisk with a custom deploy step.

Questions?