the gÉant testbed service (gts) · 2016-08-18 · string nofx integer nvm def baseclass(nvm=1,...

32
The GÉANT Testbed Service (GTS) DSL Training v.1.0-b4308 Susanne Naegele-Jackson – RRZE Fabio Farina – GARR Robert Szuman – PSNC Blazej Pietrzak – PSNC 14 October 2015

Upload: others

Post on 05-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

The GÉANT Testbed Service (GTS) DSL Training v.1.0-b4308

Susanne Naegele-Jackson – RRZE Fabio Farina – GARR Robert Szuman – PSNC Blazej Pietrzak – PSNC 14 October 2015

Page 2: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

connect • communicate • collaborate

Introduction

Page 3: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

3 Connect | Communicate | Collaborate

• Accelerating Network Innovation – Make it easy for network research (broadly

construed) to quickly and effectively test innovative technologies!

• SA2 objective: Provide experimental laboratories for network research – Simple: Minimal learning curve – Agile: Rapid prototype, short iteration cycle – Secure: Support high risk experiments, protect

others – Flexible: Supports a wide range of research

activities – Scalable: Support very large, diverse

experiments. – World Wide: geographically distributed, reaches

beyond GÉANT

The GÉANT Testbed Service

Page 4: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

4 Connect | Communicate | Collaborate

GUI

Researcher has a brilliant idea

Researcher logs in, creates a testbed via a web GUI

Core Resource Manager parses the doc and allocates resources to the testbed

Network conceived to test brilliant idea

Testbed template doc formally describes the

network

Testbed is activated and user controls it via the GUI

L1

B

L2

C

L3

A

p0 p1

src dst

p1

p2

Z A

src dst

if0

if2

Switch “B”

Virtual Circuit “L1”

VM “C” VC “L3”

VC “L2” Virtual

Machine “A”

RM

Resource A port p0, p1; Resource B port out1, out2; Adj B/out1==A/p0;

How it works

Page 5: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

5 Connect | Communicate | Collaborate

TaaS Virtualization Layer Services

The architecture Testbed X Control

Agent Testbed Y Control

Agent

SA2 Core Resource Manager and Resource Control Methods

PRA BRA AMS

GN4+SA2 Core Physical Infrastructure

OpenNSA / BoD

GN4 & NREN network services

User Control Interface

... OpenStack NFS JunOS / HP

Virtual Switching & Routing Resources

Virtual Compute

Resources

Virtual Storage Resources Virtual

Transport Resources

Page 6: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

6 Connect | Communicate | Collaborate

Systems and Hardware Engineering

Page 7: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

7 Connect | Communicate | Collaborate

The Resource Graph

“Derived Resource Graph” data plane

L1

B

L2

C L3

A

p0 p1 src

dst if1

if2 dst src

dst

src if0

if1 if3 if2

class: EFTSlink class: EFTSlink

Class: EFTSlink

class: x86VM

class: etherSwitch

class: x86VM A C

B

Ethernet Switch “B”

VLAN “L1”

Testbed “Alpha” Description

X86 Server “C” Virtual

Circuit “L3”

VLAN “L2” Virtual Machine

“A”

The TaaS Architecture treats all [testbed] networks as graphs

Internally, all testbed components are treated as generalized virtual Resources. All Resources all have a set of explicitly defined data flow Ports. User specified Port adjacency relations define the testbed topology.

Page 8: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

8 Connect | Communicate | Collaborate

• The DSL is based on the “groovy” OO language – Allows programmatic descriptions of

network layout – Enables users to define repetitive

connectivity patterns/processes

• Composite resources – Large complex testbeds are constructed

from simpler more atomic resources

• Users can define their own resource classes – Novel hardware or functional agents can be

introduced

Object Oriented Testbed Descriptions

Page 9: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

9 Connect | Communicate | Collaborate

Questions?

Page 10: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

connect • communicate • collaborate

DSL Training

Page 11: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

11 Connect | Communicate | Collaborate

OneHost.groovy

testbed { id = "OneHost" host { } } host()

testbed (”OneHost”)

testbed { id = "OneHost” description = ”One host in Prague” host { id="h1" location=“pra" port { id="port1" } } }

host(”h1”)

testbed (”OneHost”)

Prague

”port1”

Page 12: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

12 Connect | Communicate | Collaborate

HostsLine.groovy 1/2

HostsLine { description = “PRA host linked with BRA host" host { id="h1" location=“pra" port { id="port1" } } host { id="h2" location="bra" port { id="port2" } } link { id="l1" port { id="src" } port { id="dst" } } ...

host(”h1”)

HostsLine ()

Prague

”port1”

host(”h2”)

Bratislava

”port2”

link(”l1”)

”dst” ”src”

Page 13: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

13 Connect | Communicate | Collaborate

HostsLine.groovy 2/2

HostsLine { description = “PRA host linked with BRA host" host { id="h1" location=“pra" port { id="port1" } } host { id="h2" location="bra" port { id="port2" } } link { id="l1" port { id="src" } port { id="dst" } } adjacency h1.port1, l1.src adjacency h2.port2, l1.dst }

host(”h1”)

HostsLine ()

