Merge "Provide support for ovs-sfc"

This commit is contained in:
Zuul 2019-01-20 22:43:06 +00:00 committed by Gerrit Code Review
commit e96c4448ea
10 changed files with 156 additions and 7 deletions

View File

@ -0,0 +1,80 @@
======================================
Scenario - Using Open vSwitch with SFC
======================================
Overview
~~~~~~~~
Operators can choose to configure SFC mechanism with Open vSwitch
instead of ODL through the neutron networking-sfc project. The SFC
configuration results in OVS flows being configured with SFC
specifics using MPLS as dataplane technology. This document
outlines how to set it up in your environment.
Recommended reading
~~~~~~~~~~~~~~~~~~~
We recommend that you read the following documents before proceeding:
* General overview of neutron networking-sfc:
`<https://docs.openstack.org/networking-sfc/latest/index.html>`_
* How to configure networking-sfc in neutron:
`<https://docs.openstack.org/networking-sfc/latest/install/configuration.html>`_
Prerequisites
~~~~~~~~~~~~~
Configure your networking according the Open vSwitch setup:
* Scenario - Using Open vSwitch
`<https://docs.openstack.org/openstack-ansible-os_neutron/latest/app-openvswitch.html>`_
OpenStack-Ansible user variables
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Create a group var file for your network hosts
``/etc/openstack_deploy/group_vars/network_hosts``. It has to include:
.. code-block:: yaml
# Ensure the openvswitch kernel module is loaded
openstack_host_specific_kernel_modules:
- name: "openvswitch"
pattern: "CONFIG_OPENVSWITCH"
Set the following user variables in your
``/etc/openstack_deploy/user_variables.yml``:
.. code-block:: yaml
### neutron specific config
neutron_plugin_type: ml2.ovs
neutron_ml2_drivers_type: "flat,vlan"
neutron_plugin_base:
- router
- metering
- networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin
- networking_sfc.services.sfc.plugin.SfcPlugin
# Typically this would be defined by the os-neutron-install
# playbook. The provider_networks library would parse the
# provider_networks list in openstack_user_config.yml and
# generate the values of network_types, network_vlan_ranges
# and network_mappings. network_mappings would have a
# different value for each host in the inventory based on
# whether or not the host was metal (typically a compute host)
# or a container (typically a neutron agent container)
#
# When using Open vSwitch, we override it to take into account
# the Open vSwitch bridge we are going to define outside of
# OpenStack-Ansible plays
neutron_provider_networks:
network_flat_networks: "*"
network_types: "vlan"
network_vlan_ranges: "physnet1:102:199"
network_mappings: "physnet1:br-provider"
**Note:** The only difference to the Standard Open vSwitch configuration
is the setting of the ``neutron_plugin_base``.

View File

@ -49,6 +49,7 @@
(neutron_fwaas_v2 | bool) | ternary(neutron_optional_fwaas_pip_packages, []) +
(neutron_lbaasv2 | bool) | ternary(neutron_optional_lbaas_pip_packages, []) +
(neutron_vpnaas | bool) | ternary(neutron_optional_vpnaas_pip_packages, []) +
(neutron_sfc | bool) | ternary(neutron_optional_sfc_pip_packages, []) +
(neutron_oslomsg_amqp1_enabled | bool) | ternary(neutron_optional_oslomsg_amqp1_pip_packages, []) }}
venv_facts_when_changed:
- section: "neutron"

View File

@ -18,7 +18,7 @@
neutron_optional_combined_pip_packages: |-
{% set packages = neutron_optional_opendaylight_pip_packages %}
{% if 'networking_sfc.services.sfc.plugin.SfcPlugin' in neutron_plugin_base %}
{% set _ = packages.extend(neutron_optional_opendaylight_sfc_pip_packages) %}
{% set _ = packages.extend(neutron_optional_sfc_pip_packages) %}
{% endif %}
{{ packages }}

View File

