Neutron REST Proxy Plugin READMEv2

Pre-requisite OVS Configuraion (on each compute node)

Each OVS needs to be configured with the network controller information. Do the equivalent to the following on each compute node (you can execute it as script):

NETWORK_CONTROLERS=<comma-seperated-list-of-network-ctrls>
sudo ovs-vsctl \--no-wait \-\- \--if-exists del-br br-int
sudo ovs-vsctl \--no-wait add-br br-int
sudo ovs-vsctl \--no-wait br-set-external-id br-int bridge-id br-int
for ctrl in `echo ${NETWORK_CONTROLERS} \| tr ',' ' '`
do
 sudo ovs-vsctl set-controller br-int "tcp:${ctrl}:6633"
done

Plugin configuration (on the Neutron server node)

1. MySQL should be installed on the host. Initialize MySQL as follows (where $PASS = mysql password):

$ mysql -u root -p$PASS -e 'DROP DATABASE IF EXISTS restproxy_neutron;'
$ mysql -u root -p$PASS -e 'CREATE DATABASE IF NOT EXISTS restproxy_neutron;'

2. Edit /etc/neutron/neutron.conf and set provider as:

[DEFAULT]
core_plugin = neutron.plugins.bigswitch.plugin.NeutronRestProxyV2
allow_overlapping_ips = False
lock_path = <path_to_which_neutron_process_can_write_to>

When using a packaged installation, setting lock_path to /run/lock/neutron will usually work. Note that the lock_path needs to be set only when installing from packages. When installing from devstack, the default value for lock_path will work.

3. Edit /etc/nova/nova.conf and set provider as:

libvirt_vif_type=ethernet
libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver

4. Edit /etc/neutron/plugins/restproxy/restproxy.ini (replace <placeholder> as required):

[DATABASE]
sql_connection = mysql://<username>:<password>@<database_ip>:3306/restproxy_neutron
[RESTPROXY]
servers=<controller_ip:port_num>,<controller_ip:port>
serverauth=<username>:<password>
serverssl=False

Example configuration:

[DATABASE]
sql_connection = mysql://root:pass@127.0.0.1:3306/restproxy_neutron
[RESTPROXY]
servers=192.168.1.100:80,192.168.1.101:80
serverauth=user:pass
serverssl=False

5. Start the neutron service by providing the relevant configuration files

cd <neutron_path> && python <neutron_path>/bin/neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/restproxy/restproxy.ini

Running unit tests

To run tests related to the Plugin run the following from the top level Neutron directory:

./run_tests.sh neutron.tests.unit.bigswitch.test_restproxy_plugin

Testing with a dummy controller

A dummy controller which returns success for all operations has been provided. Run it as follows:

cd <neutron_path>/plugins/bigswitch/tests/
python test_server

Configure the "servers" property in restproxy.ini to 127.0.0.1:8899, and run the neutron server. You can now tests using Neutron CLI.