diskimage-builder Release Notes

2.6.0

Deprecation Notes

  • The dracut-network element has been removed. It has not been functioning for some time due to incorrect paths.

2.4.0

New Features

  • Adds mkfs, mount and fstab to the block device layer.

2.3.0

Deprecation Notes

  • The dib-run-parts element is no longer required as disk-image-create will directly source the internal version for running scripts within the chroot. This element was unintentionally leaving /usr/local/bin/dib-run-parts in the built image. From code search we do not believe anyone was relying on the presence of this script. If you do require it, you should source the dib-utils package to install.
  • dib no longer exports dib-run-parts. Adding this was an oversight made during v2 development, since dib-utils already provides this. The dib-run-parts used internally (diskimage_builder/lib/dib-run-parts) is not intended to be used by external tools. If you require dib-run-parts, you should install the dib-utils package.

Other Notes

  • The packages specified with the -p command-line operation are now installed after the install.d phase, not before. This is to give elements priority when installing packages. The flag documentation has been updated to describe this.

2.1.0

Bug Fixes

  • dib-init-system did not correctly find the init system for Debian Jessie and Debian Stretch. This version also looks for /bin/systemctl as as hint for systemd and fixes the problem.

2.0.0

Version 2.0.0 of diskimage-builder incorporates recent work from the feature/v2 branch. This includes incorporating some largely internal changes to the way it finds and calls elements, enhancements to partitioning and removal of some long-deprecated elements. If you use dib exclusively via the command-line disk-image-create installed from a package or via pypi you are unlikely to notice any difference (if you run it directly from a git-tree checkout, you may be affected).

New Features

  • 2.0.0 includes a new framework for partitioning contributed by Andreas Florath. This should allow for creating multiple partitions, images with encryption, LVM support and flexibility for multiple-devices, all of which are currently not supported. Please check the v2 documentation, specs and reach out if these features interest you (some parts still in review).
  • Element override is now supported. If you have an element of the same name earlier in the ELEMENTS_PATH, it will override later instances (previously, the behaviour was undefined).

Upgrade Notes

  • For purposes of both users and development we want dib to be as “pythonic” as possible and behave like all other projects. Two major visible changes are:

    • command-line scripts are entry points (i.e. need to be installed)
    • elements have moved under diskimage_create module

    The result of the first is that ./bin/disk-image-create from the source tree is no longer there. Like all other projects, you should install dib into a virtualenv (if you’re developing, use pip -e) and disk-image-create will “just work”.

    The second change, moving the inbuilt elements under the diskimage_create module, is a simplification so we always have a canonical path to our elements. Since we now always know where elements are relative to the imported diskimage_builder module we can drop all the path guessing complexity. This has other good flow-on effects such as testr being able to find unit-tests for elements in the normal fashion and having imports work as usual.

    We are aware there are a number of tools that like to take dib elements and do things with them. Reading some of the dib source you may find there is a canonical way to find out the included dib elements path – ask dib itself, something like

    DIB_ELEMENTS=$(python -c '
    import diskimage_builder.paths;
    diskimage_builder.paths.show_path("elements")')
    

    Note you probably do not want this. As mentioned, another feature of v2 is override elements – an element that appears first in the element path-list will override any built-in one (just like $PATH). There is a function, diskimage_builder.get_elements(), which will correctly process the element path, calculate overrides and return a canonical list of elements, their dependencies and correct paths.

    That said, you probably do not want this either! There are a number of elements that do things on behalf of other elements – they look for a file in the included elements, say, and use that as a manifest for something. Previously, these would just have to make up their own element processing via inspection of the command-line arguments. dib now exports pre-computed variables that an element can walk for all the current build elements – a YAML list for easy python decoding and a function that builds an array for Bash elements.

Deprecation Notes

  • A number of long-deprecated elements have been removed in v2, which are to the best of our knowledge unused.
    • partitioning-sfdisk
    • deploy-ironic-element
    • ironc-discovered-ramdisk
    • serial-console-element
    • map-services
  • We have removed and deprecated the dib-utils package. This was intended to be a more generic repository of tools that might be useful outside dib, but that did not eventuate and it has been folded back into dib for simplicity.

2.0.0rc1

New Features

  • Create sphinx directive ‘element_deps’ that automatically generates dependencies in the element documentation.

1.27.0

New Features

  • Cleaning logs was split, some was done in the img-functions.finalise_base, some was done in the base element. The version unifies tidy up logs in the lib/img-functions. Especially when building docker container images the base element cannot be used. This patch removes about some hundreds KB of useless logs in cases when the base element is not used.

Deprecation Notes

  • The DIB_YUMCHROOT_USE_CACHE variable has been removed and the Fedora and CentOS -minimal initial chroot will always be created by the package manager. The default creation of a chroot tarball is stopped for these elements. This unused option was unsafe; there is no guarantee that the base system will not change even between runs. Getting the package manager to reuse the cache for the initial chroot install is future work.

1.26.0

New Features

  • The bootloader element will explicitly set the timeout to 5 seconds when using grub (previously this was undefined, but platform defaults were usually 5 seconds). Set this to 0 for faster boots.
  • New squashfs image output format.

1.24.0

New Features

  • Create partitions with MBR layout optimized for performance and highly configurable.

Deprecation Notes

  • The new partitions are created based on configuration rather than on a list of provided commands for a special partitioning tool. Therefore elements using tools (like partitioning-sfdisk) are deprecated and will be removed.

Bug Fixes

  • The debian-minimal and and ubuntu-minimal elements now install directly from the updates repo, avoiding the need to double-install packages during build.

1.23.0

New Features

  • New openssh-server element to ensure that the openssh server is installed and enabled during boot.

1.22.0

New Features

  • New zypper-minimal and opensuse-minimal elements to create basic openSUSE images. These two new elements are also making use of the existing zypper element which has been extended to include the functionality previously present in the opensuse element.

Deprecation Notes

  • The dib-utils requirement has been removed as the dib-run-parts script is now shipped from within diskimage-builder. The dib-utils project is now considered retired.

1.20.0

New Features

  • Add new block device handling. Unify and generalize the creation and usage of block device. This release includes setting up the general infrastructure and setting up loop device
  • Elements that need access to the other elements being used during the build should use the new IMAGE_ELEMENT_YAML environment variable and it’s Bash equivalent get_image_element_array.
  • New element (runtime-ssh-host-keys) to manage SSH host keys at boot. Since SSH host key generation is not standard across operating systems, add support for both Debian and Ubuntu to handle it. While this is a new element, simple-init has been updated to depend on it.

Known Issues

  • Because the implementation of the new block device layer is not complete, some features which are already implemented cannot be used because of limitations of the current environment.

Deprecation Notes

  • The current way of handling block devices is deprecated. The existing block device phase will be called for a limited time. If this phase delivers a result, this is used; if there is no result, the new way of block device handling is used. Please note that the old way of block device handling has some major limitations such as that it is only possible to use one block device.
  • The element ‘partitioning-sfdisk’ is deprecated. The new implementation will create the partition tables based on a tool independent description.
  • The element-info script is now provided by a standard python entry-point, rather than an explicit wrapper script. This may affect you if you were running this script directly out of bin in the source directory without installing. See developer notes for details on using developer-installs with virtual environments for testing.
  • Element override behavior is now defined, with elements found in earlier entries of ELEMENTS_PATH overriding later ones (e.g. the same semantics as $PATH). Previously the behavior was undefined.