Skip to content

Running XIA on GENI

Dan Barrett edited this page Feb 23, 2017 · 11 revisions

Table of Contents

DO WE NEED THIS ANYMORE?????

This document describes how to setup XIA experiments on GENI nodes using the Flack tool.

1. GENI Flack tool

2. Logging into Flack

  • You first need to be a ProtoGENI user by getting an Emulab account
    • You may also need to upload your public key to Emulab in order to later login to your node in your experiment. Please see the emulab FAQ for uploading your public key.
  • You can use your Emulab account for logging in to Flack

3. Setting up GENI resources (via Flack)

  • Creating a blank slice:
    • Click 'New' button in the pane to the left of the map, and enter a name for your new slice.
  • Allocating resources / creating topology:
    • Method 1. Create a new topology via the Flack GUI
      • Allocate a raw GENI node by clicking the 'PC' icon next to one of the manager names (e.g., utahemulab.cm)
      • Create as many nodes as you need
      • Create network links between nodes by dragging a line from node to node in the canvas
    • Method 2. (Re)creating topology via importing a resource-specification (rspec) file
      • NOTE: the rspec file is generated after you first set up your topology using flack via Method 1.
      • Click 'Import' menu, and select 'Import from file'
      • Select a rspec file to (re)create topology
      • Click ‘Submit’. (This allocation/configuration process will take several minutes.)
        • The rspec file allocates nodes, sets up the network topology, and runs the configuration script to configure and build XIA on each GENI node. If using this method, skip ahead to step 5.

4. Loading up XIA prototype into GENI nodes (via Flack)

You can configure each host’s OS and pre-installation items by clicking ‘i’ button (in the node icon)

  • Selecting an operating system
    • Select ‘Standard 64-bit Ubuntu 11 image’ in ‘Disk Image’
  • Uploading your configuration scripts (that will install XIA prototype and some required packages)
    • You can upload your scripts by clicking ‘Add Install Service’
      • E.g., Install: http://xia.cs.cmu.edu/geni/build-xia-click-ubuntu11.sh.tar.gz in your directory: /users/your_account (this is your account name)
      • This will automatically download ‘build-xia-click-ubuntu11.sh.tar.gz’ and unzip it into the directory /users/your_account
        • This will:
          • pre-install the required Ubuntu packages
          • download the current release build of XIA from GitHub
          • Build XIA
  • Specifying ‘execute commands’ for running the uploaded configuration script and any other commands you wqnt to run at setup time.
    • You need to specify the execute command by clicking ‘Add Execute Service’
      • E.g., Execute: sudo su sblee(your account name) -c ‘sh /users/sblee/build-xia-click-ubuntu11.sh’ using ‘sh’
  • When all the information is complete for a node, click ‘Apply’
    • Note: You need to do this procedure for each node.
Once you have configured all the nodes, click ‘Submit’. Now the GENI resources are actually being configured and allocated.
  • NOTE 1: This allocation/configuration process will take up to 10 – 30 minutes depending on the GENI machines assigned to your slice. (It may take longer on old hardware).
  • NOTE 2: You can later re-use this setting by saving an rspec file for this configuration (via Method 2 in step 3).
    • To save your rspec file: click 'View' menu, select 'Preview request document(s)', and click 'Save to file'

5. Accessing your GENI nodes (via terminal)

  • You can log in to your GENI nodes via ssh.
    • It is highly recommended that you run an ssh-agent your machine, have a private key loaded into it, and have uploaded the public key to Emulab (via the web interface). If you have not done so, please refer to the emulab FAQ.
Login to your GENI node via ssh (e.g., userid:sblee, node:pc211.emulab.net) NOTE: Your public key is copied to each node at setup time. Using the ssh with the -A flag will proxy your credentials so that you don't need to specify authentication information when connecting between emulab nodes.
 ssh-agent bash
 ssh-add
 ssh -i .ssh/id_rsa -A sblee@pc211.emulab.net
  • XIA is installed in /xia-core in your home directory

6. Running XIA and initiating your experiments


  • The XIA network can be bootstrapped from a single GENI node by running the the network bootstrap script.
    • Although the network can be launched from any node, in the example below host0 will be used.
Initiating/controlling your XIA GENI nodes from a single node (e.g., node:pc295.emulab.net)
  • Network-wide init scripts for GENU are located in the ~/xia-core/tools/geni directory.
    • e.g., You can start the XIA-Click prototype in all GENI nodes and run the XIA network-wide bootstrapping services by running ./xiaboot start.
  • The network-wide bootstrap procedure is as follows:
  1. Routing: Each router runs routing process so as to set up AD-level routing.
  2. XHCP server: The XHCP-server process runs on each router, and sends out AD-wide broadcast of [AD,].
  3. Name service: The name service process runs at a single specific host (its AD and HID are predefined), handling name register and query requests from other hosts in the network.
  4. XHCP client: The XHCP-client process run on each host. Obtaining the network information from the XHCP beacon, it registers itself to the default gateway router, and register its (host)name to the name service.
  5. Any user applications if requested by user.
Configuring the network boot configuration (in ~/xia-core/tools/geni/xiahosts)
  • Copy and modify the xiahosts.template file
  • Using the hostnames from Flack, add the hosts to the xiahosts file
  HOSTS="pc295 pc314"
  • Add the routers to the xiahosts file
  ROUTERS=""pc318 pc310"
  • Specify which host will run the name server. This must be a host node, not a router."
  NS_HOST="pc295"
  • Specify the router the nameserver is connected to.
  NS_ROUTER="pc318"

Running and bootstrapping an XIA network

  • Starting the network
 cd ./xia-core/tools/geni/
 ./xiaboot start
  • Stopping the network
  ./xiaboot stop
  • Get network status
  ./xiaboot check

Running applications (Using the network from above for examples. It doesn't matter which host the server and clients are run on.)

  • Example programs (echo client/server shown, but other examples are available in the same directory)
ssh pc295
cd ~/xia-core/applications/examples
./echoserver

ssh pc314
cd ~/xia-core/applications/examples
./echoclient -l10 (use -h to see other options)
  • Web Demo
    • Start the demo services on host0
  ssh pc295
  ~/xia-core/bin/run_web_demo -s start
    • Start the XIA proxy service on host1
  ssh pc314
  ~/xia-core/run_web_demo -p start
    • Configure your browser to proxy connections to the XIA proxy
 proxy host: pc314.emulab.net (substitute your host1 here)
 proxy port: 8080
    • Open the demo page. Open this in a new window before changing your proxy settings.
      • If you're using firefox, the foxyproxy plug-in is useful. It provides url matching to support multiple proxies. You can insert a pattern like http://www_* , http://xia.* ,and http://dag/* to go through our proxy.)
  • Stop the web demo
  ssh pc295
  ~/xia-core/bin/run_web_demo stop
  ssh pc314
  ~/xia-core/run_web_demo stop
Clone this wiki locally