kiwi.builder Package

Submodules

kiwi.builder.archive Module

class kiwi.builder.archive.ArchiveBuilder(xml_state, target_dir, root_dir)[source]

Bases: object

Root archive image builder

Attributes

  • root_dir
    root directory path name
  • target_dir
    target directory path name
  • xml_state
    Instance of XMLState
  • requested_archive_type
    Configured archive type
  • result
    Instance of Result
  • system_setup
    Instance of SystemSetup
  • filename
    File name of the archive file
  • checksum
    File name of the checksum file
create()[source]

Create a root archive tarball

Build a simple XZ compressed root tarball from the image root tree

Image types which triggers this builder are:

  • image=”tbz”

kiwi.builder.container Module

class kiwi.builder.container.ContainerBuilder(xml_state, target_dir, root_dir)[source]

Bases: object

Container image builder

Attributes

  • root_dir
    root directory path name
  • target_dir
    target directory path name
  • container_config
    Instance of xml_parse::containerconfig
  • requested_container_type
    Configured container type
  • system_setup
    Instance of SystemSetup
  • filename
    File name of the container image
  • result
    Instance of Result
create()[source]

Builds a container image which is usually a tarball including container specific metadata.

Image types which triggers this builder are:

  • image=”docker”

kiwi.builder.disk Module

class kiwi.builder.disk.DiskBuilder(xml_state, target_dir, root_dir)[source]

Bases: object

Disk image builder

Attributes

  • arch
    platform.machine
  • root_dir
    root directory path name
  • target_dir
    target directory path name
  • xml_state
    Instance of XMLState
  • custom_root_mount_args
    Configured custom root mount arguments
  • build_type_name
    Configured build type name, oem or vmx
  • image_format
    Configured disk image format
  • install_iso
    Request for install ISO image
  • install_stick
    Request for install Stick image, converts into a request for the install ISO image because it can handle both cases by the hybrid ISO setup
  • install_pxe
    Request for install PXE archive
  • blocksize
    Configured disk blocksize
  • volume_manager_name
    Configured volume manager
  • volumes
    Configured disk volumes
  • volume_group_name
    Configured volume group name
  • mdraid
    Request for md raid, degraded setup
  • hybrid_mbr
    Request to convert partition table to hybrid GPT/MBR’
  • luks
    LUKS encryption credentials, also triggers to encrypt the disk
  • luks_os
    Target operating system name for LUKS encryption
  • machine
    Configured build type machine section
  • requested_filesystem
    Configured root filesystem
  • requested_boot_filesystem
    Configured boot filesystem
  • bootloader
    Configured boot loader
  • initrd_system
    Configured initrd system
  • disk_setup
    Instance of DiskSetup
  • boot_image
    Instance of BootImage
  • firmware
    Instance of FirmWare
  • system_setup
    Instance of SystemSetup
  • diskname
    File name of the disk image
  • install_media
    Build of install media requested true|false
  • system
    Instance of a class with the sync_data capability representing the entire image system except for the boot/ area which could live on other parts of the disk
  • system_boot
    Instance of a class with the sync_data capability representing the boot/ area of the disk if not part of system
  • system_efi
    Instance of a class with the sync_data capability representing the boot/efi area of the disk
  • generic_fstab_entries
    List of generic/persistent fstab entries
  • result
    Instance of Result
create()[source]

Build a bootable disk image and optional installation image The installation image is a bootable hybrid ISO image which embeds the disk image and an image installer

Image types which triggers this builder are:

  • image=”oem”
  • image=”vmx”
create_disk()[source]

Build a bootable raw disk image

create_disk_format(result_instance)[source]

Create a bootable disk format from a previously created raw disk image

create_install_media(result_instance)[source]

Build an installation image. The installation image is a bootable hybrid ISO image which embeds the raw disk image and an image installer

kiwi.builder.filesystem Module

class kiwi.builder.filesystem.FileSystemBuilder(xml_state, target_dir, root_dir)[source]

Bases: object

Filesystem image builder

