Commit Graph

93 Commits

Author SHA1 Message Date
Matt Crees d6bdef9e58 Bump KA Ansible versions to match new defaults
KA ansible versions bumped here: https://review.opendev.org/c/openstack/kolla-ansible/+/907522

Change-Id: I5359618de96d3ccc7215ead2e331e5c0fd2a7fc5
2024-04-03 19:30:12 +01:00
Pierre Riteau 8da5472ea8 Remove kolla_enable_host_ntp variable
This variable was configuring enable_host_ntp in kolla-ansible, which
was removed in the Xena release.

Change-Id: I737598d3bbe40b933b4b727eccc3b2a76ed97cdb
2023-12-01 13:02:19 +01:00
Zuul 409d85758a Merge "Allow more fine-grained groups for ironic, loadbalancer & network" 2023-11-30 11:20:16 +00:00
Zuul b31023ea54 Merge "Fix setting kolla_admin_openrc_cacert" 2023-11-09 01:35:47 +00:00
Grzegorz Koper 80f6db34cd Bump up Ansible supported versions to 7.x/8.x
This change bumps up the maximum supported version of Ansible to 8.x
(ansible-core 2.15.x) and minimum to 7.x (ansible-core 2.14.x).

Depends on:
https://github.com/stackhpc/ansible-role-systemd-networkd/pull/10

https://github.com/stackhpc/ansible-role-dell-powerconnect-switch/pull/13

https://github.com/stackhpc/ansible-role-mellanox-switch/pull/8

gateway_ip was being set to empty string. This was triggering neutron
""Invalid input for gateway_ip. Reason: '' is not a valid IP address."
Omitting by default.

Installing openstack.cloud collection.
Upgrade failed as Ansible in kayobe-venv was not upgraded.

Change-Id: Ia3550644e5fc3e83f792e46d42b4c35d5eec4705
2023-11-07 18:33:06 +01:00
Mark Goddard 2071dc9a38 Allow more fine-grained groups for ironic, loadbalancer & network
Kayobe has fairly coarse-grained default groups - controller, compute,
etc, which work well in the majority of cases. Kolla Ansible allows much
more fine-grained placement on a per-service basis, e.g.
ironic-conductor. If the operator has taken advantage of this
fine-grained placement, then it is possible that some of the assumptions
in Kayobe may be incorrect. This is one downside of the split between
Kayobe and Kolla Ansible.

For example, Ironic conductor services may have been moved to a subset
of the top level 'controllers' group. In this case, we would not want
the Ironic networks to be mapped to all hosts in the controllers group -
only those running Ironic conductor services. The same argument can be
made if the loadbalancer services (HAProxy & keepalived) or Neutron
dataplane services (e.g. L3 & DHCP agents) have been separated from the
top level 'network' group.

This change abstracts the placement of Ironic conductor Ironic
inspector, loadbalancer and network services into separate variables,
rather than referencing the top level 'controllers' and 'network' groups
directly. These variables may be updated by the operator to match the
service placement.

Change-Id: Idbf181c795ee98ad653f11ae483f9dab4ef1b599
2023-11-01 16:16:45 +00:00
Mark Goddard 95729405a3 Fix setting kolla_admin_openrc_cacert
Kolla Ansible renamed kolla_internal_fqdn_cacert to
kolla_admin_openrc_cacert in Victoria, after which we no longer set the
variable correctly in globals.yml. This would lead to a missing
OS_CACERT in admin-openrc.sh and public-openrc.sh.

This change fixes the issue by renaming the relevant Kayobe variables to
match and passing through the correct variable. Backwards compatibility
is provided until the end of the deprecation period.

kolla_public_openrc_cacert -> kolla_external_fqdn_cacert
kolla_admin_openrc_cacert -> kolla_internal_fqdn_cacert

Story: 2010486
Task: 47054

Change-Id: I9e1cc20579cf80525d6ef732a1aac99a65bc171b
Co-Authored-By: Maksim Malchuk <maksim.malchuk@gmail.com>
2023-11-01 10:55:19 +00:00
Mark Goddard 1dce99094b Remove unsupported kolla_docker_registry_insecure variable
This variable is not supported since
I61a61ca59652b13687c2247d5881012b51f666a7, but was not removed from
etc/kayobe/kolla.yml in that change.

This change also adds the replacement variable docker_registry_insecure
to etc/kayobe/docker.yml.

TrivialFix
Change-Id: I3fa96f0276e08a6678e5d743399d01bc19a8dd1b
2023-10-25 15:45:31 +00:00
Will Szumski c75a32e72f Pass through kolla inventories as is
Previously, we only supported passing through group_vars. Passing
through the inventory as is allows you to use other features of ansible
inventory such as host vars. It also simplifies the logic of merging
multiple inventories as we can just pass the inventory to ansible and
let ansible take care of the rest. This is useful for the multiple
environments feature.

