Configures the tap-as-a-service neutron plugin

Adds the needed changes and configurations in
order to use the neutron plugin, tap-as-a-service,
to create port mirrors using `openstack tap` commands.

Implements: configure-taas-plugin
Depends-On: https://review.opendev.org/c/openstack/kolla/+/885151
Change-Id: Ia09e1f8b423d43c0466fe2d6605ce383fd813544
Signed-off-by: Juan Pablo Suazo <jsuazo@whitestack.com>
This commit is contained in:
Juan Pablo Suazo 2023-06-06 18:07:30 -04:00
parent 05bcccbdeb
commit 664b968bbe
7 changed files with 61 additions and 0 deletions

View File

@ -727,6 +727,7 @@ enable_neutron_provider_networks: "no"
enable_neutron_segments: "no" enable_neutron_segments: "no"
enable_neutron_packet_logging: "no" enable_neutron_packet_logging: "no"
enable_neutron_sfc: "no" enable_neutron_sfc: "no"
enable_neutron_taas: "no"
enable_neutron_trunk: "no" enable_neutron_trunk: "no"
enable_neutron_metering: "no" enable_neutron_metering: "no"
enable_neutron_infoblox_ipam_agent: "no" enable_neutron_infoblox_ipam_agent: "no"

View File

@ -662,6 +662,8 @@ neutron_subprojects:
enabled: "{{ enable_neutron_vpnaas | bool }}" enabled: "{{ enable_neutron_vpnaas | bool }}"
- name: "vmware-nsx" - name: "vmware-nsx"
enabled: "{{ neutron_plugin_agent in ['vmware_dvs', 'vmware_nsxv', 'vmware_nsxv3', 'vmware_nsxp'] }}" enabled: "{{ neutron_plugin_agent in ['vmware_dvs', 'vmware_nsxv', 'vmware_nsxv3', 'vmware_nsxp'] }}"
- name: "tap-as-a-service"
enabled: "{{ enable_neutron_taas | bool }}"
#################### ####################
# Mechanism drivers # Mechanism drivers
@ -738,6 +740,8 @@ service_plugins:
enabled: "{{ neutron_plugin_agent == 'ovn' }}" enabled: "{{ neutron_plugin_agent == 'ovn' }}"
- name: "log" - name: "log"
enabled: "{{ enable_neutron_packet_logging | bool }}" enabled: "{{ enable_neutron_packet_logging | bool }}"
- name: "taas"
enabled: "{{ enable_neutron_taas | bool }}"
neutron_service_plugins: "{{ service_plugins | selectattr('enabled', 'equalto', true) | list }}" neutron_service_plugins: "{{ service_plugins | selectattr('enabled', 'equalto', true) | list }}"
@ -766,6 +770,8 @@ agent_extensions:
enabled: "{{ enable_neutron_sriov | bool }}" enabled: "{{ enable_neutron_sriov | bool }}"
- name: "log" - name: "log"
enabled: "{{ enable_neutron_packet_logging | bool }}" enabled: "{{ enable_neutron_packet_logging | bool }}"
- name: "taas"
enabled: "{{ enable_neutron_taas | bool }}"
neutron_agent_extensions: "{{ agent_extensions | selectattr('enabled', 'equalto', true) | list }}" neutron_agent_extensions: "{{ agent_extensions | selectattr('enabled', 'equalto', true) | list }}"

View File

@ -499,3 +499,26 @@
- neutron_tls_proxy.host_in_groups | bool - neutron_tls_proxy.host_in_groups | bool
notify: notify:
- Restart neutron-tls-proxy container - Restart neutron-tls-proxy container
- name: Copying over neutron_taas.conf
become: true
vars:
service_name: "{{ item.key }}"
services_need_neutron_taas_conf:
- "neutron-server"
- "neutron-openvswitch-agent"
merge_configs:
sources:
- "{{ role_path }}/templates/neutron_taas.conf.j2"
- "{{ node_custom_config }}/neutron/neutron_taas.conf"
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/neutron_taas.conf"
dest: "{{ node_config_directory }}/{{ item.key }}/neutron_taas.conf"
mode: "0660"
when:
- enable_neutron_taas | bool
- item.value.enabled | bool
- item.value.host_in_groups | bool
- item.key in services_need_neutron_taas_conf
with_dict: "{{ neutron_services }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -7,6 +7,14 @@
"owner": "neutron", "owner": "neutron",
"perm": "0600" "perm": "0600"
}, },
{% if enable_neutron_taas | bool %}
{
"source": "{{ container_config_directory }}/neutron_taas.conf",
"dest": "/etc/neutron/neutron_taas.conf",
"owner": "neutron",
"perm": "0600"
},
{% endif %}
{% if check_extra_ml2_plugins is defined and check_extra_ml2_plugins.matched > 0 %}{% for plugin in check_extra_ml2_plugins.files %} {% if check_extra_ml2_plugins is defined and check_extra_ml2_plugins.matched > 0 %}{% for plugin in check_extra_ml2_plugins.files %}
{ {
"source": "{{ container_config_directory }}/{{ plugin.path | basename }}", "source": "{{ container_config_directory }}/{{ plugin.path | basename }}",

View File

@ -13,6 +13,14 @@
"owner": "neutron", "owner": "neutron",
"perm": "0600" "perm": "0600"
}, },
{% if enable_neutron_taas | bool %}
{
"source": "{{ container_config_directory }}/neutron_taas.conf",
"dest": "/etc/neutron/neutron_taas.conf",
"owner": "neutron",
"perm": "0600"
},
{% endif %}
{% if neutron_policy_file is defined %}{ {% if neutron_policy_file is defined %}{
"source": "{{ container_config_directory }}/{{ neutron_policy_file }}", "source": "{{ container_config_directory }}/{{ neutron_policy_file }}",
"dest": "/etc/neutron/{{ neutron_policy_file }}", "dest": "/etc/neutron/{{ neutron_policy_file }}",

View File

@ -0,0 +1,6 @@
[service_providers]
service_provider = TAAS:TAAS:neutron_taas.services.taas.service_drivers.taas_rpc.TaasRpcDriver:default
[taas]
driver = neutron_taas.services.taas.drivers.linux.ovs_taas.OvsTaasDriver
enabled = True

View File

@ -0,0 +1,9 @@
---
features:
- |
Implements [Configure tap-as-a-service plugin on neutron containers].
Adds the needed changes and configurations in order to use the
neutron plugin, tap-as-a-service, to create por mirrors using
`openstack tap` commands.
`Blueprint configure-taas-plugin
<https://blueprints.launchpad.net/kolla-ansible/+spec/configure-taas-plugin>`__