wiki:Tutorial/HowToTopology

Version 2 (modified by thierry, 17 years ago) ( diff )

Go back —> Tutorials

How to use Topologies in an experiment script

This feature is only available in NodeHandler v4 and above.

If you have not done so yet:

  • Register for an account
  • Make a reservation on the Schedular for a given tesbed
  • Image the nodes of this given testbed with a baseline image that contains nodeAgent v4 (e.g. "baseline-2.2.ndz" or "baseline-2.3.ndz")

As explained here, at the end of the imaging process 3 files are generated, each containing a topology definition. Assuming you are on the 'grid' testbed, one of this generated file is called 'topo_grid_active.rb' (see attached example). This file defines a topology which includes all the nodes that were correctly imaged. In other words, this file contains a list of all nodes on the testbed that are currently working and with the correct disk image.

You can directly use the topology from this generated 'topo_grid_active.rb' file as a base to build the various node sets within your experiment script.

For example, using this topology allows you to define a group of 4 nodes running a given application, without having to explicitly specify the identity of these 4 nodes in you experiment script. Thus the selected nodes for this group is no longer hard coded in the script, but may be for example drawn randomly from the "active" topology at each run of the experiment.

Example

The attached script tut_topo_1.rb presents an example of the user-defined topologies within an experiment script.

This file contains extensive comments that should help you understand the different steps involved in defining and using topologies. For more information on the basics of writing and using an experiment script, please refer to the previous tutorials, here and here.

Detailed information on the available commands to define a topology in an experiment script can be found here.

To run this example script, use the following command:

 nodehandler4 tut_topo_1

(Assuming that you previously logged in to the 'grid' testbed, and imaged its nodes with the "baseline-2.3.ndz" image, thus you should have a "topo_grid_active.rb" file in your home directory.)

The experiment screen output should then look like this. And the experiment log file should look like this.

You can also access the results of this particular experiment example in the MySQL database, using the experiment ID: "grid_2007_08_27_20_45_37" (please refer to this page for more information on accessing the results).

Attachments (6)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.