586 Commits

Author SHA1 Message Date
Mark Goddard
c9f8d80ba6 Stop using kolla-ansible bootstrap-servers
The 'kayobe * host configure' commands no longer use the 'kolla-ansible
bootstrap-servers' command, and associated 'baremetal' role in Kolla
Ansible. The functionality provided by the 'baremetal' role has been
extracted into the openstack.kolla Ansible collection, and split
into separate roles. This allows Kayobe to use it directly, and only the
necessary parts.

This change improves failure handling in these Kayobe commands, and aims
to reduce confusion over which '--limit' and '--tags' arguments to
provide.  This ensures that if a host fails during a host configuration
command, other hosts are able to continue to completion. Previously, if
any host failed during the Kayobe playbooks, the 'kolla-ansible
bootstrap-servers' command would not run. This is useful at scale, where
host failures occur more frequently.

This change has implications for configuration of Kayobe, since some
variables that were previously in Kolla Ansible are now in Kayobe.

Several parts of the baremetal role have been split out and used here:

* apparmor-libvirt: disable AppArmor rules for libvirt on Ubuntu.
* docker: Docker installation & configuration. The docker role in
  openstack.kolla combines functionality from kolla-ansible and kayobe.
* etc-hosts: it proved difficult to generalise this, so we have some
  almost duplicated the code from kolla-ansible here. Requires delegated
  fact gathering for the case when --limit is used.
* firewall: support to disable UFW, for feature parity.
* kolla-packages: miscellaneous package installs & removals.

The addition of the stack user to the docker group has been moved to the
user bootstrapping playbook, and the docker SDK installation has been
moved to the virtualenv setup playbook.

Depends-On: https://review.opendev.org/c/openstack/ansible-collection-kolla/+/829587

Story: 2009854
Task: 44505

Change-Id: I61a61ca59652b13687c2247d5881012b51f666a7
2023-03-30 13:52:54 +00:00
Bartosz Bezak
e0ff9a0283 Fixes repositories files name in Rocky Linux 9
Distributions moved to lowercase names with RHEL 9 release.
This patch also removes previously created uppercase files.

Story: 2010637
Task: 47604
Change-Id: I8bf75ce44b9ec1fdd477fcddf2deebf2929d9fc1
2023-03-08 12:34:11 +00:00
Bartosz Bezak
068581456f use OS python to create kolla-ansible venv
Currently kayobe creates kolla-ansible venv using kayobe venv
python3. There are corner cases when creation k-a venv fails
while using kayobe venv created with python 3.6 buggy setuptools/
virtualenv command. Using OS python to create venv solves those
corner cases issues and preserves compatibilty.

Story: 2010634
Task: 47599

Change-Id: Ie0d9bf895f6714cbb8b0bd31a008eb388f4c51c2
2023-03-07 16:45:02 +01:00
Zuul
be0a819623 Merge "Ubuntu: Fix networkd config for multiple VLANs without MTU" 2023-02-16 17:33:52 +00:00
Zuul
6f6c0d3bee Merge "Add Hashi Vault support for Kolla passwords" 2023-01-23 20:09:53 +00:00
Matt Crees
4af5fd172b Add command to run config validation
Adds the command ``kayobe overcloud service configuration validate`` to
run the ``oslo-config-validator`` on all hosts via Kolla-Ansible. The
output directory of the results is specified with the flag
``--output-dir``.

Change-Id: I5d5d16eeabe69e8659e33722165928df096b3559
2023-01-10 16:08:25 +00:00
Pierre Riteau
8640fbd5c0 Sync kolla_tag with kolla-ansible
Without this change, Kayobe was tagging container images with `zed` when
kolla-ansible was expecting something like `zed-ubuntu-jammy`.

Change-Id: I23c409900db2c37105e7b218bbaedcfacb235787
2023-01-06 11:53:29 +01:00
Zuul
f23ce83a12 Merge "Support configuring VLANs with systemd-networkd syntax" 2023-01-03 13:08:12 +00:00
Scott Solkhon
08bd6815bd Add Hashi Vault support for Kolla passwords
This commit adds the necessary changes needed to support
reading and writing Kolla passwords to a Hashicorp Vault server
using Kolla-Ansible commands `kolla-readpwd` and `kolla-writepwd`.

