27 Commits

Author SHA1 Message Date
Will Szumski
988a822259 Add podman support
Adds support for Podman as an alternative container engine. This builds
on the support added in kolla-ansible in the 2023.2 cycle.

Change-Id: I2c6befbdda7e684228065103feea7250a0ea3826
2025-01-27 16:42:33 +00:00
Michal Nasiadka
996651b478 kolla-build: Add support for cross-arch builds
When kolla_base_arch and ansible_facts.architecture differs
we need to run multiarch/qemu-user-static image - see [1].

[1]: https://github.com/multiarch/qemu-user-static

Co-Authored-By: Bartosz Bezak <bartosz@stackhpc.com>

Change-Id: If149418f509c687c3e5d1072cc39a80af33dec5a
2024-09-27 14:28:21 +02:00
Rafal Lewandowski
ed263eeb4f Fix for seed-containers being unable to use password protected registry
Update old code to use truthy filter

Closes-bug: #2026276
Change-Id: I2085f9d1fd457e5b54b17f37a5e725990a60e8bc
2023-08-22 14:29:11 +02:00
Mark Goddard
3c1b9c4d9a Remove kolla_install_type variable
Kolla removed support for binary images in the Zed release, as well as
the install_type config option. It also changed the image tag format.

Yoga & earlier:

  openstack.kolla/centos-source-base:yoga

Zed & later:

  openstack.kolla/base:zed-centos-stream9

This change removes the kolla_install_type variable. It also adds a
kolla_base_distro_version variable, which is passed to kolla and
kolla-ansible.

The following two variables are also removed, since all images are now
of type source:

* overcloud_container_image_regex_map_source
* overcloud_container_image_regexes_source

Change-Id: I0023765438c0c73394c3465828c4d98f766d9350
2022-12-02 10:36:45 +00:00
Zuul
f1212d0f07 Merge "Support setting docker registry credentials to the empty string" 2021-09-17 10:46:47 +00:00
Mark Goddard
f639ad0b35 Use ansible_facts to reference facts
By default, Ansible injects a variable for every fact, prefixed with
ansible_. This can result in a large number of variables for each host,
which at scale can incur a performance penalty. Ansible provides a
configuration option [0] that can be set to False to prevent this
injection of facts. In this case, facts should be referenced via
ansible_facts.<fact>.

This change updates all references to Ansible facts within Kayobe
from using individual fact variables to using the items in the
ansible_facts dictionary. This allows users to disable fact variable
injection in their Ansible configuration, which may provide some
performance improvement.

This change disables fact variable injection in the ansible
configuration used in CI, to catch any attempts to use the injected
variables.

[0] https://docs.ansible.com/ansible/latest/reference_appendices/config.html#inject-facts-as-vars

Story: 2007993
Task: 42464
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/791276

Change-Id: I14db53ed6e57d37bbd28dd5819e432e3fe6628b2
2021-08-21 09:57:29 +02:00
Will Szumski
d0263e65bc Support setting docker registry credentials to the empty string
The use case is that I want to set these credentials via extra vars
like this:

  kayobe overcloud container image build test -e kolla_docker_registry_username=$HARBOR_REGISTRY_USER -e kolla_docker_registry_password=$HARBOR_REGISTRY_PASSWORD

Supporting the empty string means that I don't need to use any
conditional logic.

Change-Id: Ie5c21597266c8e470994eba16f3c2ed2224d0dcb
2021-07-20 11:10:27 +00:00
Michal Nasiadka
0408e5388f Add --nocache option to container image build
Change-Id: I11f0677681e51a59bcbb171d8da0e14c853d6c5c
2021-03-30 11:30:07 +00:00
Mark Goddard
e2a01b790f Ubuntu: container image build
* Use bash to execute kolla-build
* Remove backslashes from kolla-build command. YAML folded literal
  block avoids the need for this by replacing newlines with spaces
* Distribution-specific package list when installing kolla

