-
Pierre Riteau authored
Change-Id: Ia8c927c330b9428a3824a6925f6274cbc54314a0 Story: 2002098 Task: 44165
Pierre Riteau authoredChange-Id: Ia8c927c330b9428a3824a6925f6274cbc54314a0 Story: 2002098 Task: 44165
Overcloud host disk image build
This section covers configuration for building overcloud host disk images with
Diskimage builder (DIB), which is available from the Yoga 12.0.0 release. This
configuration is applied in ${KAYOBE_CONFIG_PATH}/overcloud-dib.yml
.
Enabling host disk image build
From the Yoga release, disk images for overcloud hosts can be built directly using Diskimage builder rather than through Bifrost. This is enabled with the following option:
overcloud_dib_build_host_images
- Whether to build host disk images with DIB directly instead of through
Bifrost. Setting it to true disables Bifrost image build and allows images
to be built with the
kayobe overcloud host image build
command. Default value is false. This will change in a future release.
With this option enabled, Bifrost will be configured to stop building a root disk image. This will become the default behaviour in a future release.
Overcloud root disk image configuration
Kayobe uses Diskimage builder (DIB) to build root disk images that are deployed to overcloud hosts when they are provisioned. The following options configure how these images are built. Consult the :diskimage-builder-doc:`Diskimage-builder documentation <>` for further information on building disk images.
The default configuration builds a whole disk (partitioned) image using the selected :ref:`OS distribution <os-distribution>` (CentOS Stream 8 by default) with serial console enabled, and SELinux disabled if CentOS Stream is used. Cloud-init is used to process the configuration drive built by Bifrost during provisioning.
overcloud_dib_host_images
- List of overcloud host disk images to build. Each element is a dict
defining an image in a format accepted by the stackhpc.os-images role. Default is to
build an image named
deployment_image
configured with theovercloud_dib_*
variables defined below:{"name": "deployment_image", "elements": "{{ overcloud_dib_elements }}", "env": "{{ overcloud_dib_env_vars }}", "packages": "{{ overcloud_dib_packages }}"}
. overcloud_dib_os_element
- DIB base OS element. Default is
{{ os_distribution }}
. overcloud_dib_os_release
- DIB image OS release. Default is
{{ os_release }}
. overcloud_dib_elements_default
- List of default DIB elements. Default is
["centos", "cloud-init-datasources", "disable-selinux", "enable-serial-console", "vm"]
whenovercloud_dib_os_element
iscentos
, or["ubuntu", "cloud-init-datasources", "enable-serial-console", "vm"]
whenovercloud_dib_os_element
isubuntu
. Thevm
element is poorly named, and causes DIB to build a whole disk image rather than a single partition. overcloud_dib_elements_extra
- List of additional DIB elements. Default is none.
overcloud_dib_elements
- List of DIB elements. Default is a combination of
overcloud_dib_elements_default
andovercloud_dib_elements_extra
. overcloud_dib_env_vars_default
- DIB default environment variables. Default is
{"DIB_BOOTLOADER_DEFAULT_CMDLINE": "nofb nomodeset gfxpayload=text net.ifnames=1", "DIB_CLOUD_INIT_DATASOURCES": "ConfigDrive", "DIB_RELEASE": "{{ overcloud_dib_os_release }}"}
. overcloud_dib_env_vars_extra
- DIB additional environment variables. Default is none.
overcloud_dib_env_vars
- DIB environment variables. Default is combination of
overcloud_dib_env_vars_default
andovercloud_dib_env_vars_extra
. overcloud_dib_packages
- List of DIB packages to install. Default is to install no extra packages.
overcloud_dib_git_elements_default
- List of default git repositories containing Diskimage Builder (DIB) elements. See stackhpc.os-images role for usage. Default is empty.
overcloud_dib_git_elements_extra
- List of additional git repositories containing Diskimage Builder (DIB) elements. See stackhpc.os-images role for usage. Default is empty.
overcloud_dib_git_elements
- List of git repositories containing Diskimage Builder (DIB) elements. See
stackhpc.os-images role for usage. Default is a combination of
overcloud_dib_git_elements_default
andovercloud_dib_git_elements_extra
. overcloud_dib_upper_constraints_file
- Upper constraints file for installing packages in the virtual environment
used for building overcloud host disk images. Default is
{{ pip_upper_constraints_file }}
.
Disk images are built with the following command:
(kayobe) $ kayobe overcloud host image build
It is worth noting that images will not be rebuilt if they already exist. To
force rebuilding images, it is necessary to use the --force-rebuild
argument.
(kayobe) $ kayobe overcloud host image build --force-rebuild
Example: Adding an element
In the following, we extend the list of DIB elements to add the growpart
element: