| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Change-Id: I5973943fe83bbb00cfc8623c0cd4d4b98b369315
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
|
|
Repos marked build_only: true are backed up before handle_repos()
overwrites them and restored at the end of each image build, so CI
mirror URLs are not baked into the final image.
The cleanup RUN was injected into every Dockerfile, not just images
that called handle_repos() for those repos. Child images with no
backup fell through to "rm -f", deleting the inherited repo file
(e.g. debian.sources in bifrost-base, breaking cpio install).
Fix by adding a {repo}.enabled sentinel that handle_repos creates
when it processes a build_only repo, making the cleanup conditional
on that sentinel.
Change-Id: Ie5b9970a4575b6258dc238059d3f33ddfe155789
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
|
|
Change-Id: I42cf2aac795e9f61692deec956de0bedab55086f
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
|
|
Leaving empty CI template_overrides file in case
we need to use it in future.
Change-Id: Ic46f1a594bcc330536bc78d93ece10e60622f6d4
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
|
|
[tool.setuptools.data-files] does not support recursive directory
installation. The old setup.cfg [files] worked because PBR's
FilesConfig.expand_globs() used os.walk() to expand docker/*, but
this hook is not triggered by the pbr.build PEP-517 backend.
Move docker/ into kolla/ and use [tool.setuptools.package-data]
instead. Update kolla_worker._get_images_dir() to check the kolla
package directory first so both editable and regular installs work.
Change-Id: I4fc452c03740ef22ebbb4e8d0d86c4f4783e2d09
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
|
|
The build-date label was rendered into a LABEL instruction on line
3 of every Dockerfile template, immediately after FROM.
Because Docker invalidates the cache for a changed instruction and
all subsequent layers, a date change caused a full rebuild of every
image on each new calendar day, even when nothing else had changed.
Fix this by removing build-date from the Dockerfile templates and
applying it as a --label argument at build time via image.labels.
Labels passed on the build command line are not part of the
Dockerfile cache key, so the date is still recorded in the image
metadata without affecting layer caching.
Change-Id: I8ef0d85bab1a999a4d09f7cbf0c088ca00fdcf77
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
|
|
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>
|
|
Currently, Kolla images lack standard metadata, making it difficult
to identify their build source, creation time, or exact version solely
by inspecting the image artifact.
This patch introduces the addition of Open Container Initiative (OCI)
standard labels to all generated images. The build process now detects
metadata (utilizing `direct_url.json` for pip-installed packages to
avoid subprocess calls) and injects the following labels into the
container runtime config:
* org.opencontainers.image.authors
* org.opencontainers.image.created
* org.opencontainers.image.description
* org.opencontainers.image.licenses
* org.opencontainers.image.revision
* org.opencontainers.image.source
* org.opencontainers.image.title
* org.opencontainers.image.url
* org.opencontainers.image.version
Example output:
"Labels": {
"org.opencontainers.image.authors": "Kolla Project (https://launchpad.net/kolla)",
"org.opencontainers.image.created": "2025-12-22T14:02:47.015819",
"org.opencontainers.image.description": "OpenStack Kolla keystone-ssh image",
"org.opencontainers.image.licenses": "Apache-2.0",
"org.opencontainers.image.revision": "96b54022857ccef8dc6bb11789abe32119827109",
"org.opencontainers.image.source": "https://opendev.org/openstack/kolla",
"org.opencontainers.image.title": "keystone-ssh",
"org.opencontainers.image.url": "https://opendev.org/openstack/kolla",
"org.opencontainers.image.version": "master-ubuntu-noble"
}
This enhancement improves the interoperability of Kolla images with
standard container tools and registries that display OCI metadata.
Change-Id: I3451940c90180ba91759c839987434e94251e32e
Signed-off-by: Piotr Milewski <vurmil@gmail.com>
|
|
Change-Id: I5e89a9a241f746a2cbab723ea5fc57ea65ad5ee5
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
|
|
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
|
|
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
|
|
Change-Id: I5f2177b7c2edc0e35ed2e8e9bdfc4be2f262309f
|
|
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
|
|
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
|
|
|
|
Change to use docker.DockerClient instead of the low level
docker.APIClient.
Signed-off-by: Konstantin Yarovoy <konstantin.yarovoy@tietoevry.com>
Change-Id: I88842c17d8e6ddbe89b984c7b5e0367ed356fa50
|
|
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
|
|
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
|
|
Add engine adapter module to allow additon of other container engines,
create one common EngineClient that would be called in all other
modules.
Based on patch by Konstantin Yarovoy <konstantin.yarovoy@tietoevry.com>
Change-Id: Ice6467086bd292af086322afc3fc4e869d89eefa
|
|
kolla-build cmd '--docker-dir' option specified a default value
of an empty list, this was causing a warning on tox genconfig.
Change-Id: I204a067d76395ef5ad4d3ce23243f196eab3bdd5
Closes-Bug: #1827146
|
|
As part of kolla/image/ refactoring we move KollaWorker related classes
into own file.
Based on patch by Konstantin Yarovoy <konstantin.yarovoy@tietoevry.com>
Change-Id: I55c3f6b34631048b2463b02e6ea611d7e4c1a912
|