SlideShare une entreprise Scribd logo
1  sur  15
Neutron Dev
(In a Nutshell)
Reference: https://wiki.openstack.org/wiki/NeutronDevelopment
• Neutron Service
• Exposes REST interface to manage network resources
• Requires a plugin to implement a specific network management strategy
• Agents (OVS and LB plugins)
• Manage state on the compute and gateway nodes
• External service (plugin-specific)
• Agent-based (manage configuration on compute/gateway nodes)
• Manage hardware or other resources
• Provides framework for plugins
• API (neutron.{api,extensions}) - standard interface to clients
• DB (neutron.db) - helpers to make plugin implementation easier
• Typical request lifecycle
• Accept client request
• Update local system state (in mysql)
• Async dispatch of state change to agent (rpc) or external service (http)
• Return status to client
• A request returning 200 is no guarantee of success!
• http://docs.openstack.org/api/openstack-network/2.0/content/index.html
• Network
• Subnet
• Port
• Router
• Router Interface (Subnet)
• Router Gateway (Network)
• Security Groups
• Applied at the port level
There Be Dictionaries
• Neutron uses dictionaries instead of objects
• Legacy - intended to allow non-db plugins
• But all plugins need to store local state
• So...lots of manual introspection to determine ‘model’ state
• Like lisp, but with square brackets
• pf_ref['packet_filter']['status']
OVS Plugin
• L2 Agent
• Ensures tenant isolation on a compute node with local vlans
• Configures communication across compute nodes (via vlan, gre, etc)
• Integrates support for security groups (which apply at the port level)
• Linux bridge between ovs and vif supports iptables
• Other agents are required but not OVS-specific
• L3 + Metadata
• DHCP
• Routes traffic between networks, internal and external
• Manages metadata agents (one per subnet) to proxy traffic to nova’s
metadata service
• Supports SNAT (outbound) and DNAT (floating ips)
• Implemented via iptables rules
• Usually deployed on a gateway node alongside the L2 agent (required to
ensure connectivity a given subnet)
• Manages dnsmasq instances to implement IPAM
• A dnsmasq instance per subnet
• Relies on the L2 agent to ensure connectivity with a given subnet
• Required to support overlapping ips
• RHEL support is limited to creating virtual interfaces in a namespace
• Fedora/Ubuntu et all support moving virtual interfaces between
namespaces
• ovs_use_veth ensures that RHEL-compatible port handling is used
Development Speed
• The faster we can iterate, the more we get done
• Configure and install
• Virtualization
• Virt orchestration
• Dependency Caching
• Validate
• Debug failures with pdb
• Neutron smoke test in tempest
Virtualization
• Neutron usage is destructive - need to reset to clean state often
• Virtualization allows easy snapshot and restore - use!
• Nested virt (and ssd’s) largely obviate the virt speed penalty
• https://github.com/kashyapc/nvmx-haswell/blob/master/SETUP-nVMX.rst
• Automate image creation
• veewee - https://github.com/jedi4ever/veewee
• Orchestrate virtualization
• vagrant - https://github.com/adrahon/vagrant-kvm
Dependency Caching
• Speed up devstack/packstack runs by caching
• Fedora/RHEL
• reposync/createrepo (full repo, can be huge)
• intelligentmirror (incremental, can be a pain to configure)
• Ubuntu: apt-cacher-ng (incremental, works for rpms too)
• python: wheel (https://wheel.readthedocs.org) - binary packages
• ~/.pip/pip.conf can configure wheel usage globally
• python: pypi mirror
• Either full mirror or a forthcoming upstream script that mirrors only
openstack dependencies
Unit Testing
• Tox - http://tox.readthedocs.org/en/latest/
• Install with pip
• Deploys package to an isolated virtualenv and runs tests
• tox [-e py26,pep8] [neutron.tests.unit.test_module]
• see tox.ini for names of supported envs
• Debugging
• Reuse the tox-created venv: source .tox/py27/bin/activate
• Or install fresh: pip install --editable
• Tox doesn’t support pdb (uses subunit.run internally)
• python -m testtools.run neutron.tests.unit.test_module
• Integration
• Configure tempest with devstack
• API_RATE_LIMIT=False
• ENABLED_SERVICES+=,tempest
Mocking
• Mox - https://code.google.com/p/pymox/
• Uses a record/replay model
• Heavyweight
• Avoid if possible!
• Mock - http://www.voidspace.org.uk/python/mock/
• Uses an evaluate/assert model
• Lightweight
• Prefer!
Integration Testing
• enable_service tempest
• Packstack (/var/lib/tempest)
• Provision for demo usage, configure tempest and external ovs bridge
• Need to install - pip install --editable /var/lib/tempest
• Neutron smoke - nosetests tempest/scenario/test_network_basic_ops.py
• Sanity check that the service and agents are working
• Deploys package to an isolated virtualenv and runs tests
• tox [-e py26,pep8] [neutron.tests.unit.test_module]
• see tox.ini for names of supported envs
• Debugging
• Reuse the tox-created venv: source .tox/py27/bin/activate
• Or install fresh: pip install --editable
• Tox doesn’t support pdb (uses subunit.run internally)
• python -m testtools.run neutron.tests.unit.test_module

Contenu connexe

Tendances

Marriage with docker
Marriage with dockerMarriage with docker
Marriage with dockerDušan Katona
 
Sysdig - Introducing a new definition of Monitoring
Sysdig - Introducing a new definition of MonitoringSysdig - Introducing a new definition of Monitoring
Sysdig - Introducing a new definition of MonitoringRamit Surana
 
Pulsarctl & Pulsar Manager
Pulsarctl & Pulsar ManagerPulsarctl & Pulsar Manager
Pulsarctl & Pulsar ManagerStreamNative
 
Logging for OpenStack - Elasticsearch, Fluentd, Logstash, Kibana
Logging for OpenStack - Elasticsearch, Fluentd, Logstash, KibanaLogging for OpenStack - Elasticsearch, Fluentd, Logstash, Kibana
Logging for OpenStack - Elasticsearch, Fluentd, Logstash, KibanaMd Safiyat Reza
 
Docker and Fluentd
Docker and FluentdDocker and Fluentd
Docker and FluentdN Masahiro
 
Fluentd v0.14 Overview
Fluentd v0.14 OverviewFluentd v0.14 Overview
Fluentd v0.14 OverviewN Masahiro
 
Linux host orchestration with Foreman, Puppet and Gitlab
Linux host orchestration with Foreman, Puppet and GitlabLinux host orchestration with Foreman, Puppet and Gitlab
Linux host orchestration with Foreman, Puppet and GitlabBen Tullis
 
Monitoring MongoDB’s Engines in the Wild
Monitoring MongoDB’s Engines in the WildMonitoring MongoDB’s Engines in the Wild
Monitoring MongoDB’s Engines in the WildTim Vaillancourt
 
Continuous Deployment with Jenkins and Salt
Continuous Deployment with Jenkins and SaltContinuous Deployment with Jenkins and Salt
Continuous Deployment with Jenkins and SaltAnirban Saha
 
Developing high-performance network servers in Lisp
Developing high-performance network servers in LispDeveloping high-performance network servers in Lisp
Developing high-performance network servers in LispVladimir Sedach
 
Lcna tutorial-2012
Lcna tutorial-2012Lcna tutorial-2012
Lcna tutorial-2012Gluster.org
 
Managing your SaltStack Minions with Foreman
Managing your SaltStack Minions with ForemanManaging your SaltStack Minions with Foreman
Managing your SaltStack Minions with ForemanStephen Benjamin
 
Building GUI App with Electron and Lisp
Building GUI App with Electron and LispBuilding GUI App with Electron and Lisp
Building GUI App with Electron and Lispfukamachi
 
Sysdig
SysdigSysdig
Sysdiggnosek
 
Ansible not only for Dummies
Ansible not only for DummiesAnsible not only for Dummies
Ansible not only for DummiesŁukasz Proszek
 
Scaling application servers for efficiency
Scaling application servers for efficiencyScaling application servers for efficiency
Scaling application servers for efficiencyTomas Doran
 
HTTP::Parser::XS - writing a fast & secure XS module
HTTP::Parser::XS - writing a fast & secure XS moduleHTTP::Parser::XS - writing a fast & secure XS module
HTTP::Parser::XS - writing a fast & secure XS moduleKazuho Oku
 

Tendances (20)

Marriage with docker
Marriage with dockerMarriage with docker
Marriage with docker
 
Sysdig - Introducing a new definition of Monitoring
Sysdig - Introducing a new definition of MonitoringSysdig - Introducing a new definition of Monitoring
Sysdig - Introducing a new definition of Monitoring
 
Pulsarctl & Pulsar Manager
Pulsarctl & Pulsar ManagerPulsarctl & Pulsar Manager
Pulsarctl & Pulsar Manager
 
Logging for OpenStack - Elasticsearch, Fluentd, Logstash, Kibana
Logging for OpenStack - Elasticsearch, Fluentd, Logstash, KibanaLogging for OpenStack - Elasticsearch, Fluentd, Logstash, Kibana
Logging for OpenStack - Elasticsearch, Fluentd, Logstash, Kibana
 
Docker and Fluentd
Docker and FluentdDocker and Fluentd
Docker and Fluentd
 
Fluentd v0.14 Overview
Fluentd v0.14 OverviewFluentd v0.14 Overview
Fluentd v0.14 Overview
 
Scalable Web Apps
Scalable Web AppsScalable Web Apps
Scalable Web Apps
 
Linux host orchestration with Foreman, Puppet and Gitlab
Linux host orchestration with Foreman, Puppet and GitlabLinux host orchestration with Foreman, Puppet and Gitlab
Linux host orchestration with Foreman, Puppet and Gitlab
 
Vikentsi Lapa - Tools for testing
Vikentsi Lapa - Tools for testingVikentsi Lapa - Tools for testing
Vikentsi Lapa - Tools for testing
 
Monitoring MongoDB’s Engines in the Wild
Monitoring MongoDB’s Engines in the WildMonitoring MongoDB’s Engines in the Wild
Monitoring MongoDB’s Engines in the Wild
 
Continuous Deployment with Jenkins and Salt
Continuous Deployment with Jenkins and SaltContinuous Deployment with Jenkins and Salt
Continuous Deployment with Jenkins and Salt
 
Developing high-performance network servers in Lisp
Developing high-performance network servers in LispDeveloping high-performance network servers in Lisp
Developing high-performance network servers in Lisp
 
Lcna tutorial-2012
Lcna tutorial-2012Lcna tutorial-2012
Lcna tutorial-2012
 
Managing your SaltStack Minions with Foreman
Managing your SaltStack Minions with ForemanManaging your SaltStack Minions with Foreman
Managing your SaltStack Minions with Foreman
 
Building GUI App with Electron and Lisp
Building GUI App with Electron and LispBuilding GUI App with Electron and Lisp
Building GUI App with Electron and Lisp
 
Sysdig
SysdigSysdig
Sysdig
 
Ansible not only for Dummies
Ansible not only for DummiesAnsible not only for Dummies
Ansible not only for Dummies
 
Scaling application servers for efficiency
Scaling application servers for efficiencyScaling application servers for efficiency
Scaling application servers for efficiency
 
HTTP::Parser::XS - writing a fast & secure XS module
HTTP::Parser::XS - writing a fast & secure XS moduleHTTP::Parser::XS - writing a fast & secure XS module
HTTP::Parser::XS - writing a fast & secure XS module
 
Fluentd meetup
Fluentd meetupFluentd meetup
Fluentd meetup
 

Similaire à Neutrondev ppt

ONUG Tutorial: Bridges and Tunnels Drive Through OpenStack Networking
ONUG Tutorial: Bridges and Tunnels Drive Through OpenStack NetworkingONUG Tutorial: Bridges and Tunnels Drive Through OpenStack Networking
ONUG Tutorial: Bridges and Tunnels Drive Through OpenStack Networkingmarkmcclain
 
Sanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansSanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansPeter Clapham
 
Open vSwitch Introduction
Open vSwitch IntroductionOpen vSwitch Introduction
Open vSwitch IntroductionHungWei Chiu
 
Janet-hosted test tools
Janet-hosted test toolsJanet-hosted test tools
Janet-hosted test toolsJisc
 
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)Salvatore Orlando
 
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)salv_orlando
 
Openstack Cactus Survey
Openstack Cactus SurveyOpenstack Cactus Survey
Openstack Cactus SurveyPjack Chen
 
Dockerizing the Hard Services: Neutron and Nova
Dockerizing the Hard Services: Neutron and NovaDockerizing the Hard Services: Neutron and Nova
Dockerizing the Hard Services: Neutron and Novaclayton_oneill
 
Openstack in 10 mins
Openstack in 10 minsOpenstack in 10 mins
Openstack in 10 minsDawood M.S
 
Birmingham-20060705
Birmingham-20060705Birmingham-20060705
Birmingham-20060705Miguel Vidal
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paasrajdeep
 
Inside Architecture of Neutron
Inside Architecture of NeutronInside Architecture of Neutron
Inside Architecture of Neutronmarkmcclain
 
OpenStack in action 4! Alessandro Pilotti - OpenStack, Hyper-V and Windows
OpenStack in action 4! Alessandro Pilotti - OpenStack, Hyper-V and WindowsOpenStack in action 4! Alessandro Pilotti - OpenStack, Hyper-V and Windows
OpenStack in action 4! Alessandro Pilotti - OpenStack, Hyper-V and WindowseNovance
 
OpenStack - JobShop @Iași, 2016
OpenStack - JobShop @Iași, 2016OpenStack - JobShop @Iași, 2016
OpenStack - JobShop @Iași, 2016Alexandru Coman
 