Change-Id: I28f5d73d414d405d67f5fc92ab371aa2e28a4ce3
Story: 2002009
Task: 42910
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/802863
2023-05-30 18:42:24 +02:00
Bartosz Bezak 773eead34d Bump up Ansible supported versions to 6.x/7.x
This change bumps up the maximum supported Ansible version to 7.x
(ansible-core 2.14.x) and minimum to 6.x (ansible-core 2.13.x).
This synchronises Kayobe with Kolla Ansible.

Change-Id: Ibffecaa8085bd38ebc8cded9a4bfebe77d59d515
2023-05-25 08:10:17 +00:00
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 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
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
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
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
Mark Goddard 05c09523fa ironic: default to ipxe booting
Enable the Ironic ipxe boot interface by default, following a similar
change in Ironic [1].

Drop the kolla_enable_ironic_ipxe flag, following a similar change in
Kolla Ansible [2]. Both PXE and iPXE are now enabled by default. Users
may revert to using PXE for ironic inspector's dnsmasq, by setting
ironic_dnsmasq_serve_ipxe to false in etc/kayobe/kolla/globals.yml.

[1] https://review.opendev.org/c/openstack/ironic/+/816824
[2] https://review.opendev.org/c/openstack/kolla-ansible/+/834512/

Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/832159
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/834511
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/837069

Change-Id: Ifb80bd15a20c9cfb8fbc6e0f6ac23baae631a18e
2022-04-12 11:57:21 +00:00
Zuul 31951b6d59 Merge "Adds kolla_ansible_venv_ansible" 2022-04-07 10:02:47 +00:00
Will Szumski 1375517d2b Adds kolla_ansible_venv_ansible
This adds a variable that allows you to modify the version of ansible
installed in the kolla-ansible virtualenv. This is useful if you want
to use a customised version of ansible.

Change-Id: I319dd51ed3221826f820fbc0ae3639b89e9c82ea
2022-03-30 15:36:37 +01:00
Mark Goddard f4493e41ff libvirt: support SASL authentication
Adds support for SASL authentication of libvirt TCP and TLS connections
when using a compute host libvirt daemon.

In line with the dependent Kolla Ansible patch, we enable SASL by
default, and use DIGEST-MD5 with TCP and SCRAM-SHA-256 with TLS.

Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/833022
Depends-On: https://github.com/stackhpc/ansible-role-libvirt-host/pull/52

Story: 2009858
Task: 44735

Change-Id: Id3972c24022aeb6421494c3cccdc8e7cbce802e6
2022-03-24 13:44:48 +00:00
Mark Goddard c4b74f4801 libvirt: deploy libvirt on the host
In some cases it may be desirable to run libvirt daemon on the host. For
example, when mixing host and container OS distributions.

This change makes it possible to disable the nova_libvirt container, by
setting kolla_enable_nova_libvirt_container to false.

The stackhpc.libvirt-host role is used in order to install and configure
a libvirt daemon on compute hosts when
kolla_enable_nova_libvirt_container is false.

Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/825357
Depends-On: https://review.opendev.org/c/openstack/kayobe-config-dev/+/829225
Depends-On: https://github.com/stackhpc/ansible-role-libvirt-host/pull/51

Story: 2009858
Task: 44495

Change-Id: I73fef63fb886a9d543d2f4231fb009523495edb3
2022-03-24 13:44:48 +00:00
Mark Goddard 3efc551e7e Install Ansible collections for kolla-ansible
This change uses the new Galaxy requirements file in Kolla Ansible to
install the openstack.kolla collection.

Cross-project dependencies on ansible-collection-kolla are supported.

Story: 2009854
Task: 44504

Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/819430
Change-Id: Iac185dd2bbbca128c6cf71b2734e94b3e1c6133b
2022-02-22 09:23:35 +00:00
Zuul 555f865dcd Merge "Disable EPEL by default" 2022-02-09 16:45:55 +00:00
Zuul 4028a56fac Merge "Add support for configuring proxy settings" 2022-01-04 17:22:48 +00:00
Mark Goddard e0dec91689 Disable EPEL by default
EPEL is no longer required for a default installation. Let's disable it.

Also clean up the install_epel variable from Kolla Ansible globals.yml
template, since it never existed.

Story: 2009757
Task: 44227

Change-Id: I96eb4685f997e85ad2ee5318640d58d0287a016d
2021-12-23 13:04:12 +00:00
Zuul a9aa8c7f7c Merge "Add support for Ironic inspection through DHCP-relay" 2021-11-25 23:25:57 +00:00
Pierre Riteau 2e2c96e394 Allow Docker to use insecure registry when deployed by Kayobe
Kolla Ansible has recently updated the default Docker configuration to
stop using an insecure registry [1]. To avoid breaking existing Kayobe
deployments, automatically set docker_registry_insecure to true if we
deploy a registry without TLS.

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

Change-Id: Ifec7102812b5503cb02f207098192e99e7193d49
2021-10-19 11:50:59 +02:00
Pierre Riteau e48960ecf2 Add support for configuring proxy settings
Change-Id: Ic5130a7512d4a26354bd292b0ab51ab4a9279f0a
2021-10-19 10:58:19 +02:00
Michal Nasiadka c5a3efafb4 [release] Sync Kolla Ansible inventory for Xena
Change-Id: Ib6f89f57a1fe9dc88414260e8a221de3ecd6b9a5
2021-10-15 13:02:53 +02:00
Maksim Malchuk 02e01e983b Add support for Ironic inspection through DHCP-relay
This change fix the issue when inspection didn't work corrctly in
case of L3-routed Ironic networks when DHCP packets received via a
DHCP-relay. The dnsmasq optional netmask part in the dhcp-range
parameter should be specified [1] in this case.

[1] https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

Change-Id: I9488a72db588e31289907668f1997596a8ccdec6
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/813268
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
2021-10-15 12:25:55 +03:00
Mark Goddard e318cadaa5 Use merge_configs and merge_yaml to generate Kolla configs
Supports merging configuration for the following files:

* kolla/globals.yml
* kolla/config/bifrost/bifrost.yml
* kolla/config/bifrost/dib.yml
* kolla/config/bifrost/servers.yml
* kolla/kolla-build.conf

Configuration is merged from the following sources:

* Kayobe source code
* Base Kayobe config
* Kayobe environment

Co-Authored-By: Will Szumski <will@stackhpc.com>
Change-Id: I552bd8f7853b2032954b372bf4476676dac3e271
Story: 2002009
Task: 42974
2021-10-08 09:08:45 +01: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
Mark Goddard 869185ea7b Switch default docker storage driver to overlay2
To avoid switching existing deployments from devicemapper to overlay2,
we check the existing storage driver configuration directly with the
Docker daemon, or if unreachable by reading the /etc/docker/daemon.json
configuration file.

Co-Authored-By: Pierre Riteau <pierre@stackhpc.com>
Story: 2005667
Task: 30972

Change-Id: Iaf2ee8c9f302f4684ae039bb00b2e2e5969cf1fc
2020-10-05 19:59:11 +00:00
Zuul ba2df0e1a8 Merge "Performance: Parallelise Kolla Ansible host vars generation" 2020-09-24 09:27:37 +00:00
Mark Goddard b12f9e35e5 Performance: Parallelise Kolla Ansible host vars generation
Kayobe generates a host_vars file for each host in the Kolla Ansible
inventory. These contain network interfaces and other host-specific
things. Currently this is done by iterating over all hosts, which does
not scale well with a large number of hosts.

This change extracts the host vars generation into a separate role, and
executes it in a play targeted at all hosts, with delegate_to:
localhost. This ensures that host variable files are generated in
parallel.

Story: 2007993
Task: 40629

Change-Id: Iae75e17024adee9c2874c14d3ed36f4c87ba48d7
2020-09-22 17:06:04 +01:00
Mark Goddard 7b80482ac3 Docker registry basic auth
Adds support for HTTP basic authentication with the Docker registry.

The kolla docker registry password is now written to passwords.yml.

Change-Id: Ie6e854a66a6660d4e02771fe2b5dd97af814194d
Story: 2007952
Task: 40429
2020-09-21 14:19:29 +02:00
jacky06 335ed05a5d Remove mongodb integration
more info: a6c97d7284

Depends-On: https://review.opendev.org/#/c/735030/
Change-Id: Ib94da2b14182ddc4157ca09066bd049c842fdf9c
2020-07-07 23:38:12 +08:00
gugug c456f0b9b7 Remove retired congress
Congress has been retired, remove the congress stuff

See https://review.opendev.org/721742

Change-Id: I0af07cf3cde5cf2ca2700c647eb40cc509379864
2020-06-23 23:25:25 +08:00
Pierre Riteau 791c219f4d Remove remaining mentions of neutron-lbaas
Change-Id: I0aae6eaa8a2351c15a29b45427e6971e60b9e1a8
2020-06-19 12:57:03 +02:00
Zuul 043f843759 Merge "Copy custom certificates" 2020-06-17 19:09:47 +00:00
Mark Goddard 1d12ca545e Copy custom certificates
Various kolla-ansible TLS features (including backend TLS and custom CA
certs) require certificates to be passed via
$KOLLA_CONFIG_PATH/certificates/. Currently Kayobe does not support
this.

This change adds support for copying across files from
$KAYOBE_CONFIG_PATH/kolla/certificates.

It also uses the kolla-ansible default value for
kolla_external_fqdn_cert and kolla_internal_fqdn_cert when
kolla_external_tls_cert and kolla_internal_tls_cert are respectively
not set. This allows for the standard kolla-ansible configuration
approach of dropping these certificates into the
$KAYOBE_CONFIG_PATH/kolla/certificates directory, rather than defining
them as variables. This can be useful if using the kolla-ansible
certificates command to generate certificates for testing.

Change-Id: I646930ad8ea70991d6ffa00f15f93f72d922141b
Story: 2007679
Task: 39790
2020-06-04 15:08:18 +00:00
Mark Goddard b9d76f6ef5 Remove support for CentOS 7 and Python 2
* Always use Python 3
* Drop code paths for CentOS 7
* Drop support for Yum
* Remove support for host NTP daemon, always use chrony
* Switch references from 'yum_install_epel' to 'dnf_install_epel'
* Remove overcloud host image workaround for tagged VLAN admin network
* Remove the kayobe.utils.yum_install function, which is unused

Change-Id: I368f6edafed9779658798fc342116b4c1b3ffd48
Story: 2006574
Task: 39481
2020-05-28 10:25:51 +01:00
Zuul 647b19ae76 Merge "Avoid writing out requirements.txt in kolla-ansible role" 2020-04-22 00:50:45 +00:00
Mark Goddard 58db0ed2e0 Avoid writing out requirements.txt in kolla-ansible role
We can use the Ansible pip module's support for specifying a list of
packages with version constraints.

Change-Id: If5d3c7117175732c54e38025692eb4c036053ebc
2020-04-17 11:14:49 +01:00
Mark Goddard 939e298c56 Don't use become for Kolla Ansible
Using become for all Kolla Ansible tasks is not ideal from a security
perspective. It is also incompatible with fact caching, since it causes
facts to be gathered and cached as root, which changes some facts.

This change modifies the default value of kolla_ansible_become to false.

Change-Id: I9ee5c55e59276f70c92e9c698c01123dcf8919a1
Story: 2007492
Task: 39217
2020-03-31 15:32:10 +01:00
Radosław Piliszek e7d7daa531 Remove ceph block device support
It leaves certain ceph mentions in globals.yml.j2 as it needs
syncing with kolla-ansible contents anyways
(these are all comments).

Change-Id: I05e9c6223583e9bb5dc0020edc0b56990275093c
Story: 2007295
Task: 38766
2020-03-18 10:28:33 +00:00
Pierre Riteau c9474bf9b0 Revert "Use OpenStack Train release"
This reverts commit a93b85ba07.

The local Python executable for Kolla Ansible is changed to Python 3
because Kolla Ansible master no longer supports Python 2.

Change-Id: I768ce8db9cec1c70d94f271997bbcc64d370403e
2020-02-14 14:54:23 +00:00
Mark Goddard 6b47717c43 Make local kolla-ansible Python executable configurable
The default is still Python 2. This is a necessary prerequisite for using
the master branch of kolla-ansible, which requires Python 3.

Change-Id: Ida5b60b723c8208bb7305c3d669eafdab6dbbe01
Story: 2004959
Task: 38767
2020-02-14 14:54:23 +00:00
Doug Szumski 72d4d64609 Support custom Kolla group_vars
In Kayobe hosts which are part of a Nova cell can be managed via the
existing controller and compute groups. However, since Nova Cells are
configured via group vars in Kolla Ansible we need some way of setting
these. We could pass vars through to Kolla Ansible host vars using
`kolla_overcloud_inventory_pass_through_host_vars` but the list of
variables which may be set on a per cell basis is large and undefined.

This change allows the user to directly specify Kolla Ansible group vars
as part of Kayobe config, allowing the deployment of Nova Cells by
Kayobe to be largely unchanged from the procedure documented in Kolla
Ansible.

Change-Id: I2695034d36936fcc77a4828c67f9552155781dd6
Story: 2004291
Task: 37804
2019-12-18 16:45:36 +01:00
Mark Goddard c8f105a907 Support internal API TLS encryption
Kolla Ansible Train introduces support for TLS encryption of the
internal API. This change introduces support for internal API encryption
in Kayobe.

The following new variables are introduced:

* kolla_enable_tls_internal
* kolla_internal_tls_cert
* kolla_internal_fqdn_cacert

Also only set kolla_*_fqdn_cacert in globals.yml if set.

Change-Id: If432afde374fe247d09c952e110c9567e17daea1
Story: 2006959
Task: 37649
2019-12-11 17:13:38 +00:00