Add the BGP dynamic routing neutron plugin

Depends-On: I48c1a920c94134663fd162b04db48a88eaa6c80b
Change-Id: Ib66f2c59ded9123655e2bf9720148b6d1dcd238f
This commit is contained in:
Paulo Matias 2016-08-23 17:25:02 -03:00
parent a0b5c6bfe5
commit f9975ac7c4
6 changed files with 110 additions and 1 deletions

View File

@ -32,6 +32,9 @@ neutron_lbaas_git_install_branch: master
neutron_vpnaas_git_repo: https://git.openstack.org/openstack/neutron-vpnaas
neutron_vpnaas_git_install_branch: master
neutron_dynamic_routing_git_repo: https://git.openstack.org/openstack/neutron-dynamic-routing
neutron_dynamic_routing_git_install_branch: master
neutron_requirements_git_repo: https://git.openstack.org/openstack/requirements
neutron_requirements_git_install_branch: master
@ -47,6 +50,7 @@ neutron_developer_constraints:
- "git+{{ neutron_fwaas_git_repo }}@{{ neutron_fwaas_git_install_branch }}#egg=neutron-fwaas"
- "git+{{ neutron_lbaas_git_repo }}@{{ neutron_lbaas_git_install_branch }}#egg=neutron-lbaas"
- "git+{{ neutron_vpnaas_git_repo }}@{{ neutron_vpnaas_git_install_branch }}#egg=neutron-vpnaas"
- "git+{{ neutron_dynamic_routing_git_repo }}@{{ neutron_dynamic_routing_git_install_branch }}#egg=neutron-dynamic-routing"
- "git+{{ calico_git_repo }}@{{ calico_git_install_branch }}#egg=calico"
- "git+{{ networking_calico_git_repo }}@{{ networking_calico_git_install_branch }}#egg=networking-calico"
@ -109,6 +113,7 @@ neutron_plugin_core: "{{ neutron_plugins[neutron_plugin_type].plugin_core }}"
# - firewall
# - lbaas
# - neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2
# - neutron_dynamic_routing.services.bgp.bgp_plugin.BgpPlugin
# - vpnaas
# - metering
# - qos
@ -236,6 +241,15 @@ neutron_services:
config_options: "--config-file {{ neutron_conf_dir }}/neutron.conf --config-file {{ neutron_conf_dir }}/lbaas_agent.ini --log-file=/var/log/neutron/neutron-lbaasv2-agent.log"
config_overrides: "{{ neutron_lbaas_agent_ini_overrides }}"
config_type: "ini"
neutron-bgp-dragent:
group: neutron_bgp_dragent
service_name: neutron-bgp-dragent
service_en: "{{ neutron_bgp | bool }}"
service_conf_path: "{{ neutron_conf_dir }}"
service_conf: bgp_dragent.ini
config_options: "--config-file {{ neutron_conf_dir }}/neutron.conf --config-file {{ neutron_conf_dir }}/bgp_dragent.ini --log-file=/var/log/neutron/neutron-bgp-dragent.log"
config_overrides: "{{ neutron_bgp_dragent_ini_overrides }}"
config_type: "ini"
neutron-vpnaas-agent:
group: neutron_l3_agent
service_name: neutron-vpn-agent
@ -311,6 +325,16 @@ neutron_fwaas: "{% if 'firewall' in neutron_plugin_base %}True{% else %}False{%
# Please add the 'vpnaas' to the neutron_plugin_base list
neutron_vpnaas: "{% if 'vpnaas' in neutron_plugin_base %}True{% else %}False{% endif %}"
## Neutron Dynamic Routing Agent's BGP plugin
# To enable the BGP plugin, add the following item to the neutron_plugin_base list:
# neutron_dynamic_routing.services.bgp.bgp_plugin.BgpPlugin
#
# NOTE(matias): BgpPlugin doesn't have entry points and the full classpath
# is required.
neutron_bgp: "{% if 'neutron_dynamic_routing.services.bgp.bgp_plugin.BgpPlugin' in neutron_plugin_base %}True{% else %}False{% endif %}"
neutron_bgp_speaker_driver: neutron_dynamic_routing.services.bgp.agent.driver.ryu.driver.RyuBgpDriver
neutron_bgp_router_id: "{{ neutron_local_ip }}"
## Drivers
neutron_driver_network_scheduler: neutron.scheduler.dhcp_agent_scheduler.WeightScheduler
neutron_driver_router_scheduler: neutron.scheduler.l3_agent_scheduler.LeastRoutersScheduler
@ -476,6 +500,7 @@ neutron_pip_packages:
- neutron_fwaas
- neutron_lbaas
- neutron_vpnaas
- neutron_dynamic_routing
- pycrypto
- python-glanceclient
- python-keystoneclient
@ -518,5 +543,6 @@ neutron_linuxbridge_agent_ini_overrides: {}
neutron_lbaas_agent_ini_overrides: {}
neutron_vpnaas_agent_ini_overrides: {}
neutron_openvswitch_agent_ini_overrides: {}
neutron_bgp_dragent_ini_overrides: {}
neutron_calico_dhcp_agent_ini_overrides: {}
neutron_calico_felix_ini_overrides: {}

