18
SFI Tutorial Tony Mack

SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Embed Size (px)

Citation preview

Page 1: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

SFI Tutorial

Tony Mack

Page 2: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

What is SFI

SFI: the the command line client for SFA interfaces.

SFA: minimal set of interfaces and data types that permit the federation of slice-based network components.• Registry Interface• Slice Interface

o Componento Aggregateo Slice Manager

Page 3: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

SFA InterfacesRegistry Interface - Manage Records• Add• Update• Remove• Show• List

Slice Interface - Manage Slices• Resources• Create• Delete• Start• Stop

Page 4: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Current Aggregates

PlanetLab (PLC)PlanetLab Europe (PLE)PlanetLab Japan (PLJ)VINIGpENI

Page 5: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Installing SFIFedora RPM Installation• Add yum repository

[myplc] name= MyPLC baseurl=http://build.planet-lab.org/planetlab/f8/pl-f8-i386-4.3-k22-latest/RPMS/ enabled=1 gpgcheck=0

$ yum install sfa-client• Install sfa-client

Install from source$ svn export http://svn.planet-lab.org/svn/sfa/trunk sfa $ cd sfa/trunk/sfa && python setup.py install

Page 6: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Configuring SFI• Create sfi directory$ mkdir ~/.sfi

• Install private key # username is email without domain $ cp ~/.ssh/id_rsa ~/.sfi/<username>.pkey # remove passphrase from key $ ssh-keygen -p -f ~/.sfi/<username>.pkey

• create config file ~/.sfi/sfi_configSFI_AUTH='plc.princeton' SFI_USER='plc.princeton.tmack' SFI_REGISTRY='http://www.planet-lab.org:12345/' SFI_SM='http://www.planet-lab.org:12347/'

Page 7: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Registry Interface

 

Page 8: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

 Add Record• Slice record template<record   description="Test description"   hrn="plc.princeton.tmacktestslice"   type="slice" url="http://planet-lab.org/"             <researcher>plc.princeton.tmack</researcher>         <researcher>plc.princeton.llp</researcher> </record>

$ sfi.py add slice-record.xml • Add the record to the Registry

Page 9: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Update Record$ sfi.py update slice-record.xml

Page 10: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Display Record• Show detailed record information

$ sfi.py show plc.princeton.tmacktestslice

    peer_authority: None     hrn: plc.princeton.tmacktestslice     last_updated: 20100625T18:42:41     authority: plc.princeton     gid:          hrn: plc.princeton.tmacktestslice          urn: urn:publicid:IDN+plc:princeton+None+tmacktestslice         uuid: 98680966165612911378858199233917520628     date_created: 20100625T18:42:41     type: slice     researcher: ['plc.princeton.tmack']

Page 11: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Listing Records• List all records at a specific level in the hierarchy $ sfi.py list plc

plc.iss (authority) plc.cesnet (authority) 

plc.princeton (authority)

$ sfi.py list plc.princeton

plc.princeton.planetlab-01 (node) plc.princeton.tmack (slice) plc.princeton.tmacktestslice (slice)

Page 12: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Slice Interface

 

Page 13: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Get Available Resources$ sfi.py resources -o nodes.rspec

<?xml version='1.0' encoding='ASCII'?><RSpec type="SFA">    <network name="plc">        <site id="s13">            <name>Princeton</name>            <node id="n10025">                <hostname>alice.cs.princeton.edu</hostname>                <bw_limit units="kbps">10000</bw_limit>            </node>            <node id="n10328">                <hostname>planetlab-9.cs.princeton.edu</hostname>                <bw_limit units="kbps">10000</bw_limit>            </node>           ...

Page 14: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Get Allocated Resources$ sfi.py resources plc.princeton.testslice -o slice-nodes

<?xml version='1.0' encoding='ASCII'?><RSpec type="SFA">    <network name="plc">        <site id="s13">            <name>Princeton</name>            <node id="n10025">                <hostname>alice.cs.princeton.edu</hostname>                <bw_limit units="kbps">10000</bw_limit>                </sliver>            </node>            <node id="n10328">                <hostname>planetlab-9.cs.princeton.edu</hostname>                <bw_limit units="kbps">10000</bw_limit>            </node>           ...

Page 15: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Allocate Resources Pt. 11. Modify RSpec by hand (adding the <sliver/> tag)2. Use client tools

Using Client Tools

• Get available resources

$ sfi.py resources -o nodes.rspec

• Create a text file of hostnames$ sfiListNodes.py -i nodes.rspec -o nodes.txt

• Remove/Add nodes to/from text file• Create an RSpec with requested resource

allocations$ sfiAddSliver.py -i nodes.rspec -n nodes.txt -o mynodes.rspec

Page 16: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Allocate Resources Pt.2 

• Create the slice on the specified resources$ sfi.py create plc.princeton.slice mynodes.rspec

• Check it$ sfi.py resources plc.princeton.slice

• You can use 'sfi.py create' to deallocate resources as well. Just create an RSpec with only the resources you want and execute create again.

Page 17: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Deallocate All Resources$ sfi.py delete plc.princeton.slice

Page 18: SFI Tutorial Tony Mack. What is SFI SFI: the the command line client for SFA interfaces. SFA: minimal set of interfaces and data types that permit the

Other Calls

$ sfi.py stop plc.princeton.tmacktestslice

$ sfi.py start plc.princeton.tmacktestslice

• Stop a slice

• Start a slice