add ml2 config for networking bgpvpn

- provides an option to choose ODL BGVPN
- installs networking-bgpvpn driver
- configures neutron to use ODL BGPVPN driver
- add bgpvpn scenario as a non-voting zuul job
- run networking-bgpvpn tempest

Change-Id: I29b3da7d29399708b2edef2328b174434d081259
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
This commit is contained in:
Periyasamy Palanisamy 2017-11-23 17:23:03 +01:00
parent 293bec2998
commit ced7cb81e9
12 changed files with 128 additions and 3 deletions

View File

@ -54,6 +54,8 @@ networking_odl_git_repo: https://git.openstack.org/openstack/networking-odl
networking_odl_git_install_branch: master
networking_sfc_git_repo: https://git.openstack.org/openstack/networking-sfc
networking_sfc_git_install_branch: master
networking_bgpvpn_git_repo: https://git.openstack.org/openstack/networking-bgpvpn
networking_bgpvpn_git_install_branch: master
# Developer mode
neutron_developer_mode: false

View File

@ -122,6 +122,26 @@ When using this configuration, networking-sfc will be deployed and SFC features
will be activated in ODL. A SFC topology could be then set up through the
networking-sfc API or through an orchestrator like tacker (if deployed).
BGPVPN configuration
~~~~~~~~~~~~~~~~~~~~
ODL provides support for extending L3 services over DC-GW by BGPVPN. This way
Openstack configures ODL as BGP speaker to exchange the routes with DC-GW to
establish the communication between Tenant VMs and external world in the
data path.
To activate BGPVPN service, you should add the following variables in addition
to the OpenStack-Ansible user variables mentioned above.
.. code-block:: yaml
# Activate the BGPVPN capabilities of ODL
neutron_plugin_base:
- odl-router_v2
- bgpvpn
Security information
~~~~~~~~~~~~~~~~~~~~

View File

@ -0,0 +1,8 @@
---
features:
- Enable networking-bgpvpn ml2 neutron driver to make
``OpenDaylight SDN Controller`` to support BGPVPN
for external network connectivity. You can set the
``neutron_plugin_type`` to ``ml2.opendaylight`` and
``neutron_plugin_base`` to ``odl-router_v2`` and
``bgpvpn`` to enable BGPVPN on the OpenDaylight.

View File

@ -85,6 +85,18 @@
- "'service_conf_path' in item"
- "'service_conf' in item"
- name: Generate neutron bgpvpn networking configuration
template:
src: "networking_bgpvpn.conf.j2"
dest: "{{ neutron_conf_dir }}/networking_bgpvpn.conf"
owner: "root"
group: "{{ neutron_system_group_name }}"
mode: "0640"
notify:
- Restart neutron services
when:
- "'bgpvpn' in neutron_plugin_base"
- name: Copy neutron rootwrap filters
copy:
src: "{{ item }}"

View File

@ -26,7 +26,7 @@
when: ovs_manager.stdout == ""
- name: Configure hosts for networking-odl, force kernel datapath
command: "{{ neutron_bin }}/neutron-odl-ovs-hostconfig --noovs_dpdk {% if 'odl-router_v2' in neutron_plugin_base or 'odl-router' in neutron_plugin_base %}--datapath_type=system --bridge_mappings={{ neutron_provider_networks.network_mappings }} {% endif %}"
command: "{{ neutron_bin }}/neutron-odl-ovs-hostconfig --noovs_dpdk {% if neutron_provider_networks.network_mappings is defined and 'odl-router_v2' in neutron_plugin_base or 'odl-router' in neutron_plugin_base %}--datapath_type=system --bridge_mappings={{ neutron_provider_networks.network_mappings }} {% endif %}"
when: ovs_manager.stdout == ""
- name: Retrieve current OvS local ip

View File

@ -0,0 +1,4 @@
# {{ ansible_managed }}
[service_providers]
service_provider=BGPVPN:OpenDaylight:networking_odl.bgpvpn.odl_v2.OpenDaylightBgpvpnDriver:default

View File

@ -7,7 +7,7 @@ tenant_network_types = {{ neutron_provider_networks.network_types if neutron_pro
mechanism_drivers = {{ neutron_ml2_mechanism_drivers }}
extension_drivers = port_security{% if 'qos' in neutron_plugin_base %},qos{% endif %}{% if 'dns' in neutron_plugin_base %},dns{% endif %}
{% if neutron_plugin_type == 'ml2.opendaylight' and ('odl-router_v2' in neutron_plugin_base or 'odl-router' in neutron_plugin_base) %}
{% if neutron_provider_networks.network_mappings is defined and (neutron_plugin_type == 'ml2.opendaylight' and ('odl-router_v2' in neutron_plugin_base or 'odl-router' in neutron_plugin_base)) %}
bridge_mappings = {{ neutron_provider_networks.network_mappings }}
{% endif %}

View File

@ -0,0 +1,59 @@
---
# Copyright 2017, Ericsson AB
#
# 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.
### Ensure the openvswitch kernel module is loaded
openstack_host_specific_kernel_modules:
- name: "openvswitch"
pattern: "CONFIG_OPENVSWITCH"
group: "network_hosts"
### Use OpenDaylight SDN Controller
neutron_plugin_type: "ml2.opendaylight"
odl_ip: "{{ hostvars[groups['opendaylight'][0]]['ansible_default_ipv4']['address'] }}"
neutron_opendaylight_conf_ini_overrides:
ml2_odl:
url: "http://{{ odl_ip }}:8180/controller/nb/v2/neutron"
username: admin
password: admin
neutron_plugin_base:
- odl-router_v2
- bgpvpn
neutron_ml2_drivers_type: "flat,vlan,vxlan"
neutron_provider_networks:
network_flat_networks: "*"
network_types: "vlan"
network_vlan_ranges: "physnet1:102:199"
network_mappings: "physnet1:br-provider"
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
- name: https://git.openstack.org/openstack/networking-bgpvpn
branch: master
tempest_test_whitelist:
- "neutron_tempest_plugin.api.test_networks*"
- "networking_bgpvpn_tempest.tests.api.test_bgpvpn"
- "networking_bgpvpn_tempest.tests.scenario.test_bgpvpn_basic"

11
tox.ini
View File

@ -159,6 +159,17 @@ commands =
bash -c "{toxinidir}/tests/tests-repo-clone.sh"
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:opendaylight-bgpvpn]
deps =
{[testenv:ansible]deps}
setenv =
{[testenv]setenv}
ANSIBLE_INVENTORY={toxinidir}/tests/opendaylight_inventory
ANSIBLE_OVERRIDES={toxinidir}/tests/neutron-overrides-opendaylight-bgpvpn.yml
commands =
bash -c "{toxinidir}/tests/tests-repo-clone.sh"
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:ovs-nsh]
deps =
{[testenv:ansible]deps}

View File

@ -103,6 +103,7 @@ neutron_optional_dragonflow_pip_packages:
neutron_optional_opendaylight_pip_packages:
- networking-odl
- networking-bgpvpn
neutron_optional_opendaylight_sfc_pip_packages:
- networking-sfc
@ -122,6 +123,7 @@ neutron_developer_constraints:
- "git+{{ dragonflow_git_repo }}@{{ dragonflow_git_install_branch }}#egg=dragonflow"
- "git+{{ networking_odl_git_repo }}@{{ networking_odl_git_install_branch }}#egg=networking-odl"
- "git+{{ networking_sfc_git_repo }}@{{ networking_sfc_git_install_branch }}#egg=networking-sfc"
- "git+{{ networking_bgpvpn_git_repo }}@{{ networking_bgpvpn_git_install_branch }}#egg=networking-bgpvpn"
neutron_bin: "/openstack/venvs/neutron-{{ neutron_venv_tag }}/bin"

View File

@ -55,10 +55,16 @@
vars:
tox_env: ssl
- job:
name: openstack-ansible-odl-sfc-ubuntu-xenial
parent: openstack-ansible-functional-ubuntu-xenial
voting: false
vars:
tox_env: odl-sfc
- job:
name: openstack-ansible-opendaylight-bgpvpn-ubuntu-xenial
parent: openstack-ansible-functional-ubuntu-xenial
voting: false
vars:
tox_env: opendaylight-bgpvpn

View File

@ -27,6 +27,7 @@
- openstack-ansible-ovs-nsh-ubuntu-xenial
- openstack-ansible-neutron-ssl-nv
- openstack-ansible-odl-sfc-ubuntu-xenial
- openstack-ansible-opendaylight-bgpvpn-ubuntu-xenial
experimental:
jobs:
- openstack-ansible-integrated-deploy-aio