One problem with Software Defined Network solutions such as OpenVNet is their relatively high learning curve. SDN is a difficult topic to understand and requires very specific setup. During this presentation will be focus on how to learn OpenVNet's usage by looking at its integration test.
This presentation will cover the following points.
* Explanation of the integration test environment and how it allows us to test OpenVNet's advanced features.
* Demo of how to set up the integration test on a local Linux machine.
* Explanation of how to read its dataset yaml files and translate them to vnctl commands.
These slides were used at The Wakame Users Group meeting on July 15th, 2016 in Tokyo, Japan.
WUG #013 How to learn OpenVNet's usage from its integration test
1.
2. What do we do at Axsh?
● Virtualization
● Infrastructure as a Service (IaaS)
● Software Defined Networking (SDN)
● DevOps, Continuous Integration/Delivery
● Free open source software
3. Our two main FOSS projects
● Wakame-vdc
Full featured IaaS solution
(virtual data center)
● OpenVNet
Full featured SDN solution
(virtual network)
● http://axsh.jp
4. What is OpenVNet
● Software defined networking (SDN)
● Free open source software
● Written in Ruby
● http://axsh.jp/openvnet/
● https://github.com/axsh/openvnet
5. Agenda
● Quick introduction to SDN
● Simple OpenVNet demo
● Detailed look at integration test
● Goal:
Learn how to set up advanced OpenVNet
environments by reading the integration
test
6. The concept of SDN
● First look at vitualization
Hardware
Operating System
VS
Physical machine
Hardware
Operating System Operating System
Hypervisor
Virtual machines
7. SDN with OpenVNet
Hypervisor host Hypervisor host Hypervisor hostPhysical
Network
Virtual
(software
defined)
Network
VM VM VM VM VM VM
NAT DNS DHCP Routers Switches Firewalls
8. The concept of SDN
● A physical network
NIC NIC NIC NIC NIC NIC
172.16.90.0/24
172.16.91.0/24
Router
9. The concept of SDN
● A physical network
NIC NIC NIC NIC NIC NIC
Switch Switch
Switch Switch
Router
10. The concept of SDN
● A virtual network
NIC NIC NIC NIC NIC NIC
Switch Switch
Switch Switch
Router
11. The concept of SDN
● Create any network without changing hardware
NIC NIC NIC NIC NIC NIC
Switch Switch
Switch Switch
Router
Virtual network: 10.100.0.0/24
12. The concept of SDN
● Create any network without changing hardware
NIC NIC NIC NIC NIC NIC
Switch Switch
Switch Switch
Router
Virtual network: 10.100.0.0/24 Virtual network: 192.168.100.0/24
13. The concept of SDN
● Create any network without changing hardware
NIC NIC NIC NIC NIC NIC
Switch Switch
Switch Switch
Router
Virtual network: 172.16.0.0/16
Virtual network: 10.100.0.0/24
14. The concept of SDN
● How is this magic possible?
● Because OpenVNet controls the switches
(using OpenFlow)
NIC NIC NIC NIC NIC NIC
Switch Switch
Switch Switch
Router
OpenVNet OpenVNet
OpenVNet
15. OpenVNet's inner workings
User laptop
Hypervisor Host
Open vSwitchVNA
VM VM VM VM VM
Vnctl
Web (REST) API
HTTP
Database Vnmgr
VNet Edge
Other networks
Physical network
16. A quick demo
● Try it yourself
http://openvnet.org/installation/
Vnctl
WebAPI
Vnmgr
VNA Open vSwitch
VM (inst1)VM (inst1) VM (inst2)
Database
17. Demo: 1 network
● http://openvnet.org/creating-virtual-networks
VM (inst1)VM (inst1) VM (inst2)
10.100.0.0/24
10.100.0.10 10.100.0.11
18. Demo 2: DHCP server
● http://openvnet.org/creating-virtual-networks
● DHCP is simulated by OpenVNet
VM (inst1)VM (inst1) VM (inst2)
10.100.0.0/24
10.100.0.10 10.100.0.11
DHCP
10.100.0.100
19. Demo 3: Two virtual networks
● http://openvnet.org/creating-virtual-networks
VM (inst1)VM (inst1)
172.16.0.10
DHCP
172.16.0.100
172.16.0.0/24
VM (inst1)VM (inst2)
192.168.100.10
DHCP
192.168.100.100
192.168.100.0/24
20. Demo 4: Router
● http://openvnet.org/creating-virtual-networks
● Like DHCP, routers are simulated
VM (inst1)VM (inst1)
172.16.0.10
DHCP
172.16.0.100
172.16.0.0/24
VM (inst1)VM (inst2)
192.168.100.10
DHCP
192.168.100.100
192.168.100.0/24
172.16.0.1
192.168.100.1
21. The integration test
● Shows how to set up OpenVNet on multiple
hosts
● Included in the OpenVNet source code
● https://github.com/axsh/openvnet
● OpenVNet's physical and virtual network setup
is integration_test/dataset directory.
● Test scenarios are in the
integration_test/lib/vnspec/spec directory.
22. The test code
● The yaml files get translated to vnctl
commands
datapaths:
- uuid: dp-1
node_id: vna1
display_name: node1
dpid: "0x0000aaaaaaaaaaaa"
vnctl datapaths add --uuid "dp-1" --node_id "vna1" --display_name "node1" --dpid
"0x0000aaaaaaaaaaaa"
Becomes
25. Let's take it step by step
● OpenVNet's simplest physical network
● Two VMs in 1 host
● This allows us to test many scenarios already
Itest1
VNAWebAPI
Database
Vnmgr
Open vSwitch
VM 1 VM 2
26. Add one host
● Test scenarios with multiple VNA on multiple
hosts
● The red network is for OpenVNet's internal
communication
Itest1
VNAWebAPI
Database
Vnmgr
Open vSwitch
VM 1 VM 2
Itest2
VNA Open vSwitch
VM 3 VM 4
Eth0 Eth0Eth1 Eth1
27. Add another host in another
subnet
● Test scenarios with multiple VNA/hosts on
multiple subnets
Itest1
VNAWebAPI
Database
Vnmgr
Open vSwitch
VM 1 VM 2
Eth0Eth1
Itest2
VNA Open vSwitch
VM 3 VM 4
Eth0Eth1
Itest3
VNA Open vSwitch
VM 5 VM 6
Eth0Eth1
28. A quick review
● Remember this whole setup is
OpenVNet's physical network
● This topology will never change over the
course of the tests
● We can create any virtual network
topology we want using VM 1 ~ VM 6
29. One more thing we need
● We can now test everything except VNet
Edge
● VNet Edge connects non-OpenVNet
managed networks to virtual networks
30. Add VNet Edge● Simulate non-OpenVNet (Legacy) network using Legacy1 VM
Itest1
VNAWebAPI
Database
Vnmgr
Open vSwitch
VM 1 VM 2
Eth0Eth1
Itest2
VNA Open vSwitch
VM 3 VM 4
Eth0Eth1
Itest3
VNA Open vSwitch
VM 5 VM 6
Eth0Eth1
Itest-Edge
Eth1
VNA
Open vSwitch
Eth0 Eth2
Legacy1
Eth0
31. We're done
● We can now test all of OpenVNet's
features
● We run this entire environment in one
host
● That means we use nested virtualization
32. Host (server or laptop)
Nested VMs
Itest1
VNAWebAPI
Database
Vnmgr
Open vSwitch
VM 1 VM 2
Eth0Eth1
Itest2
VNA Open vSwitch
VM 3 VM 4
Eth0Eth1
Itest3
VNA Open vSwitch
VM 5 VM 6
Eth0Eth1
Itest-Edge
Eth1
VNA
Open vSwitch
Eth0 Eth2
Legacy1
Eth0
= HOST = VM = VM in VM
33. Building this environment
● The build scripts are available on github
● https://github.com/axsh/wakame-ci-cluster/tr
● These scripts build the environment but
do not run any test code
34. Physical network setup
● OpenVNet needs to be made aware of the
physical network layout
● This is the same for every test scenario
● integration_test/dataset/base.yml
+
base_dp.yml OR base_topology.yml
35. base_dp Vs. base_tp
● A datapath roughly means a single Open
vSwitch
● OpenVNet uses internal
datapath_network structures to keep
track of which network is on which
datapath.
Open vSwitch = datapath
36. base_dp Vs. base_tp
● Topology is a new feature that generates
datapath_networks automatically
● base_dp sets datapath_networks
manually
● base_tp uses Topology
● Which one to use depends on the test
scenario
37. Other yaml files are test
scenarios
● simple.yml is the simplest scenario with
manual datapath_network
● simple_tp.yml is the same scenario with
Topology
38. simple.yml / simple_tp.yml
Itest1
VNAWebAPI
Database
Vnmgr
Open vSwitch
VM 1 VM 2
Eth0Eth1
Itest2
VNA Open vSwitch
VM 3 VM 4
Eth0Eth1
Itest3
VNA Open vSwitch
VM 5 VM 6
Eth0Eth1
Itest-Edge
Eth1
VNA
Open vSwitch
Eth0 Eth2
Legacy1
Eth0
DHCP
nw-vnet1
DHCP
nw-vnet2
39. simple.yml / simple_tp.yml
VM 1 VM 2 VM 3 VM 4 VM 5 VM 6
DHCP
nw-vnet1 (10.101.0.0/24)
DHCP
nw-vnet2 (10.101.0.0/24)
● Both networks can have the same IP
addresses
40. Itest1
VNAWebAPI
Database
Vnmgr
Open vSwitch
VM 1 VM 2
Eth0Eth1
Itest2
VNA Open vSwitch
VM 3 VM 4
Eth0Eth1
Itest3
VNA Open vSwitch
VM 5 VM 6
Eth0Eth1
Itest-Edge
Eth1
VNA
Open vSwitch
Eth0 Eth2
Legacy1
Eth0
router_v2v / router_v2v_tp
VM 1 VM 2 VM 3 VM 4 VM 5 VM 6
DHCP
nw-vnet1
DHCP
nw-vnet2
41. router_v2v / router_v2v_tp
VM 1 VM 2 VM 3 VM 4 VM 5 VM 6
DHCP
nw-vnet1 (10.101.0.0/24)
DHCP
nw-vnet2 (10.102.0.0/24)
● Two networks with a router
● IP addresses can't be the same with
a router between networks
42. Service.yml
VM 1 VM 2 VM 3 VM 4 VM 5 VM 6
DHCP
nw-vnet1 (10.101.0.0/24)
DHCP
nw-vnet2 (10.101.0.0/24)
● Adds DNS service
DNS
DNS
43. Other scenarios
● edge.yml:
L2 connectivity between virtual network
and non-OpenVNet managed network
● event.yml
Changing virtual network layout on the fly
● secg.yml / secg_reference.yml
Security groups and connection tracking
● edge_esxi.yml
Deprecated esxi support
44. Other scenarios
● filter.yml
Simple firewall rules
● router_p2v.yml
Routing between virtual and physical
networks
● WanEdge
NAT and routing to global network
45. OpenVNet feature list
●
Two protocols to support virtual networking.
- **MAC2MAC** (Axsh original protocol for physical L2 tunneling)
- **GRE** (protocol for L3 tunneling)
●
Simulated DHCP service
●
Simulated DNS service
●
L3 routing between virtual networks.
●
Single hop L3 routing between physical and virtual networks.
●
Firewall
●
Connection tracking
●
Integration with Wakame-vdc.
●
VNet Edge feature (connect virtual and physical networks)