SlideShare a Scribd company logo
1 of 20
How to write a Neutron Plugin
(if you really need to)
Salvatore Orlando
Armando Migliaccio
Who are these guys talking to us?
• Salvatore (the fat one)
– Core Openstack Neutron developer
– Breaking Openstack since Cactus
– Known by @taturiello on twitter and salv-orlando on IRC

• Armando (the fit one)
–
–
–
–

Core Openstack Neutron developer
Contributing code since Bexar
Fixes Salvatore’s code
Know by @armandomi2001 on twitter and armax on IRC

• They are both employed by VMware and happily (w)hack
neutron code on a daily basis
Summary
• Part I:

What is a Neutron plugin?
Do you really need a new one?

• Part II: Design choices when writing a
Neutron plugin
• Part III: Writing your first Neutron plugin
With code samples!!!
Part I
The world of Neutron plugins
A Neutron plugin in a Nutshell
• Implements one or more “plugin interfaces”
• Receives requests from the API layer
API

API
request

AuthN
AuthZ
Validation
Dispatch

Plugin

Agents,
physical/virtual
appliances,
controllers, etc.

• Should NOT deal with authN/authZ
Core and service plugins
– Core: Implements the “core” Neutron API
(L2 networking + IPAM)
– Service: plugin provides additional network
services (Eg.: load balancing, firewall, VPN)
• network services can also be provided by core plugin by
implementing the relevant extensions
API

Plugins

Core

L3

Core Plugin

FW

Core

L3

Core Plugin

FW

Core

L3

FW

FW

Core
plugin

L3

FW

plugin

plugin

plugin
Plugins with drivers
• Can execute a given request on different
backends; actual execution is delegated to a
driver
– ML2
• Openvswitch, linuxbridge, hyper-V, tail-F NCS, Arista, …

– Load Balancing reference plugin
– Firewall reference plugin
– (soon) VPN reference plugin

• Implementing a driver is much easier than
implementing a whole plugin!
Making the right decision
• Implementing a driver vs.
a new plugin
• Adding a new service as an
extension vs. a service plugin
Tradeoff:
– Flexibility and interoperability vs simplicity
Available options
• Integrate some kind of network
device into Neutron
– Driver (for ML2, LB, FW, etc.)

• Add a feature that applies to
existing API resources
– API extension and plugin support

• Provide a new network service,
“orthogonal feature”
– New service plugin

• New integrated solution or new
paradigm
– New core plugin
Part II
Considerations for writing
a new Neutron plugin
Planning for a new neutron plugin
• Which extensions support
– At least L3 and security
groups for Nova integration

• Reusing Neutron’s
open source components
– DHCP agent, L3 agent, etc.
Developing a new Neutron plugin
• Backend synchronization
(pull vs push)
• Scalability
• High Availability
• Fault tolerance
• Unit and functional tests
• Extensions
– API and DB extensions
Contributing a new Neutron plugin
• Meet certain standards
– Provide thorough unit test
coverage
– Provide documentation
• And then more
documentation

– Think Devstack
– Tempest
– Think Smokestack

Add your own
funny image here

https://wiki.openstack.org/wiki/NeutronDevelopment#Developing_a_Neutron_Plugin
Part III
Implementing a new
Neutron plugin
Introducing the HDN plugin
• HDN: Human Defined Networking
• Rediscover the human face of IT
– REST API requests are transformed into emails
sent to the networking guy in your IT department
– Asynchronous, eventually consistent, request
processing
– Karma-based request prioritization; the nicer you
are to the IT guy, the sooner your requests will be
processed
The HDN plugin - architecture

Message bus (email)
#TODO: Phone, Fax
API
request

Neutron REST Interface

Human-powered plugin engine
Implementing the plugin
• Core API
– Support for networks, ports, and subnet

• Supported extensions
– L3: Support for routers and floating IPs
– Admin extension for notifying request completion

• Other neutron extensions
– Outside scope… at the end of the day you can
always pick up the phone and call your IT guy!
Getting our hands dirty
• Sources for the HDN plugin are available on
github
– https://github.com/salv-orlando/hdn
– tested with gmail, should work with all SMTP
servers
Summary
• Consider all your alternatives before making a
choice on whether developing a plugin, an
extension or a driver
• When developing a new plugin check if and how
it should integrate with the various neutron
agents
• Make your plugin verifiable through unit and
integration testing
• Open source all the things, but document them
as well
• Who needs SDN when you have HDN???