neutron_icehouse_update
neutron_icehouse_updateneutron_icehouse_update
neutron_icehouse_updateAkihiro Motoki
 
Open stack networking_101_update_2014
Open stack networking_101_update_2014Open stack networking_101_update_2014
Open stack networking_101_update_2014yfauser
 
Puppet & Perforce: Versioning Everything for Deployments
Puppet & Perforce: Versioning Everything for DeploymentsPuppet & Perforce: Versioning Everything for Deployments
Puppet & Perforce: Versioning Everything for DeploymentsPerforce
 

Similaire à Neutrondev ppt (20)

OpenStack and Windows
OpenStack and WindowsOpenStack and Windows
OpenStack and Windows
 
ONUG Tutorial: Bridges and Tunnels Drive Through OpenStack Networking
ONUG Tutorial: Bridges and Tunnels Drive Through OpenStack NetworkingONUG Tutorial: Bridges and Tunnels Drive Through OpenStack Networking
ONUG Tutorial: Bridges and Tunnels Drive Through OpenStack Networking
 
Sanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticiansSanger, upcoming Openstack for Bio-informaticians
Sanger, upcoming Openstack for Bio-informaticians
 
Flexible compute
Flexible computeFlexible compute
Flexible compute
 
Open vSwitch Introduction
Open vSwitch IntroductionOpen vSwitch Introduction
Open vSwitch Introduction
 