Attributes

  • label
    filesystem label
  • root_dir
    root directory path name
  • target_dir
    target directory path name
  • requested_image_type
    Configured image type
  • requested_filesystem
    Requested filesystem name
  • system_setup
    Instance of SystemSetup
  • filename
    File name of the filesystem image
  • blocksize
    Configured disk blocksize
  • filesystem_setup
    Instance of FileSystemSetup
  • filesystems_no_device_node
    List of filesystems which are created from a data tree and do not require a block device e.g loop
  • filesystem_custom_parameters
    Configured custom filesystem mount and creation arguments
  • result
    Instance of Result
create()[source]

Build a mountable filesystem image

Image types which triggers this builder are:

  • image=”ext2”
  • image=”ext3”
  • image=”ext4”
  • image=”btrfs”
  • image=”xfs”

kiwi.builder.install Module

class kiwi.builder.install.InstallImageBuilder(xml_state, target_dir, boot_image_task)[source]

Bases: object

Installation image builder

Attributes

  • arch
    platform.machine
  • target_dir
    target directory path name
  • machine
    Configured build type machine section
  • boot_image
    Instance of BootImage
  • xml_state
    Instance of XMLState
  • diskname
    File name of the disk image
  • isoname
    File name of the install ISO image
  • pxename
    File name of the install PXE archive
  • squashed_diskname
    File name of the squahsfs compressed disk image
  • md5name
    File name of the disk checksum file
  • mbrid
    Instance of SystemIdentifier
  • media_dir
    Temporary directory to collect the install ISO contents
  • pxe_dir
    Temporary directory to collect the PXE install Archive contents
  • squashed_contents
    Temporary directory to collect the contents of the squashfs compressed disk image. These are the disk image file itself and the checksum file
  • custom_iso_args
    Additional custom ISO creation arguments
create_install_iso()[source]

Create an install ISO from the disk_image as hybrid ISO bootable via legacy BIOS, EFI and as disk from Stick

Image types which triggers this builder are:

  • installiso=”true|false”
  • installstick=”true|false”
create_install_pxe_archive()[source]

Create an oem install tar archive suitable for installing a disk image via the network using the PXE boot protocol. The archive contains the raw disk image and its checksum as well as an install initrd and kernel plus the required kernel commandline information which needs to be added as append line in the pxelinux config file on the boot server

Image types which triggers this builder are:

  • installpxe=”true|false”

kiwi.builder.live Module

class kiwi.builder.live.LiveImageBuilder(xml_state, target_dir, root_dir)[source]

Bases: object

Live image builder

Attributes

  • media_dir
    Temporary directory to collect the install ISO contents
  • arch
    platform.machine
  • root_dir
    root directory path name
  • target_dir
    target directory path name
  • xml_state
    Instance of XMLState
  • live_type
    Configured live ISO type name
  • types
    List of supported live ISO types
  • hybrid
    Request for hybrid ISO: true|false
  • volume_id
    Configured ISO volume ID or default
  • mbrid
    Instance of SystemIdentifier
  • filesystem_custom_parameters
    Configured custom filesystem mount and creation arguments
  • boot_image_task
    Instance of BootImage
  • firmware
    Instance of FirmWare
  • system_setup
    Instance of SystemSetup
  • isoname
    File name of the live ISO image
  • live_image_file
    File name of compressed image on the ISO
  • result
    Instance of Result
create()[source]

Build a bootable hybrid live ISO image

Image types which triggers this builder are:

  • image=”iso”

kiwi.builder.pxe Module

class kiwi.builder.pxe.PxeBuilder(xml_state, target_dir, root_dir)[source]

Bases: object

Filesystem based PXE image builder.

Attributes

  • target_dir
    target directory path name
  • compressed
    Request to XZ compress filesystem image
  • machine
    Configured build type machine section
  • pxedeploy
    Configured build type pxedeploy section
  • filesystem
    Instance of FileSystemBuilder
  • system_setup
    Instance of SystemSetup
  • boot_image_task
    Instance of BootImage
  • image_name
    File name of the filesystem image
  • kernel_filename
    File name of the kernel image
  • hypervisor_filename
    File name of the hypervisor image
  • result
    Instance of Result
create()[source]

Build a pxe image set consisting out of a boot image(initrd) plus its appropriate kernel files and the root filesystem image with a checksum. The result can be used within the kiwi PXE boot infrastructure

Image types which triggers this builder are:

  • image=”pxe”

Module Contents

class kiwi.builder.ImageBuilder[source]

Bases: object

image builder factory