The `diskimage-builder` command provides a yaml file based interface to `disk-image-create` and `ramdisk-image-create`. Every argument to these scripts has a YAML equivalent. The command has the following features: - Environment values can be provided from the calling environment as well as YAML - All arguments are validated with jsonschema in the most appropriate YAML type - Schema is self-documenting and printed when running with --help - Multiple YAML files can be specified and each file can have multiple images defined - Entries with duplicate image names will be merged into a single image build, with attributes overwritten, elements appended, and environment values updated/overwritten. A missing image name implies the same image name as the previous entry. - --dry-run and --stop-on-failure flags A simple YAML defintion would resemble: - imagename: centos-minimal checksum: true install-type: package elements: [centos, vm] - imagename: ironic-python-agent elements: - ironic-python-agent-ramdisk - extra-hardware The TripleO project has managed image build options with YAML files and it has proved useful having git history and a diff friendly format, specifically for the following situations: - Managing differences between distros (centos, rhel) - Managing changes in major distro releases (centos-8, centos-9-stream) - Managing the python2 to python3 transition, within and across major distro releases Now that the TripleO toolchain is being retired this tool is being proposed to be used for the image builds of TripleO's successor, as well as the rest of the community. Subsequent commits will add documentation and switch some tests to using `diskimage-builder`. Change-Id: I95cba3530d1b1c6c52cf547338762e33738f7225
8 lines
363 B
YAML
8 lines
363 B
YAML
---
|
|
features:
|
|
- |
|
|
A new command ``diskimage-builder`` is now provided (also aliased to
|
|
``dib``). It provides a YAML file based interface to ``disk-image-create``
|
|
and ``ramdisk-image-create``. All arguments can be specified as yaml
|
|
dictionary entries, along with environment variable overrides which are
|
|
applied over the provided environment. |