This follows the support that was added into Kolla-Ansible in
the Change-Id Icf0eaf7544fcbdf7b83f697cc711446f47118a4d.

Change-Id: I732988e6160cc64d663d6ef8179f04d3e1226537
2022-12-21 18:27:13 +00:00
866e869b55 Update master for stable/zed
Add file to the reno documentation build to show release notes for
stable/zed.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.

Sem-Ver: feature
Change-Id: Ic251a20c6c4e202bc69449a98a3632a5a5d2811c
2022-12-16 08:46:39 +00:00
Pierre Riteau
63e8a47206 [release] Clean up release notes for Zed release
Release notes about cloud image updates are removed because they refer
to unsupported systems.

Change-Id: I020ca65b2ec1d4be4f6660f9b90be80e952138b0
2022-12-15 13:15:44 +01:00
Mark Goddard
73df27677c Use environment variables for plugin paths
Kayobe provides various roles and plugins in the ansible directory.
These are accessible to Kayobe playbooks in the same directory.

In some cases it can be useful to use these items from Kayobe custom
playbooks, however they cannot since they reside in a different
directory. Typically we work around this by symlinking to the relevant
directory from the directory containing the custom playbook. This is not
an elegant workaround, and has assumptions about the relative paths of
the Kayobe configuration and virtual environment in which Kayobe is
installed.

This change adds the Kayobe role, collection, and plugin paths to the
relevant Ansible lookup paths using environment variables. This allows
custom playbooks to use these items. Also added to the lookup paths are
roles, collections and plugins in Kayobe configuration in the
etc/kayobe/ansible/ directory. This removes the limitation of playbooks
needing to reside in the same directory as those items in order to use
them.

We import the Ansible configuration settings module directly, since it
avoids replicating the configuration logic.

Story: 2010280
Task: 46234

Change-Id: I2fb2b4d7ed937e0184a62b0f119659569448f8df
2022-12-14 22:52:41 +01:00
Michal Nasiadka
65587cb279 Bump up Ansible supported versions to 5.x/6.x
This change bumps up the maximum supported Ansible version to 6.x
(ansible-core 2.13.x) and minimum to 5.x. This synchronises Kayobe with
Kolla Ansible.

Shebang has been removed from modules due to [1].

os_openstacksdk_version has been added as openstack cloud modules don't
support versions greater than 0.99.

[1]: https://github.com/ansible/ansible/pull/76677

Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/867546
Change-Id: Ibb00f6d079442a8509411ae8a71d74fd7bd8cccd
2022-12-14 14:55:33 +00:00
Pierre Riteau
f6660bbff8 Remove support for Monasca and its dependencies
This follows removal of support from Kolla Ansible. This also removes
support for configuring Grafana with overcloud post configure.

Change-Id: I8102fafb00db178f1ae6801d37c43a39033cbfe6
2022-12-13 14:32:33 +01:00
Zuul
ad1a107fa5 Merge "Support OpenSearch configuration" 2022-12-13 12:31:34 +00:00
Pierre Riteau
12ab39568e Support OpenSearch configuration
Change-Id: I6af90d02e619d85b25ad364dc17d411008fd792e
2022-12-13 09:50:21 +00:00
Zuul
3a8311b7e4 Merge "Move to Rocky Linux 9" 2022-12-13 07:24:52 +00:00
Bartosz Bezak
2f447f6545 Move to Rocky Linux 9
CentOS Stream 8 support has been dropped. Migration path will be present
in Yoga release - as a followup change.

MichaelRigart.interfaces does not support custom routes for
NetworkManager yet. It has been disabled in CI for Rocky Linux 9
temporarily.

Non-voting CentOS Stream 9 CI overcloud job is using RL9 container
images (as kolla CI is not building CS9 images anymore).

