Jump to: navigation, search

Brocade-neutron-plugin

Revision as of 21:14, 14 May 2013 by Shh (talk | contribs) (Overview)


Brocade Quantum Plugin


Overview

Brocade Quantum Plugin implements the Quantum v2.0 API. Switches running NOS (e.g. VDX 67xx, VDX 87xx) are supported. It uses NETCONF at the backend to configure the Brocade switch.

The plugin orchestrates virtual network and physical networks at appropriate times in the life cycle of a 'Quantum network' and virtual machines.


 
             +------------+        +------------+          +-------------+
             |            |        |            |          |             |
             |            |        |            |          |   Brocade   |
             | Openstack  |  v2.0  |  Brocade   |  NETCONF |  VCS Switch |
             | Quantum    +--------+  Quantum   +----------+             |
             |            |        |  Plugin    |          |  VDX 67xx   |
             |            |        |            |          |  VDX 87xx   |
             |            |        |            |          |             |
             |            |        |            |          |             |
             +------------+        +------------+          +-------------+

Directory Structure

(this paragraph is relevant ONLY if you have download the Brocade Quantum Plugin from the repository located at: http://www.github.com/brocade/brocade )

Normally you will have your Openstack directory structure as follows:


/opt/stack/nova/
/opt/stack/horizon/
/opt/stack/quantum/quantum/plugins/


This repository represents code that will be put into the brocade directory as:


/opt/stack/quantum/quantum/plugins/brocade


Prerequsites

ncclient v0.3.1 - Python library for NETCONF clients. http://github.com/brocade/ncclient


% git clone https://www.github.com/brocade/ncclient
% cd ncclient; sudo python ./setup.py install


Configuration

1. Specify to Quantum that you will be using the Brocade Plugin - this is done by setting the parameter core_plugin in Quantum:


core_plugin = quantum.plugins.brocade.QuantumPlugin.BrcdPluginV2


2. Physical switch configuration parameters and Brocade specific database configuration is specified in the configuration file specified in the brocade.ini file:


% cat /etc/quantum/plugins/brocade/brocade.ini

[SWITCH]
username = admin
password = password
address  = <switch mgmt ip address>
ostype   = NOS

[DATABASE]
sql_connection = mysql://root:pass@localhost/brcd_quantum?charset=utf8


Please see list of more configurable parameters in the brocade.ini file.

Running Setup.py

Running setup.py with appropriate permissions will copy the default configuration file to /etc/quantum/plugins/brocade/brocade.ini. This file MUST be edited to suit your setup/environment.


% cd /opt/stack/quantum/quantum/plugins/brocade
% python setup.py


Devstack

Please see special notes for devstack at: http://wiki.openstack.org/brocade-quantum-plugin

You may download a Brocade specific devstack. This should be used until the devstack changes become part of the mainstream devstack. [This text will be removed at that time]


% git clone https://www.github.com/brocade/devstack


In order to use Brocade Quantum Plugin, add the following lines in localrc, if localrc file does not exist you may have to create one:


ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-net,n-cond,cinder,c-sch,c-api,c-vol,n-sch,n-novnc,n-xvnc,n-cauth,horizon,rabbit,quantum,q-svc,q-agt
Q_PLUGIN=brocade


As part of using devstack, the files above are copied over from quantum to their final destination. So it will be advisable to edit the files appropriately.


/opt/stack/quantum/etc/quantum.conf -> /etc/quantum/quantum.conf
/opt/stack/quantum/etc/quantum/plugins/brocade/brocade.ini -> /etc/quantum/plugins/brocade/brocade.ini


Hence it is important to make any changes to the configuration in:

/opt/stack/quantum/etc/quantum/plugins/brocade/brocade.ini

Grizzly Release Update

A late change in Horizon prevents the page after login to be not rendered correctly. This is due to the "router" extenstion in Quantum becoming mandatory for the Grizzly release. However the 2 line change below will allow Horizon to render correctly and enable floating ip support for the Brocade Plugin.


--- a/quantum/plugins/brocade/QuantumPlugin.py
+++ b/quantum/plugins/brocade/QuantumPlugin.py
@@ -198,6 +198,7 @@ class AgentNotifierApi(proxy.RpcProxy,
 
 
 class BrocadePluginV2(db_base_plugin_v2.QuantumDbPluginV2,
+                      l3_db.L3_NAT_db_mixin,
                       sg_db_rpc.SecurityGroupServerRpcMixin,
                       agentschedulers_db.AgentSchedulerDbMixin):
     """BrocadePluginV2 is a Quantum plugin.
@@ -213,6 +214,7 @@ class BrocadePluginV2(db_base_plugin_v2.QuantumDbPluginV2,
         """
 
         self.supported_extension_aliases = ["binding", "security-group",
+                                            "router",
                                             "agent", "agent_scheduler"]
         self.binding_view = "extension:port_binding:view"
         self.binding_set = "extension:port_binding:set"