Janet-hosted test tools
Janet-hosted test toolsJanet-hosted test tools
Janet-hosted test tools
 
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)
 
Openstack Cactus Survey
Openstack Cactus SurveyOpenstack Cactus Survey
Openstack Cactus Survey
 
Dockerizing the Hard Services: Neutron and Nova
Dockerizing the Hard Services: Neutron and NovaDockerizing the Hard Services: Neutron and Nova
Dockerizing the Hard Services: Neutron and Nova
 
Openstack in 10 mins
Openstack in 10 minsOpenstack in 10 mins
Openstack in 10 mins
 
Openstack
OpenstackOpenstack
Openstack
 
Birmingham-20060705
Birmingham-20060705Birmingham-20060705
Birmingham-20060705
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paas
 
Inside Architecture of Neutron
Inside Architecture of NeutronInside Architecture of Neutron
Inside Architecture of Neutron
 
OpenStack in action 4! Alessandro Pilotti - OpenStack, Hyper-V and Windows
OpenStack in action 4! Alessandro Pilotti - OpenStack, Hyper-V and WindowsOpenStack in action 4! Alessandro Pilotti - OpenStack, Hyper-V and Windows
OpenStack in action 4! Alessandro Pilotti - OpenStack, Hyper-V and Windows
 
OpenStack - JobShop @Iași, 2016
OpenStack - JobShop @Iași, 2016OpenStack - JobShop @Iași, 2016
OpenStack - JobShop @Iași, 2016
 
neutron_icehouse_update
neutron_icehouse_updateneutron_icehouse_update
neutron_icehouse_update
 
Open stack networking_101_update_2014
Open stack networking_101_update_2014Open stack networking_101_update_2014
Open stack networking_101_update_2014
 
Puppet & Perforce: Versioning Everything for Deployments
Puppet & Perforce: Versioning Everything for DeploymentsPuppet & Perforce: Versioning Everything for Deployments
Puppet & Perforce: Versioning Everything for Deployments
 

