harmonia open iris_basic_v0.1

Post on 15-Jan-2015

939 Views

Category:

Software

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

OpenIRIS Virtual Network control

TRANSCRIPT

2014.07.24.

신용윤(SDN - Virtual Network)

Harmonia - OpenIRISNetwork Virtualization SDN Controller

123

4

Introduce

Architecture

OpenStack

IRIS Neutron Plugin

56

7

IRIS ML2 Mechanism DriverIRIS Virtual Network

ModuleTodo

Introduce

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

• 코드네임 : 하르모니아 (Harmonia) 개발 코드 네임

정식 명칭 : IRIS-pNaaS

• Harmonia Logo

• Harmonia ? 전쟁의 신 ( 아레스 ) 과 미와 사랑의 여신 ( 아프로디테 ) 사이에서 태어난 그리스

여신으로 ‘조화’를 의미함 음악 용어인 하모니 (Harmony) 의 어원

Virtual Network 의 조화를 이루고자 하는 의미

HarmoniaIntroduce

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

• Swift• Inexpensive• Automation We can create virtual networks, make swift networks and low-price. Don’t worry about! It’s automation.

Keywords : SIA (Swift, Inexpensive, Automation)Introduce

Architecture

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

개념도

Tenant A

Tenant B

VM1

VM2 VM3

VM4

VM5 VM6

REST API

Control Node

Network Node

Compute Node

Compute Node

Compute Node

Compute Node

VM1

VM2

VM3

VM4 VM5

VM6

Open-Flow

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

OpenStack Concept Architecture

http://docs.openstack.org/icehouse/install-guide/install/apt/content/ch_overview.html

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

Control Node, Network Node, Compute Node

http://docs.openstack.org/icehouse/install-guide/install/apt/content/ch_overview.html

SDN Con-troller

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

구성도 ( 서버 랙 )

eth1

eth0

Management Network

Data Net-work

External Network

OF Switch

eth0

eth0

eth1

eth1

eth0

eth1

Control Node

Network Node

eth2

Compute Node

eth2

OpenFlow

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

구성도 ( 서버 랙 - 실사 )

Control Node

- OS : Ubuntu 14.04 , Fedora, etc…

- OVS : version 2.0 이상 * 주의 : Linux Kernel 과 dependency- 네트워크 인터페이스 : 2 * eth0 : Management Network ( 사설 IP) * eth1 : 외부망 연동 ( 공인 IP)

Network Node

- OS : Ubuntu 14.04 , Fedora, etc…

- OVS : version 2.0 이상 * 주의 : Linux Kernel 과 dependency- 네트워크 인터페이스 : 3 이상 * eth0 : Management Network ( 사설 IP) * eth1 : Data Network ( 사설 IP) * eth2 : 외부망 연동 ( 공인 IP)

Com-pute Node

- OS : Ubuntu 14.04 , Fedora, etc…

- OVS : version 2.0 이상 * 주의 : Linux Kernel 과 dependency- 네트워크 인터페이스 : 3 이상 * eth0 : Management Network ( 사설 IP) * eth1 : Data Network ( 사설 IP) * eth2 : 외부망 연동 ( 공인 IP)

③①

Compute Node

Compute Node

Compute Node

Compute Node

Compute Node

Compute Node

Compute Node

Network Node

Control Node

Open-Flow

SwitchHub

Management Network ( 일반 Hub)

Data Network (OpenFlow SW)+ SDN Controller

Data Network Switch (OpenFlow SW) - OF Switch, OVS, OpenWRT, … - Connect SDN Controller

Management Network Hub

OpenvSwitch 분석

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

OpenvSwitch

• A virtual switch or Virtual Ethernet Bridge (VEB)• A key component of networking for virtualized computing• User-space : configuration, control• Kernel-space : datapath (include in main Linux kernel since version 3.3)• Cisco Nexus 1000v, VMware vDS, IBM DVS 5000v, MS Hyper-V vSwitch

OverviewOverview & Features

• Visibility into inter-VM communication via NetFlow, sFlow®, IPFIX, SPAN, LACP (IEEE 802.1AX-2008)• Standard 802.1Q VLAN model with trunking• STP (IEEE 802.1D-1998), Fine-grained QoS control• NIC bonding with source-MAC load balancing, active backup, and L4 hashing• OpenFlow protocol support (including many extensions for virtualization)• Multiple tunneling protocols (VXLAN, Ethernet over GRE, CAPWAP, Ipsec, GRE over Ipsec)

Features

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

OpenvSwitch

Open vSwitch Architecture

ovs-vsctlovsdb-client

ovs-appctl ovs-dpctl

ovs-brcompatdovs-

vswitchd

brcompat.ko

openvswitch.ko

Kernel Datapath (Fast Path)

use

r sp

ace

Kern

el sp

ace

ovsdb-server

Netlink

tap

RemoteOpen vSwitch db

OpenFlowController

ovs-ofctl

VM

vNIC

OVS Management(JSON RPC)

OpenFlow

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

OpenvSwitch

Open vSwitch Architecture

br-ovs

vnet0

Packet flows

eth0

tap1

Port

Flow Table

Bridge

Interface

eth2

eth1

vnet1

bond0 eth2

tap2

vNIC vNIC

VM VM

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

OpenvSwitch

• a daemon that implements the switch, along with a companion Linux kernel module for flow-based switchingovs-vswitchdOpen vSwitch Architecture

• a lightweight database server that ovs-vswitchd queries to obtain configurationovsdb-server• a utility for querying and updating the configuration of ovs-vswitchdovs-vsctl• a tool for configuring and monitoring the switch kernel moduleovs-dpctl• a utility that sends commands to running Open vSwitch daemons (ovs-vswitchd)ovs-appctl• a simple OpenFlow controller reference implementationovs-controller• Linux bridge compatibility modulebrocompat.ko• Open vSwitch switching datapathopenvswitch.ko

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

OpenvSwitch

Open vSwitch Configuration

Table PurposeOpen_vSwitch Open vSwitch configurationBridge Bridge configurationPort Port configurationInterface One physical network device in a PortQoS Quality of Service configurationQueue QoS output queueMirror Port mirroringController OpenFlow controller configurationManager OVSDB management connectionNetFlow NetFlow configurationSSL SSL configurationsFlow sFlow configurationCapability Capability configuration

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

OpenvSwitch

$ sudo ovs-vsctl show225d73cc-15b3-4db5-9b45-e783f7c49a10 Bridge br-tun Port "gre-3" Interface "gre-3" type: gre options: {in_key=flow, out_key=flow, remote_ip="192.168.0.10"} Port br-tun Interface br-tun type: internal Port patch-int Interface patch-int type: patch options: {peer=patch-tun} Bridge br-int Port "tap1" tag: 1 Interface "tap1" Port "tap2" tag: 1 Interface "tap2" Port br-int Interface br-int type: internal Port patch-tun Interface patch-tun type: patch options: {peer=patch-int}

Open vSwitch Configuration sample

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

OpenvSwitch

Open vSwitch Configuration sample

Linux Networking Stack

br-int

Eth0External IP

tap1

Eth2192.168.10

.20

Eth1192.168.0.2

0

tap2

vNIC vNIC

VM VM

br-tun

gre3

patch-tun

patch-int

GRE Tunnel192.168.0.10

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

OpenvSwitch

Open vSwitch Demo

Switch

OpenvSwitch Bridge

tap1

eth1

tap2

vNIC vNIC

VM VM

eth0

Switch

gre-1 OpenvSwitch Bridge

tap1

eth1

tap2

vNIC vNIC

VM VM

eth0

gre-1GRE tun-

nel

External network

Tunneling net-work

192.168.0.0/24

Control Node

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

OpenvSwitch

Virtual Network - OpenStack

eth1

NovaKey-stone

eth0

External net-work

Management network 192.168.0.0/24

Glance Horizon

eth2

Network Node

eth1

Neutron Server

eth0

Neutron L3-Agent

eth2

Compute Node 01

eth1

eth0

eth2

Compute Node 02

eth1

eth0

eth2

Neutron Agent

Neutron Open-vSwitch Plug-in

Nova Compute

Neutron Agent

Neutron Open-vSwitch Plug-in

Nova Compute

Data network 192.168.10.0/24

Network Node

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

OpenvSwitch

br-ex

qg~~

eth1

eth0

gre-1

Compute Node 01

tap1

eth1

tap2

VM VM

eth0

gre-1GRE tunnel

Virtual Network - OpenStack

tap~~

br-int

qr~~

br-

tun

gre-2 gre-2

br-

tun

br-int

Tunnel <-> Compute Node 02

• qg~~ : external gateway interface• qr~~ : virtual router interface• tap~~ : network service interface (DHCP, DNS,

…)

OpenStackNeutron 분석

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

Neutron

• A virtual switch or Virtual Ethernet Bridge (VEB)• A key component of networking for virtualized computing• User-space : configuration, control• Kernel-space : datapath (include in main Linux kernel since version 3.3)• Cisco Nexus 1000v, VMware vDS, IBM DVS 5000v, MS Hyper-V vSwitch

OverviewOverview & Features

• Visibility into inter-VM communication via NetFlow, sFlow®, IPFIX, SPAN, LACP (IEEE 802.1AX-2008)• Standard 802.1Q VLAN model with trunking• STP (IEEE 802.1D-1998), Fine-grained QoS control• NIC bonding with source-MAC load balancing, active backup, and L4 hashing• OpenFlow protocol support (including many extensions for virtualization)• Multiple tunneling protocols (VXLAN, Ethernet over GRE, CAPWAP, Ipsec, GRE over Ipsec)

Features

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

Neutron – Neutron Server

Layer Diagram

Core REST API

Extension A REST API

Extension … REST API

Extension N REST API

Auth N / Auth Z / Input Validation/Output view

Core Plugin Interface

Service A Plugin Inter-

face

Service … Plugin Inter-

face

Service N Plugin Inter-

face

Core Plugin(Vendor spe-

cific)Service A Plugin Service N Plugin Agents

[composite:neutron]use = egg:Paste#urlmap/: neutronversions/v2.0: neutronapi_v2_0[composite:neutronapi_v2_0]use = call:neutron.auth:pipeline_factorykeystone = authtoken keystonecontext extensions neutronapiapp_v2_0[filter:keystonecontext]paste.filter_factory = neutron.auth:NeutronKeystoneContext.factory[filter:authtoken]paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory[filter:extensions]paste.filter_factory = neutron.api.extensions:plugin_aware_extension_middleware_factory[app:neutronversions]paste.app_factory = neutron.api.versions:Versions.factory[app:neutronapiapp_v2_0]paste.app_factory = neutron.api.v2.router:APIRouter.factory

Application and filters

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

Neutron : paste

neutron/server/__init__.py: main()

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

Neutron : main entry point

config.parse(sys.argv[1:])# --config-file neutron.conf --config-file XXXXX.ini

neutron/common/config.py

def load_paste_app(app_name)# Name of the application to load ex) def load_paste_app(“neutron”)

• neutron/auth.py def pipeline_factory(loader, global_conf, **local_conf):• neutron/api/v2/router.py class APIRouter(wsgi.router): def factory(cls, global_config, **local_config):• neutron/api/extensions.py def plugin_aware_extension_middleware_factory(global_config, **local_config):neutron/auth.py class NeutronKeystoneContext(wsgi.Middleware):

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

Neutron : filters and application

pipeline

URLrequest

authtoken

keystonecon-text

extensions

Process

URL is declared

here?

Response

neutronapiapp_v2_0

Process

URL is declared

here?

No

No, return HTTPNot-

Found

neutron/api/v2/router.py : APIRouter.factory()1. __init__()1.1 plugin = manager.NeutronManager.get_plugin( ) 1.1.1 neutron/manager.py : __init__( ) 1.1.1.1 def _create_instance( ) #create core plugin instance 1.1.1.2 def _load_service_plugins( ) #load plugin service

load plugins

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

Neutron : neutronapiapp_v2_0

neutron/neutron.confservice_plugins = …core_plugin = ml2NeutronManager : service_plugins = {“CORE”: ml2, “LOADBALANCER”: xxx, …}

• neutron/plugins/cisco|vmware|nuage/extensions/xxx.py@classmethoddef get_resources(cls): for resource_name in [‘router’, ‘floatingip’]: … controller = base.create_resource (collection_name, resource_name, plugin…) ex = ResourceExtension(collection_name, controller, member_actions…)

extensions are about resources and the actions on themWhat are plugins & extensions

• neutron/services/l3_router/l3_router_plugin.py• neutron/plugins/bigswitch/plugin.pysupported_extension_aliases = [“router”, “ext-gw-mode”, “extraroute”, “l3_agent_scheduler”]• neutron/extensions/l3.py• neutron/plugins/bigswitch/plugin.pydef update_router(self, context, id, router):• neutron/extensions/l3.py• neutron/plugins/bigswitch/routerrule_db.pydef get_router(self, context, id, fields=None):

