27
Tutorial Programming The Pla0orm Berlin September 30 th , 2016 Lorenzo Tomasini

Tutorial on programming the Platform

Embed Size (px)

Citation preview

Page 1: Tutorial on programming the Platform

Tutorial

Programming The Pla0orm

BerlinSeptember30th,2016

LorenzoTomasini

Page 2: Tutorial on programming the Platform

Agenda

•  TheSo:FIREarchitecture•  Experimentlifecycle•  Accesstothefederatedtestbed•  DesignandProgramming•  TheMongoDBexample•  DiscoveryandAllocaKonofresources•  RunningandtroubleshooKngtheexperiment

7Oktober2016 So:FIREProjectMeeKngBerlin 2

Page 3: Tutorial on programming the Platform

jFed

FITEagleSo:FireSofwarePortalOpenVPNserver

Experimenter

Testbed

Testbed

Testbed

VNF

VNF

VNFVNF

VNF

ExperimenterLevel

So:FIREPlaSormProviderslevel

NFVMANOLevel

TestbedFederaKonLevel

So:FIRE

PlaSorm

Page 4: Tutorial on programming the Platform

Experiment Lifecycle

q Accesstothefederatedtestbedq DesignandProgrammingq DiscoveryandAllocaKonofresourcesq RunningandtroubleshooKngtheexperiment

7Oktober2016 So:FIREProjectMeeKngBerlin 4

Page 5: Tutorial on programming the Platform

Experiment Lifecycle

q Accesstothefederatedtestbedq DesignandProgrammingq DiscoveryandAllocaKonofresourcesq RunningandtroubleshooKngtheexperiment

7Oktober2016 So:FIREProjectMeeKngBerlin 5

Page 6: Tutorial on programming the Platform

Access to the Federated Testbed

•  Theexperimenterswillreceive•  UsernameandpasswordfortheSSP

•  ThesamecredenKalusedtoaccessthewebportal•  CerKficatetoaccesstheSo:FIREVPN•  ThesamecerKficateandanewpasswordforlogintojFedanddiscovertheresources

7Oktober2016 So:FIREProjectMeeKngBerlin 6

Page 7: Tutorial on programming the Platform

jFed

FITEagleSo:FireSofwarePortalOpenVPNserver

Experimenter

Testbed

Testbed

Testbed

VNF

VNF

VNFVNF

VNF

ExperimenterLevel

So:FIREPlaSormProviderslevel

NFVMANOLevel

TestbedFederaKonLevel

So:FIRE

PlaSorm

Page 8: Tutorial on programming the Platform

Experiment Lifecycle

q Accesstothefederatedtestbedq DesignandProgrammingq DiscoveryandAllocaKonofresourcesq RunningandtroubleshooKngtheexperiment

7Oktober2016 So:FIREProjectMeeKngBerlin 8

Page 9: Tutorial on programming the Platform

Design and Programming

1.  DesignthecloudsoluKon1.  HowmanyVNFwillIneed?2.  WhatrequirementshaseachVNF?3.  Howaretheyconnected?4.  WhatrequireseachVNFfromotherVNFs?

7Oktober2016 So:FIREProjectMeeKngBerlin 9

Page 10: Tutorial on programming the Platform

MongoDB Sharded Cluster

7Oktober2016 So:FIREProjectMeeKngBerlin 10

Page 11: Tutorial on programming the Platform

MongoDB Sharded Cluster

•  Shard:Eachshardcontainsasubsetofthedata.Eachshardcanbealsodeployedasareplicaset.• Mongos(Router):Themongosrouteractsasaqueryrouter,providinganinterfacebetweenclientapplicaKonsandtheshardedcluster.• ConfigServer(s):ConfigserversstoremetadataandconfiguraKonseangsforthecluster.Configserverscanbedeployedasareplicaset

7Oktober2016 So:FIREProjectMeeKngBerlin 11

Page 12: Tutorial on programming the Platform

MongoDB Sharded Cluster

•  ThreetypeofVNF:•  Shard•  Config•  Router

•  ThismeansthreeVNFPackages,oneperVNFtobeuploadedtotheSSP

7Oktober2016 So:FIREProjectMeeKngBerlin 12

Page 13: Tutorial on programming the Platform

MongoDB example

7Oktober2016 So:FIREProjectMeeKngBerlin 13

Router

Config Shard1

Shardn

ClientApp

FOKUStestbed

Surreytestbed TelecomItaliatestbed

Page 14: Tutorial on programming the Platform

Create a VNF Package

• VNFPackageisasimpletarfilecontaining:

•  Metadata.yaml•  Scriptsfolder•  vnfd.json

