Skip to content

Commit 827fb07

Browse files
authored
Merge pull request #395 from stackhpc/upstream/master-2025-03-31
Synchronise master with upstream
2 parents b6c8269 + 78c5638 commit 827fb07

File tree

14 files changed

+136
-18
lines changed

14 files changed

+136
-18
lines changed

.zuul.d/project.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
- project:
33
templates:
4+
- check-requirements
45
- openstack-python3-jobs
56
- openstack-python3-jobs-arm64
67
- openstack-cover-jobs
7-
- check-requirements
8+
- periodic-stable-jobs
89
- publish-openstack-docs-pti
910
- release-notes-jobs-python3
10-
- periodic-stable-jobs
1111
check:
1212
jobs:
1313
- kolla-tox-genconfig

doc/source/admin/image-building.rst

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,69 @@ Python packages build options
373373

374374
The block ``base_pip_conf`` in the ``base`` Dockerfile can be used to provide
375375
the PyPI build customisation options via the standard environment variables
376-
like ``PIP_INDEX_URL``, ``PIP_TRUSTED_HOST``, etc. Also here can be provided
377-
the standard environment variable ``UPPER_CONSTRAINTS_FILE`` used for building
378-
the ``bifrost_deploy`` container when PyPI upper-constraints needs to be
379-
overridden. Also this variable would be used in the ``kolla-toolbox`` if
380-
provided instead of the defaults.
376+
like ``PIP_INDEX_URL``, ``PIP_TRUSTED_HOST``, etc.
377+
378+
To override PYPI upper-constraints of all OpenStack images, you can
379+
define the source location of openstack-base. in ``kolla-build.conf``.
380+
381+
Upstream repository of `openstack-base (requirements) <https://opendev.org/openstack/requirements>`__
382+
has a source of
383+
`upper constraints file <https://opendev.org/openstack/requirements/src/branch/master/upper-constraints.txt>`__.
384+
385+
Make a fork or clone the repository then customise ``upper-constraints.txt``
386+
and define the location of ``openstack-base`` in ``kolla_build.conf``.
387+
388+
.. path /etc/kolla/kolla-build.conf
389+
.. code-block:: ini
390+
391+
# These examples use upstream openstack-base as a demonstration
392+
# To use custom openstack-base, make changes accordingly
393+
394+
# Using git source
395+
[openstack-base]
396+
type = git
397+
location = https://opendev.org/openstack/requirements
398+
reference = master
399+
400+
# Using URL source
401+
[openstack-base]
402+
type = url
403+
location = https://tarballs.opendev.org/openstack/requirements/requirements-master.tar.gz
404+
405+
# Using local source
406+
[openstack-base]
407+
type = local
408+
location = /home/kolla/src/requirements
409+
410+
To remove or change the version of specific Python packages in
411+
``openstack-base`` upper-constraints, you can use the block
412+
``openstack_base_override_upper_constraints`` in your template file,
413+
for example, ``template-overrides.j2``:
414+
415+
.. code-block:: jinja
416+
417+
{% block openstack_base_override_upper_constraints %}
418+
RUN {{ macros.upper_constraints_version_change("sqlparse", "0.4.4", "0.5.0") }}
419+
RUN {{ macros.upper_constraints_remove("reno") }}
420+
{% endblock %}
421+
422+
``kolla-toolbox`` image needs different approach as it does not uses
423+
``openstack-base`` as a base image.
424+
A variable ``UPPER_CONSTRAINTS_FILE`` is set in the
425+
Dockerfile of ``kolla-toolbox``.
426+
To change variable, add the following contents to the
427+
``kolla_toolbox_pip_conf`` block in your template file, for example,
428+
``template-overrides.j2``:
429+
430+
.. code-block:: jinja
431+
432+
{% block kolla_toolbox_pip_conf %}
433+
ENV UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/master
434+
{% endblock %}
435+
436+
.. note::
437+
438+
``UPPER_CONSTRAINTS_FILE`` must be a valid URL to the file
381439

382440
Plugin functionality
383441
--------------------

docker/base/Dockerfile.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ COPY dnf.conf /etc/dnf/dnf.conf
5252