Change-Id: Idf5ee822b03ba40179803c981500a6bad37594bf
2022-12-12 22:24:47 +01:00
Zuul
13b005fafa Merge "Support copying nova_compute Kolla configuration" 2022-12-08 18:50:41 +00:00
Zuul
1d8a5d6c74 Merge "Support configuration of swap" 2022-12-08 15:55:53 +00:00
Zuul
ba38d7d6ce Merge "Fixes an issue with --wipe-disks" 2022-12-07 15:33:39 +00:00
Mark Goddard
0c074431d0 Support configuration of swap
Supports creating and using swap files, or using pre-existing swap
devices.

Story: 2004958
Task: 29390

Change-Id: Iadb540f42036a4a63cdd5b695b82f1504b3a4a28
2022-12-07 14:23:18 +00:00
Zuul
a50fdb6b7f Merge "Remove kolla_install_type variable" 2022-12-07 12:53:48 +00:00
Zuul
820a60d1ca Merge "Build overcloud host images via DIB by default" 2022-12-07 12:53:42 +00:00
Zuul
3a4b3bea51 Merge "Remove support for Ironic boot option" 2022-12-07 11:22:55 +00:00
Bartosz Bezak
31085438b1 [release] Tidy up release notes for Zed
Change-Id: I4034376cfe78f6a520e035be8df028ff5a747b43
2022-12-07 09:37:05 +00:00
Mark Goddard
50f5fb14e3 Build overcloud host images via DIB by default
Changes overcloud_dib_build_host_images to true, as promised in
I93d242889e225b4e60254f6b9cc5eeb457294ac8.

Change-Id: I322432985535348fb4ebe5bff7db5dd68f16b340
2022-12-02 10:36:51 +00: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
Pierre Riteau
59aaec13f1 Support copying nova_compute Kolla configuration
This folder can be used to store a Nova release file [1] specific to
nova_compute containers.

[1] https://opendev.org/openstack/nova/src/branch/master/etc/nova/release.sample

Change-Id: I2f4f02dbd6834ffd0fa5189b818bdc91a5c168a2
2022-11-15 13:21:36 +01:00
Alex-Welsh
ce74a98b1d Add --add-known-hosts to control host bootstrap
Provide the option to add hosts to the SSH known hosts file when running
control host bootstrap.

Story: 2001670
Task: 6716
Change-Id: I512a343f875ee95194ab4fa98872e349f5a6dc7b
2022-11-09 11:26:15 +00:00
Zuul
42b9341c6c Merge "Add support for ANSIBLE_VAULT_PASSWORD_FILE" 2022-10-20 14:22:52 +00:00
Will Szumski
faa5b33fef Fixes an issue with --wipe-disks
The awk expression that was in use prior to this change was fragile
and in some cases could incorrectly identify the unmounted block
devices. This change switches to parsing the json output which
should hopefully be more robust.

Change-Id: Ifa89e7307eb445b4f1708f0c6ac3409b3f96aafe
Story: 2010367
Task: 46578
2022-10-17 17:37:55 +01:00
Zuul
18ff3195fc Merge "Fix bug trying to decrypt a plaintext file" 2022-10-13 21:38:14 +00:00
Zuul
9a9346660b Merge "Deprecate Monasca and dependencies" 2022-10-13 21:38:06 +00:00
Alex-Welsh
4661cf7410 Add support for ANSIBLE_VAULT_PASSWORD_FILE
Story: 2006766
Task: 37281

Change-Id: I53fac9ac5cfb17729bf854bd9e16373dc9c2efe2
2022-10-13 22:08:15 +02:00
Piotr Parczewski
2c1a18fd38 Deprecate Monasca and dependencies
Adds a deprecation notice for Monasca and dependent services:
Kafka, Storm, ZooKeeper.

Change-Id: Icdeb0ad7544be27f74ddcb3f70dc48bf6c31d772
2022-10-13 19:11:27 +00:00
Alex-Welsh
c81d9e8b2c Fix bug trying to decrypt a plaintext file
Story: 2010315
Task: 46382
Change-Id: I840a56339c826d05da663f8cc8eb0623ad12c468
2022-10-12 14:55:17 +01:00
Zuul
1440acd60e Merge "added option to skip hooks" 2022-10-12 09:13:46 +00:00
k-s-dean
fa40aab7ff Add prometheus-msteams group to kayobe
This adds the prometheus-msteams group into
overcloud-services.j2 as it's missing and has been added
in the yoga release to kolla-ansible.

Change-Id: Ie9b9c49c3f382612a11a6184c30f11c57d40494d
2022-10-07 10:59:02 +01:00
Alex-Welsh
d7069283fd added option to skip hooks
adds the argument --skip-hooks/-sh which will stop the execution of
hooked ansible playbooks. Either a pattern can be specified to match
against or hook execution can be stopped altogether with "all"

Story: 2009241
Task: 43390

Change-Id: I4f2176aa056fec62e31d07140e3d05779480a93d
2022-10-04 14:40:31 +01:00
Pierre Riteau
0db7684428 Update to latest CentOS Stream 8 cloud image
Change-Id: I4c3afb71600781dffe8072303d775cbfad16cbac
2022-09-30 09:10:02 +00:00
Pierre Riteau
2f2387fc3b Remove support for Ironic boot option
This has been dropped upstream in Ironic [1].

[1] https://review.opendev.org/c/openstack/ironic/+/850240

Change-Id: Ib95cdadb00a84edbf6d17de1c2bd450c002e798e
2022-09-30 09:09:59 +00:00
Rafal Lewandowski
e10f176ce1 Add new DIB upper constraints variables
overcloud-dib: added overcloud_dib_dib_upper_constraints_file
ipa: added ipa_build_dib_upper_constraints_file
added os_images_dib_upper_constraints_file to image build
playbooks

New variables were added to facilitate control over the DIB
upper constraints without changing them for other components.
They are empty by default in order to facilitate Rocky9
image builds.

Change-Id: Ib50dd61685f13c60ace67213ddd1e714a80dece3
2022-09-13 11:23:58 +02:00
Pierre Riteau
6d7b8812ae Support configuring VLANs with systemd-networkd syntax
This allows operators to configure arbitrarily named VLAN interfaces
using systemd-networkd.

Story: 2010266
Task: 46178

Change-Id: I666d7011bde0050ebc509b427c1d4f5a66b6231a
2022-09-09 17:57:11 +02:00
Zuul
4a3f88694e Merge "Move group_vars to an inventory directory" 2022-09-08 14:48:26 +00:00
Michal Nasiadka
cfb5c004ea nclu-switch: Fix order in template
Currently description is applied first to the interface, but if it's a
virtual one - it won't exist before running the configuration commands.

Story: 2010279
Task: 46232

Change-Id: I40212b40a4d391272f4063f42e8a7043b3d58fd7
2022-09-08 11:33:33 +02:00
Mark Goddard
af3b719b73 Move group_vars to an inventory directory
The group variables originally in ansible/group_vars/ were playbook
group variables, due to being adjacent to the playbooks. Typically they
provided default values for global variables in the all group, as well
as some more specific groups. This has worked fairly well, but results
in (at least) a couple of problems.

1. The default variable precedence rules mean that these playbook group
   variables have a higher precedence than inventory group variables
   (for a given group). This can make it challenging to override
   playbook group variables in the inventory in Kayobe configuration.

2. Any playbook run by Kayobe must be in the same directory as the
   playbook group variables in order to use them. Given that they
   include variables required for connectivity such as ansible_host and
   ansible_user, this is quite critical. For Kayobe custom playbooks, we
   work around this by symlinking to the group_vars directory from the
   directory containing the custom playbook. This is not an elegant
   workaround, and has assumptions about the relative paths of the
   Kayobe configuration and virtual environment in which Kayobe is
   installed.

Story: 2010280
Task: 46233

Change-Id: Ifea5c7e73f6f410f96a7398bfd349d1f631d9fc0
2022-09-08 10:11:23 +01:00
Zuul
149ed3469c Merge "Support --kolla-playbook argument" 2022-08-26 16:45:36 +00:00
Zuul
12b37356ba Merge "Fix use of become_user by installing acl package" 2022-08-26 16:45:33 +00:00
Zuul
73b9ec07b4 Merge "Add support for specifying SNAT source and destination filters" 2022-08-26 16:19:11 +00:00