kiwi.builder Package

Submodules

kiwi.builder.archive Module

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

Bases: object

Root archive image builder

Parameters:
  • xml_state (obsject) – Instance of XMLState
  • target_dir (str) – target directory path name
  • root_dir (str) – root directory path name
  • custom_args (dict) – Custom processing arguments defined as hash keys: * xz_options: string of XZ compression parameters
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”
Returns:result
Return type:instance of Result

kiwi.builder.container Module

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

Bases: object

Container image builder

Parameters:
  • xml_state (object) – Instance of XMLState
  • target_dir (str) – target directory path name
  • root_dir (str) – root directory path name
  • custom_args (dict) – Custom processing arguments defined as hash keys: * xz_options: string of XZ compression parameters
create()[source]

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

Image types which triggers this builder are:

  • image=”docker”
Returns:result
Return type:instance of Result

kiwi.builder.disk Module

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

Bases: object

Disk image builder

Parameters:
  • xml_state (object) – Instance of XMLState
  • target_dir (str) – Target directory path name
  • root_dir (str) – Root directory path name
  • custom_args (dict) – Custom processing arguments defined as hash keys: * signing_keys: list of package signing keys * xz_options: string of XZ compression parameters
append_unpartitioned_space()[source]

Extends the raw disk if an unpartitioned area is specified

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”
Returns:result
Return type:instance of Result
create_disk()[source]

Build a bootable raw disk image

Raises:
Returns:

result

Return type:

instance of Result

create_disk_format(result_instance)[source]

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

Parameters:result_instance (object) – instance of Result
Returns:updated result_instance
Return type:instance of Result
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

Parameters:result_instance (object) – instance of Result
Returns:updated result_instance with installation media
Return type:instance of Result

kiwi.builder.filesystem Module

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

Bases: object

Filesystem image builder

Parameters:
  • label (str) – filesystem label
  • root_dir (str) – root directory path name
  • target_dir (str) – target directory path name
  • requested_image_type (str) – configured image type
  • requested_filesystem (str) – requested filesystem name
  • system_setup (obejct) – instance of SystemSetup
  • filename (str) – file name of the filesystem image
  • blocksize (int) – configured disk blocksize
  • filesystem_setup (object) – instance of FileSystemSetup
  • filesystems_no_device_node (object) – List of filesystems which are created from a data tree and do not require a block device e.g loop
  • filesystem_custom_parameters (dict) – Configured custom filesystem mount and creation arguments
  • result (object) – 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”
Returns:result
Return type:instance of Result

kiwi.builder.install Module

class kiwi.builder.install.InstallImageBuilder(xml_state, root_dir, target_dir, boot_image_task, custom_args=None)[source]

Bases: object

Installation image builder

Parameters:
  • xml_state (object) – instance of XMLState
  • root_dir (str) – system image root directory
  • target_dir (str) – target directory path name
  • boot_image_task (object) – instance of BootImage
  • custom_args (dict) – Custom processing arguments defined as hash keys: * xz_options: string of XZ compression parameters
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 system image xz compressed
  • The raw system image checksum metadata file
  • The append file template for the boot server
  • The system image initrd for kexec
  • The install initrd
  • The kernel

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, custom_args=None)[source]

Bases: object

Live image builder

Parameters:
  • xml_state (object) – instance of XMLState
  • target_dir (str) – target directory path name
  • root_dir (str) – root directory path name
  • custom_args (dict) – Custom processing arguments defined as hash keys: * xz_options: string of XZ compression parameters
create()[source]

Build a bootable hybrid live ISO image

Image types which triggers this builder are:

  • image=”iso”
Raises:KiwiLiveBootImageError – if no kernel or hipervisor is found in boot image tree
Returns:result
Return type:instance of Result

kiwi.builder.pxe Module

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

Bases: object

Filesystem based PXE image builder.

Parameters:
  • xml_state (object) – instance of XMLState
  • target_dir (str) – target directory path name
  • root_dir (str) – system image root directory
  • custom_args (dict) – Custom processing arguments defined as hash keys: * signing_keys: list of package signing keys * xz_options: string of XZ compression parameters
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”
Raises:KiwiPxeBootImageError – if no kernel or hipervisor is found in boot image tree
Returns:result
Return type:instance of Result

Module Contents

class kiwi.builder.ImageBuilder[source]

Bases: object

image builder factory