Plugins are used to support the resources

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

Neutron : plugins and extensions

• __init__( )1.1 plugin = manager.NeutronManager.get_plugin()1.2 ext_mgr = extensions.PluginAwareExtensionManager.get_instance()1.2.1 neutron/api/extensions.py : def get_extensions_path()1.2.2 neutron/api/extensions.py : class PluginAwareExtensionManager(ExtensionManager): __init__(paths, plugins)1.2.2.1 neutron/api/extensions.py : def _load_all_extensions(self): self._load_all_extensions_from_path(path)1.2.2.2 neutron/api/extensions.py : def _load_all_extensions(self, path): … self.add_extension(new_ext)1.2.2.3 neutron/api/extensions.py : def add_extension(self, ext): … self._check_extension(ext):

neutron/api/v2/router.py: APIRouter.factory()neutronapiapp_v2_0: load extensions

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

Neutron : plugins and extensions

neutron standard ex-tension plus ones speci-

fied byapi_extension_path=

inneutron.conf

check each python module name under the path, and capitalize the first letter of the mod-ule name to find the

class in it, excluding the modules starting with

“_”.

1. 각 플러그인 마다 체크 (supported_extension_aliases)

2. check if the potential extension has im-plemented the needed functions.

3. check if one of plugins supports it. plugin’s supported_extension_aliases at-tribute defines what extensions it sup-ports.

• __init__( )1.1 plugin = manager.NeutronManager.get_plugin()1.2 ext_mgr = extensions.PluginAwareExtensionManager.get_instance()1.3 install core resources1.3.1 neutron/api/v2/router.py RESOURCES = {‘network’: ‘networks’, ‘subnet’: ‘subnets’, ‘port’: ‘ports’}

neutron/api/v2/router.py: APIRouter.factory()neutronapiapp_v2_0: install core resource

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

Neutron : plugins and extensions

• def plugin_aware_extension_middleware_factory(global_config, **local_config)1.1 def _factory(app): ext_mgr = PluginAwareExtensionManager.get_instance() return ExtensionMiddleware(app, ext_mgr=ext_mgr)neutron/api/extension.pyextension filter: assemble extensions

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

Neutron : plugins and extensions

:ExtensionMiddle-ware

:PluginAwareExtension-Manager

:ExtensionDe-scriptor

1. __init__(application, ext_mgr)

1.1 get_resource()

[for each extension]1.1.1 get_resources()

Loop1.2 install route ob-

jects

URL processing (1/2)

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

Neutron : plugins and extensions

Resource:Resource

:TextDeserial-izer

:Control Node:DictSerializer

1: HTTP URL

1.1: __init__

1.2: deserialize (data string)

1.3: getattr (action)

1.4: create | update | show | index | delete

1.5: serialize (data)

URL processing (2/2)

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

Neutron : plugins and extensions

:Control Node

1.4: create | update | show | index | delete

plugin:Plugin

1.4.1: calculate Plugin handler (action)

1.4.2: authz/input validation

1.4.3: (handler_fun}

1.4.4: _send_dhcp_notification (context, data, method-name)

1.4.5: _view_(context, data, fields_to_strip)

Notification to ceilometer also happens hereAction is link cre-ate, update, show, index or delete

Handler_fun is like create_net, list_nets func-tion of plugins

OpenStackML2 Plugin 분석

neutron.ml2.type_drivers = flat = neutron.plugins.ml2.drivers.type_flat:FlatTypeDriver local = neutron.plugins.ml2.drivers.type_local:LocalTypeDriver vlan = neutron.plugins.ml2.drivers.type_vlan:VlanTypeDriver gre = neutron.plugins.ml2.drivers.type_gre:GreTypeDriver vxlan = neutron.plugins.ml2.drivers.type_vxlan:VxlanTypeDriverneutron.ml2.mechanism_drivers = linuxbridge = neutron.plugins.ml2.drivers.mech_linuxbridge:LinuxbridgeMechanismDriver openvswitch = neutron.plugins.ml2.drivers.mech_openvswitch:OpenvswitchMechanismDriver hyperv = neutron.plugins.ml2.drivers.mech_hyperv:HypervMechanismDriver ncs = neutron.plugins.ml2.drivers.mechanism_ncs:NCSMechanismDriver arista = neutron.plugins.ml2.drivers.mech_arista.mechanism_arista:AristaDriver cisco_nexus = neutron.plugins.ml2.drivers.cisco.mech_cisco_nexus:CiscoNexusMechanismDriver l2population = neutron.plugins.ml2.drivers.l2pop.mech_driver:L2populationMechanismDriver …

