are you ready for the tutorial?

50
Sponsored by the National Science Foundation 1 GEC16: March 20, 2013 Are you ready for the tutorial? 1. Did you do the pre-work? A. Are you able to login to the GENI Portal? Using your home institution username and password, or Using a GPO issued username and password, or A temporary account B. Have the GEC16 Tutorial VM including both: VirtualBox GEC16 Tutorial VM image 2. Sign In to GENI Portal 3. Join Project: GEC16AdvNetw 4. Grab a Worksheet and Instructions

Upload: maj

Post on 25-Feb-2016

33 views

Category:

Documents


4 download

DESCRIPTION

Are you ready for the tutorial?. Did you do the pre-work? Are you able to login to the GENI Portal? Using your home institution username and password, or Using a GPO issued username and password, or A temporary account Have the GEC16 Tutorial VM including both: VirtualBox - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Are you ready for the tutorial?

Sponsored by the National Science Foundation 1GEC16: March 20, 2013

Are you ready for the tutorial?1. Did you do the pre-work?

A. Are you able to login to the GENI Portal?• Using your home institution username and password, or• Using a GPO issued username and password, or• A temporary account

B. Have the GEC16 Tutorial VM including both:• VirtualBox• GEC16 Tutorial VM image

2. Sign In to GENI Portal

3. Join Project: GEC16AdvNetw4. Grab a Worksheet and Instructions

Page 2: Are you ready for the tutorial?

Sponsored by the National Science Foundation

Tutorial: Advanced Network Experiments

Niky RigaGENI Project Office

Jay AikatUniversity, North Carolina

GEC16, 20 March2013

$ omni.py createsliver aliceslice myRSpec.xml INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab. expires within 1 day on 2011-07-07 INFO:omni:Creating sliver(s) from rspec fileINFO:omni:Writing result of createsliver for INFO:omni:Writing to ‘aliceslice-manifest-rspeINFO:omni: -----------------------------------INFO:omni: Completed createsliver:

Options as run: aggregate: https://www.emulab. framework: pgeni native: True

Args: createsliver aliceslice myRSpec.xml

Result Summary: Slice urn:publicid:IDN+pgeniReserved resources on https://www.emulab.net/p Saved createsliver results to aliceslice-manINFO:omni: ===================================

omni

Page 3: Are you ready for the tutorial?

Sponsored by the National Science Foundation 3GEC16: March 20, 2013

Tutorial Outline• Part I: Learn how to use Omni Presentation and Hands-on

• Part II: Presentation of Advanced Experiments Tmix traffic generation Click Software Routers

• Part III: Hands-on Experiments Split in two groups:

– Tmix– Non-IP routing using Click

Page 4: Are you ready for the tutorial?

Sponsored by the National Science Foundation

Part I: Introduction to Omni

Niky Riga, Sarah Edwards GENI Project Office

$ omni.py createsliver aliceslice myRSpec.xml INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab. expires within 1 day on 2011-07-07 INFO:omni:Creating sliver(s) from rspec fileINFO:omni:Writing result of createsliver for INFO:omni:Writing to ‘aliceslice-manifest-rspeINFO:omni: -----------------------------------INFO:omni: Completed createsliver:

Options as run: aggregate: https://www.emulab. framework: pgeni native: True

Args: createsliver aliceslice myRSpec.xml

Result Summary: Slice urn:publicid:IDN+pgeniReserved resources on https://www.emulab.net/p Saved createsliver results to aliceslice-manINFO:omni: ===================================

Page 5: Are you ready for the tutorial?

Sponsored by the National Science Foundation 5GEC16: March 20, 2013

Hands On Exercise

Do a Simple Client-Server Experiment

Reserve two hosts using Omni and exchange traffic between them

Page 6: Are you ready for the tutorial?

Sponsored by the National Science Foundation 6GEC16: March 20, 2013

New GENI Terminology

AM API

slivercredentials

certificate

Page 7: Are you ready for the tutorial?

Sponsored by the National Science Foundation 7GEC16: March 20, 2013

Experimenter

GENI Credentials, GENI Certificates, GENI Keys

GENI Certificate : identifies user; created by the Portal and you can download it through the webUI, it is an ssl certificateGENI Credential : identifies user's permissions; you almost never have to handle; tools query if from Portal Services

GENI Keys : Access to compute resources are through ssh-keys, you can use your own or use the one GENI created for you Passphrase : is the password that protects your private key

Page 8: Are you ready for the tutorial?