Dernier

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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?Igalia
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
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...Neo4j
 
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.pdfsudhanshuwaghmare1
 
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 DevelopmentsTrustArc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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)wesley chun
 
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 TerraformAndrey Devyatkin
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Dernier (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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?
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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...
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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)
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Neutrondev ppt

  • 1. Neutron Dev (In a Nutshell) Reference: https://wiki.openstack.org/wiki/NeutronDevelopment
  • 2. • Neutron Service • Exposes REST interface to manage network resources • Requires a plugin to implement a specific network management strategy • Agents (OVS and LB plugins) • Manage state on the compute and gateway nodes • External service (plugin-specific) • Agent-based (manage configuration on compute/gateway nodes) • Manage hardware or other resources
  • 3. • Provides framework for plugins • API (neutron.{api,extensions}) - standard interface to clients • DB (neutron.db) - helpers to make plugin implementation easier • Typical request lifecycle • Accept client request • Update local system state (in mysql) • Async dispatch of state change to agent (rpc) or external service (http) • Return status to client • A request returning 200 is no guarantee of success!
  • 4. • http://docs.openstack.org/api/openstack-network/2.0/content/index.html • Network • Subnet • Port • Router • Router Interface (Subnet) • Router Gateway (Network) • Security Groups • Applied at the port level
  • 5. There Be Dictionaries • Neutron uses dictionaries instead of objects • Legacy - intended to allow non-db plugins • But all plugins need to store local state • So...lots of manual introspection to determine ‘model’ state • Like lisp, but with square brackets • pf_ref['packet_filter']['status']
  • 6. OVS Plugin • L2 Agent • Ensures tenant isolation on a compute node with local vlans • Configures communication across compute nodes (via vlan, gre, etc) • Integrates support for security groups (which apply at the port level) • Linux bridge between ovs and vif supports iptables • Other agents are required but not OVS-specific • L3 + Metadata • DHCP
  • 7. • Routes traffic between networks, internal and external • Manages metadata agents (one per subnet) to proxy traffic to nova’s metadata service • Supports SNAT (outbound) and DNAT (floating ips) • Implemented via iptables rules • Usually deployed on a gateway node alongside the L2 agent (required to ensure connectivity a given subnet)
  • 8. • Manages dnsmasq instances to implement IPAM • A dnsmasq instance per subnet • Relies on the L2 agent to ensure connectivity with a given subnet
  • 9. • Required to support overlapping ips • RHEL support is limited to creating virtual interfaces in a namespace • Fedora/Ubuntu et all support moving virtual interfaces between namespaces • ovs_use_veth ensures that RHEL-compatible port handling is used
  • 10. Development Speed • The faster we can iterate, the more we get done • Configure and install • Virtualization • Virt orchestration • Dependency Caching • Validate • Debug failures with pdb • Neutron smoke test in tempest
  • 11. Virtualization • Neutron usage is destructive - need to reset to clean state often • Virtualization allows easy snapshot and restore - use! • Nested virt (and ssd’s) largely obviate the virt speed penalty • https://github.com/kashyapc/nvmx-haswell/blob/master/SETUP-nVMX.rst • Automate image creation • veewee - https://github.com/jedi4ever/veewee • Orchestrate virtualization • vagrant - https://github.com/adrahon/vagrant-kvm
  • 12. Dependency Caching • Speed up devstack/packstack runs by caching • Fedora/RHEL • reposync/createrepo (full repo, can be huge) • intelligentmirror (incremental, can be a pain to configure) • Ubuntu: apt-cacher-ng (incremental, works for rpms too) • python: wheel (https://wheel.readthedocs.org) - binary packages • ~/.pip/pip.conf can configure wheel usage globally • python: pypi mirror • Either full mirror or a forthcoming upstream script that mirrors only openstack dependencies
  • 13. Unit Testing • Tox - http://tox.readthedocs.org/en/latest/ • Install with pip • Deploys package to an isolated virtualenv and runs tests • tox [-e py26,pep8] [neutron.tests.unit.test_module] • see tox.ini for names of supported envs • Debugging • Reuse the tox-created venv: source .tox/py27/bin/activate • Or install fresh: pip install --editable • Tox doesn’t support pdb (uses subunit.run internally) • python -m testtools.run neutron.tests.unit.test_module • Integration • Configure tempest with devstack • API_RATE_LIMIT=False • ENABLED_SERVICES+=,tempest
  • 14. Mocking • Mox - https://code.google.com/p/pymox/ • Uses a record/replay model • Heavyweight • Avoid if possible! • Mock - http://www.voidspace.org.uk/python/mock/ • Uses an evaluate/assert model • Lightweight • Prefer!
  • 15. Integration Testing • enable_service tempest • Packstack (/var/lib/tempest) • Provision for demo usage, configure tempest and external ovs bridge • Need to install - pip install --editable /var/lib/tempest • Neutron smoke - nosetests tempest/scenario/test_network_basic_ops.py • Sanity check that the service and agents are working • Deploys package to an isolated virtualenv and runs tests • tox [-e py26,pep8] [neutron.tests.unit.test_module] • see tox.ini for names of supported envs • Debugging • Reuse the tox-created venv: source .tox/py27/bin/activate • Or install fresh: pip install --editable • Tox doesn’t support pdb (uses subunit.run internally) • python -m testtools.run neutron.tests.unit.test_module