From 56c1a886f5dc0683084495745fe54e27e0de08eb Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Fri, 19 Feb 2021 16:13:38 +0100 Subject: [PATCH] Add ipa_build_upper_constraints_file variable This variable allows to customise the upper constraints file used to install packages inside the ipa-build-dib virtual environment. This can be used when we need a newer version of diskimage-builder than the one available in upper constraints for the current release. Change-Id: Idbe57e7edc3fae25153f5e24ad6b7847b1c4660c --- ansible/group_vars/all/ipa | 4 ++++ ansible/overcloud-ipa-build.yml | 2 +- ansible/seed-ipa-build.yml | 2 +- doc/source/configuration/reference/ironic-python-agent.rst | 4 ++++ etc/kayobe/ipa.yml | 4 ++++ .../ipa-build-upper-constraints-5686abaa161b0d94.yaml | 7 +++++++ 6 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/ipa-build-upper-constraints-5686abaa161b0d94.yaml diff --git a/ansible/group_vars/all/ipa b/ansible/group_vars/all/ipa index 66861dd25..ef819ec52 100644 --- a/ansible/group_vars/all/ipa +++ b/ansible/group_vars/all/ipa @@ -75,6 +75,10 @@ ipa_build_dib_git_elements: >- # List of DIB packages to install. Default is none. ipa_build_dib_packages: [] +# Upper constraints file for installing packages in the virtual environment +# used for building IPA images. Default is {{ pip_upper_constraints_file }}. +ipa_build_upper_constraints_file: "{{ pip_upper_constraints_file }}" + ############################################################################### # Ironic Python Agent (IPA) images configuration. diff --git a/ansible/overcloud-ipa-build.yml b/ansible/overcloud-ipa-build.yml index aa3c19946..5092e21cc 100644 --- a/ansible/overcloud-ipa-build.yml +++ b/ansible/overcloud-ipa-build.yml @@ -29,7 +29,7 @@ vars: os_images_venv: "{{ virtualenv_path }}/ipa-build-dib" os_images_package_state: latest - os_images_upper_constraints_file: "{{ pip_upper_constraints_file }}" + os_images_upper_constraints_file: "{{ ipa_build_upper_constraints_file }}" os_images_cache: "{{ image_cache_path }}" os_images_common: "" os_images_list: diff --git a/ansible/seed-ipa-build.yml b/ansible/seed-ipa-build.yml index ddc3ce50b..898676c1d 100644 --- a/ansible/seed-ipa-build.yml +++ b/ansible/seed-ipa-build.yml @@ -20,7 +20,7 @@ vars: os_images_venv: "{{ virtualenv_path }}/ipa-build-dib" os_images_package_state: latest - os_images_upper_constraints_file: "{{ pip_upper_constraints_file }}" + os_images_upper_constraints_file: "{{ ipa_build_upper_constraints_file }}" os_images_cache: "{{ image_cache_path }}" os_images_common: "" os_images_list: diff --git a/doc/source/configuration/reference/ironic-python-agent.rst b/doc/source/configuration/reference/ironic-python-agent.rst index ab5c125c9..916384b60 100644 --- a/doc/source/configuration/reference/ironic-python-agent.rst +++ b/doc/source/configuration/reference/ironic-python-agent.rst @@ -84,6 +84,10 @@ image build``. and ``ipa_build_dib_git_elements_extra``. ``ipa_build_dib_packages`` List of DIB packages to install. Default is none. +``ipa_build_upper_constraints_file`` + Upper constraints file for installing packages in the virtual environment + used for building IPA images. Default is ``{{ pip_upper_constraints_file + }}``. Example: Building IPA images locally ------------------------------------ diff --git a/etc/kayobe/ipa.yml b/etc/kayobe/ipa.yml index bcacbef48..49236d13a 100644 --- a/etc/kayobe/ipa.yml +++ b/etc/kayobe/ipa.yml @@ -61,6 +61,10 @@ # List of DIB packages to install. Default is none. #ipa_build_dib_packages: +# Upper constraints file for installing packages in the virtual environment +# used for building IPA images. Default is {{ pip_upper_constraints_file }}. +#ipa_build_upper_constraints_file: + ############################################################################### # Ironic Python Agent (IPA) images configuration. diff --git a/releasenotes/notes/ipa-build-upper-constraints-5686abaa161b0d94.yaml b/releasenotes/notes/ipa-build-upper-constraints-5686abaa161b0d94.yaml new file mode 100644 index 000000000..bf44f2100 --- /dev/null +++ b/releasenotes/notes/ipa-build-upper-constraints-5686abaa161b0d94.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + Adds the ``ipa_build_upper_constraints_file`` variable to select the upper + constraints file used to install diskimage-builder in the virtual + environment used for building IPA images. This allows you to install a + newer release than the one allowed by the default constraints.