wiki:GENIExperimenter/Tutorials/HelloOmni

This page will guide you through your first Omni experiment. Omni is a command line tool that helps you interact with GENI aggregate managers. The only thing you will need is a GENI account. If you don't already have one, sign up!

1. Configure Omni with your GENI account

Omni is a command-line tool that will help you reserve resources in GENI. Follow these steps to download and configure Omni.

Omni web page
  1. Download Omni.The Omni client is part of the GENI Control Framework (GCF) software package. Start with downloading GCF .
  2. Install and Configure Omni
  3. Optional - Add your key to the ssh agent. If there is an ssh agent running on your host add you key to the ssh agent by running:
    ssh-add ~/.ssh/geni_key
  1. Verify that you have the necessary credential and key files.

Run:

     ls ~/.ssh ~/.ssl

The output looks like :

geni@geni-vm:~$ ls ~/.ssh ~/.ssl
/home/geni/.ssh:
geni_key_portal		geni_key_portal.pub

/home/geni/.ssl:
geni_cert_portal.pem

geni_key_portal The private key that you will use to login to the nodes
geni_key_portal.pub The corresponding public key that will be uploaded to the nodes
geni_cert_portal.pem Cleartext certificate used for secure XML RPC calls between experimenter tools and the aggregates

Note: Depending on the setup of your host you might see more files than the ones listed above.

2. Launch your experiment

Now that you have configured Omni we are ready to design our experiment, which going over most of the Omni commands.

  1. Create a slice. The first thing to do when preparing to run a GENI experiment is to create a slice. Name your slice something like xxxomni (where xxx are your initials). Your slicename in general should be something memorable but not your username. Type:
    omni createslice <slicename>
    
  2. Verify that your slice was created. Use the listmyslices command, of omni:
    omni listmyslices <username>
    
  3. Renew your slice. To extend the lifetime of your slice. Type:
    omni renewslice <slicename> <YYYYMMDD>
    
    The slice lifetime is typically short and when your slice expires, all reserved resources at the time are also released. Note: your resources might have a shorter lifetime than your slice.
  4. See available resources. For this experiment we are going to use the Aggregate manager at NYSERNet. In order to see what each AM offers you can use the listresources command. Type:
     omni listresources -a nysernet-ig -o
    
    The -o option will save the output to a file. The filename is chosen by Omni and printed as part of the output. The output will look like :
    geni@geni-VirtualBox:~$ omni listresources -a nysernet-ig -o
    INFO:omni:Loading config file /home/geni/.gcf/omni_config
    INFO:omni:Using control framework pg
    INFO:omni:Saving output to a file.
    INFO:omni:Substituting AM nickname nysernet-ig with URL https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0, URN unspecified_AM_URN
    INFO:omni:Listed resources on 1 out of 1 possible aggregates.
    INFO:omni:Writing to 'rspec-www-emulab-net-protogeniv2.xml'
    INFO:omni: ------------------------------------------------------------
    INFO:omni: Completed listresources:
    
      Options as run:
    		aggregate: ['nysernet-ig']
    		framework: pg
    		output: True
    
      Args: listresources
    
      Result Summary: Queried resources from 1 of 1 aggregate(s).
    Wrote rspecs from 1 aggregate(s) to 1 file(s)
    Saved listresources RSpec at 'unspecified_AM_URN' (url 'https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0') to file rspec-www-emulab-net-protogeniv2.xml;  
    INFO:omni: ============================================================
    
    In the last line of the output Omni will tell you the name of the file that output is saved at. In the example above this would be rspec-www-emulab-net-protogeniv2.xml. This file is a Resource SPECification document(RSpec), and in particular an advertisement rspec. Open the file that Omni saved and just take a look to see how an advertisement RSpec looks like. In order to see only available resources type:
    omni listresources -a nysernet-ig --available -o
    
  5. Reserve resources. To be able to reserve resources you will need to craft a request rspec. For this example we have created the rspec and post it on the web for you to use. If you want to take a look to the rspec itself, you can directly visit the rspec URL. Type:
      omni createsliver -a nysernet-ig <slicename> http://www.gpolab.bbn.com/exp/HelloGENI/hellogeni.rspec
    
  6. See the reserved resources. You can use the listresources command, to see what resources are reserved at an Aggregate.
     omni listresources -a nysernet-ig <slicename>
    
  7. Optional- Extend the lifetime of your reservation. The lifetime of your reservation can never exceed the lifetime of your slice and is usually set to a default value. For the purpose of this exercise you don't need to renew your reservation. Note After reserving your resources, renewing your slice will not automatically renew your slivers, so you will have to manually renew them if you decide you need them longer. If you wanted to do this, the command would look like:
    omni renewsliver -a nysernet-ig <slicename> <YYYYMMDD>
    
  8. Check the status of your resources. Type:
      omni sliverstatus -a nysernet-ig <slicename>
    
    The sliverstatus command reports the status of each individual resource that you reserved as well as the status of your overall GENI sliver. The status reported usually reflects the status of your resource, for example if you hav reserved a host, then status ready means that the host is booted and ready, i.e. you can login to it. When the status is ready for the whole sliver, in the summary of the output there will be something like: ... has overall SliverStatus: ready... When you see this you are ready to continue to the next step.

3. View your results

For this example experiment we used the install script facility to automatically install the necessary software and kick-off the experiment. In this very simple setup, we have installed and launched a web server as well as an iperf server, on the server host. On the client, we have started some processes to test both of these services. To view the results of this experiment:

  1. After the sliverstatus command tells you that your resources are ready, we should visit the running webserver . In order to do that we need to know which machine was assigned to be our server host. This information is part of the sliverstatus command but it is hard to locate. Omni comes with a script that makes it easy to gather all the information for accessing your hosts. In the terminal run:

    readyToLogin -a nysernet-ig <slicename>
readyToLogin snapshot
    The script will return the actual command that you would need to use for logging in. However we don't need this information right now. At the end of the script find the information that corresponds to the server host, and see what host was reserved (this will be the hostname after your username in the ssh command line, it should look like pcxxx.emulab.net ).
Hello GENI index
  1. Start a web browser and in the location bar type: http://<hostname> .
  2. When the page loads, click the webserver statistics link to look at statistics. Refresh the page a couple of times to see how
    the statistics change as the client requests documents.
  3. Click the iperf logs link to see the statistics from the iperf transfers.
  1. Optional: Manually generate traffic While conducting experiments in GENI, you will often want to run commands directly on the nodes. In this optional step, you will log in to a node and issue commands directly to it.
    • Follow these instructions and log in to the client node. You can also simply copy and paste the command as it was printed in the readyToLogin output.
    • When you have successfully logged in, run this command
      iperf -c server -P 2
      
      This task shouldn't take more than 30 seconds. Change the number after the -P argument and watch how the performance is affected while you change the number of parallel TCP connections.
    • Scroll all the way down the server iperf log, and look at the logs for your transfers

4. Cleanup

After you are done with your experiment, you should always release your resources so that other experimenters can use the resources.

  1. In the terminal, where you have been running your omni commands do:
    omni deletesliver -a  nysernet-ig <slicename>
    
Last modified 9 years ago Last modified on 01/23/15 11:13:03