Jump to: navigation, search

Difference between revisions of "Arista-neutron-ml2-driver"

(Created page with "<!-- ##master-page:HomepageTemplate --> <!-- #format wiki --> <!-- #language en --> = PLUMgrid Neutron Plugin = ---------------------- == Overview == PLUMgrid Neutron P...")
 
(Directory Structure)
 
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<!-- ##master-page:[[HomepageTemplate]] -->
+
= Arista Neutron ML2 Driver =
<!-- #format wiki -->
 
<!-- #language en -->
 
 
 
= PLUMgrid Neutron Plugin =
 
----------------------
 
  
 
== Overview ==
 
== Overview ==
  
PLUMgrid Neutron Plugin implements the Neutron v2.0 API.
+
Arista ML2 Mechanism Driver implement ML2 Plugin Mechanism Driver API.
 +
This driver can manage all types of Arista switches.
 +
For further details, please refer to [https://www.arista.com/custom_data/downloads/?f=/support/download/DesignGuides/OpenStack_Deployment_Guide.pdf Arista OpenStack Deployment Guide] provided by Arista Networks.
  
 
== Directory Structure ==
 
== Directory Structure ==
  
The PLUMgrid Neutron Plugin can be downloaded from the repository located at:
+
The Arista Neutron ML2 Driver can be downloaded from the repository located at:
  
 
<pre><nowiki>
 
<pre><nowiki>
https://github.com/emagana/quantum.git
+
https://git.openstack.org/openstack/networking-arista (branch: master)
(branch: bp/plumgrid-quantum-plugin)
 
 
</nowiki></pre>
 
</nowiki></pre>
  
  
This repository represents code that will be put into the PLUMgrid directory as:
+
This repository includes the latest development code and actively maintained branches.  Tagged releases for networking-arista are available from the Python Package Index at:
 
+
https://pypi.org/project/networking_arista/.
 
 
<pre><nowiki>
 
/opt/stack/quantum/quantum/plugins/plumgrid
 
</nowiki></pre>
 
 
 
  
 
== Requirements ==
 
== Requirements ==
  
PLUMgrid IO Visor 2.1.9 (or higher)
+
* Prior to enabling Arista Driver, Arista EAPI Host (see configuration example below) must be up and running. For details, please see Arista OpenStack Deployment Guide
 +
* Ensure that jsonrpclib is installed (see Arista OpenStack Deployment Guide)
  
 
== Configuration ==
 
== Configuration ==
  
=== Plugin configuration (Neutron server node) ===
+
=== Arista Driver configuration (Neutron server node) ===
 
 
* MySQL should be installed on the host. Initialize MySQL as follows (where $PASS = mysql password):
 
 
 
<pre><nowiki>
 
$ mysql -u root -p$PASS -e 'DROP DATABASE IF EXISTS plumgrid_neutron;'
 
$ mysql -u root -p$PASS -e 'CREATE DATABASE IF NOT EXISTS plumgrid_neutron;'
 
</nowiki></pre>
 
 
 
* Edit /etc/quantum/quantum.conf and set provider as:
 
 
 
<pre><nowiki>
 
[DEFAULT]
 
core_plugin = quantum.plugins.plumgrid.plumgrid_nos_plugin.plumgrid_plugin.NeutronPluginPLUMgridV2
 
allow_overlapping_ips = False
 
</nowiki></pre>
 
 
 
* Edit /etc/nova/nova.conf and set provider as:
 
 
 
<pre><nowiki>
 
libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
 
libvirt_vif_type=ethernet
 
</nowiki></pre>
 
  
* Edit /etc/quantum/plugins/plumgrid/plumgrid.ini (replace <placeholder> as required):
+
* Edit /etc/neutron/plugins/ml2/ml2_conf_arista.ini:
  
 
<pre><nowiki>
 
<pre><nowiki>
[DATABASE]
+
[ml2_arista]
sql_connection = mysql://<username>:<password>@<database_ip>:3306/plumgrid_neutron
+
# (StrOpt) EOS IP address. This is required field. If not set, all
 
+
#          communications to Arista EOS will fail
[PLUMgridNOS]
+
#
servers=<plumgrid_NOS_IP>
+
# eapi_host =
username=<username>
+
# Example: eapi_host = 192.168.0.1
password=<password>
+
#
 +
# (StrOpt) EOS command API username. This is required field.
 +
#          if not set, all communications to Arista EOS will fail.
 +
#
 +
# eapi_username =
 +
# Example: arista_eapi_username = admin
 +
#
 +
# (StrOpt) EOS command API password. This is required field.
 +
#          if not set, all communications to Arista EOS will fail.
 +
#
 +
# eapi_password =
 +
# Example: eapi_password = my_password
 +
#
 +
# (StrOpt) Defines if hostnames are sent to Arista EOS as FQDNs
 +
#          ("node1.domain.com") or as short names ("node1"). This is
 +
#          optional. If not set, a value of "True" is assumed.
 +
#
 +
# use_fqdn =
 +
# Example: use_fqdn = True
 +
#
 +
# (IntOpt) Sync interval in seconds between Quantum plugin and EOS.
 +
#          This field defines how often the synchronization is performed.
 +
#          This is an optional field. If not set, a value of 180 seconds
 +
#          is assumed.
 +
#
 +
# sync_interval =
 +
# Example: sync_interval = 60
 +
#
 +
# (StrOpt) Defines Region Name that is assigned to this OpenStack Controller.
 +
#          This is useful when multiple OpenStack/Neutron controllers are
 +
#          managing the same Arista HW clusters. Note that this name must
 +
#          match with the region name registered (or known) to keystone
 +
#          service. Authentication with Keysotne is performed by EOS.
 +
#          This is optional. If not set, a value of "RegionOne" is assumed.
 +
#
 +
# region_name =
 +
# Example: region_name = RegionOne
 
</nowiki></pre>
 
</nowiki></pre>
  
  
=== Configuration Example ===
 
 
<pre><nowiki>
 
[DATABASE]
 
sql_connection = mysql://root:nova@127.0.0.1:3306/plumgrid_neutorn
 
 
[PLUMgridNOS]
 
nos_server=127.0.0.1
 
username=plumgrid
 
password=plumgrid
 
 
Start the neutron service by providing the relevant configuration files
 
Start the neutron service by providing the relevant configuration files
 
cd <quantum_path> && python <quantum_path>/bin/quantum-server --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/plugins/plumgrid/plumgrid.ini
 
</nowiki></pre>
 
 
 
== PLUMgrid Plugin Unit Tests ==
 
  
 
<pre><nowiki>
 
<pre><nowiki>
cd <quantum_path>  
+
cd <neutron_path> && python <neutron_path>/bin/neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_arista.ini
./run_tests.sh quantum.tests.unit.plumgrid.test_plumgrid_plugin
 
 
</nowiki></pre>
 
</nowiki></pre>
  
 
+
[[category:neutron]]
== Devstack ==
 
 
 
Work In Progress!
 

Latest revision as of 15:09, 2 November 2018

Arista Neutron ML2 Driver

Overview

Arista ML2 Mechanism Driver implement ML2 Plugin Mechanism Driver API. This driver can manage all types of Arista switches. For further details, please refer to Arista OpenStack Deployment Guide provided by Arista Networks.

Directory Structure

The Arista Neutron ML2 Driver can be downloaded from the repository located at:

https://git.openstack.org/openstack/networking-arista (branch: master)


This repository includes the latest development code and actively maintained branches. Tagged releases for networking-arista are available from the Python Package Index at: https://pypi.org/project/networking_arista/.

Requirements

  • Prior to enabling Arista Driver, Arista EAPI Host (see configuration example below) must be up and running. For details, please see Arista OpenStack Deployment Guide
  • Ensure that jsonrpclib is installed (see Arista OpenStack Deployment Guide)

Configuration

Arista Driver configuration (Neutron server node)

  • Edit /etc/neutron/plugins/ml2/ml2_conf_arista.ini:
[ml2_arista]
# (StrOpt) EOS IP address. This is required field. If not set, all
#          communications to Arista EOS will fail
#
# eapi_host =
# Example: eapi_host = 192.168.0.1
#
# (StrOpt) EOS command API username. This is required field.
#          if not set, all communications to Arista EOS will fail.
#
# eapi_username =
# Example: arista_eapi_username = admin
#
# (StrOpt) EOS command API password. This is required field.
#          if not set, all communications to Arista EOS will fail.
#
# eapi_password =
# Example: eapi_password = my_password
#
# (StrOpt) Defines if hostnames are sent to Arista EOS as FQDNs
#          ("node1.domain.com") or as short names ("node1"). This is
#          optional. If not set, a value of "True" is assumed.
#
# use_fqdn =
# Example: use_fqdn = True
#
# (IntOpt) Sync interval in seconds between Quantum plugin and EOS.
#          This field defines how often the synchronization is performed.
#          This is an optional field. If not set, a value of 180 seconds
#          is assumed.
#
# sync_interval =
# Example: sync_interval = 60
#
# (StrOpt) Defines Region Name that is assigned to this OpenStack Controller.
#          This is useful when multiple OpenStack/Neutron controllers are
#          managing the same Arista HW clusters. Note that this name must
#          match with the region name registered (or known) to keystone
#          service. Authentication with Keysotne is performed by EOS.
#          This is optional. If not set, a value of "RegionOne" is assumed.
#
# region_name =
# Example: region_name = RegionOne


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/ml2/ml2_conf.ini --config-file /etc/neutron/plugins/ml2/ml2_conf_arista.ini