diff --git a/.zuul.d/project.yaml b/.zuul.d/project.yaml index c35dacc86d..a93a1ef017 100644 --- a/.zuul.d/project.yaml +++ b/.zuul.d/project.yaml @@ -1,13 +1,13 @@ --- - project: templates: + - check-requirements - openstack-python3-jobs - openstack-python3-jobs-arm64 - openstack-cover-jobs - - check-requirements + - periodic-stable-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 - - periodic-stable-jobs check: jobs: - kolla-tox-genconfig diff --git a/doc/source/admin/image-building.rst b/doc/source/admin/image-building.rst index d3639e0e69..28412fc1ce 100644 --- a/doc/source/admin/image-building.rst +++ b/doc/source/admin/image-building.rst @@ -373,11 +373,69 @@ Python packages build options The block ``base_pip_conf`` in the ``base`` Dockerfile can be used to provide the PyPI build customisation options via the standard environment variables -like ``PIP_INDEX_URL``, ``PIP_TRUSTED_HOST``, etc. Also here can be provided -the standard environment variable ``UPPER_CONSTRAINTS_FILE`` used for building -the ``bifrost_deploy`` container when PyPI upper-constraints needs to be -overridden. Also this variable would be used in the ``kolla-toolbox`` if -provided instead of the defaults. +like ``PIP_INDEX_URL``, ``PIP_TRUSTED_HOST``, etc. + +To override PYPI upper-constraints of all OpenStack images, you can +define the source location of openstack-base. in ``kolla-build.conf``. + +Upstream repository of `openstack-base (requirements) `__ +has a source of +`upper constraints file `__. + +Make a fork or clone the repository then customise ``upper-constraints.txt`` +and define the location of ``openstack-base`` in ``kolla_build.conf``. + +.. path /etc/kolla/kolla-build.conf +.. code-block:: ini + + # These examples use upstream openstack-base as a demonstration + # To use custom openstack-base, make changes accordingly + + # Using git source + [openstack-base] + type = git + location = https://opendev.org/openstack/requirements + reference = master + + # Using URL source + [openstack-base] + type = url + location = https://tarballs.opendev.org/openstack/requirements/requirements-master.tar.gz + + # Using local source + [openstack-base] + type = local + location = /home/kolla/src/requirements + +To remove or change the version of specific Python packages in +``openstack-base`` upper-constraints, you can use the block +``openstack_base_override_upper_constraints`` in your template file, +for example, ``template-overrides.j2``: + +.. code-block:: jinja + + {% block openstack_base_override_upper_constraints %} + RUN {{ macros.upper_constraints_version_change("sqlparse", "0.4.4", "0.5.0") }} + RUN {{ macros.upper_constraints_remove("reno") }} + {% endblock %} + +``kolla-toolbox`` image needs different approach as it does not uses +``openstack-base`` as a base image. +A variable ``UPPER_CONSTRAINTS_FILE`` is set in the +Dockerfile of ``kolla-toolbox``. +To change variable, add the following contents to the +``kolla_toolbox_pip_conf`` block in your template file, for example, +``template-overrides.j2``: + +.. code-block:: jinja + + {% block kolla_toolbox_pip_conf %} + ENV UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/master + {% endblock %} + +.. note:: + + ``UPPER_CONSTRAINTS_FILE`` must be a valid URL to the file Plugin functionality -------------------- diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index 64e9272da9..6bd94a2cc8 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -52,6 +52,7 @@ COPY dnf.conf /etc/dnf/dnf.conf #### BEGIN REPO ENABLEMENT {% set base_yum_repo_files = [ + 'docker-ce.repo', 'grafana.repo', 'influxdb.repo', 'mariadb.repo', @@ -303,6 +304,7 @@ COPY apt_preferences /etc/apt/preferences.d/kolla-custom {# NOTE(hrw): type field defaults to 'asc' which is used for single keys #} {% set base_remote_apt_keys = [ + {'name': 'docker-ce', 'url': 'https://download.docker.com/linux/debian/gpg'}, {'name': 'grafana', 'url': 'https://rpm.grafana.com/gpg.key'}, {'name': 'influxdb', 'url': 'https://repos.influxdata.com/influxdata-archive_compat.key'}, {'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 \ # 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 %} {{ macros.kolla_patch_sources() }} diff --git a/docker/base/docker-ce.repo b/docker/base/docker-ce.repo new file mode 100644 index 0000000000..d976c58526 --- /dev/null +++ b/docker/base/docker-ce.repo @@ -0,0 +1,6 @@ +[docker-ce] +name=Docker CE Stable - $basearch +baseurl=https://download.docker.com/linux/centos/$releasever/$basearch/stable +enabled=1 +gpgcheck=1 +gpgkey=https://download.docker.com/linux/centos/gpg diff --git a/docker/bifrost/bifrost-base/Dockerfile.j2 b/docker/bifrost/bifrost-base/Dockerfile.j2 index a1306728c8..5aac6ef717 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 f9d7003256..d66ff3b667 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))") \ @@ -91,7 +95,7 @@ RUN mkdir -p /requirements \ ENV PATH {{ venv_path }}/bin:$PATH {% set kolla_toolbox_pip_packages = [ - 'ansible-core==2.17.*', + 'ansible-core==2.18.*', 'cmd2', 'influxdb', 'openstacksdk', diff --git a/docker/neutron/neutron-base/Dockerfile.j2 b/docker/neutron/neutron-base/Dockerfile.j2 index 40015e4956..ba8c3684dc 100644 --- a/docker/neutron/neutron-base/Dockerfile.j2 +++ b/docker/neutron/neutron-base/Dockerfile.j2 @@ -7,7 +7,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% import "macros.j2" as macros with context %} -{{ macros.enable_extra_repos(['openvswitch']) }} +{{ macros.enable_extra_repos(['docker-ce', 'openvswitch']) }} {{ macros.configure_user(name='neutron') }} {% if base_package_type == 'rpm' %} @@ -16,6 +16,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'conntrack-tools', 'dnsmasq', 'dnsmasq-utils', + 'docker-ce-cli', 'haproxy', 'iproute-tc', 'ipset', @@ -35,6 +36,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'conntrack', 'dnsmasq', 'dnsmasq-utils', + 'docker-ce-cli', 'haproxy', 'iproute2', 'ipset', diff --git a/docker/opensearch/opensearch-dashboards/Dockerfile.j2 b/docker/opensearch/opensearch-dashboards/Dockerfile.j2 index 4459ec3e62..4edf1bf631 100644 --- a/docker/opensearch/opensearch-dashboards/Dockerfile.j2 +++ b/docker/opensearch/opensearch-dashboards/Dockerfile.j2 @@ -12,9 +12,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% set opensearch_dashboards_packages = ['opensearch-dashboards'] %} -{{ macros.install_packages(opensearch_dashboards_packages | customizable("packages")) }} - -RUN chown -R opensearch-dashboards:opensearch-dashboards /usr/share/opensearch-dashboards +{{ macros.install_packages(opensearch_dashboards_packages | customizable("packages")) }} \ + && chown -R opensearch-dashboards:opensearch-dashboards /usr/share/opensearch-dashboards COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start diff --git a/docker/opensearch/opensearch/Dockerfile.j2 b/docker/opensearch/opensearch/Dockerfile.j2 index 32d928a21b..600a5a27a2 100644 --- a/docker/opensearch/opensearch/Dockerfile.j2 +++ b/docker/opensearch/opensearch/Dockerfile.j2 @@ -16,9 +16,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ENV OPENSEARCH_INITIAL_ADMIN_PASSWORD="Kolla24OpenSearch" -{{ macros.install_packages(opensearch_packages | customizable("packages")) }} - -RUN chown -R opensearch:opensearch /usr/share/opensearch +{{ macros.install_packages(opensearch_packages | customizable("packages")) }} \ + && chown -R opensearch:opensearch /usr/share/opensearch COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start diff --git a/kolla/common/config.py b/kolla/common/config.py index 14bfc00ded..678b0db539 100644 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -37,7 +37,7 @@ 'rocky': 'Rocky Linux 9.* (Blue Onyx)', 'ubuntu': 'Ubuntu 24.04.* LTS', } -OPENSTACK_RELEASE = 'master' +OPENSTACK_RELEASE = '2025.1' # This is noarch repository so we will use it on all architectures DELOREAN_DEPS = "https://trunk.rdoproject.org/centos9-epoxy/" \ diff --git a/kolla/template/repos.yaml b/kolla/template/repos.yaml index 59b8e9efff..c549f76c51 100644 --- a/kolla/template/repos.yaml +++ b/kolla/template/repos.yaml @@ -2,6 +2,7 @@ centos: ceph: "centos-ceph-reef" crb: "crb" + docker-ce: "docker-ce" epel: "epel" erlang: "rabbitmq_rabbitmq-erlang" extras: "extras" @@ -20,6 +21,7 @@ centos: centos-aarch64: ceph: "centos-ceph-reef" crb: "crb" + docker-ce: "docker-ce" epel: "epel" erlang: "copr-rabbitmq-erlang" extras: "extras" @@ -39,6 +41,11 @@ centos-aarch64: # https://www.rabbitmq.com/install-debian.html#apt-cloudsmith debian: + docker-ce: + url: "https://download.docker.com/linux/debian" + suite: "bookworm" + component: "stable" + gpg_key: "docker-ce.asc" erlang: url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu" suite: "jammy" @@ -86,6 +93,11 @@ debian: gpg_key: "rabbitmq.gpg" debian-aarch64: + docker-ce: + url: "https://download.docker.com/linux/debian" + suite: "bookworm" + component: "stable" + gpg_key: "docker-ce.asc" erlang: url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu" suite: "jammy" @@ -138,6 +150,7 @@ debian-aarch64: rocky: ceph: "centos-ceph-reef" crb: "crb" + docker-ce: "docker-ce" epel: "epel" erlang: "rabbitmq_rabbitmq-erlang" extras: "extras" @@ -156,6 +169,7 @@ rocky: rocky-aarch64: ceph: "centos-ceph-reef" crb: "crb" + docker-ce: "docker-ce" epel: "epel" erlang: "copr-rabbitmq-erlang" extras: "extras" @@ -172,6 +186,11 @@ rocky-aarch64: rabbitmq: "rabbitmq_rabbitmq-server" ubuntu: + docker-ce: + url: "https://download.docker.com/linux/ubuntu" + suite: "noble" + component: "stable" + gpg_key: "docker-ce.asc" erlang: url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu" suite: "noble" @@ -220,6 +239,11 @@ ubuntu: gpg_key: "rabbitmq.gpg" ubuntu-aarch64: + docker-ce: + url: "https://download.docker.com/linux/ubuntu" + suite: "noble" + component: "stable" + gpg_key: "docker-ce.asc" erlang: url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu" suite: "noble" diff --git a/releasenotes/notes/ansible-core-2.18-582103463aba6e8a.yaml b/releasenotes/notes/ansible-core-2.18-582103463aba6e8a.yaml new file mode 100644 index 0000000000..89cd983a23 --- /dev/null +++ b/releasenotes/notes/ansible-core-2.18-582103463aba6e8a.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + Kolla toolbox is now using ``ansible-core 2.18`` diff --git a/releasenotes/notes/change-bifrost-upper-constraints-source-e93cb72e88823d56.yaml b/releasenotes/notes/change-bifrost-upper-constraints-source-e93cb72e88823d56.yaml new file mode 100644 index 0000000000..0b3b233540 --- /dev/null +++ b/releasenotes/notes/change-bifrost-upper-constraints-source-e93cb72e88823d56.yaml @@ -0,0 +1,14 @@ +--- +features: + - | + Updated the contents of Python package options in documentation to reflect + latest customisation methods. +upgrade: + - | + The use of ``UPPER_CONSTRAINTS_FILE`` environment variable was moved from + ``base_pip_conf`` block in base Dockerfile to ``kolla_toolbox_pip_conf`` + block in kolla-toolbox Dockerfile as the environment variable now only + affects Kolla-toolbox build. + Bifrost python upper-constraints now follows openstack-base's + python upper-constraints instead of ``UPPER_CONSTRAINTS_FILE`` environment + variable. diff --git a/releasenotes/notes/deprecate-bifrost-dd93b6d8eb04cac6.yaml b/releasenotes/notes/deprecate-bifrost-dd93b6d8eb04cac6.yaml new file mode 100644 index 0000000000..358147f4ed --- /dev/null +++ b/releasenotes/notes/deprecate-bifrost-dd93b6d8eb04cac6.yaml @@ -0,0 +1,6 @@ +--- +deprecations: + - | + Building ``bifrost-deploy`` container image has been deprecated, in favor + of a new ironic standalone deployment using ``ironic`` container images + that will be implemented in ``kolla-ansible`` in the next cycles.