View File

@ -14,6 +14,10 @@ Load Balancer as a Service (LBaaS)
VPN as a Service (VPNaaS)
Provides a method for extending a private network across a public network.
BGP Dynamic Routing service
Provides a means for advertising self-service (private) network prefixes
to physical network devices that support BGP.
Firewall service (optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -188,3 +192,39 @@ The VPNaaS default configuration options are changed through the
dict.
.. _conf override: http://docs.openstack.org/developer/openstack-ansible/install-guide/configure-openstack.html
BGP Dynamic Routing service (optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The `BGP Dynamic Routing`_ plugin for neutron provides BGP speakers which can
advertise OpenStack project network prefixes to external network devices, such
as routers. This is especially useful when coupled with the `subnet pools`_
feature, which enables neutron to be configured in such a way as to allow users
to create self-service `segmented IPv6 subnets`_.
.. _BGP Dynamic Routing: http://docs.openstack.org/networking-guide/config-bgp-dynamic-routing.html
.. _subnet pools: http://docs.openstack.org/networking-guide/config-subnet-pools.html
.. _segmented IPv6 subnets: https://cloudbau.github.io/openstack/neutron/networking/2016/05/17/neutron-ipv6.html
The following procedure describes how to modify the
``/etc/openstack_deploy/user_variables.yml`` file to enable the BGP Dynamic
Routing plugin.
#. Add the BGP plugin to the ``neutron_plugin_base`` variable
in ``/etc/openstack_deploy/user_variables.yml``:
.. code-block:: yaml
neutron_plugin_base:
- ...
- neutron_dynamic_routing.services.bgp.bgp_plugin.BgpPlugin
Ensure that ``neutron_plugin_base`` includes all of the plugins that you
want to deploy with neutron in addition to the BGP plugin.
#. Execute the neutron install playbook in order to update the configuration:
.. code-block:: shell-session
# cd /opt/openstack-ansible/playbooks
# openstack-ansible os-neutron-install.yml

View File

@ -112,6 +112,19 @@ MIGRATIONS = {
}
},
'installed': False
},
'neutron-dynamic-routing': {
'branches': {
'expand': {
'revision': None,
'head': None
},
'contract': {
'revision': None,
'head': None
}
},
'installed': False
}
},
'run_contract': True,
@ -228,7 +241,7 @@ def main():
for line in current.splitlines():
head = False
project_match = re.search(
"^\s*Running current for (neutron(-[a-z]+)?) ...$",
"^\s*Running current for (neutron(-[a-z-]+)?) ...$",
line
)
migration_match = re.search("^([0-9a-z]{4,12})(\s\(head\))?$", line)

View File

@ -0,0 +1,9 @@
---
features:
- "Neutron BGP dynamic routing plugin can now optionally be deployed and
configured. Please see `OpenStack Networking Guide: BGP dynamic routing
<http://docs.openstack.org/networking-guide/config-bgp-dynamic-routing.html>`_
for details about what the service is and what it provides."
upgrade:
- Database migration tasks have been added for the dynamic routing neutron
plugin.

View File

@ -109,6 +109,18 @@
- neutron_services['neutron-lbaasv2-agent']['group'] in group_names
- neutron_services['neutron-lbaasv2-agent'].service_en | bool
- include: neutron_init_common.yml
vars:
program_name: "{{ neutron_services['neutron-bgp-dragent'].service_name }}"
program_config_options: "{{ neutron_services['neutron-bgp-dragent'].config_options }}"
service_name: "{{ neutron_service_name }}"
system_user: "{{ neutron_system_user_name }}"
system_group: "{{ neutron_system_group_name }}"
service_home: "{{ neutron_system_home_folder }}"
when:
- neutron_services['neutron-bgp-dragent']['group'] in group_names
- neutron_services['neutron-bgp-dragent'].service_en | bool
- include: neutron_init_common.yml
vars:
program_name: "{{ neutron_services['neutron-vpnaas-agent'].service_name }}"

View File

@ -0,0 +1,9 @@
# {{ ansible_managed }}
[BGP]
# BGP speaker driver class to be instantiated. (string value)
bgp_speaker_driver = {{ neutron_bgp_speaker_driver }}
# 32-bit BGP identifier, typically an IPv4 address owned by the system running
# the BGP DrAgent. (string value)
bgp_router_id = {{ neutron_bgp_router_id }}