deep dive into quantum

31
1 Deep dive into Quantum 2012/11/10 COSUG Meet up Luo, Zhongyue

Upload: open-source-software-competence-center-huawei-technologies

Post on 12-May-2015

1.700 views

Category:

Documents


4 download

DESCRIPTION

China OpenStack User Group

TRANSCRIPT

Page 1: Deep Dive Into Quantum

1

Deep dive into Quantum

2012/11/10 COSUG Meet up

Luo, Zhongyue

Page 2: Deep Dive Into Quantum

2

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

Page 3: Deep Dive Into Quantum

3

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

Page 4: Deep Dive Into Quantum

4

Intro

Network A Network B

VMA1

VMA2

VMB1

VMB2

Tenant View

Provider View

Phy Srv 1

VMA1

VMB1

Hypervisor

Phy Srv 2

VMA2

Hypervisor

Phy Srv 3

VMB2

Hypervisor

Data Centre Network

Page 5: Deep Dive Into Quantum

5

Intro

Net1 10.0.0.0/24

VM1 10.0.0.2 Nova

Quantum L2 virtual network

VM2 10.0.0.3

virtual port

virtual server

virtual interface (VIF)

Subnet 1

2

3

Page 6: Deep Dive Into Quantum

6

Intro

TenantA-VM1 10.0.0.2

TenantA-VM3 10.0.1.2

TenantA-VM2 10.0.0.3 9.0.0.3

Public Net 88.0.0.0/18

Tenant-A Net1 10.0.0.0/24

Tenant-A Net2 10.0.1.0/24

Tenant-A Net3 172.16.0.0/24

Tenant-A On Premise Net

172.16.0.0/24

VPN

TenantA-VM4 172.16.0.30

Not necessarily a VM!

Page 7: Deep Dive Into Quantum

7

File Structure

start

choose one

extensions

Page 8: Deep Dive Into Quantum

8

File Structure

extension implementations

agent implementations

api-pate.ini

handler setup

Page 9: Deep Dive Into Quantum

9

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

Page 10: Deep Dive Into Quantum

10

Components

API Extentions

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

• Enables innovation in virtual networking.

• Extensions implemented by many plugins can become “core”.

Page 11: Deep Dive Into Quantum

11

Overview

RPC

Page 12: Deep Dive Into Quantum

12

Overview

Quantum topic

q-plugin

Exchange:

Queue: notifications.info

quantum-server Dhcp agent

q-agent-notifier- network-delete_fanout

fanout

q-agent-notifier- tunnel-update_fanout

fanout

q-agent-notifier- port-update_fanout

fanout

q-agent-notifier- network-delete_fanout

_{uuid4}

q-agent-notifier- tunnel-update_fanout

_{uuid4}

q-agent-notifier- port-update_fanout

_{uuid4}

Plugin agent Comsumer:

get_device_details update_device_down tunnel_sync

Quantum rest api (resource CUD)

tunnel_update network_delete port_update

get_active_networks get_network_info get_dhcp_port release_dhcp_port release_port_fixed_ip update_lease_expiration

Plugin agent

Dhcp agent

quantum-server

http://wiki.openstack.org/Quantum?action=AttachFile&do=get&target=quantum-technical-archicture.ppt

Page 13: Deep Dive Into Quantum

13

Rest APIs

Networks

• Represents an L2 network segment

• Can associate with a set of subnets and ports

http://docs.openstack.org/api/openstack-network/1.0/content/Networks.html

quantum/api/v2/attributes.py

Page 14: Deep Dive Into Quantum

14

Rest APIs

Subnets

• Represents a range of IP addresses

• Allocated to devices

• API request specifications

o quantum/api/v2/attributes.py

Page 15: Deep Dive Into Quantum

15

Rest APIs

Ports

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

• Allocated to devices

http://docs.openstack.org/api/openstack-network/1.0/content/Ports.html

• API request specifications

o quantum/api/v2/attributes.py

Page 16: Deep Dive Into Quantum

Under the Hood

Page 17: Deep Dive Into Quantum

17

Configuration: Open vSwitch plugin

Install KVM, Open vSwitch and configure your environment

http://blog.scottlowe.org/2012/08/17/installing-kvm-and-open-vswitch-on-ubuntu/

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:[email protected]:3306/ovs_quantum .

NOTE: The database IP address in the file should be reachable by all compute nodes.

Page 18: Deep Dive Into Quantum

18

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

Page 19: Deep Dive Into Quantum

19

How does the plugin get loaded?

Page 20: Deep Dive Into Quantum

20

How does the plugin get loaded?

Page 21: Deep Dive Into Quantum

21

How does the plugin get loaded?

Page 22: Deep Dive Into Quantum

22

How does the plugin get loaded?

Page 23: Deep Dive Into Quantum

23

How does the plugin get loaded?

Page 24: Deep Dive Into Quantum

24

How does the plugin get loaded?

Page 25: Deep Dive Into Quantum

25

How does the plugin get loaded?

Page 26: Deep Dive Into Quantum

26

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.

Page 27: Deep Dive Into Quantum

27

Why is there a agent for the Open vSwitch plugin?

Page 28: Deep Dive Into Quantum

28

Why is there a agent for the Open vSwitch plugin?

Page 29: Deep Dive Into Quantum

29

Why is there a agent for the Open vSwitch plugin?

OVS cli wrappers

Page 31: Deep Dive Into Quantum