Prague

”port1”

host(”h2”)

Bratislava

”port2”

link(”l1”)

”dst” ”src”

Page 14: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

14 Connect | Communicate | Collaborate

Triangle.groovy 1/3

type triangle { description = "Triangle between PRA, BRA and LJU" host { id="h1" location=“pra" port { id="port11" } port { id="port12" } } host { id="h2" location="bra" port { id="port21" } port { id="port22" } } host { id="h3" location="lju" port { id="port31" } port { id="port32" } } ...

host(”h1”)

type triangle ()

Prague ”port11”

host(”h2”)

Bratislava

”port22”

host(”h3”) ”port31” ”port32”

”port12”

”port21”

Ljubljana

Page 15: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

15 Connect | Communicate | Collaborate

Triangle.groovy 2/3

... link { id="l1" port { id="src" } port { id="dst" } } link { id="l2" port { id="src" } port { id="dst" } } link { id="l3" port { id="src" } port { id="dst" } } ...

host(”h1”)

type triangle ()

Prague ”port11”

host(”h2”)

Bratislava

”port22”

host(”h3”) ”port31” ”port32”

”port12”

”port21”

link(”l1”)

”dst” ”src”

link(”l2”) ”dst”

”src”

link(”l3”)

”src”

”dst”

Ljubljana

Page 16: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

16 Connect | Communicate | Collaborate

Triangle.groovy 3/3

... link { id="l1" port { id="src" } port { id="dst" } } link { id="l2" port { id="src" } port { id="dst" } } link { id="l3" port { id="src" } port { id="dst" } } adjacency h1.port11, l1.src adjacency h2.port21, l1.dst adjacency h1.port12, l2.src adjacency h3.port32, l2.dst adjacency h2.port22, l3.src adjacency h3.port31, l3.dst }

host(”h1”)

type triangle ()

Prague ”port11”

host(”h2”)

Bratislava

”port22”

host(”h3”) ”port31” ”port32”

”port12”

”port21”

link(”l1”)

”dst” ”src”

link(”l2”) ”dst”

”src”

link(”l3”)

”src”

”dst”

Ljubljana

Page 17: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

17 Connect | Communicate | Collaborate

TriangleLoop.groovy

triangle { description = "Triangle using Groovy language iterators to define adjacencies." id = "t1" def hosts = [] def links = [] 3.times { idx -> def h1 = host { id = "host$idx" port { id = "p1" } port { id = "p2" } } hosts << h1 def l1 = link { id = "link$idx" port { id = "src" } port { id = "dst" } } links << l1 adjacency h1.p1, l1.src } 3.times { idx -> adjacency hosts[(idx + 1) % 3].p2, links[idx].dst } }

host(”h1”)

triangle (”t1”)

”p1”

host(”h2”)

”p2”

host(”h3”) ”p1” ”p2”

”p2”

”p1”

link(”l1”)

”dst” ”src”

link(”l2”) ”dst”

”src”

link(”l3”)

”src”

”dst”

Page 18: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

18 Connect | Communicate | Collaborate

Triangle3x.groovy

... triangle3x { description = "Three times triangle between PRA, BRA and LJU" 3.times { idx -> triangle { id = "triangle$idx" } } }

host(”h1”)

triangle(”triangle1”)

Prague ”port11”

host(”h2”)

Bratislava

”port22”

host(”h3”) ”port31” ”port32”

”port12”

”port21”

link(”l1”)

”dst” ”src”

link(”l2”) ”dst”

”src”

link(”l3”)

”src”

”dst”

Ljubljana triangle(”triangle2”) triangle(”triangle3”)

triangle3x ()

Page 19: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

19 Connect | Communicate | Collaborate

Pentagon.groovy

Study the Groovy file and figure out how the pentagon topology can be created. Try and use the iterators for both links and hosts Don’t forget, the links are treated as resources and you have to define adjacencies between the ports

Page 20: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

20 Connect | Communicate | Collaborate

OneOFX.groovy 1/3

OneOFX { description = "Two hosts connected to Openflow switch" id = "t1" host { id="h1" location=“pra" port { id="port1" } } host { id="h2" location=“pra" port { id="port1" } } link { id="l1" port { id="src" } port { id="dst" } } link { id="l2" port { id="src" } port { id="dst" } } ...

host(”h1”)

OneOFX (”t1”)

Prague

host(”h2”)

Prague

”port1” ”port1”

link(”l1”) ”dst”

”src”

link(”l2”)

”src”

”dst”

Page 21: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

21 Connect | Communicate | Collaborate

OneOFX.groovy 2/3

... ofx { id="ofx1" location=“pra" fabricIPv4="10.10.100.1" controllerPort="9966" fabricSubnetMaskv4="255.255.255.0" controllerIPv4="10.10.100.100" port { id="port1"} port { id="port2"} port { id="port3" mode="CONTROL" } } ...

host(”h1”)

OneOFX (”t1”)

Prague

host(”h2”)

Prague

”port1”

ofx(”ofx1”) ”port2” ”port1”

”port1”

link(”l1”) ”dst”

”src”

link(”l2”)

”src”

”dst” Prague

”port3”

Page 22: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

22 Connect | Communicate | Collaborate

OneOFX.groovy 3/3

... ofx { id="ofx1" location=“pra" fabricIPv4="10.10.100.1" controllerPort="9966" fabricSubnetMaskv4="255.255.255.0" controllerIPv4="10.10.100.100" port { id="port1"} port { id="port2"} port { id="port3" mode="CONTROL" } } adjacency h1.port1, l1.src adjacency ofx1.port1, l1.dst adjacency h2.port1, l2.src adjacency ofx1.port2, l2.dst }

host(”h1”)

OneOFX (”t1”)

Prague

host(”h2”)

Prague

”port1” ”port1”

link(”l1”) ”dst”

”src”

link(”l2”)

”src”

”dst”

ofx(”ofx1”) ”port2” ”port1”

”port3”

Prague

Page 23: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

23 Connect | Communicate | Collaborate

Questions?

Page 24: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

24 Connect | Communicate | Collaborate

Getting more information

Visit the service page

http://services.geant.net/gts/ Manuals, guides and training

http://services.geant.net/gts/resources For further information, support, special needs

[email protected]

Page 25: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

connect • communicate • collaborate

GUI Demonstration

Page 26: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

connect • communicate • collaborate

Tips & Tricks

Special purpose resources DSL advanced usage hints

Page 27: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

27 Connect | Communicate | Collaborate

Testbed external domain stitching

Connect your GTS testbed to your lab ExternalDomainPort resource type

ExternalDomainPort_example{ host { id="h1" port { id=“eth1" } } link { id="l1" port { id=“src" } port { id=“dst” } } ExternalDomain { id = “ProtoGENI-SL” location = “LON” port { id=“ep1” } } adjacency h1.eth, l1.src adjacency ProtoGENI-SL.ep1, l1.dst }

Page 28: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

28 Connect | Communicate | Collaborate

Testbed external domain stitching

ExternalDomain properties id – User defined ID, case sensitive string; location – “AMS, BRA, LJU, …”. It’s where the External Domain VC terminates at the GTS edge Port id – Either “ep1”, or “ep2”

Semi-automatic provisioning!

GTS creates the link up to ExternalDomain port Then, you must contact us and your NREN to connect your lab to GTS through GÈANT Network

Page 29: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

29 Connect | Communicate | Collaborate

Advanced Groovy DSL 1/

Defining types and using them as nested resources Useful when you have to repeat complex fragments

... type NestedHost { host { id = "h1" port { id = "eth6" } port { id = "eth4" } } port { id = "p1" } adjacency p1, h1.eth4 } ...

NestedHostsLine { id = "t1" NestedHost { id = "n1" } host { id = "h2" port { id = "eth5" } } link { id = "link" port { id = "src" } port { id = "dst" } } adjacency n1.p1, link.src adjacency h2.eth5, link.dst }

Page 30: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

30 Connect | Communicate | Collaborate

Advanced Groovy DSL 2/

Use types together with Groovy constructs, check the syntax online Different iterators: times, each, for, while, … Data structures: maps, lists, intervals

type VertexEdge { host { id = "h" port { id = "eth1" } port { id = "eth2" } } link { id = "l" port { id = "src" } port { id = "dst" } } adjacency h.eth1, l.src port { id = "eth2" } port { id = "dst" } adjacency eth2, h.eth2 adjacency dst, l.dst }

type Triangle { id = "t" 3.times { idx -> VertexEdge { id = "v${idx}" } } 3.times { idx -> adjacency this."v${(idx + 1) % 3}".p, this."v${idx}".dst } } def list = ["red", "blue", "green"] list.each { Triangle { id = "Triangle_${it}" } }

Page 31: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

31 Connect | Communicate | Collaborate

Advanced Groovy DSL 3/

One-liners declaration and user defined functions through delegation Useful when your experiment needs parametric instances

def createHost(composite, name) { composite.with { host { id = name; port { id = "eth1" } } } } HostsVC_byFunction { link { id = "link" port { id = "src" } port { id = "dst" } } adjacency createHost("h1").eth1, link.src adjacency createHost("h2").eth1, link.dst } HostsVC_byInline { ... adjacency host { id = "h1"; port { id = "eth1" } }.eth1, link.src adjacency host { id = "h2"; port { id = "eth1" } }.eth1, link.dst }

Page 32: The GÉANT Testbed Service (GTS) · 2016-08-18 · String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() {

32 Connect | Communicate | Collaborate

Advanced Groovy DSL 4/

Full fledge OOP: inheritance, polymorphism Useful when your want full control over your testbed through Groovy

// Parent Class class BaseClass{ String nOFX Integer nVM def BaseClass(nVM=1, nOFX=1) { this.nOFX = nOFX this.nVM = nVM buildTestbed() } def buildTestbed() { // build your testbed // based on #OFXs, #VMs } }

// Child Class: @groovy.transform.InheritConstructors class AnotherClass extends BaseClass { // overload parent definition def buildTestbed() { // call parent method super.buildTestbed() } } def testbed_pool = [:] locs["tb1"] = new Child(2,1) locs["tb2"] = new AnotherClass()