Change-Id: Icad129aaafb17023f3c9d007fb63466b23b1395a
Story: 2004960
Task: 41764
2021-03-01 18:00:00 +00:00
Mark Goddard
e360f7cd62 Ubuntu: Use . to source shell scripts
Ubuntu uses sh rather than bash by default, which does not support the
source keyword.

Change-Id: Ic36531c0f26fc7dee361bebb83a1d3089166c1eb
Story: 2004960
Task: 41490
2020-12-22 13:22:30 +00:00
Mark Goddard
a1ea2cc753 Add monasca to image regex list
Without this monasca images are not built unless explicitly requested.

Monasca images only support the kolla source type, not binary.

Also fixes image builds if the list of regular expressions for an image
build set is empty, kolla will build all images. In our case we actually
want to build none, since it means that no services are enabled for that
image set. The main example of where this could happen is when monasca
is disabled, the list of source-only images will be empty.

Change-Id: I395e73a06b690d4b443af7c5eb8827514f56d03d
TrivialFix
2018-09-05 13:52:27 +01:00
Nick Jones
5265993134
Don't assume user's primary group name is the same as username
In certain environments, a user's primary group doesn't necessarily
match that of their username.  This change updates various playbooks to
make use of the `ansible_user_gid` fact instead.

This change also makes ownership explicit by using `ansible_user_uid`
instead of `ansible_user` or `ansible_user_id`, where appropriate.

Change-Id: Ifc2ea7d95ec90e91791ccb10772b15d991379479
Story: 2002770
Task: 22636
2018-07-04 19:56:05 +01:00
Mark Goddard
713da0730f Don't specify a docker registry when kolla_docker_registry is defined but None
This is the default.
2017-11-21 17:51:07 +00:00
Mark Goddard
19614e9491 Add an ansible group for container image builders
Hosts in this group are used to build container images for both the seed and
overcloud hosts.

We also rename various overcloud image related variables from controller* to
overcloud*.
2017-11-21 17:50:32 +00:00
John Garbutt
63cf1abf9f Fix image build regex
Turns out kolla_docker_registry is always defined, but is sometimes an
empty string or None. It defaults to None.

Before this change we always sent "--registry" but the kolla build CLI
would pick up our regex as the parameter associated with "--registry" so
we would get a strange image tag, and still build all the images.
2017-11-21 15:33:44 +00:00
Kevin TIBI
e3b8fb5f59 add conf for private registry 2017-11-09 13:34:17 +00:00
Mark Goddard
95715c1296 Merge branch 'master' into kolla-build-config-path 2017-10-26 17:53:00 +01:00
Mark Goddard
185d5dd1d8 Merge pull request #38 from markgoddard/fix-when-warnings
Fix when warnings & add no_log
2017-10-26 17:15:10 +01:00
ktibi
35cc193f53 Update container-image-build.yml 2017-10-26 10:24:53 +02:00
ktibi
11e9827da2 Update container-image-build.yml 2017-10-25 15:14:15 +02:00
ktibi
ab73d76845 Update container-image-build.yml 2017-10-25 15:06:19 +02:00
Mark Goddard
2b9a304d83 Change kolla build configuration path variable
Previously shared kolla-ansible's kolla_config_path, now uses
kolla_build_config_path.

Also adds a variable, config_path, which sets a base path for
configuration on the remote hosts.
2017-10-23 15:28:56 +01:00
Mark Goddard
ca284aea06 Fix ansible warnings for when clauses with curly braces 2017-10-20 12:14:35 +01:00
Mark Goddard
19ceec45cd Use virtualenv_path for all virtualenvs 2017-08-07 12:08:08 +00:00
Mark Goddard
9a7fae1973 Redirect stderr to kolla-build.log during container image build
Logs are sent to stderr as of pike.
2017-06-29 16:08:32 +01:00
Mark Goddard
456b10e074 Allow specification of container images to build
Also adds a command to pull container images
2017-04-01 09:25:10 +01:00
Mark Goddard
3067a28b3e Add commands for building seed and overcloud container images 2017-03-15 10:19:42 +00:00