55 Commits

Author SHA1 Message Date
Michal Arbet
d0f2345d2e Add installation of dbus package
In kolla-ansible, we perform a precheck to see if the python library for
dbus exists, but we do not install it in the bootstrap. This patch
addresses this issue by adding the installation of the dbus python
library.

Change-Id: Idfd4ffd0f80a2f22098639f81be69c664198b6c8
Closes-Bug: #2021585
(cherry picked from commit 1fd93d145a498e1d68e707701e6b3879a6505a58)
2024-09-25 16:41:19 +00:00
Michal Nasiadka
3504748a0c Fix etc hosts generation for interfaces with dashes
Partial-Bug: #2070051
Change-Id: I03cdea3edf9b53cdce254c209997ed984e084b18
(cherry picked from commit ec4d03c3ba22923b1c8f9891799393402c4f52c0)
2024-07-11 06:48:22 +00:00
Michal Nasiadka
e96d6f3de7 docker_sdk: Pin requests to <2.32 due to docker-py incompatibility
Closes-Bug: #2066364
Change-Id: I274d698956303af832972c2c5e16509f2053bd5b
2024-05-22 12:04:21 +00:00
Matt Crees
a0ff355bb2 Fix: include missing docker log-opts in config
The default docker config options, which specify the ``log-opts`` under
``roles/docker/vars/main.yml``, were not included in the
``docker_config`` combinations when the docker role was extracted from
the baremetal role in the Zed release. This means that
``docker_log_max_file`` and ``docker_log_max_size`` are not written into
the docker daemon.json.