Sponsored by the National Science Foundation 8GEC16: March 20, 2013

Omni: Resource Reservation tool

• A command line experimenter tool

• Create slices and slivers using the GENI AM API

• Written in and scriptable from Python

• Use existing accounts– GENI Portal– ProtoGENI– PlanetLab

• Works with aggregates that implement the GENI AM API – ProtoGENI, PlanetLab,

OpenFlow, InstaGENI, ExoGENI

$ omni.py createsliver aliceslice myRSpec.xml INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab. expires within 1 day on 2011-07-07 INFO:omni:Creating sliver(s) from rspec fileINFO:omni:Writing result of createsliver for INFO:omni:Writing to ‘aliceslice-manifest-rspeINFO:omni: -----------------------------------INFO:omni: Completed createsliver:

Options as run: aggregate: https://www.emulab. framework: pgeni native: True

Args: createsliver aliceslice myRSpec.xml

Result Summary: Slice urn:publicid:IDN+pgeniReserved resources on https://www.emulab.net/p Saved createsliver results to aliceslice-manINFO:omni: ===================================

http://trac.gpolab.bbn.com/gcf/wiki/Omni

Page 9: Are you ready for the tutorial?

Sponsored by the National Science Foundation 9GEC16: March 20, 2013

Omni Command Workflow

createslice

listmyslices

getversion

renewslice

createsliver

listresources

sliverstatus

deletesliver

Repeat for each aggregate

Repeat for each aggregate

CreateSlice

CreateSliver Cleanup

Legend: AM API command

Page 10: Are you ready for the tutorial?

Sponsored by the National Science Foundation 10GEC16: March 20, 2013

omni_configure.py[omni]default_cf = portalusers = gpousr21# ---------- Users ----------[gpousr21]urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+gpousr21 keys = ~/.ssh/geni_key

...

You only need the Omni bundle from the portal Standard AM nicknames

Run this script for standard configuration:1. Download GENI bundle2. Run the script

Page 11: Are you ready for the tutorial?

Sponsored by the National Science Foundation 11GEC16: March 20, 2013

omni_config[omni]default_cf = pgeni # Tutorial accounts are on GPO’s PGusers = gpousr21 # gpousr21’s keys loaded on the VM to allow login

# ---------- Users ----------[gpousr21]urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+gpousr21 # Really important to get the keys correct!!!#key to load on VMkeys = ~/Tutorials/Omni/gpousr20/ssh/gpousr20_key.pub

# default aggregates to run omni commands onaggregates = http://emulab.net/protogeni/xmlrpc/am, https://pgeni.gpolab.bbn.com/protogeni/xmlrpc/am, ...

Page 12: Are you ready for the tutorial?

Sponsored by the National Science Foundation 12GEC16: March 20, 2013

Getting Help

• omni.py –hLists all commands and their argumentsLists all command line optionsLists Omni versionLists url to find out more information about Omni

• Omni Troubleshooting page: http://trac.gpolab.bbn.com/gcf/wiki/OmniTroubleShoot

Page 13: Are you ready for the tutorial?

Sponsored by the National Science Foundation 13GEC16: March 20, 2013

Before we start

• Many people will be accessing the resources, so some calls might fail. Wait a bit and try again!

• Omni is a command line tool, copy-paste is your friend

• You can copy-paste between your computer and the VM.

Page 14: Are you ready for the tutorial?

Sponsored by the National Science Foundation 14GEC16: March 20, 2013

• Part I: Design/Setup– Step 1: Configure Omni– Step 2: Obtain Resources

• Part II: Execute– Execute Experiment– View results

• Part III: Finish– Teardown Experiment

Page 15: Are you ready for the tutorial?

Sponsored by the National Science Foundation 15GEC16: March 20, 2013

Configure omni

geni@NSDI13-Tutorials:~$> omni-configure.py –f portal

Page 16: Are you ready for the tutorial?

Sponsored by the National Science Foundation 16GEC16: March 20, 2013

• Part I: Design/Setup– Step 1: Configure Omni– Step 2: Obtain Resources

• Part II: Execute– Execute Experiment– View results

• Part III: Finish– Teardown Experiment

Page 17: Are you ready for the tutorial?

Sponsored by the National Science Foundation 17GEC16: March 20, 2013

Experimenter

For the Tutorial: Keep it simple

Slice

Sliver

AM

ProtoGENI Aggregate

You Once you understand how to run this simple experiment, scaling up

is easy!

GENI Portal

Page 18: Are you ready for the tutorial?

Sponsored by the National Science Foundation 18GEC16: March 20, 2013

Request Specifications

Resource Specification Document (RSpec)• XML document that describes resources

– hosts, links, switches, etc

GENI v3• AM extensions• Client extensions• Tool extensions

Page 19: Are you ready for the tutorial?

Sponsored by the National Science Foundation 19GEC16: March 20, 2013

The Three Types of RSpecs

AggregateManager

Client

Advertisement

Request

Manifest

Advertisement RSpec : What does the AM have?Request RSpec : What does the Experimenter want? Manifest RSpec: What does the Experimenter have?

omni.py list

resources sl

icename

omni.py list

resources

omni.py createsliver slicename reqRSpec

Page 20: Are you ready for the tutorial?

Sponsored by the National Science Foundation 20GEC16: March 20, 2013

Omni Commands

• omni.py getversion• omni.py createslice slicename• omni.py renewslice slicename date• omni.py listmyslices username• omni.py createsliver slicename requestRSpec

• omni.py sliverstatus slicename• omni.py listresources [slicename]• omni.py deletesliver slicename

Page 21: Are you ready for the tutorial?

Sponsored by the National Science Foundation 21GEC16: March 20, 2013

Experiment Workflow

• Part I: Design/Setup– Step 1: Establish Management Environment– Step 2: Obtain Resources

• Part II: Execute– Run Experiment

• Part III: Finish– Teardown Experiment

Page 22: Are you ready for the tutorial?

Sponsored by the National Science Foundation 22GEC16: March 20, 2013

Scripting Omni

• You can write custom Python scripts – Call existing Omni functions– Parse the Output

• Example: readyToLogin.py– Calls getversion, sliverstatus, listresources– Parses output – Determines ssh command to log into node– Print ssh configuration blocks to place in your ssh

config file

• More examples distributed with Omni– remote-execute.py

Page 23: Are you ready for the tutorial?

Sponsored by the National Science Foundation 23GEC16: March 20, 2013

Run Experimentgeni@NSDI13-Tutorials:~$> readyToLogin.py omni99 –a pg-utah

xterm -e ssh -i /home/geni/.ssh/ geni_key [email protected] &

Page 24: Are you ready for the tutorial?

Sponsored by the National Science Foundation 24GEC16: March 20, 2013

Experiment Workflow

• Part I: Design/Setup– Step 1: Establish Management Environment– Step 2: Obtain Resources

• Part II: Execute– Execute Experiment

• Part III: Finish– Teardown Experiment

Page 25: Are you ready for the tutorial?

Sponsored by the National Science Foundation 25GEC16: March 20, 2013

Part III: Finish Experiment

When your experiment is done, you should always release your resources.

– Normally this is when you would archive your data– Delete your slivers at each aggregate

slice

projectaggregate

RSpecuserresourcesliv

er

AM API

slivercredentials

certificate

Page 26: Are you ready for the tutorial?

Sponsored by the National Science Foundation 26GEC16: March 20, 2013

Omni: Command Line Tool

Written in PythonEasy to automate experimentsHelps with simple orchestration

through omni scriptingTalks to all AMs that speak the

GENI AM API

✗Very manual✗Needs RSpecs

$ omni.py createsliver aliceslice myRSpec.xml INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab. expires within 1 day on 2011-07-07 INFO:omni:Creating sliver(s) from rspec fileINFO:omni:Writing result of createsliver for INFO:omni:Writing to ‘aliceslice-manifest-rspeINFO:omni: -----------------------------------INFO:omni: Completed createsliver:

Options as run: aggregate: https://www.emulab. framework: pgeni native: True

Args: createsliver aliceslice myRSpec.xml

Result Summary: Slice urn:publicid:IDN+pgeniReserved resources on https://www.emulab.net/p Saved createsliver results to aliceslice-manINFO:omni: ===================================

Page 27: Are you ready for the tutorial?

Sponsored by the National Science Foundation

Part II: TMix Traffic Generator

Jay AikatUniversity of North Carolina,

Chapel Hill

Page 28: Are you ready for the tutorial?

Sponsored by the National Science Foundation

Part II: Click Software Routers

Niky RigaGENI Project Office

Page 29: Are you ready for the tutorial?

Sponsored by the National Science Foundation 29GEC16: March 20, 2013

Software Routers

• Not wire-speed• Easy to deploy• Provide ability to implement new routing

protocols over a L2 network fast–MobilityFirst, Packet Cache, XIA

• An easy way to bandwidth limit your slice

Page 30: Are you ready for the tutorial?

Sponsored by the National Science Foundation 30GEC16: March 20, 2013

Access of multiple users in resources

• Omni allows multiple users to access the same resources–Modification of omni_config file

–Different ways for each compute aggregate

Alice Bob

Alice’s SliceProtoGENI

MyPLC MyPLC

Page 31: Are you ready for the tutorial?

Sponsored by the National Science Foundation 31GEC16: March 20, 2013

Install scripts

• Specify in the rspec–Where to download software from

• Usually comes with an install-script.sh–What commands to run at boot time

• It runs in the context of a the “geni” user– It is not your user account– It does have sudo priviledges

Page 32: Are you ready for the tutorial?

Sponsored by the National Science Foundation 32GEC16: March 20, 2013

Install scripts

• Automatic installation of software

Page 33: Are you ready for the tutorial?

Sponsored by the National Science Foundation 33GEC16: March 20, 2013

Click Example Experiment

• You will run your own non-IP multipath router– Odd checksums left– Even checksums right

• 6 VMs in Utah– 4 routers– 2 end hosts

Page 34: Are you ready for the tutorial?

Sponsored by the National Science Foundation

Part III: Hands-on Experiments

Page 35: Are you ready for the tutorial?

Sponsored by the National Science Foundation

Part III: Click Example Experiment

Niky Riga, Vic ThomasGENI Project Office

Page 36: Are you ready for the tutorial?

Sponsored by the National Science Foundation 36GEC16: March 20, 2013

Hands On Exercise

Run a non-IP router over L2

Reserve 6 hosts:4 will be click routers, 2 will be end

hosts.

Odd checksums left Even checksums right

Page 37: Are you ready for the tutorial?

Sponsored by the National Science Foundation 37GEC16: March 20, 2013

• Part I: Design/Setup– Setup: Omni with Multiple Users– Obtain Resources: Create a slice and reserve

resources

• Part II: Execute– Configure and Initialize Services: Configure the

Click Routers– Execute Experiment: Use custom routing to

forward traffic over multi-path topology• Part III: Finish

– Teardown Experiment

Page 38: Are you ready for the tutorial?

Sponsored by the National Science Foundation 38GEC16: March 20, 2013

Multiple Users

[omni]default_cf = portalusers = alice, bob# ---------- Users ----------[alice]urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+alicekeys = ~/.ssh/alice_key[bob]urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+bobkeys = ~/.ssh/bob_key

ProtoGENI AMs[omni]default_cf = portalusers = alice, bob# ---------- Users ----------[alice]urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+alicekeys = ~/.ssh/alice_key, ~/.ssh/bob_key

SFA (PlanetLab) AMs

Multiple accounts, each one with each own key

One account accessible by many keys

Page 39: Are you ready for the tutorial?

Sponsored by the National Science Foundation 39GEC16: March 20, 2013

• Part I: Design/Setup– Setup: Omni with Multiple Users– Obtain Resources: Create a slice and

reserve resources

• Part II: Execute– Configure and Initialize Services: Configure the

Click Routers– Execute Experiment: Use custom routing to

forward traffic over multi-path topology

• Part III: Finish– Teardown Experiment

Page 40: Are you ready for the tutorial?

Sponsored by the National Science Foundation 40GEC16: March 20, 2013

Experimenter

For the Tutorial: Portal Account with Omni

Slice : click<initials>

Sliver

AM

ProtoGENI Aggregate

You

GENI Portal

$ omni.py createsliver aliceslice myRSpec.xml INFO:omni:Loading config file omni_config INFO:omni:Using control framework pgeni INFO:omni:Slice urn:publicid:IDN+pgeni.gpolab. expires within 1 day on 2011-07-07 INFO:omni:Creating sliver(s) from rspec fileINFO:omni:Writing result of createsliver for INFO:omni:Writing to ‘aliceslice-manifest-rspeINFO:omni: -----------------------------------INFO:omni: Completed createsliver:

Options as run: aggregate: https://www.emulab. framework: pgeni native: True

Args: createsliver aliceslice myRSpec.xml

Result Summary: Slice urn:publicid:IDN+pgeniReserved resources on https://www.emulab.net/p Saved createsliver results to aliceslice-manINFO:omni: ===================================

omni

http://www.gpolab.bbn.com/experiment-support/ ClickExampleExperiment/rspecs/click-XX.rspec

Page 41: Are you ready for the tutorial?

Sponsored by the National Science Foundation 41GEC16: March 20, 2013

… in the meantime … Install Scripts

• specified in the rspec– It needs to be available over http

• does not run as “you”,but has sudo• it runs at every boot • $PATH might not be set• OS-dependent

1. Write script in language of choice2. Upload script3. Test script4. Add to rspec

Page 42: Are you ready for the tutorial?

Sponsored by the National Science Foundation 42GEC16: March 20, 2013

Install Scripts: Look inside# 1. Change to dir. with installed softwarecd /local

# 2. Check if first timeif [ ! -f "./installed.txt" ]then #### Create the file #### sudo touch "./installed.txt” #### Run one-time commands #### #2a. Install necessary packages #2b. Install custom software #2c. Reboot if neededfi#3. Run Boot-time commands#3a. Start common serviceshn=`echo $HOSTNAME | cut -d'.' -f 1`if [ $hn == "server" ]then #4. Host specific commandsfi

1. Download install script

2. Identify the 4 sections

Page 43: Are you ready for the tutorial?

Sponsored by the National Science Foundation 43GEC16: March 20, 2013

Experiment Workflow

• Part I: Design/Setup– Setup: Omni with Multiple Users– Obtain Resources: Create a slice and reserve

resources

• Part II: Execute– Configure and Initialize Services: Configure

the Click Routers– Execute Experiment: Use custom routing to

forward traffic over multi-path topology• Part III: Finish

– Teardown Experiment

Page 44: Are you ready for the tutorial?

Sponsored by the National Science Foundation 44GEC16: March 20, 2013

Scripting Omni: remote-execute.py

• Script that helps you execute commands in your nodes from your computer

• Makes it easy to orchestrate experiments– Write scripts to orchestrate experiments

• Uses readyToLogin.py to get login information

remote-execute.py –m <command> [-h host]

Page 45: Are you ready for the tutorial?

Sponsored by the National Science Foundation 45GEC16: March 20, 2013

Remote configuration of Click

• Remotely invoke configuration script: extractClickConfig.py– parse manifest rspec– extract information about topology– create click.config

• Remotely turn off IP in the routers

IP

Page 46: Are you ready for the tutorial?

Sponsored by the National Science Foundation 46GEC16: March 20, 2013

Experiment Workflow

• Part I: Design/Setup– Setup: Omni with Multiple Users– Obtain Resources: Create a slice and reserve

resources

• Part II: Execute– Configure and Initialize Services: Configure the

Click Routers– Execute Experiment: Use custom routing to

forward traffic over multi-path topology

• Part III: Finish– Teardown Experiment

Page 47: Are you ready for the tutorial?

Sponsored by the National Science Foundation 47GEC16: March 20, 2013

Send Traffic

Start routersSend packet using netcat

HostA Top Bottom

Left

Right

HostBIP

Page 48: Are you ready for the tutorial?

Sponsored by the National Science Foundation 48GEC16: March 20, 2013

Click Config Fileroute :: Classifier(27/01%01,-);modify :: Unstrip(2) -> StoreData(0, "AliceWasHere3546") -> route;FromDevice(eth3, PROMISC true) -> Classifier(12/0800) -> modify;route[0] -> left :: EtherEncap(0x7744, 00:04:23:b7:14:76, 00:04:23:b7:18:fa) -> SimpleQueue -> Print(outL) -> ToDevice(eth2);route[1] -> right :: EtherEncap(0x7744, 00:04:23:b7:1c:e0, 00:04:23:b7:19:2e) -> SimpleQueue -> Print(outR) -> ToDevice(eth4);

restore :: SimpleQueue -> Strip(30) -> EtherEncap(0x800, 00:04:23:b7:14:77, 00:04:23:b7:20:00) -> ToDevice(eth3);

Page 49: Are you ready for the tutorial?

Sponsored by the National Science Foundation 49GEC16: March 20, 2013

Experiment Workflow

• Part I: Design/Setup– Setup: Omni with Multiple Users– Obtain Resources: Create a slice and reserve

resources

• Part II: Execute– Configure and Initialize Services: Configure the

Click Routers– Execute Experiment: Use custom routing to

forward traffic over multi-path topology• Part III: Finish

– Teardown Experiment

Page 50: Are you ready for the tutorial?

Sponsored by the National Science Foundation 50GEC16: March 20, 2013

Part III: Finish Experiment

When your experiment is done, you should always release your resources.

– Normally this is when you would archive your data– Delete your slivers at each aggregate

slice

projectaggregate

RSpecuserresourcesliv

er

AM API

slivercredentials

certificate