diff options
| author | Seunghun Lee <seunghun@stackhpc.com> | 2024-11-12 10:19:54 +0000 |
|---|---|---|
| committer | Seunghun Lee <seunghun@stackhpc.com> | 2025-02-05 15:36:52 +0000 |
| commit | 4cab35b1a81055c3696e5fa42d794d6fc96076e6 (patch) | |
| tree | 6ae51123bfd5d324c7f3200c3a1992b718d6733d /docker | |
| parent | 68fa7d302095b5362f176b7e690e3cbaa516fae0 (diff) | |
| download | kolla-4cab35b1a81055c3696e5fa42d794d6fc96076e6.tar.gz kolla-4cab35b1a81055c3696e5fa42d794d6fc96076e6.zip | |
Change Bifrost Python upper-constraints source
Users can override the upper-constraints.txt by setting the source of
openstack-base in kolla-build.conf.
However, bifrost-base Dockerfile so far doesn't pass overridden
upper-constraints file to Bifrost install playbook resulting the
playbook not acknowledging it and just use upstream one.
This change sets the source of Bifrost upper-constraints to use
upper-constraints of openstack-base for consistency among all Kolla
images
With this, change the environment variable UPPER_CONSTRAINTS_FILE is
only affecting kolla-toolbox image.
Therefore, moved UPPER_CONSTRATINS_FILE variable example to the
``kolla_toolbox_pip_conf`` block of kolla-toolbox Dockerfile.
Additionally, updated 'Python packages build options' section of
documentation to represent latest method of changing Python package
related options (including this change).
Change-Id: I0a9c782ca1177ef84e4323cb1e5bfac0fb3f383c
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/base/Dockerfile.j2 | 1 | ||||
| -rw-r--r-- | docker/bifrost/bifrost-base/Dockerfile.j2 | 1 | ||||
| -rw-r--r-- | docker/kolla-toolbox/Dockerfile.j2 | 6 |
3 files changed, 6 insertions, 2 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index bb61c8307..c7ec3de1f 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -379,7 +379,6 @@ RUN touch /usr/local/bin/kolla_extend_start \ # the variables like PIP_INDEX_URL, PIP_EXTRA_INDEX_URL, PIP_TRUSTED_HOST etc. should be defined here. # ENV PIP_INDEX_URL=https://pypi.python.org/simple # ENV PIP_TRUSTED_HOST=pypi.python.org -# ENV UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/{{ openstack_release }} {% endblock %} {% block base_footer %}{% endblock %} diff --git a/docker/bifrost/bifrost-base/Dockerfile.j2 b/docker/bifrost/bifrost-base/Dockerfile.j2 index 3d0fe726f..8aa8f54ae 100644 --- a/docker/bifrost/bifrost-base/Dockerfile.j2 +++ b/docker/bifrost/bifrost-base/Dockerfile.j2 @@ -45,6 +45,7 @@ RUN echo " " && \ $VENV/bin/ansible-galaxy collection install -r /bifrost/ansible-collections-requirements.yml && \ $VENV/bin/ansible-playbook -vvvv -i /bifrost/playbooks/inventory/target \ /bifrost/playbooks/install.yaml \ + -e upper_constraints_file="/requirements/upper-constraints.txt" \ -e git_branch={{ openstack_branch_slashed }} \ -e ipa_upstream_release={{ openstack_branch }} \ -e enable_inspector=true \ diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2 index 7a60674af..29c3ab640 100644 --- a/docker/kolla-toolbox/Dockerfile.j2 +++ b/docker/kolla-toolbox/Dockerfile.j2 @@ -78,9 +78,13 @@ RUN cd /usr/bin && \ ln -s python3.12 python3 {% endif %} +{% block kolla_toolbox_pip_conf %} +ENV UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/{{ openstack_release }} +{% endblock %} + {% block kolla_toolbox_upper_constraints %} RUN mkdir -p /requirements \ - && curl -o /requirements/upper-constraints.txt ${UPPER_CONSTRAINTS_FILE:-https://releases.openstack.org/constraints/upper/{{ openstack_release }}} \ + && curl -o /requirements/upper-constraints.txt $UPPER_CONSTRAINTS_FILE \ && {{ macros.upper_constraints_remove("openstacksdk") }} \ && python3 -m venv --system-site-packages {{ venv_path }} \ && KOLLA_DISTRO_PYTHON_VERSION=$(/usr/bin/python3 -c "import sys; print('{}.{}'.format(sys.version_info.major, sys.version_info.minor))") \ |