The var name needs to be changed, as it can't be recursively defined
within the ``docker_config`` definition under
``roles/docker/tasks/config.yml`.

Closes-Bug: #2040105
Change-Id: I05efda2a9699336136dce8cfa99ada77b9b2a17b
(cherry picked from commit cff2a29d1c21a1d05ce97ebf1d41f846189f1547)
2024-02-19 16:47:09 +00:00
Zuul
dcd94f663f Merge "docker: Add docker_debug and docker_registry_mirror" 2023-11-17 19:15:17 +00:00
Zuul
5302819417 Merge "podman: Support registry mirror" 2023-11-15 13:14:40 +00:00
Michal Arbet
8b4437f943 [trivial] Fix boolean variable in podman config
Change-Id: Icef452820b6a6cff8f8bfb3ff2b970f7c1b0e519
2023-11-02 11:54:45 +01:00
Michal Nasiadka
f950460a17 podman: Support registry mirror
Change-Id: Ifc09da0b48d950fe010229c484f5f0a33b8648b8
2023-11-02 06:06:46 +00:00
Michal Nasiadka
e4a82e401c docker: Add docker_debug and docker_registry_mirror
This patch is an approach to move kolla-ansible CI configuration
to use these variables instead of docker_custom_config and add
similar variables in the podman role.

Change-Id: I22c5752845816aca8d03257d4aecb3991ae84a10
2023-10-31 13:37:35 +00:00
Michal Nasiadka
0ca12aaa0e Fix podman role registry var names
Initially it has been merged with private_registry and
private_registry_ca - let's change it to podman_registry
and podman_registry_ca to conform with a rule that vars
should be named with role name.

Change-Id: If6b2898d90b9f51d308ce2f7010084a896afa708
2023-10-31 08:52:34 +00:00
Ivan Halomi
4ac11fabcf Add Podman support
Add podman and podman_sdk role for preparing machine
for Podman deployment of Openstack.

Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com>
Signed-off-by: Martin Hiner <m.hiner@partner.samsung.com>
Co-Authored-By: Michal Arbet <michal.arbet@ultimum.io>
Change-Id: Ie4b4c1cf8fe6e7ce41eaa703b423dedcb41e3afc
2023-10-19 19:23:59 +02:00
Michal Nasiadka
19a684cb2e debian: Add Bookworm support
Since Debian Bookworm does not support installing packages
using pip outside of a venv - let's install python3-docker
package when not using one.

Change-Id: Ide845a4108607765fb3fe772f9bd30db054e2c92
2023-08-24 12:03:14 +00:00
Michal Nasiadka
f848a01cf4 baremetal: remove warn: false
ansible-core 2.14 does not support warn: argument for command

Change-Id: I24d82b719066dd9ac058753d80d87145c598b0f1
2023-05-22 12:55:57 +00:00
Michal Nasiadka
b4f1d3c993 Bump ansible-lint
Sync the versions with kolla-ansible

Depends-On: https://review.opendev.org/c/openstack/kayobe/+/883744

Change-Id: I744d64e1e69021f93497fcf127a6abd315f04669
2023-05-22 12:55:26 +00:00
Michal Nasiadka
f74dd4859c docker_sdk: bump version
docker-py 6.1.0 is out which fixes requests/urllib3 issues

Change-Id: I989f652bd4159fd3b1b0e3bf5464b0a33961d8fa
2023-05-08 10:37:00 +02:00
Zuul
0e3dbd7b26 Merge "baremetal: Refactor /etc/hosts configuration into a separate role" 2023-03-15 11:44:31 +00:00
Zuul
57c6124238 Merge "docker: Add docker_systemd_reload functionality" 2023-03-15 11:44:30 +00:00
Michal Nasiadka
d985ef48b2 docker: Set ulimit nofile on EL9
Some latest RPM-based distributions, such as RHEL 9 and CentOS Stream 9, ship
a recent version of systemd that sets the default open file handle limit is
set to 1073741816.
That effects in various issues (like rabbitmq not working), including
ceph/other services in containers not working properly.
kolla-ansible has set that as a default ulimit for Kolla container images [1],
this patch sets that as a Docker Engine default (for container images
that don't have this overridden).

[1]: https://review.opendev.org/c/openstack/kolla-ansible/+/839715

Closes-Bug: #2008761

Change-Id: I48a8f18287aa3b017ce04d4b076d88989f927a56
2023-03-01 14:15:39 +00:00
Mark Goddard
6236e557fd baremetal: Refactor /etc/hosts configuration into a separate role
Change-Id: If65657860fc607b92dca62337fc24dd7b5d21589
2023-02-22 12:26:57 +00:00
Michal Nasiadka
60979d8c7c Add support for pinning docker package
Change-Id: Id1986acddbd93a48e54cb8df3d9909cf828c1311
2023-02-13 13:02:47 +00:00
Michal Nasiadka
131df5e480 docker: Add docker_systemd_reload functionality
Change-Id: I8cca0cc46212ce92c474ebf67fd0835375d5d541
2023-02-13 12:57:38 +00:00
Zuul
b92ab57d4d Merge "baremetal: improve task output readability" 2023-02-08 09:16:56 +00:00
Zuul
a55ba91b45 Merge "Debian/Ubuntu: handle APT keys in proper way" 2023-02-08 02:41:03 +00:00
Michal Arbet
fcb91f1e56 Fix bootstrap servers by installing apparmor package
Probably because of a new version of docker-ce package
apparmor is not installed by default anymore and
containers can't start because of apparmor_parser is missing.

This patch is adding apparmor package to list of packages to
be installed.

Closes-Bug: #2004583
Depends-on: https://review.opendev.org/c/openstack/kolla-ansible/+/872558
Change-Id: I4855a9ea896f30575b924a45f020c23a2e780f4b
2023-02-07 10:20:05 +00:00
Michal Arbet
41ea290e68 Debian/Ubuntu: handle APT keys in proper way
apt-key is deprecated and in Debian 'bullseye' it complain when we use
it the way we did.

The right way is to store key files in separate directory and then, for
each repo source file, point to proper key. And this is what this patch
does.

Both distros use the same keys now.

More info:
  - https://losst.pro/en/how-to-fix-key-is-stored-in-legacy-trusted-gpg-keyring-in-ubuntu
  - https://wiki.debian.org/DebianRepository/UseThirdParty

Change-Id: I4a5116499b13fff0b9523ed29acb080df110e2d4
2023-01-31 02:13:41 +00:00
Erik Berg
bb3beb57c1
baremetal: improve task output readability
By adding a name section, we can get some sense of which tasks are
skipped or inlcluded during the playthrough.

Change-Id: Ib0c083a7e3a761ab39f7f3e632bd4e0400a34b61
2023-01-11 09:02:50 +01:00
Bartosz Bezak
55ae3519b7 delete check for removed docker_custom_option command
Change-Id: Ib2ed06f2499c750702611edd0c13e571e6d2732a
2023-01-10 15:06:54 +01:00
Zuul
655307d3ce Merge "Do not create kolla_user by default" 2022-09-29 11:12:57 +00:00
Michal Nasiadka
62a426c7a3 Bump Ceph and EPEL versions
Bump Ceph to Quincy to align with new versions in Kolla images
and raise EPEL version to 9 (since Zed only supports EL9).

Change-Id: Iabfdea8775ca31a2168ae99f90a33ffe8483f39c
2022-09-27 10:56:33 +02:00
Bartosz Bezak
a39b3f7cda moved to 'python3 -m venv' to create virtualenv
In RHEL9 derivatives python3-virtualenv package is in EPEL9 now.

Change-Id: I22a14bc095f018a1276e5630bf598411c7d8cb54
2022-09-13 08:48:28 +00:00
Zuul
a7a1f9f236 Merge "Don't assume /etc/hosts exists" 2022-09-07 15:30:40 +00:00
Radosław Piliszek
8b9e9c30d5 Do not create kolla_user by default
Change-Id: I530ca17a0f2081efd08893bf8f311e1c91645ce8
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/855017
2022-08-29 12:16:42 +00:00
Mark Goddard
9239254201 packages: install iputils for ping
ping is used in haproxy prechecks, but may not be installed on all
systems. This change ensures the package is installed.

TrivialFix

Change-Id: Ib41e8bc4a9d7c5d32df542ad993826c656786952
2022-08-26 11:29:50 +01:00
Mark Goddard
25020e469f Don't assume /etc/hosts exists
The baremetal role adds entries to /etc/hosts. If the file does not
exist, it will fail:

  TASK [baremetal : Ensure localhost in /etc/hosts] ****************************************
  fatal: [compute2]: FAILED! => {"changed": false, "msg": "Destination /etc/hosts does not exist !", "rc": 257}

Though surprising, this is possible, and we should not assume that
/etc/hosts exists.

This change modifies the above task to create the file if it does not
exist.

Closes-Bug: #1982837
Change-Id: Ic419ee13a10b3fa1b890cfec23bab0a67489eb96
2022-07-26 14:00:17 +01:00
Michal Nasiadka
1fb0e56697 packages: add tzdata to ubuntu package list
Jammy Jellfish (22.04 LTS) doesn't have tzdata installed by default
It's needed for bind mounting /etc/localtime

Change-Id: Iefeafc7d2e6f6025acd0a8bcacd1434a48e7cda4
2022-07-19 16:12:44 +00:00
Mark Goddard
47d24a6ca6 baremetal: refactor libvirt apparmor configuration
Change-Id: Ie262d0359be9ad54ef49a519cccffd038fe02646
2022-05-26 09:52:00 +00:00
Mark Goddard
844903c586 baremetal: refactor package installation into a separate role
* Use package module for all distros
* Apply Apt TTL on Debian/Ubuntu

Change-Id: Ifb0116df8af7e02ef119780a08e8841d2865cf15
2022-05-24 09:45:11 +00:00
Mark Goddard
abc4ecef25 docker: add registry CA configuration
Adapted from Kayobe.

Change-Id: Ib07df6dee124c5d55a7a102606717d222b4c5127
2022-05-06 14:10:34 +00:00
Mark Goddard
137d7643e6 docker: restart docker and containerd in handlers
This is more efficient when there are no changes.

Change-Id: I50ef8ea28e7d83e2788e1ceaee93c97765031a15
2022-05-06 14:09:09 +00:00
Mark Goddard
5471da12b1 baremetal: refactor docker deployment into a separate role
The multitude of set_fact tasks have been replaced with task variables.

The deprecated docker_custom_option variable has been removed.

Change-Id: If3468ab06a64b5998314da1de2644cef3999ece6
2022-05-06 13:47:47 +00:00
Tim Shearer
cefaf5df13 Adjust iscsi package removal on Red Hat hosts.
The host libvirt package should only be removed when the nova-libvirt
container is enabled. But, removal of iscsi-initiator-utils also causes
libvirt to be uninstalled because of its dependency on
libvirt-daemon-driver-storage-iscsi.

This modification prevents iscsi-initiator-utils from being removed
when nova-libvirt is disabled.

Change-Id: Ie7025342ff0c1a052ccbd449e278bc5d3424a0bf
2022-04-19 11:18:12 -04:00
Zuul
07b42a9c85 Merge "Correct docker package on openEuler" 2022-03-30 08:11:07 +00:00
wangxiyuan
c90cf14b6a Correct docker package on openEuler
1. openEuler support docker rpm package by default. It names docker.
2. the docker umask on openEuler is too strict.

This Patch correct the package name and set the umaks to normal on openEuler

bp: support-openeuler-os
Change-Id: I1cc5daee133f11f3b012232cf7434affb065643a
2022-03-26 09:50:14 +08:00
Mark Goddard
f4d5ea2dfc baremetal: refactor docker_sdk installation to a separate role
Use become_user=kolla to create the virtualenv. This ensures that the
virtualenv is owned by the kolla user.

Change-Id: Ifeaa766a48588179b66470fdac9216e2a1b4330d
2022-03-24 10:52:39 +00:00
Zuul
8745783e49 Merge "baremetal: refactor kolla user & group creation into a separate role" 2022-03-23 18:33:18 +00:00
Mark Goddard
6c81058e74 baremetal: refactor kolla user & group creation into a separate role
Change-Id: I1f8d19a97479cc3a780fd33bb509003bc835c2bc
2022-03-23 15:56:59 +00:00
Zuul
125a621d23 Merge "libvirt: make it possible to run libvirt on the host" 2022-03-21 15:41:19 +00:00
Mark Goddard
efd3335f6d libvirt: make it possible to run libvirt on the host
In some cases it may be desirable to run the libvirt daemon on the host.
For example, when mixing host and container OS distributions or
versions.

This change implements changes to the baremetal role necessary to
disable the nova_libvirt container. In this case we should not remove
libvirt packages from the host, nor should we remove the AppArmor
profile for libvirt on Ubuntu hosts.

Needed-By: https://review.opendev.org/c/openstack/kolla-ansible/+/825357

Change-Id: I8dbe805cea66bd04374b36a4e8876da9b05b2045
2022-03-18 16:52:20 +00:00
yangjianfeng
09c276638c baremetal: Add support for git http/https proxy setup
Change-Id: I8a3c4e3729361eed226d3b7d5acf7ea229d9b682
2022-03-16 20:16:29 +00:00
Zuul
60175f15a0 Merge "Add support for Rocky Linux 8" 2022-03-03 15:38:18 +00:00