7Oktober2016 So:FIREProjectMeeKngBerlin 14

Page 15: Tutorial on programming the Platform

Metadata.yaml •  TheMetadata.yamldefinesessenKalproperKesfortheVNF.ThisfileisbasedontheYAMLsyntaxwhereinformaKonarestoredinsimple<key>:<value>associaKons.

7Oktober2016 So:FIREProjectMeeKngBerlin 15Reference:hfp://openbaton.github.io/documentaKon/vnfpackage/

name:routerdescrip:on:"Theroutermodule”scripts-link:scripts_linkprovider:TUBshared:trueimage:

upload:falsenames: -Ubuntu14.04Cloudbasedlink:hJp://link-to-image

Image-config:name:Ubuntu14.04CloudbaseddiskFormat:qcow2containerFormat:bareminCPU:0minDisk:0minRam:0isPublic:true

Page 16: Tutorial on programming the Platform

VNF Lifecycle event

7Oktober2016 So:FIREProjectMeeKngBerlin 16

Page 17: Tutorial on programming the Platform

Vnfd.json

•  Thevnfd.jsoncontainstheVirtualNetworkFuncKonDescriptor(VNFD)onboardedtotheOrchestrator.

7Oktober2016 So:FIREProjectMeeKngBerlin 17

Page 18: Tutorial on programming the Platform

Scripts folder •  ThescriptsfoldercontainsallthescriptsrequiredforstarKng,configuringorwhateveryouwanttodoontherunninginstanceduringspecificlifecycles.TheexecuKonorderisdefinedbythelifecycle_eventsinsidetheVNFD.Thislifecycle_eventsaretriggeredbytheNFVOinthemeaningof:iftheevent"INSTANTIATE"containsascriptinthelifecycle_events,thisscriptisexecutedwhentheNFVOcallstheinstanKatemethodforthespecificVNFR.

•  Note:Thescriptsinthefolderscriptsarefetchedonlyifthescripts-linkisnotdefinedintheMetadata.yaml.Thismeansthatthescriptsinthatfolderhavelessprioritythanthescriptslocatedunderscripts-link.

•  Note:ScriptsareexecutedwhenaspecificEventisfiredandthisEventreferencestospecificscripts.

•  Note:subfoldersarenotallowed

7Oktober2016 So:FIREProjectMeeKngBerlin 18Reference:hfp://openbaton.github.io/documentaKon/vnfpackage/

Page 19: Tutorial on programming the Platform

Script example

#!/bin/bash

exportLC_ALL=C

shard_uri="$shard_softfire_internal_floatingIp:$shard_port”

echo$shard_uri

echo"sh.addShard('$shard_uri')">addShard.js

if[-z$database];then

database=softfire

fi

echo"sh.enableSharding('$database')">>addShard.js

mongo--port$port<addShard.js

7Oktober2016 So:FIREProjectMeeKngBerlin 19

Routerscript:shard_configure.sh

Page 20: Tutorial on programming the Platform

So:fireSo:warePortal

27.09.16 So:FIREProjectMeeKngBerlin 20

Page 21: Tutorial on programming the Platform

jFed

FITEagleSo:FireSofwarePortalOpenVPNserver

Experimenter

Testbed

Testbed

Testbed

VNF

VNF

VNFVNF

VNF

ExperimenterLevel

So:FIREPlaSormProviderslevel

NFVMANOLevel

TestbedFederaKonLevel

So:FIRE

PlaSorm

Page 22: Tutorial on programming the Platform

Experiment Lifecycle

q Accesstothefederatedtestbedq DesignandProgrammingq DiscoveryandAllocaKonofresourcesq RunningandtroubleshooKngtheexperiment

7Oktober2016 So:FIREProjectMeeKngBerlin 22

Page 23: Tutorial on programming the Platform

jFed for resource discovery

7Oktober2016 So:FIREProjectMeeKngBerlin 23

Page 24: Tutorial on programming the Platform

Experiment Lifecycle

q Accesstothefederatedtestbedq DesignandProgrammingq DiscoveryandAllocaKonofresourcesq RunningandtroubleshooKngtheexperiment

7Oktober2016 So:FIREProjectMeeKngBerlin 24

Page 25: Tutorial on programming the Platform

jFedforresourceallocaKon

27.09.16 So:FIREProjectMeeKngBerlin 25

Page 26: Tutorial on programming the Platform

jFedforresourceaccess

27.09.16 So:FIREProjectMeeKngBerlin 26

Page 27: Tutorial on programming the Platform

jFedforresourceaccess

27.09.16 So:FIREProjectMeeKngBerlin 27