Setup.cfg <ml2 Setup>

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

ml2 : Type and mechanism driver

neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/ml2.ini[ml2]type_drivers = local,flat,vlan,gre,vxlanmechanism_drivers = openvswitch,linuxbridgetenant_network_types = vlan,gre,vxlan[ml2_type_flat]flat_networks = physnet1,physnet2[ml2_type_vlan]network_vlan_ranges = physnet1:1000:2999,physnet2[ml2_type_gre]tunnel_id_ranges = 1:1000[ml2_type_vxlan]vni_ranges = 1001:2000

ml2.ini <ml2 설정 파일 >

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

ml2 : configuration for types

__init__ : neutron manager (server)

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

ml2

• Create core plugin instance [core_plugin=]neutron/manager.py: __init__()

Ml2 plugin :TypeManager :TypeDriver :MechanismManager :MechanismDriver1:

__init__()1.1: initialize()

[loop on driv-ers]

1.1.1: initial-ize()

loop

[loop on ordered_mech_drivers]

1.2.1: initialize()

loop

1.2: initialize()

1.3: _setup_rpc()

ml2.ini 를 통하여 어떠한 드라이버를 사용할 것인지

읽고 환경을 설정함

Ml2 RPC structure

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

ml2 : RPC structure

SecurityGroupServerRpcCallback-Mixin()

: neutron/db/securitygroups_rpc_base.py

DhcpRpcCallbackMixin()

: neutron/db/dhcp_rpc_base.py

TunnelRpcCallbackMixin(): neutron/plugins/ml2/drivers/

type_tunnel.pyRpcCallbacks

: neutron/plugins/ml2/rpc.py

AgentNotifierApi(): neutron/plugins/ 각 플러그인 마다

구현 Ml2Plugin

TunnelAgentRpcApiMixin: neutron/plugins/ml2/drivers/

type_tunnel.py

SecurityGroupAgentRpcApiM-ixin

: neutron/agent/securitygroups_rpc.py

callbacks

notifier

DHCP Agent 에서 RPC 처리

L2 Agent 에서 Notifi

RPC of L2 agent: ovs neutron agent

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

ml2 : L2 RPC structure

SecurityGroupAgentRpcApiMixin: neutron/agent/securitygroups_rpc.py+ security_groups_rule_updated(context, kwargs

**)+ security_groups_member_updated(context, kwargs **)+ security_groups_provider_updated(context, kwargs **)

OVSNeutronAgent: neutron/plugins/ 각 플러그인의 Agent

+ network_delete(context, kwargs **)+ port_update(context, kwargs **)+ tunnel_update(context, kwargs **)

OVSPluginApi: neutron/plugins/ 각 플러그인의 Agent 를 통해 제공

PluginApi: neutron/plugins/ 각 플러그인의 Agent 를 통해 제공

아래는 neutron/agent/rpc.py+ get_device_details(…, device, agent_id)+ update_device_down(…, agent_id, host=none)+ update_device_up(…, agent_id, host=none)+ tunnel_sync(…, tunnel_ip, tunnel_type=None)

SecurityGroupServerRpcApiMixin: neutron/db/

securitygroups_rpc_base.py+ security_group_rules_for_devices(…)

plugin_rpc

callback

Plugin 과 통신

Plugin 을 통해 Message 받음

Plugin to agent

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

ml2 : L2 Message

SecurityGroupAgentRpcApiMixin: neutron/agent/securitygroups_rpc.py+ security_groups_rule_updated(…)

+ security_groups_member_updated(…)+ security_groups_provider_updated(…)

OVSNeutronAgent: neutron/plugins/ 각 플러그인의 Agent

+ network_delete(context, kwargs **)+ port_update(context, kwargs **)+ tunnel_update(context, kwargs **)

SecurityGroupAgentRpcCallback-Mixin

: neutron/db/securitygroups_rpc_base.py

+ security_groups_rule_updated(…)+ security_groups_member_updated(…)+ security_groups_provider_updated(…)

TunnelAgentRpcApiMixin: neutron/plugins/ml2/drivers/

type_tunnel.py+ tunnel_update(…)

AgentNotifierApi: neutron/plugins/ 각 플러그인의 Agent

아래는 neutron/agent/rpc.py

+ network_delete(context, network_id)+ port_update(context, port, …)

Ml2Pluginnotifier

Plu

gin

sL2

A-

gen

t

q-agent-notifier-tunnel-update_fanout

Ex-

ch

an

ge

Qu

eu

e

q-agent-notifier-port-update_fanout

q-agent-notifier-network-delete_fanout

q-agent-notifier-security_gtoup-update_fanout

q-agent-notifier-tunnel-update_fanout_<uuid>

q-agent-notifier-port-update_fanout_<uuid>

q-agent-notifier-network-delete_fanout_<uuid>

q-agent-notifier-security_gtoup-update_fanout_<uuid>

L2 Agent to Plugin

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

ml2 : L2 Message

L2

A-

gen

tP

lug

ins

Ex-

ch

an

ge

Qu

eu

e

Ml2Plugin

RpcCallbacks: neutron/plugins/ml2/rpc.py

+ get_port_from_device(…)+ get_device_details(…)+ update_device_down(…)+ update_device_up(…)

TunnelAgentRpcApiMixin: neutron/plugins/ml2/drivers/

type_tunnel.py+ security_group_rules_for_devices(…)

PluginApi: neutron/plugins/ 각 플러그인의 Agent 를 통해 제공

아래는 neutron/agent/rpc.py+ get_device_details(…, device, agent_id)+ update_device_down(…, agent_id, host=none)+ update_device_up(…, agent_id, host=none)+ tunnel_sync(…, tunnel_ip, tunnel_type=None)

OVSNeutronAgent: neutron/plugins/ 각 플러그인의 Agent

+ network_delete(context, kwargs **)+ port_update(context, kwargs **)+ tunnel_update(context, kwargs **)

OVSPluginApi: neutron/plugins/ 각 플러그인의 Agent 를

통해 제공plugin_rpc

Neutron

q_plugin

callbacks

SecurityGroupAgentRpcCallback-Mixin

: neutron/db/securitygroups_rpc_base.py+

security_group_rules_for_devices(…)

TunnelRpcCallbackMixin: neutron/plugins/ml2/drivers/

type_tunnel.py+ tunnel_sync(…)

RPC of DHCP agent

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

ml2 : DHCP RPC structure

DhcpAgent(): neutron/agent/dhcp_agent.py

+ network_create_end(context, payload)+ network_update_end(context, payload)+ network_delete_end(context, payload)+ subnet_update_end(context, payload)+ subnet_delete_end(context, payload)+ port_update_end(context, payload)+ port_delete_end(context, payload)

DhcpAgentWithStateReport: neutron/agent/dhcp_agent.py

DhcpPluginApi: neutron/agent/dhcp_agent.py

+ get _active_networks_info(…)+ get_network_info(network_id)+ create_dhcp_port(port)+ update_dhcp_port(port_id, port)+ release_dhcp_port(network_id, device_id)

callback

Plugin_rpc

Neutron to agent

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

ml2 : DHCP Message

DhcpAgentNotifyAPI: neutron/api/rpc/agentnotifiers/

dhcp_rpc_agent_api.py+ notify(…, data, methodname)

Neu

-tro

nS

erv

er

DH

CPA

gen

t

dhcp_agent_fanout

Ex-

ch

an

ge

Qu

eu

e

neutron

dhcp_agent_fanout_<uuid>

dhcp_agent.<host>

DhcpAgentWithStateReport: neutron/agent/dhcp_agent.py

DhcpAgent(): neutron/agent/dhcp_agent.py

+ network_create_end(context, payload)+ network_update_end(context, payload)+ network_delete_end(context, payload)+ subnet_update_end(context, payload)+ subnet_delete_end(context, payload)+ port_update_end(context, payload)+ port_delete_end(context, payload)

‘network.create.end’, ‘net-work.update.end’, ‘net-work.delete.end’, ‘sub-net.create.end’, ‘subnet.up-date.end’, ‘sub-net.delete.end’, ‘port.cre-ate.end’, ‘port.update.end’, ‘port.delete.end’

DHCP Agent to Plugin

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

ml2 : DHCP Message

DH

CPA

gen

tP

lug

ins

Ex-

ch

an

ge

Qu

eu

e

RpcCallbacks: neutron/plugins/ml2/rpc.py

+ get_port_from_device(…)+ get_device_details(…)+ update_device_down(…)+ update_device_up(…)

Neutron

q_plugin

callbacks DhcpRpcCallbackMixin: neutron/db/dhcp_rpc_base.py

+ get_active_networks_info(…)+ get_network_info(…)+ release_dhcp_port(…)+ create_dhcp_port(…)+ update_dhcp_port(…)

DhcpPluginApi: neutron/agent/dhcp_agent.py

+ get _active_networks_info(…)+ get_network_info(network_id)+ create_dhcp_port(port)+ update_dhcp_port(port_id, port)+ release_dhcp_port(network_id, de-vice_id)

DhcpAgentWithStateReport: neutron/agent/dhcp_agent.py

plugin_rpc

Ml2Plugin

OpenStackNova compute 분석

…network_api_class=nova.network.neutronv2.api.API…neutron_url=http://<eth0:IP Address>:9696…neutron_region_name=RegionOne…neutron_admin_tenant_name=service…neutron_auth_strategy=keystone…neutron_admin_auth_url=http://<eth0:IP Address>:35357/v2.0…neutron_admin_password=<edit password>…neutron_admin_username=neutron…libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver

Nova.conf

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

nova compute

interaction to boot VM (OVS bridge)

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

nova compute

_build_instance() on Nova compute

Neutron Server

2. Create port : REST API

Plugin 을 통해 Message 받음

1. _allocate_network

()3. vif_driver.plug()

ovs bridge br-int

4. Add a port tapxxxxxx with external_ids set

Neutron openvswitch agent(Loop to detect port update on br-int)

6. Get the Neutron port id from the ex-ternal_ids

8. Set up the ovs port so that the network of VM works

5. Find a port tapxxxxxx was added

Message queue

7. get_device_details(port

_id)

9. update_device_up()

IRIS Neutron Pluginml2 mechanism Driver

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS Neutron plugin

Overview & FeaturesNeutron

ml2 plugin

OpenIRIS - pNaaS

Tunnel ManagerVNID-to-Flow

Mapper

Virtual Routing Manager

OpenIRIS ml2 Manager

Policy Manager

ECMP

QoS/ToS

E2E Path Visual-izer

OVS-Plugin ARP Proxy

Link Cost Man-ager

BW

Flow Monitor

Queu-ing

Path Computa-tion

OF Switch OF Switch

OF Switch

OF Switch

Core ModuleTopology Man-

agerForwarding Man-

agerMAC Learning Status Man-

agerSwitch Man-

ager…

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Architecture

OpenvSwitch

VM1 VM2

Compute Node

Network Node

Control Node

Open-vSwitch

VM1 VM2

OF Switch OF Switch

OpenF

low

OpenFlow

REST API REST API

OF Switch

OF Switch

Compute Node

Open-vSwitch

VM1 VM2Compute

Node

OpenIRIS - pNaaS

Tunnel ManagerVNID-to-Flow

Mapper

Virtual Routing Manager

Neutron APIPolicy Manager

ECMP

QoS/ToS

E2E Path Visual-izer

OVS-Plugin ARP Proxy

Link Cost Man-ager

BW

Flow Monitor

Queu-ing

Path Computa-tion

REST API

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Overview & Features

• Using REST APIOverview

