Support elements repositories for overcloud host images

Change-Id: Ia8c927c330b9428a3824a6925f6274cbc54314a0
Story: 2002098
Task: 44165
This commit is contained in:
Pierre Riteau 2022-01-07 16:37:29 +01:00
parent 81758d14c3
commit c4a116e912
4 changed files with 61 additions and 0 deletions

View File

@ -65,6 +65,20 @@ overcloud_dib_env_vars: "{{ overcloud_dib_env_vars_default | combine(overcloud_d
# List of DIB packages to install. Default is to install no extra packages.
overcloud_dib_packages: []
# List of default git repositories containing Diskimage Builder (DIB) elements.
# See stackhpc.os-images role for usage. Default is empty.
overcloud_dib_git_elements_default: []
# List of additional git repositories containing Diskimage Builder (DIB)
# elements. See stackhpc.os-images role for usage. Default is empty.
overcloud_dib_git_elements_extra: []
# 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 and overcloud_dib_git_elements_extra.
overcloud_dib_git_elements: >-
{{ overcloud_dib_git_elements_default + overcloud_dib_git_elements_extra }}
# Upper constraints file for installing packages in the virtual environment
# used for building overcloud host disk images. Default is {{
# pip_upper_constraints_file }}.

View File

@ -28,6 +28,7 @@
os_images_cache: "{{ image_cache_path }}"
os_images_common: ""
os_images_list: "{{ overcloud_dib_host_images }}"
os_images_git_elements: "{{ overcloud_dib_git_elements }}"
os_images_upload: False
os_images_force_rebuild: "{{ overcloud_host_image_force_rebuild }}"

View File

@ -77,6 +77,17 @@ the configuration drive built by Bifrost during provisioning.
``overcloud_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`` and
``overcloud_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 ``{{
@ -154,6 +165,28 @@ Alternatively, the :diskimage-builder-doc:`dynamic-login element
<elements/dynamic-login/README>` can be used to authorize SSH keys by appending
them to the kernel arguments.
Example: Configuring custom DIB elements
----------------------------------------
Sometimes it is useful to use custom DIB elements that are not shipped with DIB
itself. This can be done by sharing them in a git repository.
.. code-block:: yaml
:caption: ``overcloud-dib.yml``
overcloud_dib_elements_extra:
- "my-element"
overcloud_dib_git_elements:
- repo: "https://git.example.com/custom-dib-elements"
local: "{{ source_checkout_path }}/custom-dib-elements"
version: "master"
elements_path: "elements"
In this example the ``master`` branch of
https://git.example.com/custom-dib-elements would have a top level ``elements``
directory, containing a ``my-element`` directory for the element.
Example: Installing a package
-----------------------------

View File

@ -53,6 +53,19 @@
# List of DIB packages to install. Default is to install no extra packages.
#overcloud_dib_packages:
# List of default git repositories containing Diskimage Builder (DIB) elements.
# See stackhpc.os-images role for usage. Default is empty.
#overcloud_dib_git_elements_default:
# List of additional git repositories containing Diskimage Builder (DIB)
# elements. See stackhpc.os-images role for usage. Default is empty.
#overcloud_dib_git_elements_extra:
# 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 and overcloud_dib_git_elements_extra.
#overcloud_dib_git_elements:
# Upper constraints file for installing packages in the virtual environment
# used for building overcloud host disk images. Default is {{
# pip_upper_constraints_file }}.