A Cisco Plugin Framework for Quantum Supporting L2 Networks Spanning Multiple Switches
Configuration for Quantum 2.0 - Folsom release to achieve Nova network parity with Cisco plugin framework. This requires use of the OpenVSwitch plugin as sub-plugin.
Pre-requisites If you are using a Nexus switch in your topology, you'll need the following NX-OS version and packages to enable Nexus support:
- NX-OS 5.2.1 (Delhi) Build 69 or above.
- paramiko library - SSHv2 protocol library for python
- ncclient v0.3.1 - Python library for NETCONF clients
You need a version of ncclient modified by Cisco Systems. To get it, from your shell prompt do:
git clone email@example.com:CiscoSystems/ncclient.git sudo python ./setup.py install
For more information of ncclient, see: http://schmizz.net/ncclient/
Plugin Installation Instructions
1. Make a backup copy of quantum/etc/quantum.conf.
2. Edit quantum/etc/quantum.conf and edit the "core_plugin" for v2 API:
core_plugin = quantum.plugins.cisco.network_plugin.PluginV2
3. MySQL database setup
a. Create quantum_l2network database in mysql with the following command: mysql -u<mysqlusername> -p<mysqlpassword> -e "create database quantum_l2network"
b. Enter the quantum_l2network database configuration info in the quantum/plugins/cisco/conf/db_conn.ini file:
[DATABASE] name = quantum_l2network user = <put_db_user_name_here> pass = <put_db_password_here> host = <put_quantum_mysql_host_here>
Nexus switch sub-plugin configuration
To turn on support for Cisco Nexus switches:
1. Uncomment the nexus_plugin property in /etc/quantum/plugins/cisco/cisco_plugins.ini to read:
2. Enter the relevant configuration in the /etc/quantum/plugins/cisco/nexus.ini file. Example:
[SWITCH] Change the following to reflect the Nexus switch details nexus_ip_address=<put_nexus_switch_ip_address_here> Interfaces connected from the Nexus Switch to the compute hosts ports, e.g.: 1/10 and 1/11 ports=<put_interfaces_names_here_separated_by_commas> Port number where the SSH will be running at the Nexus Switch, e.g.: 22 (Default)
[DRIVER] name=quantum.plugins.cisco.nexus.cisco_nexus_network_driver_v2.CiscoNEXUSDriver name=quantum.plugins.cisco.tests.unit.v2.nexus.fake_nexus_driver.CiscoNEXUSFakeDriver
3. Make sure that SSH host key of the Nexus switch is known to the host on which you are running the Quantum service. You can do this simply by logging in to your Quantum host as the user that Quantum runs as and SSHing to the switch at least once. If the host key changes (e.g. due to replacement of the supervisor or clearing of the SSH config on the switch), you may need to repeat this step and remove the old hostkey from ~/.ssh/known_hosts.
4. Verify that you have the correct credentials for each IP address listed in quantum/plugins/cisco/conf/credentials.ini. Example:
- Provide the Nexus credentials, if you are using Nexus switches. IP address, username and password.
- If not this will be ignored.
[10.0.0.1] username=admin password=mySecretPasswordForNexus
In general, make sure that Nexus switch used in your system, has a credential entry in the above file. This is required for the system to be able to communicate with those switches.
OpenVSwitch sub-plugin configuration
By using the OpenVSwitch plugin as a sub-plugin, parity with pre-Folsom Nova networking is achieved. VLAN mode must be enabled. To use it together with the Nexus device sub-plugin perform the following steps:
1. Update /etc/quantum/plugins/cisco/l2network_plugin.ini so that the [MODEL] section contains a single item:
2. Update /etc/quantum/plugins/cisco/cisco_plugins.ini so that the [PLUGINS] section of the configuration file contains the following configuration:
3. Update the /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini file to set the "sql_connection"
sql_connection = mysql://<username>:<password>@<mysql_host>/ovs_quantum?charset=utf8
and additionally make the OpenVSwitch plugin operate in VLAN mode with the desired VLAN range for each network:
tenant_network_type = vlan enable_tunneling = False network_vlan_ranges = default:<vlan_min>:<vlan_max>
For more details about configuration of the OpenVSwitch plugin please consult the Quantum Admin Guide (http://docs.openstack.org/trunk/openstack-network/admin/content/index.html).