Skip to content
dostavro edited this page Apr 12, 2013 · 14 revisions

Installing SFA tools in your machine (Ubuntu 12.04)

At this page you can find instructions on how to install SFA tools in Ubuntu 12.04. Probably you can also use Debian 6 or other debian-based distro. It is only tested in ubuntu though.

Configuring SFA client to talk to our SFA AM

First of all, configure sfi like this:

vi ~/.sfi/sfi_config

    SFI_AUTH='topdomain.subdomain'
    SFI_USER='topdomain.subdomain.pi'
    SFI_REGISTRY='http://localhost:12345/'# sfi --help

    #SFI_SM='http://localhost:12347/'
    SFI_SM='http://localhost:8001/RPC2'

After that, make sure SFA tools are up and running before trying to use your client

sudo /etc/init.d/sfa start

Creating a slice with sfi

First of all, create an XML with your slice settings

# vi ~/.sfi/slice_record.xml
    <record hrn="topdomain.subdomain.test" type="slice"
      description="A slice for illustrating registry-only features in SFA"
       url="http://test.onelab.eu/">
      <researcher>topdomain.subdomain.user</researcher>
    </record>

Now, add your slice into the Registry (Register)

sfi.py add ~/.sfi/slice_record.xml

Start talking to the AM with sfi.py

Call the GetVersion method

sfi.py version

Discover the available resources

sfi.py resources

Now let's add a node in our slice. Create a file called 'rspec' like this:

<?xml version="1.0"?>
<rspec xmlns="http://www.geni.net/resources/rspec/3" xmlns:omf="http://nitlab.inf.uth.gr/schema/sfa/rspec/1" type="request">
  <node component_id="urn:publicid:IDN+omf:nitos+node+node1" component_name="node1" client_id="sfi">
  </node>
</rspec>

Let's add this node in our slice

sfi.py create topdomain.subdomain.test rspec

Check the provisioned resources of our slice

sfi.py resources topdomain.subdomain.test

Check the status of our slice

sfi.py status topdomain.subdomain.test

Let's renew our sliver

sfi.py renew topdomain.subdomain.test '20140302202134Z'

Check if it's updated

sfi.py status topdomain.subdomain.test

Delete the slice

sfi.py delete topdomain.subdomain.test

Check again the available resources to see that our node is not there anymore.

sfi.py resources topdomain.subdomain.test