14 Commits

Author SHA1 Message Date
Mark Goddard
2c2c8b9504 Fix CI failures
* new ansible-lint complaints
* clamp ansible-lint to <7
* tox 4 support
* switch to CentOS NFV Open vSwitch repository for OVS - rocky 9 RDO install was failing
* switch from Kayobe CentOS stream 8 to Rocky Linux 9 and Ubuntu Jammy
  jobs - these are the current supported distros in Kayobe master

Change-Id: Ic607ccccc866da65c100053bfa15ee141a98679e
2023-05-18 09:24:55 +01:00
Bartosz Bezak
d7312db645 [CI] Drop Python 3.7 job. Fix ansible-lint errors.
Two changes to fix CI:
- Drop Python 3.7 job as Victoria is in extended maintenance now [1][2]
- Name tasks to fix 'unnamed-task' ansible-lint errors

[1]: https://review.opendev.org/c/openstack/governance/+/693743
[2]: https://review.opendev.org/c/openstack/governance/+/743847

Change-Id: I7324467e54deda1a05063cfa1b52a276f7622442
2022-07-26 10:45:19 +02:00
Mark Goddard
9111328e8a 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 Tenks
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

Change-Id: I4831769909c341c72bb178daf8df3309773a56ad
Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2022-02-23 18:17:43 +00:00
Riccardo Pittau
996921a5b6 Fix ansiblelint 208
File permissions not mentioned

Change-Id: I5efbb06ccee9ac7e83bfcf4171c5ae7d2930128b
2020-09-01 11:33:13 +02:00
Mark Goddard
ced8a4a528 Support linux bridge in addition to OVS
While OVS was used initially due to availability of a
networking-generic-switch driver for it, Linux bridge can be useful for
environments where OVS is not available.

This is configured via bridge_type variable. It defaults to
'openvswitch', but may be set to 'linuxbridge'.

Change-Id: I750a73cebc743edcbcd8c23c67e4920d0058bead
2020-03-13 11:12:37 +00:00
Will Szumski
9c126332be Do not install Open vSwitch
Open vSwitch packages are no longer present in the default, or EPEL
repoistories. This means there is no clean way to install Open vSwitch
on CentOS. Instead, we should leave it up the user to decide how to
install it.

Change-Id: Ie56296230c9840e542ac70d96dc68c285d198ad6
2019-10-21 16:59:06 +01:00
Mark Goddard
a30ac7de48 Fix ansible-lint nits
Ansible lint has become more fussy about its nit picking, blocking CI.

This change makes it happy again.

Change-Id: Ifb86c5e071697acda014bb543cab7ebf2b648dc9
2018-12-19 18:55:36 +00:00
Will Szumski
154ec6cc2c Open vSwitch service name is different between distros
The service is called openvswitch-switch on Debian/Ubuntu derivatives -
this starts ovsdb-server.service and ovs-vswitchd.service as
dependencies.

TrivialFix

Change-Id: I0cb06a387cfeadadb3b978afb4d17a88e9935d17
2018-11-08 13:32:08 +00:00
Will Szumski
d697cb47f0 Use state: started instead of state:running
state: running is deprecated and has been removed in
the v2.7.1 release of ansible, see:

617372f8c0 (diff-feb33e2d626dfa74de00b4ffe094e1a0)

Depends-On: https://review.openstack.org/#/c/615224/
Change-Id: I94d710472b1fbc1e05ef11fdefa909b15bedd712
2018-11-08 13:13:44 +00:00
Will Szumski
75a86cb00d Abstract over differerences in Open vSwitch package name
This is need for Debian/Ubuntu support. This was missed from the
initial ubuntu support patch as it is only installed if
the ovs-vsctl command is missing.

TrivialFix

Change-Id: I36c2e71234dd8b446deb382d705ac74add6a3bdf
2018-11-08 11:04:24 +00:00
Will Szumski
41b6e0795f Use package instead of yum
This is with the view that tenks should support multiple
GNU/Linux distributions. The package module abstracts
over the differences between package managers.
2018-10-01 09:47:35 +01:00
Will Miller
99eaf48098 Persist physnet indices in state file
Instead of overwriting the physnet mappings specified in the Tenks
configuration, create a separate dict that maps physnet names to their
indices. Like physnet_mappings, this will be present for each
hypervisor.
2018-09-14 10:27:21 +00:00
Will Miller
caffd7bfaf Add new tenks_state_update plugin
Instead of just an allocations file, Tenks now uses a 'state' file. This
contains the node allocations, as well as physical network mappings and
indices. Clusters can also now be re-deployed with different specs to
update the state.
2018-09-13 16:58:50 +00:00
Will Miller
56b0019258 Restructure playbooks for multiple commands
Much of the logic in the existing 'deploy' playbooks could be reused for
a teardown command, so it didn't make sense to duplicate this. Instead,
rename/restructure playbooks such that they refer to an area of
responsibility, rather than an action.

Also, make some changes to allow a new 'teardown' action.
2018-09-10 14:19:02 +00:00