More Related Content

What's hot

What's hot (20)

OVN DBs HA with scale test
OVN DBs HA with scale testOVN DBs HA with scale test
OVN DBs HA with scale test
 
Red Hat OpenStack 17 저자직강+스터디그룹_3주차
Red Hat OpenStack 17 저자직강+스터디그룹_3주차Red Hat OpenStack 17 저자직강+스터디그룹_3주차
Red Hat OpenStack 17 저자직강+스터디그룹_3주차
 
Meetup 23 - 02 - OVN - The future of networking in OpenStack
Meetup 23 - 02 - OVN - The future of networking in OpenStackMeetup 23 - 02 - OVN - The future of networking in OpenStack
Meetup 23 - 02 - OVN - The future of networking in OpenStack
 
OpenStack Architecture
OpenStack ArchitectureOpenStack Architecture
OpenStack Architecture
 
OpenStackユーザ会資料 - Masakari
OpenStackユーザ会資料 - MasakariOpenStackユーザ会資料 - Masakari
OpenStackユーザ会資料 - Masakari
 
OpenStack Quantum Intro (OS Meetup 3-26-12)
OpenStack Quantum Intro (OS Meetup 3-26-12)OpenStack Quantum Intro (OS Meetup 3-26-12)
OpenStack Quantum Intro (OS Meetup 3-26-12)
 
Troubleshooting common oslo.messaging and RabbitMQ issues
Troubleshooting common oslo.messaging and RabbitMQ issuesTroubleshooting common oslo.messaging and RabbitMQ issues
Troubleshooting common oslo.messaging and RabbitMQ issues
 
[오픈소스컨설팅]오픈스택에 대하여
[오픈소스컨설팅]오픈스택에 대하여[오픈소스컨설팅]오픈스택에 대하여
[오픈소스컨설팅]오픈스택에 대하여
 
L3HA-VRRP-20141201
L3HA-VRRP-20141201L3HA-VRRP-20141201
L3HA-VRRP-20141201
 
OpenStack Neutron's Distributed Virtual Router
OpenStack Neutron's Distributed Virtual RouterOpenStack Neutron's Distributed Virtual Router
OpenStack Neutron's Distributed Virtual Router
 
Neutron-to-Neutron: interconnecting multiple OpenStack deployments
Neutron-to-Neutron: interconnecting multiple OpenStack deploymentsNeutron-to-Neutron: interconnecting multiple OpenStack deployments
Neutron-to-Neutron: interconnecting multiple OpenStack deployments
 
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
 
Large scale overlay networks with ovn: problems and solutions
Large scale overlay networks with ovn: problems and solutionsLarge scale overlay networks with ovn: problems and solutions
Large scale overlay networks with ovn: problems and solutions
 
Red Hat OpenStack 17 저자직강+스터디그룹_1주차
Red Hat OpenStack 17 저자직강+스터디그룹_1주차Red Hat OpenStack 17 저자직강+스터디그룹_1주차
Red Hat OpenStack 17 저자직강+스터디그룹_1주차
 
OpenStack vs VMware vCloud
OpenStack vs VMware vCloudOpenStack vs VMware vCloud
OpenStack vs VMware vCloud
 
ONIC-Japan-2019-OVN public
ONIC-Japan-2019-OVN publicONIC-Japan-2019-OVN public
ONIC-Japan-2019-OVN public
 
Ceilometer to Gnocchi
Ceilometer to GnocchiCeilometer to Gnocchi
Ceilometer to Gnocchi
 
Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Red Hat OpenStack 17 저자직강+스터디그룹_2주차Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Red Hat OpenStack 17 저자직강+스터디그룹_2주차
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes Architecture
 
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
 

Similar to How to write a Neutron Plugin - if you really need to

SDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center NetworkingSDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center Networking
Thomas Graf
 

Similar to How to write a Neutron Plugin - if you really need to (20)

How to build a Neutron Plugin (stadium edition)
How to build a Neutron Plugin (stadium edition)How to build a Neutron Plugin (stadium edition)
How to build a Neutron Plugin (stadium edition)
 
How to write a Neutron plugin (stadium edition)
How to write a Neutron plugin (stadium edition)How to write a Neutron plugin (stadium edition)
How to write a Neutron plugin (stadium edition)
 
neutron_icehouse_update
neutron_icehouse_updateneutron_icehouse_update
neutron_icehouse_update
 
Under the Trenchcoat: Neutron Agent Extensions
Under the Trenchcoat: Neutron Agent ExtensionsUnder the Trenchcoat: Neutron Agent Extensions
Under the Trenchcoat: Neutron Agent Extensions
 
Open stack networking_101_update_2014
Open stack networking_101_update_2014Open stack networking_101_update_2014
Open stack networking_101_update_2014
 
OpenStack Neutron 201 1hr
OpenStack Neutron 201 1hr OpenStack Neutron 201 1hr
OpenStack Neutron 201 1hr
 
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
Deep Dive into the Microsoft OpenStack CI Infrastructure (Alessandro Pilotti)
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
Panther Sniffer for DQMH®.pptx
Panther Sniffer for DQMH®.pptxPanther Sniffer for DQMH®.pptx
Panther Sniffer for DQMH®.pptx
 
Introduction to TensorFlow Lite
Introduction to TensorFlow Lite Introduction to TensorFlow Lite
Introduction to TensorFlow Lite
 
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream Projects
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream ProjectsITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream Projects
ITCamp 2017 - Raffaele Rialdi - Adopting .NET Core in Mainstream Projects
 
Openstack Overview
Openstack OverviewOpenstack Overview
Openstack Overview
 
IoT Node-Red Presentation
IoT  Node-Red PresentationIoT  Node-Red Presentation
IoT Node-Red Presentation
 
Open stackaustinmeetupsept21
Open stackaustinmeetupsept21Open stackaustinmeetupsept21
Open stackaustinmeetupsept21
 
Moving to microservices – a technology and organisation transformational journey
Moving to microservices – a technology and organisation transformational journeyMoving to microservices – a technology and organisation transformational journey
Moving to microservices – a technology and organisation transformational journey
 
SDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center NetworkingSDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center Networking
 
Network Virtualization & Software-defined Networking
Network Virtualization & Software-defined NetworkingNetwork Virtualization & Software-defined Networking
Network Virtualization & Software-defined Networking
 
Developing Blockchain Applications
Developing Blockchain Applications Developing Blockchain Applications
Developing Blockchain Applications
 
OpenStack at NTT Resonant: Lessons Learned in Web Infrastructure
OpenStack at NTT Resonant: Lessons Learned in Web InfrastructureOpenStack at NTT Resonant: Lessons Learned in Web Infrastructure
OpenStack at NTT Resonant: Lessons Learned in Web Infrastructure
 
Monkey Server
Monkey ServerMonkey Server
Monkey Server
 

More from salv_orlando (6)

Can you trust Neutron?
Can you trust Neutron?Can you trust Neutron?
Can you trust Neutron?
 
Introduction to Openstack Network
Introduction to Openstack NetworkIntroduction to Openstack Network
Introduction to Openstack Network
 
Quantum Grizzly Upgrade Paths
Quantum Grizzly Upgrade PathsQuantum Grizzly Upgrade Paths
Quantum Grizzly Upgrade Paths
 
Grizzly summit: Quantum API
Grizzly summit: Quantum APIGrizzly summit: Quantum API
Grizzly summit: Quantum API
 
Advanced network services insertions framework
Advanced network services insertions frameworkAdvanced network services insertions framework
Advanced network services insertions framework
 
Quantum - Virtual networks for Openstack
Quantum - Virtual networks for OpenstackQuantum - Virtual networks for Openstack
Quantum - Virtual networks for Openstack
 

Recently uploaded

