Add multi-node devstack support to VPNaaS

Modify devstack plugin to support multi-node confgurations
(i.e. where the network node is split from the controller node).

DocImpact: Migrate HowTo wiki page to additional devref text

Change-Id: Iac5756ffe75b2125faace54b74b296036905a9b0
Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
This commit is contained in:
Ryan Moats 2015-12-14 11:28:00 -06:00 committed by RYAN D. MOATS
parent e91661a2d0
commit e544a4f669
4 changed files with 72 additions and 33 deletions

View File

@ -1,26 +1,3 @@
This directory contains the neutron-vpnaas devstack plugin. To
configure VPNaaS, in the [[local|localrc]] section, you will need
to enable the neutron-vpnaas devstack plugin.
This directory contains the neutron-vpnaas devstack plugin. Please
see the devref for how to set up VPNaaS with devstack.
Add a line of the form:
enable_plugin neutron-vpnaas <GITURL> [GITREF]
where
<GITURL> is the URL of a neutron-vpnaas repository
[GITREF] is an optional git ref (branch/ref/tag). The default is
master.
For example
enable_plugin neutron-vpnaas https://git.openstack.org/openstack/neutron-vpnaas stable/kilo
Note: Since the VPN agent process, is a subclass of the L3 agent,
which is a subclass of the FW agent, the DevStack plugin will
check for the FW service being enabled, and if so, will include
the config file specified in Q_FWAAS_CONF_FILE (default is
fwaas_driver.ini).
For more information, see the "Externally Hosted Plugins" section of
http://docs.openstack.org/developer/devstack/plugins.html.

View File

@ -5,7 +5,9 @@ set -o xtrace
function neutron_vpnaas_install {
setup_develop $NEUTRON_VPNAAS_DIR
if is_service_enabled q-l3; then
neutron_agent_vpnaas_install_agent_packages
fi
}
function neutron_agent_vpnaas_install_agent_packages {
@ -26,7 +28,10 @@ function neutron_vpnaas_configure_common {
inicomment $NEUTRON_VPNAAS_CONF service_providers service_provider
iniadd $NEUTRON_VPNAAS_CONF service_providers service_provider $NEUTRON_VPNAAS_SERVICE_PROVIDER
iniset $NEUTRON_CONF DEFAULT service_plugins $Q_SERVICE_PLUGIN_CLASSES
$NEUTRON_BIN_DIR/neutron-db-manage --service vpnaas --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE upgrade head
}
function neutron_vpnaas_configure_db {
$NEUTRON_BIN_DIR/neutron-db-manage --subproject neutron-vpnaas --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE upgrade head
}
function neutron_vpnaas_configure_agent {
@ -83,17 +88,27 @@ if [[ "$1" == "stack" && "$2" == "install" ]]; then
neutron_vpnaas_install
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring neutron-vpnaas"
neutron_vpnaas_generate_config_files
neutron_vpnaas_configure_common
if is_service_enabled q-svc; then
echo_summary "Configuring neutron-vpnaas on controller"
neutron_vpnaas_configure_db
fi
if is_service_enabled q-l3; then
echo_summary "Configuring neutron-vpnaas agent"
neutron_vpnaas_configure_agent
fi
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
if is_service_enabled q-l3; then
echo_summary "Initializing neutron-vpnaas"
neutron_vpnaas_start
fi
elif [[ "$1" == "unstack" ]]; then
if is_service_enabled q-l3; then
neutron_vpnaas_stop
fi
# NOP for clean step

View File

@ -0,0 +1,46 @@
===============================
Configuring VPNaaS for DevStack
===============================
-----------------------
Multinode vs All-In-One
-----------------------
Devstack typically runs in single or "All-In-One" (AIO) mode. However, it
can also be deployed to run on multiple nodes. For VPNaaS, running on an
AIO setup is simple, as everything happens on the same node. However, to
deploy to a multinode setup requires the following things to happen:
#. Each controller node requires database migrations in support of running
VPNaaS.
#. Each network node that would run the L3 agent needs to run the Neutron
VPNaaS agent in its place.
Therefore, the devstack plugin script needs some extra logic.
----------------
How to Configure
----------------
To configure VPNaaS, it is only necessary to enable the neutron-vpnaas
devstack plugin by adding the following line to the [[local|localrc]]
section of devstack's local.conf file::
enable_plugin neutron-vpnaas <GITURL> [BRANCH]
<GITURL> is the URL of a neutron-vpnaas repository
[BRANCH] is an optional git ref (branch/ref/tag). The default is master.
For example::
enable_plugin neutron-vpnaas https://git.openstack.org/openstack/neutron-vpnaas stable/kilo
This VPNaaS devstack plugin code will then
#. Install the common VPNaaS configuration and code,
#. Apply database migrations on nodes that are running the controller (as
determined by enabling the q-svc service),
#. Run the VPNaaS agent on nodes that would normally be running the L3 agent
(as determined by enabling the q-l3 service).

View File

@ -42,12 +42,13 @@ VPNaaS Internals
multiple-local-subnets
Testing
-------
.. toctree::
:maxdepth: 3
devstack
.. todo::
Add notes about functional testing, with info on how