No description
Find a file
Lars Karlitski c6e45d4357 Add io.weldr.qcow2
A stage that makes a bootable .qcow2 image out of the tree.
2019-04-09 18:43:21 +02:00
stages Add io.weldr.qcow2 2019-04-09 18:43:21 +02:00
LICENSE Add LICENSE 2019-04-09 18:18:44 +02:00
osbuild Add --from and --save options 2019-04-09 12:16:55 +02:00
README.md README.md: Add section about running osbuild 2019-04-09 18:41:59 +02:00

osbuild

A build system for operating system images, working towards an image build pipeline that's more comprehensible, reproducible, and extendable.

Pipelines

The build process for an image is described by a pipeline. Each stage in a pipeline is a program that, given some configuration, modifies a file system tree. Pipelines are defined as JSON files like this one:

{
  "name": "Example Image",
  "pipeline": [
    {
      "name": "io.weldr.dnf",
      "options": {
        "packages": [ "@core", "httpd" ]
      }
    },
    {
      "name": "io.weldr.systemd",
      "options": {
        "enabled_services": [ "httpd" ]
      }
    },
    {
      "name": "io.weldr.qcow2",
      "options": {
        "target": "output.qcow2"
      }
    }
  ]
}

osbuild runs each of stages in turn, somewhat isolating them into mount and pid namespaces. It injects the options object with a tree key pointing to the file system tree and passes that to the stage via its stdin. Stages may have side effects: the io.weldr.qcow2 stage in the above example packs the tree into a qcow2 image.

Running

osbuild [--from ARCHIVE] [--save ARCHIVE] PIPELINE

Runs PIPELINE. If --from is given, unpacks its contents (.tar.gz) into the tree before running the first stage. If --save is given, saves the contents of the tree in the given archive.