• Network (http://<IRIS IP:8080>/vm/ml2/networks/{uuid}) create_network_postcommit update_network_postcommit delete_network_postcommit

• Subnet (http://<IRIS IP:8080>/vm/ml2/subnets/{uuid}) create_subnet_postcommit update_subnet_postcommit delete_subnet_postcommit

• Port (http://<IRIS IP:8080>/vm/ml2/ports/{uuid}) create_port_postcommit update_port_postcommit delete_port_postcommit

Features

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Create Network / Subnet

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Create Network / Subnet

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Create Network / Subnet

• Get : http://IP:8080/controller/nb/v2/neutron/networks/af57c272-fe28-4a1d-a5e0-48b42508f1eaREST Call

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Create Network / Subnet

• Get : http://IP:8080/controller/nb/v2/neutron/subnets/d07c4855-f728-415d-b841-c62086a1ca0eREST Call

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Create vm

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Create vm

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Create vm

• Get : http://IP:8080/controller/nb/v2/neutron/ports/8f59e83c-7dd9-4c8d-b642-67da44b00e30REST Call

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Create vm

• Get : http://IP:8080/controller/nb/v2/neutron/ports/90a6dfc6-3f72-4aa9-9c99-1c1b8bbd2eacREST Call

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Install

• service neutron-server stop• service neutron-openvswitch-agent stop• Download OpenIRIS ml2 mechanism Driver

/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers /usr/lib/python2.6/site-packages/neutron/plugins/ml2/drivers

• Edit file /etc/neutron/plugins/ml2/ml2_conf.ini

[openiris] [ml2_openiris]

• service neutron-server start

Network Node

• Github DevStack : https://github.com/uni2u/DevStack.git (Find bugs...)

TBD Neutron(ml2 plugin) : https://github.com/uni2u/Neutron.git (Find bugs...)

TBD• We need Stable Version

Screenshot : ubuntu 12.04 / 14.04, Fedora, etc

DevStack

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Todo

• Provide IRIS ml2 plugin in devstack (OpenStack Project) mechanism_iris, … we need devstack!

• Script Files More easy install devstack

DevStack

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Todo

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Todo

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Todo /opt/stack/neutron/set-up.cfg

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS ML2 Mechanism Driver

Todo

IRISVirtual Network Module

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS Virtual Network Module

Overview & Features

• OpenIRIS ML2 Module Download Git : https://github.com/bjlee72/IRIS.git

• Now TBD

Overview

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS Virtual Network Module

Architecture

OpenvSwitch

VM1 VM2

Compute Node

Network Node

Control Node

Open-vSwitch

VM1 VM2

OF Switch OF Switch

OpenF

low

OpenFlow

REST API REST API

OF Switch

OF Switch

Compute Node

Open-vSwitch

VM1 VM2Compute

Node

OpenIRIS - pNaaS

Tunnel ManagerVNID-to-Flow

Mapper

Virtual Routing Manager

Neutron APIPolicy Manager

ECMP

QoS/ToS

E2E Path Visual-izer

OVS-Plugin ARP Proxy

Link Cost Man-ager

BW

Flow Monitor

Queu-ing

Path Computa-tion

REST API

Harmonia – OpenIRIS : The SDN Controller for Network Virtualization

IRIS Virtual Network Module

Overview & Features

• IOpenstackML2ConnectorServie.java Interface of ML2_Module (OFMOpenstackML2Connector.java) Incomplete (interface is nothing)

• NetworkConfiguration.java ml2 plugin called this class REST (http://IP:8080/vm/ml2)

• OFMOpenstackML2Connector.java Module class

• RestCreateNetwork.java create_network_posecommit (ml2 plugin) REST (http://IP:8080/vm/ml2/networks/{uuid}) Incomplete (PUT, POST, DELETE)

• RestCreatePort.java create_port_posecommit (ml2 plugin) REST (http://IP:8080/vm/ml2/ports/{uuid}) Incomplete (PUT, POST, DELETE)

• RestCreateSubnet.java create_subnet_posecommit (ml2 plugin) REST (http://IP:8080/vm/ml2/subnets/{uuid}) Incomplete (PUT, POST, DELETE)

Features (ml2 classes)

부록DevStack (icehouse) installhttp://uni2u.meximas.com

Harmonia : The SDN Controller for Network Virtualization

DevStack Install

준비사항 및 실습

• VirtualBox ver 4.3.12 (https://www.virtualbox.org/wiki/Downloads)• Ubuntu 14.04 LTS (http://www.ubuntu.com/download/desktop)준비사항

VirtualBox 설정

Harmonia : The SDN Controller for Network Virtualization

DevStack Install

Virtualbox VM Create – Control Node

Harmonia : The SDN Controller for Network Virtualization

DevStack Install

Virtualbox VM Create – Control Node

Harmonia : The SDN Controller for Network Virtualization

DevStack Install

Virtualbox VM Start – Control Node

Harmonia : The SDN Controller for Network Virtualization

DevStack Install

Control Node 설정

• Services deployed Compute(Nova) / Network(Neutron) / Object Storage(Swift) / Image Storage (Glance) / Block Storage(Cinder) / Identity(Keystone) / Database(Trove) / Or-chestration(Heat) / Dashboard(Horizon)

• Installation Order System Update, Upgrade

Install git, vim User Permission Download Devstack (ver. Icehouse)

Installs

sudo apt-get updatesudo apt-get upgradesudo apt-get dist-upgradesudo apt-get install git vimsudo adduser stackecho “stack ALL=(ALL) NOPASSWD:ALL” >> /etc/sudoersgit clone https://github.com/openstack-dev/devstack.git -b stable/ice-house devstack/

top related