5353
#### BEGIN REPO ENABLEMENT
5454
{% set base_yum_repo_files = [
55+
'docker-ce.repo',
5556
'grafana.repo',
5657
'influxdb.repo',
5758
'mariadb.repo',
@@ -303,6 +304,7 @@ COPY apt_preferences /etc/apt/preferences.d/kolla-custom
303304

304305
{# NOTE(hrw): type field defaults to 'asc' which is used for single keys #}
305306
{% set base_remote_apt_keys = [
307+
{'name': 'docker-ce', 'url': 'https://download.docker.com/linux/debian/gpg'},
306308
{'name': 'grafana', 'url': 'https://rpm.grafana.com/gpg.key'},
307309
{'name': 'influxdb', 'url': 'https://repos.influxdata.com/influxdata-archive_compat.key'},
308310
{'name': 'mariadb', 'url': 'https://downloads.mariadb.com/MariaDB/mariadb-keyring-2019.gpg', 'type': 'gpg'},
@@ -396,7 +398,6 @@ RUN touch /usr/local/bin/kolla_extend_start \
396398
# the variables like PIP_INDEX_URL, PIP_EXTRA_INDEX_URL, PIP_TRUSTED_HOST etc. should be defined here.
397399
# ENV PIP_INDEX_URL=https://pypi.python.org/simple
398400
# ENV PIP_TRUSTED_HOST=pypi.python.org
399-
# ENV UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/{{ openstack_release }}
400401
{% endblock %}
401402

402403
{{ macros.kolla_patch_sources() }}

docker/base/docker-ce.repo

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[docker-ce]
2+
name=Docker CE Stable - $basearch
3+
baseurl=https://download.docker.com/linux/centos/$releasever/$basearch/stable
4+
enabled=1
5+
gpgcheck=1
6+
gpgkey=https://download.docker.com/linux/centos/gpg

docker/bifrost/bifrost-base/Dockerfile.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ RUN echo " " && \
4545
$VENV/bin/ansible-galaxy collection install -r /bifrost/ansible-collections-requirements.yml && \
4646
$VENV/bin/ansible-playbook -vvvv -i /bifrost/playbooks/inventory/target \
4747
/bifrost/playbooks/install.yaml \
48+
-e upper_constraints_file="/requirements/upper-constraints.txt" \
4849
-e git_branch={{ openstack_branch_slashed }} \
4950
-e ipa_upstream_release={{ openstack_branch }} \
5051
-e enable_inspector=true \

docker/kolla-toolbox/Dockerfile.j2

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,13 @@ RUN cd /usr/bin && \
7878
ln -s python3.12 python3
7979
{% endif %}
8080

81+
{% block kolla_toolbox_pip_conf %}
82+
ENV UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/{{ openstack_release }}
83+
{% endblock %}
84+
8185
{% block kolla_toolbox_upper_constraints %}
8286
RUN mkdir -p /requirements \
83-
&& curl -o /requirements/upper-constraints.txt ${UPPER_CONSTRAINTS_FILE:-https://releases.openstack.org/constraints/upper/{{ openstack_release }}} \
87+
&& curl -o /requirements/upper-constraints.txt $UPPER_CONSTRAINTS_FILE \
8488
&& {{ macros.upper_constraints_remove("openstacksdk") }} \
8589
&& python3 -m venv --system-site-packages {{ venv_path }} \
8690
&& KOLLA_DISTRO_PYTHON_VERSION=$(/usr/bin/python3 -c "import sys; print('{}.{}'.format(sys.version_info.major, sys.version_info.minor))") \
@@ -91,7 +95,7 @@ RUN mkdir -p /requirements \
9195
ENV PATH {{ venv_path }}/bin:$PATH
9296

9397
{% set kolla_toolbox_pip_packages = [
94-
'ansible-core==2.17.*',
98+
'ansible-core==2.18.*',
9599
'cmd2',
96100
'influxdb',
97101
'openstacksdk',

docker/neutron/neutron-base/Dockerfile.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
77

88
{% import "macros.j2" as macros with context %}
99

10-
{{ macros.enable_extra_repos(['openvswitch']) }}
10+
{{ macros.enable_extra_repos(['docker-ce', 'openvswitch']) }}
1111
{{ macros.configure_user(name='neutron') }}
1212

1313
{% if base_package_type == 'rpm' %}
@@ -16,6 +16,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
1616
'conntrack-tools',
1717
'dnsmasq',
1818
'dnsmasq-utils',
19+
'docker-ce-cli',
1920
'haproxy',
2021
'iproute-tc',
2122
'ipset',
@@ -35,6 +36,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
3536
'conntrack',
3637
'dnsmasq',
3738
'dnsmasq-utils',
39+
'docker-ce-cli',
3840
'haproxy',
3941
'iproute2',
4042
'ipset',

docker/opensearch/opensearch-dashboards/Dockerfile.j2

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
1212

1313
{% set opensearch_dashboards_packages = ['opensearch-dashboards'] %}
1414

15-
{{ macros.install_packages(opensearch_dashboards_packages | customizable("packages")) }}
16-
17-
RUN chown -R opensearch-dashboards:opensearch-dashboards /usr/share/opensearch-dashboards
15+
{{ macros.install_packages(opensearch_dashboards_packages | customizable("packages")) }} \
16+
&& chown -R opensearch-dashboards:opensearch-dashboards /usr/share/opensearch-dashboards
1817

1918
COPY extend_start.sh /usr/local/bin/kolla_extend_start
2019
RUN chmod 755 /usr/local/bin/kolla_extend_start

docker/opensearch/opensearch/Dockerfile.j2

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
1616

1717
ENV OPENSEARCH_INITIAL_ADMIN_PASSWORD="Kolla24OpenSearch"
1818

19-
{{ macros.install_packages(opensearch_packages | customizable("packages")) }}
20-
21-
RUN chown -R opensearch:opensearch /usr/share/opensearch
19+
{{ macros.install_packages(opensearch_packages | customizable("packages")) }} \
20+
&& chown -R opensearch:opensearch /usr/share/opensearch
2221

2322
COPY extend_start.sh /usr/local/bin/kolla_extend_start
2423
RUN chmod 755 /usr/local/bin/kolla_extend_start

kolla/common/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
'rocky': 'Rocky Linux 9.* (Blue Onyx)',
3838
'ubuntu': 'Ubuntu 24.04.* LTS',
3939
}
40-
OPENSTACK_RELEASE = 'master'
40+
OPENSTACK_RELEASE = '2025.1'
4141

4242
# This is noarch repository so we will use it on all architectures
4343
DELOREAN_DEPS = "https://trunk.rdoproject.org/centos9-epoxy/" \

0 commit comments

Comments
 (0)