@ -266,8 +266,8 @@ lock_path = {{ neutron_lock_path }}
{% if neutron_services['neutron-server']['group'] in group_names and 'networking_sfc.services.sfc.plugin.SfcPlugin' in neutron_plugin_base %}
# ODL-SFC
[sfc]
drivers = odl_v2
drivers = {{ (neutron_plugin_type == 'ml2.opendaylight') | ternary('odl_v2', 'ovs') }}
[flowclassifier]
drivers = odl_v2
drivers = {{ (neutron_plugin_type == 'ml2.opendaylight') | ternary('odl_v2', 'ovs') }}
{% endif %}

View File

@ -15,9 +15,14 @@ bridge_mappings = {{ neutron_provider_networks.network_mappings }}
l2_population = {{ neutron_plugins[neutron_plugin_type].l2_population }}
tunnel_types = {{ neutron_tunnel_types }}
enable_distributed_routing = {{ neutron_plugins[neutron_plugin_type].router_distributed | default('False') }}
{% set ovs_agent_extensions = [] %}
{% if 'qos' in neutron_plugin_base %}
extensions = qos
{% set _ = ovs_agent_extensions.append("qos") %}
{% endif %}
{% if 'networking_sfc.services.sfc.plugin.SfcPlugin' in neutron_plugin_base %}
{% set _ = ovs_agent_extensions.append("sfc") %}
{% endif %}
extensions = {{ ovs_agent_extensions | join(',') }}
# Security groups
[securitygroup]

View File

@ -0,0 +1,41 @@
---
# Copyright 2017, Intracom-Telecom
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
### Use OpenDaylight SDN Controller
neutron_plugin_type: "ml2.ovs"
openstack_host_specific_kernel_modules:
- name: "openvswitch"
pattern: "CONFIG_OPENVSWITCH"
group: "physical_host"
neutron_plugin_base:
- router
- metering
- networking_sfc.services.flowclassifier.plugin.FlowClassifierPlugin
- networking_sfc.services.sfc.plugin.SfcPlugin
tempest_run: yes
tempest_plugins:
- name: neutron
repo: https://git.openstack.org/openstack/neutron
branch: master
- name: neutron-plugins
repo: https://git.openstack.org/openstack/neutron-tempest-plugin
branch: master
tempest_test_whitelist:
- "neutron_tempest_plugin.api.test_networks*"

View File

@ -167,6 +167,14 @@ commands =
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:ovs-sfc]
setenv =
{[testenv]setenv}
ANSIBLE_INVENTORY={toxinidir}/tests/ovs_inventory
ANSIBLE_OVERRIDES={toxinidir}/tests/neutron-overrides-ovs-sfc.yml
commands =
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:linters]
basepython = python3
commands =

View File

@ -59,7 +59,7 @@ neutron_optional_opendaylight_pip_packages:
- ceilometer
- networking-bgpvpn
neutron_optional_opendaylight_sfc_pip_packages:
neutron_optional_sfc_pip_packages:
- networking-sfc
neutron_proprietary_nuage_pip_packages:
@ -281,6 +281,12 @@ neutron_bgp_router_id: "{{ neutron_local_ip }}"
neutron_port_forwarding: "{{ ('port_forwarding' in neutron_plugin_base) | ternary('True', 'False') }}"
###
### Service Function Chaining
###
neutron_sfc: "{{ ('networking_sfc.services.sfc.plugin.SfcPlugin' in neutron_plugin_base) | ternary('True', 'False') }}"
###
### Services info
###

View File

@ -55,6 +55,12 @@
vars:
tox_env: odl-sfc
- job:
name: openstack-ansible-ovs-sfc-ubuntu-xenial
parent: openstack-ansible-functional-ubuntu-xenial
vars:
tox_env: ovs-sfc
- job:
name: openstack-ansible-opendaylight-bgpvpn-ubuntu-xenial
parent: openstack-ansible-functional-ubuntu-xenial

View File

@ -29,6 +29,8 @@
- openstack-ansible-opendaylight-ubuntu-xenial
- openstack-ansible-ovs-nsh-ubuntu-xenial
- openstack-ansible-odl-sfc-ubuntu-xenial
- openstack-ansible-ovs-sfc-ubuntu-xenial:
voting: false
- openstack-ansible-opendaylight-bgpvpn-ubuntu-xenial:
voting: false
gate: