Understanding the AM API using Content Centric Networking

Image Map

1. Design the Experiment

  1. In today's experiment you will use resources at the aggregate listed on the worksheet. If you don't have a worksheet use Clemson InstaGENI (aka

2. Establish the Environment

2.1 Set up ssh keys and configure Omni

If your account is from the GENI Portal follow the instructions here.

If your account is from the iMinds member authority ( follow the instructions here.

3. Obtain Resources

3.1 Create a slice

Create a slice using omni and the slice name of your choice. From now on that slice name will be referred to as SLICENAME.

$ omni createslice SLICENAME

3.2. Load a simple topology in jFed

For this exercise, we will edit an existing RSpec file. Start by loading this predefined topology into jFed.

  1. In the Portal, launch jFed for this slice.
  2. From the jFed Experimenter Toolkit menu (see figure), select the Open URL button.
Import an RSpec into jFed
Figure 3-1 Import an RSpec into jFed.
  1. Enter the URL for the RSpec:
    then click Ok.
  2. When jFed pops up a message asking you to pick a manager to use, select the manager listed on your worksheet from the list. After you pick an aggregate manager, a network topology should appear on the canvas.
    Pick Aggregate Manager
    Figure 3-2 Pick an Aggregate Manager.
    Because this RSpec file contains a generic description of resources and does not specify any particular aggregate manager, jFed will pop up a message asking you to specify an aggregate to use:
    Assign these nodes now ....

3.3. Modify the RSpec to automatically install and execute CCNX software

For this experiment, we need to install the following software on the nodes:

  • The CCNX software (ccnx-0.6.2.tar.gz)
  • Scripts that set up the CCNX software (ccnx-setup.tar.gz)
  • Scripts used to pull atmospheric precipitation data using the CCNX protocol (ccnx-atmos.tar.gz)

When the nodes start up, we need the following scripts to be executed:

  • Script that sets up the node (node-setup)
  • Script that sets up the ccnx protocol (ccnx-setup)
  • Script that setup up ccnx protocol routes (add-precip-routes)

We automate the installation and running of the proper software using install and execute scripts in the RSpec. These can be added by double clicking on a node, and then clicking a "+" under the "Boot scripts" tab.

You DO NOT have to specify install and execute scripts for the nodes as they have already been done for you. You can check this by clicking on the icons for these nodes.

In general, be very careful when entering this information. These commands will not be executed until the nodes boot up and may fail silently.
  1. Click on each node to manipulate details of the node configuration. The execute commands below are found under the "Boot scripts" tab.

    The ccnx-setup execute command takes as parameters the name of a single "barrier" node, which must be up in order for the experiment to start, and the number of nodes in the topology as follows:
    We will continue to use the node router as the barrier node.

    We will add two nodes to the topology, so go ahead and change the number of nodes from 3 to 5. The new router execute command on all three nodes should be:
    cd /tmp/ccnx-setup && ./ccnx-setup router 5

Figure 3-2 Edit all three nodes
  1. Copy the user node by:
    • Click on the user node.
    • Press the Duplicate button.
    • A new node should appear.
    • Double click on the new node and rename it user0.
    • Remove each link connecting user0 to the topology. Delete the link by right clicking on each link and selecting "Delete". You may need to move the nodes around to see the added links.
    • Look at the install and execute scripts. They should be the same as on the original user node.
  2. Copy the router node the same way setting the name of the new node to be router1. Be sure to delete the links from this node as well.

Figure 3-3 Copy the router and user nodes.
  1. Draw a link between the router and router1 nodes.
  2. Draw another link between the new router1 node and the user0 node.
  3. The topology should look like Figure 3-4

Figure 3-4 Draw links to connect the nodes.
  1. Let the aggregate selecting IP addresses for you. To do this, click on each link and set the "Configuration Type" field to "Auto".
  2. The add-precip-routes execute command takes as a parameter the name of the "next hop" node, which is the next node on the path to the data node:
    add-precip-routes NEXT_HOP_NODE
    Edit the new router1 node to point to router.

    The new add-precip-routes execute command on router1 should be:
    cd /tmp/ccnx-setup && ./add-precip-routes router
  3. Edit the new user0 node to point to router1.

    The new add-precip-routes execute command on user0 should be:
    cd /tmp/ccnx-setup && ./add-precip-routes router1

Figure 3-5 Edit the next hop on router1 and user0.

3.4. Export the modified request RSpec

Now we will pull back some of the covers and inspect exactly what jFed has been doing for us when preparing the RSpecs for the experiments we design. Each node and link has a corresponding element in the RSpec, and the details of the component configuration (such as the install and execute services we requested above) are specified with attributes, or sometimes child elements, within those portions of the document.

  1. From the jFed Experimenter Toolkit window (see figure), select the RSpec Editor tab. This will bring up a window showing the current RSpec -- please take a moment to inspect it. The `<node>` and `<link>` elements contain the specification for the components we will request, and if you look closely, you will be able to see the install and execute service elements you added earlier.

Figure 3-5 View the final request RSpec
  1. Use the Save to file button (in the upper left) to a local copy of your RSpec with the name ccn_precip.xml. We'll use this in the next step to demonstrate how other client tools also use RSpec files to communicate requests to aggregate managers.

Figure 3-6 Save the final request RSpec

3.6. Instantiate the new experiment using Omni

For this step, we'll change the approach a bit and switch to a new client tool, the command line Omni client.

From a terminal, please enter the command:


where AM_NICKNAME is the nickname for your assigned aggregate manager and SLICENAME is the name of the slice you created earlier (both of these are given on your worksheet). RSPEC_FILE should be replaced with the filename of the RSpec you saved in step 4.

If all is well, Omni should give you a number of informational messages, such as:

INFO:omni:Loading config file /home/geni/.gcf/omni_config

It should quickly proceed to the point where it makes the request to the remote manager:

INFO:omni:Creating sliver(s) from rspec file /home/geni/Downloads/experiments.rspec for slice ...

This step can sometimes be time-consuming, so please be patient. If it succeeds, within a couple of minutes Omni should report:

INFO:omni: Completed createsliver:

and your resource reservation is complete!


Next: Execute

Last modified 5 years ago Last modified on 06/07/17 10:14:04