diff --git a/ansible/group_vars/all/overcloud-dib b/ansible/group_vars/all/overcloud-dib index 1cc77fa3f..c7bc700da 100644 --- a/ansible/group_vars/all/overcloud-dib +++ b/ansible/group_vars/all/overcloud-dib @@ -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 }}. diff --git a/ansible/overcloud-host-image-build.yml b/ansible/overcloud-host-image-build.yml index 4751729b1..5ac5af42e 100644 --- a/ansible/overcloud-host-image-build.yml +++ b/ansible/overcloud-host-image-build.yml @@ -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 }}" diff --git a/doc/source/configuration/reference/overcloud-dib.rst b/doc/source/configuration/reference/overcloud-dib.rst index d20e3d61e..57bd9eb78 100644 --- a/doc/source/configuration/reference/overcloud-dib.rst +++ b/doc/source/configuration/reference/overcloud-dib.rst @@ -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 ` 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 ----------------------------- diff --git a/etc/kayobe/overcloud-dib.yml b/etc/kayobe/overcloud-dib.yml index 54418e86c..f53804e42 100644 --- a/etc/kayobe/overcloud-dib.yml +++ b/etc/kayobe/overcloud-dib.yml @@ -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 }}.