-
Notifications
You must be signed in to change notification settings - Fork 28
Running XIA on GENI
Dan Barrett edited this page Feb 23, 2017
·
11 revisions
This document describes how to setup XIA experiments on GENI nodes using the Flack tool.
- Flack is a GUI tool for setting up GENI resources (nodes, links, connectivity, etc)
- Flack link: https://www.emulab.net/protogeni/flack2/flack.html
- Flack manual: http://www.protogeni.net/trac/protogeni/wiki/FlackManual
- Flack tutorials: http://www.protogeni.net/trac/protogeni/wiki/FlackTutorial
- 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
- 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
- An example rspec file for topology of 2 routers (i.e., 2 ADs) and 2 hosts (1 for each AD) is here (NOTE: you need to replace 'USERNAME' in the file with your emulab account name): https://raw.github.com/XIA-Project/xia-core/master/tools/geni/xia-2r-2h.rspec
- 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.
-
Method 1. Create a new topology via the Flack GUI
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
- This will:
- You can upload your scripts by clicking ‘Add Install Service’
- 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’
- You need to specify the execute command by clicking ‘Add Execute Service’
- When all the information is complete for a node, click ‘Apply’
- Note: You need to do this procedure for each node.
- 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'
- 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.
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
- 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.
- 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:
- Routing: Each router runs routing process so as to set up AD-level routing.
- XHCP server: The XHCP-server process runs on each router, and sends out AD-wide broadcast of [AD,].
- 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.
- 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.
- Any user applications if requested by user.
- 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.)
- Open the demo page. Open this in a new window before changing your proxy settings.
- Stop the web demo
ssh pc295 ~/xia-core/bin/run_web_demo stop ssh pc314 ~/xia-core/run_web_demo stop