Recently uploaded (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

How to write a Neutron Plugin - if you really need to

  • 1. How to write a Neutron Plugin (if you really need to) Salvatore Orlando Armando Migliaccio
  • 2. Who are these guys talking to us? • Salvatore (the fat one) – Core Openstack Neutron developer – Breaking Openstack since Cactus – Known by @taturiello on twitter and salv-orlando on IRC • Armando (the fit one) – – – – Core Openstack Neutron developer Contributing code since Bexar Fixes Salvatore’s code Know by @armandomi2001 on twitter and armax on IRC • They are both employed by VMware and happily (w)hack neutron code on a daily basis
  • 3. Summary • Part I: What is a Neutron plugin? Do you really need a new one? • Part II: Design choices when writing a Neutron plugin • Part III: Writing your first Neutron plugin With code samples!!!
  • 4. Part I The world of Neutron plugins
  • 5. A Neutron plugin in a Nutshell • Implements one or more “plugin interfaces” • Receives requests from the API layer API API request AuthN AuthZ Validation Dispatch Plugin Agents, physical/virtual appliances, controllers, etc. • Should NOT deal with authN/authZ
  • 6. Core and service plugins – Core: Implements the “core” Neutron API (L2 networking + IPAM) – Service: plugin provides additional network services (Eg.: load balancing, firewall, VPN) • network services can also be provided by core plugin by implementing the relevant extensions API Plugins Core L3 Core Plugin FW Core L3 Core Plugin FW Core L3 FW FW Core plugin L3 FW plugin plugin plugin
  • 7. Plugins with drivers • Can execute a given request on different backends; actual execution is delegated to a driver – ML2 • Openvswitch, linuxbridge, hyper-V, tail-F NCS, Arista, … – Load Balancing reference plugin – Firewall reference plugin – (soon) VPN reference plugin • Implementing a driver is much easier than implementing a whole plugin!
  • 8. Making the right decision • Implementing a driver vs. a new plugin • Adding a new service as an extension vs. a service plugin Tradeoff: – Flexibility and interoperability vs simplicity
  • 9. Available options • Integrate some kind of network device into Neutron – Driver (for ML2, LB, FW, etc.) • Add a feature that applies to existing API resources – API extension and plugin support • Provide a new network service, “orthogonal feature” – New service plugin • New integrated solution or new paradigm – New core plugin
  • 10. Part II Considerations for writing a new Neutron plugin
  • 11. Planning for a new neutron plugin • Which extensions support – At least L3 and security groups for Nova integration • Reusing Neutron’s open source components – DHCP agent, L3 agent, etc.
  • 12. Developing a new Neutron plugin • Backend synchronization (pull vs push) • Scalability • High Availability • Fault tolerance • Unit and functional tests • Extensions – API and DB extensions
  • 13. Contributing a new Neutron plugin • Meet certain standards – Provide thorough unit test coverage – Provide documentation • And then more documentation – Think Devstack – Tempest – Think Smokestack Add your own funny image here https://wiki.openstack.org/wiki/NeutronDevelopment#Developing_a_Neutron_Plugin
  • 14. Part III Implementing a new Neutron plugin
  • 15. Introducing the HDN plugin • HDN: Human Defined Networking • Rediscover the human face of IT – REST API requests are transformed into emails sent to the networking guy in your IT department – Asynchronous, eventually consistent, request processing – Karma-based request prioritization; the nicer you are to the IT guy, the sooner your requests will be processed
  • 16. The HDN plugin - architecture Message bus (email) #TODO: Phone, Fax API request Neutron REST Interface Human-powered plugin engine
  • 17. Implementing the plugin • Core API – Support for networks, ports, and subnet • Supported extensions – L3: Support for routers and floating IPs – Admin extension for notifying request completion • Other neutron extensions – Outside scope… at the end of the day you can always pick up the phone and call your IT guy!
  • 18. Getting our hands dirty • Sources for the HDN plugin are available on github – https://github.com/salv-orlando/hdn – tested with gmail, should work with all SMTP servers
  • 20. • Consider all your alternatives before making a choice on whether developing a plugin, an extension or a driver • When developing a new plugin check if and how it should integrate with the various neutron agents • Make your plugin verifiable through unit and integration testing • Open source all the things, but document them as well • Who needs SDN when you have HDN???

Editor's Notes

  1. Explain also the three examples:Left – a single plugin implementing also extensions for L3 and Firewall services – refer to nicira plugin as an example of this kindCenter – A single plugin implementing core + L3 service, and distinct plugins for other services – this is what currently happens in deployments based on open source componentsRight – A distinct plugin for each extension; a schema that would be feasible from Havana as the L3 services can now be implemented in their own plugin
  2. Bullet 1 – cite examples as ML2 driver or radwareLBaaS driverBullet 2 – cite examples as security groups or allowed address pairs or whatever extension you likeBullet 3 – Cite load balancing firewall and all this stuff. Remember that lines with bullet 2 are somewhat blurred because one could decide to go for a monolithic plugin approach and develop new services as extensions too.Bullet 4 – Cite ML2 as example