wiki:GENIExperimenter/Tutorials/RunHelloOmni

Version 2 (modified by rrhain@bbn.com, 9 years ago) (diff)

--

Wiki Home Welcome GENI Experimenters Sign Up For a GENI Account Run Hello Omni example Image Map

Hello Omni

Overview:

Welcome to GENI. This page will guide you through your first GENI experiment.
This is a very simple tutorial with one server and one client that are connected with a Layer 2 link.
Hello GENI topology
   

Prerequisites:

For this tutorial you need an active GENI account. If you don't have an account yet sign up!

Tools:

All the tools will already be installed at your nodes. For your reference we are going to use:
   

Where to get help:

For problems with omni please subscribe/email to the omni users mailing list For any questions or problem with the tutorial please email help@geni.net

Step-by-step Instructions

Design/Setup

Step 1: Configure Omni:

If this is the first time you are using Omni, you will need to download, install and configure it first by following these instructions:
Omni web page
  1. Download the latest release of Omni. . The Omni client is part of the GENI Control Framework (GCF) software package.
  2. Install GCF/Omni by following these instructions
  3. Configure Omni using these instructions . For the rest of the instructions, it is assumed that you followed the default configuration of omni. If you have customized it in any way, please adjust the instructions accordingly.
  1. Verify that you have the necessary credential and key files . Run:
    ls ~/.ssh ~/.ssl
    According to what type of account you have, the output varies slightly. For example if you have an account at the GENI Experimenter Portal the output looks like :
    geni@geni-vm:~$ ls ~/.ssh ~/.ssl

    /home/geni/.ssh:
    geni_cert_portal_key geni_key_portal
    geni_cert_portal_key.pub geni_key_portal.pub

    /home/geni/.ssl:
    geni_cert_portal.pem


    Files under ~/.ssh and ~/.ssl if omni is configured with a portal account
    geni_cert_portal.pem Cleartext certificate, i.e. does not require any passphrase
    geni_key_portal, geni_cert_portal_key Private keys that you can use to login to the nodes
    geni_key_portal.pub, geni_cert_portal_key.pub The corresponding public keys that will be uploaded to the nodes

    Note: Depending on the setup of your host you might see more files than the ones listed above.
  2. Optional - Look around the omni_config file
    Open the file ~/.gcf/omni_config using either vim or emacs. Close to the top of the file you will see two parameters called default_cf and users. Your username should be at least listed in the users section. Look for the sections in the file that are named < default_cf > and < username >.

    In the < username > section, the information need for logging-in to reserved compute resources is provided. It includes your unique user URN and at least one public key that would be uploaded to the hosts that you reserve.

    In the < default_cf > section you configure Omni to use your personal information. The cert and the key attribute point to files that we have manually downloaded from the Clearinghouse where you have a GENI Account.

Step 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.py createslice < slicename >
  2. Verify that your slice was created. Use the listmyslices command, of omni:
    omni.py listmyslices < username >
  3. Renew your slice. To extend the lifetime of your slice. Type:
    omni.py 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 of Nysernet. In order to see what each AM offers you can use the listresources command. Type:
    omni.py 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.py listresources -a nysernet-ig -o
    20:13:35 INFO : Loading agg_nick_cache file '/home/rrhain/.gcf/agg_nick_cache'
    20:13:35 INFO : Loading config file '/home/rrhain/.gcf/omni_config'
    20:13:35 INFO : Using control framework portal
    20:13:35 INFO : Member Authority is https://ch.geni.net/MA (from config)
    20:13:35 INFO : Slice Authority is https://ch.geni.net/SA (from config)
    20:13:35 INFO : Substituting AM nickname nysernet-ig with URL https://instageni.nysernet.org:12369/protogeni/xmlrpc/am/2.0, URN urn:publicid:IDN+instageni.nysernet.org+authority+cm
    20:13:36 INFO : Saving output to a file.
    20:13:38 INFO : Listed advertised resources at 1 out of 1 possible aggregates.
    20:13:38 INFO : (PG log url - look here for details on any failures: https://www.instageni.nysernet.org/spewlogfile.php3?logfile=889fd9841968d3b891afc5b2cc36bd94)
    20:13:38 INFO : Writing to 'rspec-instageni-nysernet-org.xml'
    20:13:38 INFO : ------------------------------------------------------
    20:13:38 INFO : Completed listresources:

      Options as run:
    aggregate: ['nysernet-ig'] framework: portal output: True project: tutorial

    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 from 'urn:publicid:IDN+instageni.nysernet.org+authority+cm' (url 'https://instageni.nysernet.org:12369/protogeni/xmlrpc/am/2.0') to file rspec-instageni-nysernet-org.xml;
    20:13:38 INFO : ======================================================

    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-instageni-nysernet-org.xml. This file is a 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.py 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.py createsliver -a nysernet-ig < slicename > http://www.gpolab.bbn.com/experiment-support/HelloGENI/hellogeni.rspec
  6. See the reserved resources. You can use the listresources command, to see what resources are reserved at an Aggregate.
    omni.py 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.py renewsliver -a nysernet-ig < slicename > < YYYYMMDD >
  8. Check the status of your resources. Type:
    omni.py 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.
Execute

Step 3: View 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. Follow these instructions and log in to the server node. Get the control interface IP address by typing ifconfig. This IP address should be accessible from the internet. In a web browser, type the IP address found from ifconfig.
  2. Click the Web Server 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 Logs from the iperf Server link to see the statistics from the iperf transfers.

Optional Step 4: 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.
  1. Follow these instructions and log in to the client node
  2. 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.
  3. Scroll all the way down the server iperf log, and look at the logs for your transfers.
Execute

Step 5: Cleanup experiment:

After you are done with your experiment, you should always release your resources so that other experimenters can use the resources. In order to cleanup your slice, type :
omni deletesliver -a nysernet-ig < slicename >
Wait and after a few moments all the resources will have been released. Notice that your slice is still there. There is no way to delete a slice, it will be removed automatically after its expiration date, but remember that a slice is just an empty container so it doesn't take up any resources.

What's next?

Congratulations! You have finished your first GENI Experiment. Now that you are more familiar with GENI concepts you can: