1393 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov
da0ddb5102 Add versioned CAPI jobs to gates
Change-Id: Ic0365b92667b6f16436c95378fc112a0c7696473
2025-03-24 10:59:20 +00:00
Jonathan Rosser
26c6832e3f Test all supported versions of k8s workload cluster with magnum-cluster-api
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_magnum/+/916647
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/916810
Change-Id: Ib6a577655f3c9d482b37f355b01c16fcdc93ea05
2025-03-24 08:05:11 +00:00
Zuul
a7cc1311dd Merge "[doc] Add brief documentation for mcapi proxy" 2025-03-22 20:09:16 +00:00
Zuul
3cbd720637 Merge "Move variables defenition from playbook level for mcapi proxy" 2025-03-22 16:06:23 +00:00
Zuul
2d796b96d6 Merge "Fix a typo in mcapi_vexxhost_proxy_git_constraints" 2025-03-22 11:50:49 +00:00
Zuul
ad0ff28110 Merge "Respect defined version and source of mcapi driver" 2025-03-22 09:50:23 +00:00
Zuul
303fec92f3 Merge "Store clusterctl and magnum-system namespace dump if cluster create fails" 2025-03-21 18:51:56 +00:00
Zuul
f58dcb9f1d Merge "Define clusterctl_version explicitly" 2025-03-21 14:38:41 +00:00
Dmitriy Rabotyagov
6b4740eed3 Define clusterctl_version explicitly
Since [1] default for clusterctl_version is no longer set, so we have
to provide it explicitly.

[1] 471eaec113

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/944970
Change-Id: I31b340573d9d5f6145b4484740c7cbbe4f20f0ff
2025-03-19 08:40:28 +00:00
Zuul
68e03f5720 Merge "upgraded prometheus.prometheus collection does not need ansible fact vars anymore" 2025-03-13 16:19:48 +00:00
Marcus Klein
b5a493359b upgraded prometheus.prometheus collection does not need ansible fact vars anymore
Change-Id: I638dae545e33259798ef849396289cb53569c372
2025-03-13 11:17:46 +01:00
Marcus Klein
20b3c6aeb1 traefik_common for Grafana deployment needs to use Python 3
Change-Id: I17a99bf5d1761527c07817ff4248ac0fb5e25752
2025-03-13 11:14:14 +01:00
Dmitriy Rabotyagov
fe7e08184f [doc] Add brief documentation for mcapi proxy
Change-Id: I95c314bf308f618b59dce77c61635866eed63b92
2025-02-03 12:26:15 +00:00
Dmitriy Rabotyagov
c7b491d4c5 Move variables defenition from playbook level for mcapi proxy
Spreading variables across multiple places with a different
naming convention adds confusing about their origin and
default values.

This patch aims to align naming convention as well as defaults
defenition on role level rather then partially in playbook and partially
in role.

Change-Id: I8a665a485cb8028ce7aee62cb9107cd6a482e2e4
2025-02-03 12:26:10 +00:00
Dmitriy Rabotyagov
8c1c2c6c94 Fix a typo in mcapi_vexxhost_proxy_git_constraints
Change-Id: Ie7a1a0c196527057945cb70c49527620e02935c1
2025-02-03 12:26:05 +00:00
Dmitriy Rabotyagov
a7a9a8b643 Respect defined version and source of mcapi driver
At the moment proxy and main mcapi versions are not related in
any way, which means that there can be a conflict between
installed versions of proxy with mcapi.

One of examples was triggered by [1], when proxy was issuing
a requests towards API which does not exist yet in the central
cluster. This resulted in HTTPError: 404 Client Error: Not Found for url
when proxy tried to fetch list of clusters.

[1] 8e375c414a

Change-Id: Iba1f34e7b79e34f23b8169ecd20907832626d540
2025-02-03 12:25:55 +00:00
Jonathan Rosser
83b18fe6ac Store clusterctl and magnum-system namespace dump if cluster create fails
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/936625
Change-Id: I218847b64a087b2949dda1b2871d4ee93180feb5
2025-01-22 22:28:43 +00:00
Jonathan Rosser
3a4d3450e0 Upgrade magnum-cluster-api to 0.24.2
This brings in new features and a bug fix for application of
security groups.

Change-Id: I1cc97696535949db41141d239ddd08e5b4070091
2025-01-20 13:02:24 +00:00
Zuul
23172d96b7 Merge "[doc] Move all variables to group_vars" 2024-11-27 11:58:11 +00:00
Rishat Azizov
b5fba6cf35 add variable filebeat_auth_enabled for possibility to disable sending auth logs
Change-Id: I2cc2f2c4bdebbdec1fab835e9c0df1f165b5fc9d
2024-11-27 12:13:16 +05:00
Dmitriy Rabotyagov
e9a9df3ff8 [doc] Move all variables to group_vars
Makes sense to be consistent and follow suggestion to use group_vars
where applicable.
There is a bug in vexxhost collection which prevents from doing so,
unfortunatelly.

For this to be accurate doc, a patch to vexxhost collection should
land first:
https://github.com/vexxhost/ansible-collection-kubernetes/pull/136

Change-Id: I5f48e913436bf5d6a8d6c0a9f77c58886e451d1f
2024-11-20 11:11:14 +01:00
Zuul
551f75c425 Merge "Allow to supply custom kibana backend to roles" 2024-11-20 09:16:33 +00:00
Zuul
331d48149c Merge "Allow ELK7 roles to run with disabled ANSIBLE_INJECT_FACT_VARS" 2024-11-20 09:16:18 +00:00
Marcus Klein
78bb1459ea Fix Grafana deployment
Change-Id: I45c4f4f87a348d83d50952ab658058a1dc88ff08
2024-11-18 15:11:58 +01:00
Dmitriy Rabotyagov
e013623e78 Allow to supply custom kibana backend to roles
Right now all roles assume that kibana has been deployed using the
stack and `kibana` group is defined in Ansible.

However if one need just to use journalbeat or filebeat roles to push
data to external Kibana - it's barely possible. Defining `kibana` group
is risky as open doors for installKibana playbook execution.

This patch adds variable kibana_target along with more role-specific
variables that allow to adjust thi behaviour and manually supply
Kibana endpoint to be configured.

Change-Id: Id2a42ae9c6146dcc9e86b15fee36372b95461d20
2024-11-14 10:07:38 +00:00
Dmitriy Rabotyagov
1d52793ec6 Allow ELK7 roles to run with disabled ANSIBLE_INJECT_FACT_VARS
Enabling ANSIBLE_INJECT_FACT_VARS does result in a performance
regression as each variable loaded to runtime slows down task
execution.

We disable ANSIBLE_INJECT_FACT_VARS in OSA by default for a while,
so ELK role should also be able to run with this setting disabled.

Change-Id: Ibffc09cdb4f9289ddad38211ccb0265642b4321f
2024-11-11 13:07:31 +00:00
Dmitriy Rabotyagov
d596f5d2b3 Ensure that k8s hostname is lowercased
In case your hostname contains upper-level symbols, they will be all
lowered in k8s cluster.

With that it's important to ensure that the expected hostname used in
roles is always lowercase one.

Change-Id: I31e483cc7766e26f932984067daee6983122db10
2024-10-05 14:37:39 +02:00
Zuul
66c4f75967 Merge "mcapi_proxy: ensure proxy service restarts when venv changes" 2024-09-19 19:55:17 +00:00
Jonathan Rosser
b0194e3932 Update magnum-cluster-api version
Pick up fixes for nodegroup and proxy service when FIP is in use.

Change-Id: I3a6325d86d81a6684fa0d9f8cb78e2b4b5f28b82
2024-09-09 15:00:38 +01:00
Zuul
7cc118d2fd Merge "Update magnum-cluster-api version" 2024-09-09 13:56:02 +00:00
Jonathan Rosser
b0a4b8733b Revert "Ensure that python3-cryptography is present in k8s control plane hosts"
This reverts commit c1ede00a6cb3dfdf776ba4335898ef883474a596.

Reason for revert: This is now included in v1.14.0 of ansible-collection-kubernetes

Change-Id: Icfbe36d45cf39e0b7d8fdf4bbf674711cb34004f
2024-09-09 09:58:57 +00:00
Jonathan Rosser
06d5c9cd0c Update magnum-cluster-api version
Change-Id: Iab4559adf79021c9868ad83c9d3b527fe8e4a484
2024-09-04 10:09:04 +01:00
Zuul
0fc47826b0 Merge "Add support for deploying mcapi control plane k8s on debian-12" 2024-09-02 15:00:01 +00:00
Zuul
f0ecb05150 Merge "Add support for deploying mcapi control plane k8s on rocky linux" 2024-09-02 13:01:28 +00:00
Zuul
5dddad4eb0 Merge "Add variables and hook for high-availability k8s control plane test" 2024-09-02 11:12:12 +00:00
Zuul
730c5b2991 Merge "Allow mcapi proxy git sources and python package versions to be overridden" 2024-09-02 11:02:48 +00:00
Andrew Bonney
f0992b8d0d mcapi_proxy: ensure proxy service restarts when venv changes
Previously the service would only restart if the systemd unit
was modified. If the venv was changed in-place, this would not
trigger a restart.

Change-Id: I685bedef4d84bf718aaa9064a20d3c1b71daf5bf
2024-08-29 09:03:31 +01:00
Andrew Bonney
ec11f51a72 mcapi_proxy: allow overriding of systemd service environment
Various configuration options for this service are set using
environment variables, including: POD_IP, PROXY_BIND, PROXY_PORT.

This patch exposes a variable which can be used to set these via
the systemd service unit.

Change-Id: I5f649c3894c63e13649f8f12d4dd839b22ba6cfc
2024-08-22 10:50:13 +01:00
Jonathan Rosser
0e2baf97d2 Allow mcapi proxy git sources and python package versions to be overridden
This code is updated to have overrides similar to many other service
roles in openstack-ansible.

Change-Id: I4fc16b27dacd4ab40269cde1371e70255a4e2ced
2024-08-15 13:28:02 +01:00
Jonathan Rosser
2ca458f78e Add support for deploying mcapi control plane k8s on debian-12
Change-Id: I616d723f3ec5ef87123b3dba498e9bccce50b9c1
2024-07-23 11:55:59 +00:00
Jonathan Rosser
8b4b915b81 Add support for deploying mcapi control plane k8s on rocky linux
Change-Id: I03e2775d6e7067a1bfbac8f438617266f556930b
2024-07-17 07:56:02 +00:00
Jonathan Rosser
10b48d400a Add variables and hook for high-availability k8s control plane test
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/924156
Change-Id: Ia9f3a424d9d9249eb5ff76ee2d9125769c3ca732
2024-07-16 16:03:14 +00:00
Jonathan Rosser
818df7b1a8 Update format of install_defaults
In order to respect group_vars install_defaults role moved vars
definition from inlcude_vars to the role defaults. With that now we
need to provide correct path to the defaults during the role import.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/923390
Change-Id: I23ad7c955e2d0e267ea6c1aeb50f6be24c515b69
2024-07-10 08:37:31 +01:00
Jonathan Rosser
14bbd0a81e Pass kubeconfig path directly to sonobuoy role
This makes it possible to use the sonobuoy role to test the control
plane cluster as well as workload clusters.

Change-Id: Ia82ebe150774fbd694e74531c3392518887698fd
2024-07-05 19:33:51 +01:00
Jonathan Rosser
c27aee8829 Split large k8s_install playbook into more specific smaller playbooks
Change-Id: I0569a323f12848cd100abf6e50ee7afdf08b37b3
2024-07-05 19:33:51 +01:00
Zuul
1fd9949ebd Merge "Pin version of magnum_cluster_api driver" 2024-07-01 16:19:34 +00:00
Jonathan Rosser
7a98658aea Update ansible-collection-kubernetes version pin
There is now a release version that includes all the changes necessary
for successful deployment with openstack-ansible.

Change-Id: I5e76bfb1210c5890f6d373acf1a35d0a6d981ff4
2024-06-29 12:11:10 +00:00
Jonathan Rosser
039ea30f5f Pin version of magnum_cluster_api driver
Change-Id: I1f3ba1169009d5932c9a91a96f1b22907181f952
2024-06-29 12:10:32 +00:00
Jonathan Rosser
2ab60332f2 Pin version of ansible-collection-kubernetes
Pin prior to OSA Caracal release - ideally this would be a released
version of the collection but OSA requires a recent patch that is
not yet included in a release.

Change-Id: I54acd63939f2e9f87554446d4c33a155a3ffe812
2024-05-20 12:56:35 +01:00
Jonathan Rosser
a362cfab06 Apply label to control plane k8s nodes to allow cluster-autoscaler to run
Kubernetes cluster-autoscaler only runs on nodes with a specific label
so add task to set required label(s) on control-plane k8s nodes.

Change-Id: I9bf371ad1ba5d80b7e5a950ac1d60499788d9d0d
2024-05-20 12:53:39 +01:00