wiki:GENIExperimenter/Tutorials/SystematicExperimentationAnsible/Design

Version 6 (modified by sedwards@bbn.com, 9 years ago) (diff)

--

Systematic Experimentation (with Ansible)

Image Map

1. Design the Experiment

For our experiment we want two types of node: servers and clients.

The "server" nodes will run an apache web server accessible via the public Internet. The server will also use nmap to port scan the IP space used by the dataplane topology.

The "client" nodes will just respond to the ping generated by the nmap port scanner.

To start we will create a single "server" node and a single "client" node in a way that we like. We can then replicate these two representative nodes to generate larger topologies.

2. Establish the Environment

To run this exercise, you will need two pieces of software. If you haven't already, get or install these now:

  1. omni installed on your local machine (instructions), and
  2. ansible installed on your local machine (find the instructions for your package manager here).

    Windows users should have done the following steps before they reserved their resources.

    Tip Before reserving their resources, Windows users should have followed the instructions for setting up a separate GENI node for running Ansible.

Resources:

3. Obtain Resources

3.1 Create Representative "Server" and "Client" Node Types

  1. Create a new slice.
  2. Click the Add Resources button to open the Add Resources page.
  3. Create a representative "server" node. We will copy this node to make other servers.
    1. Drag a "Xen VM" onto the canvas (this is the multicolored icon on the left).
    2. Click on the node to display the configuration panel on the left. The remaining items can all be set in this panel.
    3. Set the name of the node to "server". The hostname of all of the servers will start with this string.
    4. Set the Icon for this node to be a "Server". By setting the icon, it makes it easier to visually identify the node types.
    5. Give the node a "Publicly Routable IP". This will allow users to access the webserver via the public Internet.
    6. Set the Disk Image to "Ubuntu 12.04 LTS". While there are defaults, it is usually good to configure the OS image so you know what you are getting. In this case, we know how to configure a webserver and nmap on an Ubuntu disk image so we choose the OS appropriately.
Server node configuration
Figure 3-1 Configuring the server node.
  1. Create a representative "client" node. We will copy this node to make other clients.
    1. Drag a default VM onto the canvas (this is the black icon on the left) and configure the fields described below.
    2. Set the name of the node to "client".
    3. Set the Icon for this node to a "Node".
  2. Draw a link between the two nodes.
  3. Save the RSpec with these two representatives node types to a file on your local machine. For a real experiment, you would commit this file to a version control system for safe keeping.
Server and client nodes
Figure 3-2 The server and client nodes.

Tip: For a real experiment, we would now define the IP addresses on the dataplane interfaces, reserve the topology, and write and test the automated configuration of the nodes for your experiment. The idea is that by taking the time to properly automate the configuration of these two nodes, we will be able to build larger topologies easily. This step may take some time, but in exchange it will make running the rest of the experiment quicker and easier and save you a great deal of frustration. For today's exercise, this work has already been done and tested for you.

Using these well defined node types, you can create a wide array of custom topologies.

3.2 Duplicate Node Types to Create a Custom Topology

Next we will define a simple topology using the representative node types defined above.

  1. Duplicate the "server" node once. To copy a node click on the node and select "Duplicate Nodes Only".
  2. Duplicate the "client" node twice.
  3. Connect each remaining node to the original link (VLAN) to create a multipoint VLAN. To do this, click near each node and drag towards the small unlabeled box on the existing link and then release. You should now have a total of five nodes on a single multipoint VLAN.
  4. Set the IPs on the data plane links by pressing the "Auto-IP" button. Click on the unlabeled box defining the link to see what IP addresses were assign. Take note of what IP subnet was assigned as we will need it later.
  5. Select a site and reserve your resources.
The full topology
Figure 3-3 The full topology.

For a real experiment, we would download this RSpec and save it in a version control system.

What other topologies could you create using these two node types? What other node types would be helpful in creating more complex topologies?

Next we will install and configure software on our nodes.


Introduction

Next: Execute