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
There are two cases when we may want to delete things:
1. if a desired node configuration or spec changes, we delete existing node
resources.
2. if we use the teardown.yml playbook, cmd == teardown, delete
everything, including global state.
In both cases, Tenks state (state.yml), all nodes to be deleted are given a
'state' of absent'. We should therefore use this rather than the 'cmd' variable
which only works in the latter case.
Change-Id: Icc033340c7fd882e61d90e3d086f7ba4a5b673bf
Story: 2004907
Task: 29257
If the ironic_config field is not present in a node definition, then
that node should not be registered with ironic. In this case we also
don't need to query glance for images or wait for resources to appear
in placement.
If nova_flavors is empty, we do not need to register flavors, so no need
to install the client or check for OS_USERNAME.
Also fixes an issue in the action plugin where it would fail if
ironic_config field is not present in a node definition.
Finally, in CI deploy/teardown tests, rather than skipping tasks, we now
remove the ironic_config field from the node definition, and set
nova_flavors to empty, such that we exercise these code paths.
Change-Id: I29b42665f1609c99e80f12ab6f3815d0e0918dae
Story: 2004412
Task: 28056
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.
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.
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.
Call node enrolment from the top level deploy.yml playbook, to make it
easier to skip enrolment if necessary. Rename to fit the scheme of
second-level playbooks.
Also, fix variable scoping issues by giving a different name to the
temporary variable used when calling the scheduling module. This ensures
that all future tasks correctly reference the allocations from the file.