Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .zuul.d/project.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
68 changes: 63 additions & 5 deletions doc/source/admin/image-building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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) <https://opendev.org/openstack/requirements>`__
has a source of
`upper constraints file <https://opendev.org/openstack/requirements/src/branch/master/upper-constraints.txt>`__.

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
--------------------
Expand Down
3 changes: 2 additions & 1 deletion docker/base/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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'},
Expand Down Expand Up @@ -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() }}
Expand Down
6 changes: 6 additions & 0 deletions docker/base/docker-ce.repo
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions docker/bifrost/bifrost-base/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
8 changes: 6 additions & 2 deletions docker/kolla-toolbox/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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))") \
Expand All @@ -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',
Expand Down
4 changes: 3 additions & 1 deletion docker/neutron/neutron-base/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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' %}
Expand All @@ -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',
Expand All @@ -35,6 +36,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'conntrack',
'dnsmasq',
'dnsmasq-utils',
'docker-ce-cli',
'haproxy',
'iproute2',
'ipset',
Expand Down
5 changes: 2 additions & 3 deletions docker/opensearch/opensearch-dashboards/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions docker/opensearch/opensearch/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kolla/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/" \
Expand Down
24 changes: 24 additions & 0 deletions kolla/template/repos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
centos:
ceph: "centos-ceph-reef"
crb: "crb"
docker-ce: "docker-ce"
epel: "epel"
erlang: "rabbitmq_rabbitmq-erlang"
extras: "extras"
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions releasenotes/notes/ansible-core-2.18-582103463aba6e8a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
upgrade:
- |
Kolla toolbox is now using ``ansible-core 2.18``
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 6 additions & 0 deletions releasenotes/notes/deprecate-bifrost-dd93b6d8eb04cac6.yaml
Original file line number Diff line number Diff line change
@@ -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.
Loading