aboutsummaryrefslogtreecommitdiff
path: root/kolla/image
AgeCommit message (Collapse)AuthorFilesLines
2026-06-11kolla-build: Use SandboxedEnvironment to prevent SSTIMichal Nasiadka1-2/+3
Switch from jinja2.Environment to jinja2.sandbox.SandboxedEnvironment to block Server-Side Template Injection attacks. Closes-Bug: #2146056 Change-Id: Iecd1d8dcf99007e3339120961c7c1d0ca12f83d8 Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com> (cherry picked from commit 0b20ffce09552014fa52c45de574511dc2200ac5)
2025-10-06Merge "debian: Use {{ openstack_release_codename }} for extrepo"Zuul1-0/+3
2025-10-01Move to Rocky Linux 10Michal Nasiadka1-1/+3
Depends-On: https://review.opendev.org/c/openstack/ansible-collection-kolla/+/961237 Change-Id: Idd809f5efd2d308c1565d7635e67af0a431d18f7 Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
2025-09-23debian: Use {{ openstack_release_codename }} for extrepoMichal Nasiadka1-0/+3
Change-Id: I5e89a9a241f746a2cbab723ea5fc57ea65ad5ee5 Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
2025-08-20Merge "Enable Prometheus mtail build for ARM64"Zuul1-1/+0
2025-08-20Merge "Influxdb: use stable RHEL repo"Zuul1-1/+0
2025-08-18Influxdb: use stable RHEL repoBartosz Bezak1-1/+0
Switch the RHEL repo to the stable channel as per [1]. Use new GPG. Telegraf arm64 builds are enabled again, as binaries exists. [1] https://repos.influxdata.com/stable/x86_64/ Change-Id: Ie4f6f15404f6965df51f3214506ae9f8bb9b61e7 Signed-off-by: Bartosz Bezak <bartosz@stackhpc.com>
2025-08-18Enable Barbican build on Ubuntu ARM64Bartosz Bezak1-1/+0
Re-enable the Ubuntu arm64 build. The previous exclusion was due to uWSGI issue [1], which is no longer reproducible on Ubuntu Noble. Change-Id: I400e9a9a3bf03053589835f933023eedee504f08 Signed-off-by: Bartosz Bezak <bartosz@stackhpc.com>
2025-08-18Enable Prometheus mtail build for ARM64Bartosz Bezak1-1/+0
arm64 binaries are available currently. Change-Id: Iabf606848a6160eaf9e2494a2564f37c6db09882 Signed-off-by: Bartosz Bezak <bartosz@stackhpc.com>
2025-08-06send empty X-Registry-Auth for anonymous pushesBartosz Bezak1-0/+10
Since Docker 28.3.3 the daemon rejects a push that carries no `X-Registry-Auth` header [1]. The SDK already sets this header when it finds credentials, so the breakage happens only on anonymous pushes. During `PushTask.push_image()` we now check whether the SDK can resolve credentials for the target registry; if it cannot, we inject `auth_config={}`, causing the SDK to send the minimal "{}" header that satisfies the daemon while leaving authenticated pushes unchanged. Drop this addition when [2] is fixed. [1] https://github.com/moby/moby/pull/50371 [2] https://github.com/docker/docker-py/issues/3348 Closes-Bug: #2119619 Change-Id: I7a2f3fce223afd74741b40bf62836b325fca5b19 Signed-off-by: Bartosz Bezak <bartosz@stackhpc.com>
2025-07-16Move to CentOS Stream 10Michal Nasiadka1-0/+3
Known missing packages: - mod_auth_mellon - missing SAML support in Keystone/Horizon - built in Kolla COPR - glusterfs-fuse in manila-share - built in Kolla COPR - collectd/telegraf - no opstools repository - redis - needs a switch to valkey - python3-ethtool - not required for neutron-mlnx-agent since 6 years [1] Building packages in Kolla COPR is a temporary solution until these show up in EPEL10. [1]: Id2cae3ac9ff049e9fc8225551f99e1e99a87fc65 Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/951751 Change-Id: I7074fabcf95184fcfd2561648ae1e05acfb0bc11 Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
2025-02-19Remove Git remote origin after cloning sourcesMichal Arbet1-0/+1
When kolla is cloning a Git repository during the build process, the `.git/config` file retains the remote origin URL, which may expose sensitive credentials if authentication tokens are embedded in the URL. This fix ensures that the remote is removed after cloning to prevent unintended exposure of credentials. Closes-Bug: #2098904 Change-Id: Iec21fc2363e03133ec77326da7392bc25b40132a
2025-02-18Allow to use configure_user macro for external templatesAndriy Kurilin1-1/+12
Commit 79a234239516b94b1b79c7ddafcc4fbe4e3ba155 introduced an ability to build 'in-house'/'not-built-in' projects with Kolla. This commits extends this feature with an ability to use configure_user macro for 'not-built-in' users. The implementation is done the same way as for 'sources', i.e. engine after registers new section structure as soon as it finds unknown '<project>-user' section. In addition, the documentation and CI are extended to cover ``--docker-dir`` option. Change-Id: I690d9f3829083f2493bf286a1c45764b9699219b
2024-11-15Add mechanism for patching files in containersMichal Arbet2-1/+33
This patch adds a way to patch files in a Docker image built by Kolla. This is very useful for several reasons, specifically: - Custom modifications - The stable branch of some library has a fix but no pip package has been released - Eliminates the need to package your own pip packages - Eliminates the need to invent your own versioning to prevent upstream versioning - Eliminates the need to manage a pip server - In other words, it eliminates the need to get a wheel into the image and install it manually using any method not previously mentioned It is also highly desirable because, although Kolla can replace the source for a service with a custom URL for a tarball or its own Git repo, it cannot do this for dependencies pulled from pip. I would also like to point out that this is a feature with its own code path and works only if the user "inserts" a patch into the folder patches/docker-image/something.patch and creates an analogous series file for patch source code. Simply said, this code will never interfere with the upstream build process since this feature is not intended for use in upstream. It is rather meant for downstream users who know what they are doing. Now they just have an option to patch their images. Everything works on all layers of the Docker image and stores a report of applied patches which can then be seen in /etc. This mechanism is similar as debian patch quilt. Change-Id: I61d0790c5d4d070b7ea9e8c99c0a76ff5d22bf9d
2024-10-24CI: bump hackingMichal Nasiadka1-2/+2
Change-Id: I5f2177b7c2edc0e35ed2e8e9bdfc4be2f262309f
2024-09-19Switch to Dynamic Python Version DetectionMichal Arbet1-8/+0
This commit removes the hardcoded KOLLA_DISTRO_PYTHON_VERSION and replaces it with dynamic Python version detection during container images build. Dockerfiles and scripts now use general python3 references, simplifying maintenance and ensuring compatibility with future Python versions. Test cases relying on distro_python_version were also cleaned up. Change-Id: I891749598247a5e951ed4a873b16acfd0566f59c
2024-09-02Merge "Drop prometheus-msteams container images"Zuul1-1/+0
2024-08-27Check if archive is tarfileMichal Nasiadka1-3/+8
Change-Id: I802267d848c1dee722015b0d379bd9210f6c103e
2024-08-23Drop prometheus-msteams container imagesBartosz Bezak1-1/+0
The prometheus-msteams project is no longer maintained [1]. As a result we are removing its associated container images from our repository. Users are encouraged to switch to the native Prometheus Alertmanager integration with Microsoft Teams [2], which offers ongoing support and features. [1] https://github.com/prometheus-msteams/prometheus-msteams/issues/343 [2] https://prometheus.io/docs/alerting/latest/configuration/#msteams_config Change-Id: I66421b14668722607b58865a2ad100204fd387f7
2024-05-28Drop packaging requirement and unpin docker-pyMichal Nasiadka1-11/+9
Change-Id: I11d306be5e5bb3d5b05b50dd8ee64ac9424854a1
2024-05-10collectd: Mark unbuildable on rockyMichal Nasiadka1-0/+1
Since Rocky 9.4 release - delivered libpqos is 5, not 4 - and CentOS Stream 9 OpsTools packages have not been rebuilt. Related-Bug: #2065362 Change-Id: Ic0929becd44f25a9fb8d6d789b8169f41c95a226
2024-03-28Merge "add: cross-compile support"Zuul1-0/+1
2024-02-21Move curl sources to sources.pyMichal Nasiadka2-0/+13
Move most curl sources to sources.py, so it can be automatically updated in future. This also makes overriding the versions/locations/sha256 easier. Change-Id: Ib3497fe96162ae190e5c113cacaaa3ef8334f590
2024-02-08add: cross-compile supportTadas Sutkaitis1-0/+1
The main goal is to be able to build ARM images on standard x86 hardware. Add simple functions supported by python-py and podman-py to enable creation of container images on emulated architectures. Change-Id: I1526b460f6e271c2ec63ab3a3b1dc348d742e96d
2023-12-21Merge "Summary JSON file"Zuul2-4/+21
2023-12-04Revert "Disable build of Gnocchi containers"Michal Nasiadka1-9/+0
This reverts commit 5505cd000ce7f12c272c5b62074c9cc6bf1bb7a7. Closes-Bug: 2039051 Reason for revert: Builds properly now Change-Id: I8fbe01340e539949d867a87a3d20326fc1a2b1b0
2023-12-04bifrost: Don't use env-setupMichal Nasiadka1-2/+0
env-setup script removes epel-release and this breaks our CI template overrides. It is also more geared towards using in opendev CI - let's just install proper Ansible version instead. Change-Id: I68f645bef05dd15eba41479e3ef6713100fb87d0
2023-11-28Handle the case where docker is not availableBartosz Bezak1-1/+6
Change-Id: I473ea1c68d2fd7f15fa0545d77892276b1accfeb
2023-11-28import packaging only for docker container engineBartosz Bezak1-1/+1
Change-Id: If4e0c0e5d6ed5c79ca7d8a3c8f16bfa665f6968f
2023-10-11mark gnocchi-base as unbuildableSven Kieske1-0/+9
Related-Bug: 2039051 Change-Id: If374f086e54be5b9799db7661c88b0204c4f507c Signed-off-by: Sven Kieske <kieske@osism.tech>
2023-09-29Fix build errors missing podman/docker moduleMichal Nasiadka1-9/+12
Example: Traceback (most recent call last): File "/home/ubuntu/kolla/kolla/image/build.py", line 79, in run task.run() File "/home/ubuntu/kolla/kolla/image/tasks.py", line 144, in run self.builder(self.image) File "/home/ubuntu/kolla/kolla/image/tasks.py", line 424, in builder if isinstance(e, podman.errors.exceptions.BuildError): NameError: name 'podman' is not defined Change-Id: I947c77750b3ccfb975e010c2042a3716e3e46bde
2023-09-21Add podman for image buildingMichal Arbet2-3/+40
Add podman as an option to choose for container engine for kolla-build (--engine podman) Signed-off-by: Konstantin Yarovoy <konstantin.yarovoy@tietoevry.com> Co-Authored-By: Michal Arbet <michal.arbet@ultimum.io> Change-Id: I068c906df97745e397408d8c3ef6af47ee037638
2023-09-14Fix stderr logging when image build failMichal Arbet1-1/+8
Change-Id: Ie8730ae44cc26b87bd7eac93c8aac8dce8c7c5fc
2023-09-08build: distutils.StrictVersion() is deprecatedMarcin Juszkiewicz1-2/+2
kolla/tests/test_build.py::MainTest::test_run_build [65/1834] /home/marcin/devel/linaro/kolla/kolla/kolla/image/build.py:117: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. StrictVersion(docker.__version__) Change-Id: I2ebc8b0e35c67bf893deb89ea7fa0146dedd4640
2023-08-28Transition to DockerClientMichal Nasiadka2-19/+29
Change to use docker.DockerClient instead of the low level docker.APIClient. Signed-off-by: Konstantin Yarovoy <konstantin.yarovoy@tietoevry.com> Change-Id: I88842c17d8e6ddbe89b984c7b5e0367ed356fa50
2023-08-21Merge "Move to Debian 12 'bookworm'"Zuul2-1/+3
2023-08-18ubuntu: mark collectd and telegraf as buildableMichal Nasiadka1-2/+0
Closes-Bug: #2019756 Change-Id: Ibf3983f49795eea1f75aa7efb120c812adab4c86
2023-08-18Move to Debian 12 'bookworm'Marcin Juszkiewicz2-1/+3
We move to use some components from distribution instead of 3rdparty repos. At least for now - this may/will change later. Packages from Debian: - Erlang 25.2 - MariaDB 10.11 Some Ubuntu/jammy repositories are used in places where there is not (yet) Debian/bookworm one. openvswitch-netcontrold image fails as it needs to be converted to use virtualenv - added into unbuildable images for now. See https://etherpad.opendev.org/p/kolla-bobcat-ptg#L199 for more information. Depends-On: https://review.opendev.org/891946 Change-Id: I45b5a5980fb2318f1aab23a3a6aaf0922563b171
2023-08-02Revert "Disable build of Gnocchi containers"Maksim Malchuk1-7/+0
This reverts commit 5505cd000ce7f12c272c5b62074c9cc6bf1bb7a7. Reason: Closed #1304 [1] as completed. Also build from master until new tag releases since #1304 fixed in master [2] only. 1. https://github.com/gnocchixyz/gnocchi/issues/1304 2. https://github.com/gnocchixyz/gnocchi/commit/b52f7414d595e8d765fde50992f2776a77b98de6 Change-Id: I3ca4e10508c26b752412789502ceb917ecb4dbeb Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
2023-06-22config: switch OpenStack release back to masterMarcin Juszkiewicz1-0/+2
2023.1 'Antelope' has stable/ branch so we can go back to master. rocky/centos: mark bifrost unbuildable - EPEL issues - will be fixed separately Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/886395 Change-Id: I523e7465c3cf87ae4ee3fd16b3a79ddb0b707b37
2023-06-20Disable build of Gnocchi containersMaksim Malchuk1-5/+12
Revert this commit when [1] is solved. 1. https://github.com/gnocchixyz/gnocchi/issues/1304 Change-Id: Iafeb9093340621d65a9c9cd126d65679d981dfb1 Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
2023-05-29rocky/centos: mark bifrost buildableMichal Nasiadka1-2/+0
Change-Id: I18d3ca8bd83a72dba15fc7e543270e260ae4dab0
2023-05-05Fix docker version check after docker-py>=6.0.0Michal Nasiadka1-1/+2
docker-py reworked their version function and now it does not return a string [1]. Example: >>> import docker >>> docker.version <module 'docker.version' from '/home/cloud-user/kolla-venv/lib64/python3.9/site-packages/docker/version.py'> [1]: https://github.com/docker/docker-py/commit/cd2c35a9b699522b282cc4f024efa5699df24896 Closes-Bug: #2018559 Change-Id: I5ec0fbfdaf18cf53a6b5bf91236d3e040daa9d7e
2023-04-27Summary JSON fileMark Goddard2-4/+21
Add support for writing the build summary to a JSON file. This is more machine-friendly than the current approach of writing to standard output at the end of the build. The file is configured via [DEFAULT] summary_json_file. Change-Id: I9868af5d00977750d0673fc48f8863a99f878dc8
2023-03-31Fix test malicious tarball failMichal Nasiadka1-1/+1
Since I650fcbc8f773fad8116338f6fb0cf7b4f4f17b33 builds from git fails on plugins with an exception: 'tarfile.ReadError: not a gzip file' because the test checks only gzip compressed archives but plugins created as plain tar files. This change fixes the issue using transparent compression support and also adds some debug info. Closes-Bug: #1990432 Change-Id: If0f9b4dd058a257d0653332d1b663e150c717304 Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com> Co-Authored-by: Michal Nasiadka <mnasiadka@gmail.com>
2023-03-17Test for unsafe files in tarfile.extractallMichal Nasiadka2-1/+12
In addition to that, mark bifrost unbuildable since it's failing on EPEL 9 enablement. Closes-Bug: #1990432 Change-Id: I650fcbc8f773fad8116338f6fb0cf7b4f4f17b33
2023-03-02Merge "Revert "bifrost: mark unbuidable for Ubuntu""Zuul1-1/+0
2023-02-27Merge "Add a way to add other container engines"Zuul3-60/+83
2023-02-24Revert "bifrost: mark unbuidable for Ubuntu"Michal Nasiadka1-1/+0
This reverts commit b2f747fbba7adf3059d0da9bd899788b4a45763c. Reason for revert: Fixed in bifrost Depends-On: https://review.opendev.org/c/openstack/bifrost/+/874650 Change-Id: Id409c2b5423791d4ca9626e376de07ef7c1a8d8e
2023-02-20bifrost: mark unbuidable for UbuntuMichal Nasiadka1-0/+1
Ubuntu packages have changed efi shim file name and bifrost is failing. Change-Id: I0d072ae6081a9427aebf4dc562501a0a6ef160d0