No description
Find a file
Tom Gundersen f25cffa151 osbuild.py/pipeline: assign a unique id to every pipeline
This uniquely identifies a pipeline based on its content. Pipelines
are considered equal modulo whitespace and the order of object
elements.

The intention is that two runs of a pipeline with the same id
generates functionaly equivalent ids. It is up to the writers
of stages and pipelines to ensure this property holds.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-07-03 13:11:37 +02:00
assemblers assemblers/loop_dev: take the size and optionally the offset as arguments 2019-07-01 22:18:05 +02:00
samples samples/qcow2: reuse the base-with-grub2 stage 2019-07-02 18:49:33 +02:00
stages stages/grub2: use static grub.cfg/grubenv files 2019-07-02 20:05:19 +02:00
LICENSE Add LICENSE 2019-04-09 18:18:44 +02:00
osbuild osbuild.py/pipeline: assign a unique id to every pipeline 2019-07-03 13:11:37 +02:00
osbuild-run osbuild.py: rename run-stage to osbuild-run 2019-06-14 18:45:55 +02:00
osbuild.py osbuild.py/pipeline: assign a unique id to every pipeline 2019-07-03 13:11:37 +02:00
README.md osbuild: replace --from and --save with --input and --output 2019-06-12 16:26:29 +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 the stages in turn, isolating them from the host and from each other, with the exception that the first stage may be given an input directory, the last stage an output directory and all stages of a given pipeline are given the same filesystem tree to operate on.

Each stage is passed the (appended) options object as JSON over stdin.

The above pipeline has no input and produces a qcow2 image.

Running

osbuild [--input DIRECTORY] [--output DIRECTORY] PIPELINE

Runs PIPELINE. If --input is given, the directory is available read-only in the first stage. If --output is given it, it must be empty and is avialble read-write in the final stage.