Sie sind auf Seite 1von 31
Deep dive into Quantum 2012/11/10 COSUG Meet up Luo, Zhongyue 1

Deep dive into Quantum

2012/11/10 COSUG Meet up

Luo, Zhongyue

TODO

Intro

Overview

File Structure

Components REST APIs Under the hood

Configuration: Open vSwitch plugin

How does the plugin get loaded?

Why is there a agent for the Open vSwitch plugin?

Resources

Intro

What is Quantum?

Network-Connectivity-as-a-Service for OpenStack

Goal

Provides an API to dynamically request and configure virtual networks

Support API and API extensions to provide advanced

network capabilities

Integrate virtual networks with other OpenStack services

Intro

Tenant View

VM A1
VM
A1
VM A2
VM
A2

Network A

VM B1
VM
B1
VM B2
VM
B2

Network B

Phy Srv 3 Phy Srv 1 Phy Srv 2 VM VM VM VM B2 A1
Phy Srv 3
Phy Srv 1
Phy Srv 2
VM
VM
VM
VM
B2
A1
B1
A2
Hypervisor
Hypervisor
Hypervisor
Data Centre Network

Provider View

Intro

Nova

Quantum

Intro Nova Quantum VM1 VM2 10.0.0.2 10.0.0.3 3 2 Net1 10.0.0.0/24 1 Subnet virtual server virtual
Intro Nova Quantum VM1 VM2 10.0.0.2 10.0.0.3 3 2 Net1 10.0.0.0/24 1 Subnet virtual server virtual
VM1 VM2 10.0.0.2 10.0.0.3 3 2 Net1 10.0.0.0/24 1 Subnet
VM1
VM2
10.0.0.2
10.0.0.3
3
2
Net1
10.0.0.0/24
1
Subnet

virtual server

virtual interface

(VIF)

virtual port

L2 virtual network

Intro

TenantA-VM3 TenantA-VM1 TenantA-VM2 10.0.1.2 10.0.0.2 10.0.0.3 9.0.0.3 TenantA-VM4 Tenant-A Net1 Tenant-A Net2
TenantA-VM3
TenantA-VM1
TenantA-VM2
10.0.1.2
10.0.0.2
10.0.0.3
9.0.0.3
TenantA-VM4
Tenant-A Net1
Tenant-A Net2
172.16.0.30
10.0.0.0/24
10.0.1.0/24
Tenant-A Net3
172.16.0.0/24
VPN
Tenant-A On
Premise Net
Public Net
172.16.0.0/24
88.0.0.0/18

Not necessarily a VM!

File Structure

extensions choose one start
extensions
choose
one
start

File Structure

agent extension implementations implementations handler setup api-pate.ini
agent
extension
implementations
implementations
handler
setup
api-pate.ini

Components

Plugins

Cloud Operators weigh trade-offs, choose a plugin

Hide backend technology

Server

A generic tenant API to create and configure “virtual

networks

Agent

Daemon to perform the actual network configuration on each physical host

Components

API Extentions

QoS, SLA, L3 forwarding, Security, Metering, etc.

Enables innovation in virtual networking.

Extensions implemented by many plugins can become “core”.

Overview

RPC
RPC

Overview

http://wiki.openstack.org/Quantum?action=AttachFil

e&do=get&target=quantum-technical-archicture.ppt

Dhcp agent
Dhcp agent
quantum-server
quantum-server
Dhcp agent quantum-server get_active_networks get_network_info get_dhcp_port

get_active_networks

get_network_info

get_dhcp_port

release_dhcp_port

release_port_fixed_ip

update_lease_expiration

Plugin agent
Plugin agent
get_device_details update_device_down tunnel_sync Quantum topic q-plugin notifications.info quantum-server
get_device_details
update_device_down
tunnel_sync
Quantum
topic
q-plugin
notifications.info
quantum-server

Quantum rest api (resource CUD)

network_delete

q-agent-notifier-

network-delete_fanout

fanout

q-agent-notifier-

network-delete_fanout

_{uuid4}

tunnel_update

q-agent-notifier-

tunnel-update_fanout

fanout

q-agent-notifier-

tunnel-update_fanout

_{uuid4}

port_update

q-agent-notifier-

port-update_fanout

fanout

q-agent-notifier-

port-update_fanout

_{uuid4}

Exchange:

Queue:

fanout q-agent-notifier- port-update_fanout _{uuid4} Exchange: Queue: Plugin agent Dhcp agent Comsumer: 12
Plugin agent
Plugin agent
Dhcp agent
Dhcp agent

Comsumer:

Rest APIs

Networks

Represents an L2 network segment

Can associate with a set of subnets and ports

and ports http://docs.openstack.org/api/openstack-network/1.0/content/Networks.html quantum/api/v2/attributes.py 13

quantum/api/v2/attributes.py

Rest APIs

Subnets

Represents a range of IP addresses

Allocated to devices

API request specifications

o quantum/api/v2/attributes.py

Rest APIs

Ports

A connection point of a device to attach to a L2 Quantum

network

Allocated to devices

API request specifications

o quantum/api/v2/attributes.py

Under the Hood

Configuration: Open vSwitch plugin

Install KVM, Open vSwitch and configure your environment

Edit etc/quantum/plugins.ini

core_plugin = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPlugin

Edit etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini

mysql://root:nova@127.0.0.1:3306/ovs_quantum . NOTE: The database IP address in the file should be reachable by all compute nodes.

Configuration: Open vSwitch plugin

Edit nova.conf on nova-network and nova-manage hosts

network_manager=nova.network.quantum.manager.QuantumManager

linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver

linuxnet_ovs_integration_bridge=br-int

Edit nova.conf on nova-compute hosts

libvirt_ovs_bridge=br-int

libvirt_vif_type=ethernet

libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtOpenVswitchDriver

Start the agent

$ python ovs_quantum_agent.py ovs_quantum_plugin.ini

How does the plugin get loaded?

How does the plugin get loaded? 19
How does the plugin get loaded? 19

How does the plugin get loaded?

How does the plugin get loaded? 20
How does the plugin get loaded? 20

How does the plugin get loaded?

How does the plugin get loaded? 21

How does the plugin get loaded?

How does the plugin get loaded? 22
How does the plugin get loaded? 23

How does the plugin get loaded?

How does the plugin get loaded?

How does the plugin get loaded? 24

How does the plugin get loaded?

How does the plugin get loaded? 25

Why is there a agent for the Open vSwitch plugin?

The OVS agent

Checks the configuration and mappings consistency of the

local Open vSwitch environment and the central mysql

database

Polls directly to the local Open vSwitch instance

Configures flows to implement the logical data model.

Why is there a agent for the Open vSwitch plugin?

Why is there a agent for the Open vSwitch plugin? 27

Why is there a agent for the Open vSwitch plugin?

Why is there a agent for the Open vSwitch plugin? 28
Why is there a agent for the Open vSwitch plugin? 28
Why is there a agent for the Open vSwitch plugin? 28

Why is there a agent for the Open vSwitch plugin?

Why is there a agent for the Open vSwitch plugin? OVS cli wrappers 29

OVS cli wrappers