User Tools

Site Tools


usage:slice-admin

Slice administrator's guide

This guide covers all the operations related to the slice management. It also pretends to serve as a reference for researchers on the topic of how to run an experiment on the Community-Lab testbed.

When running an application (like an experiment or service) in Community-Lab we recomend to follow these steps:

  1. Prepare the environment of your slivers using VCT (see Using the Virtual CONFINE Testbed).
  2. Test the application first in VCT (see Slice Allocation and Deployment for a detailed tutorial section). You may use first the plain bridged virtual links and then apply the more realistic link error model, to make sure the application works as expected under any network situation.
  3. Test the application in a local testbed or in a more controlled set of nodes; for instance, use those located at the UPC Lab, since they are not expected to have connectivity issues.
  4. Share information about your application in the users mailing list: although it is not a requirement, providing some details about your experiment or application will help others to know about what you are doing and creates awareness about what is being researched in the testbed.
  5. Run the application in the target testbed. That involves creating a slice, adding the desired slivers and starting them; and finally running the desired application. Please keep in mind that changes are not applied immediately on the nodes as nodes poll periodically the controller and apply changes eventually after a few minutes in the next successful connection; so expect each of these steps to take some time. Special care should be taken when running applications on Community-Lab since it is part of several community networks and their operation should not be disrupted. One must respect the Acceptable Use Policy of the testbed and of the community networks involved.
  6. Delete the slivers and slice once the experiment is finished: resources of the Community-Lab testbed are limited, therefore slivers should be stopped and slices removed after usage to leave resources for other applications.

The testbed is experimental, so please report any issues (see How to get support). Thanks and good luck!

Preparing an experiment

The first step to successfully run an experiment or application on a Community-Lab testbed is to prepare each of its slivers. On your design, there may be slivers with requirements or configuration files that go beyond the template provided by the testbed administrators, or some of the slivers may have different requirements in terms of software or data than others. If that is the case, Confine testbeds offer the chance of customizing your slivers attaching to them a sliver data file. Usually (e.g. for slivers using Debian, OpenWrt and similar templates), the file will be handled as an archive file (e.g. a .tar.gz file) to be unpacked in the root directory (/) of the sliver's read-write overlay (see Sliver deployment for more details on the overlay). Thus the sliver data file may be used in two ways:

  • To simply add files to your sliver, you may just create an archive containing data files to be fed to the application, programs to process them, or even init scripts and symlinks to automate the execution of the application. VCT can help you build such sliver data files (see Creating sliver data).
  • If you need greater customizations of sliver templates, a simple archive may be insufficient or cumbersome to create and use. In this case you may capture the changes (like tuning of configuration files and installation or removal of packages) performed to a sliver based on a particular template so you can reproduce those changes again and again on other slivers based on the same template. Usually, these captures will be created using VCT by running each component of the application virtually, customizing it via SSH and then dumping the sliver's overlay using the confine_sliver_dump_overlay command (see Dumping sliver data).

If the sliver data file is attached to a slice as a sliver default, it will be used by all its slivers unless they define their own one. In the end, each sliver will be customized by combining the slice's sliver template and the sliver's sliver data, where the latter overwrites the former.

Creating a slice

Once each sliver has been prepared, the next step is to create a slice in the testbed. To do so, follow the next steps on the Community-Lab controller:

  1. Click on the Slices icon to get the list of slices in the testbed.
  2. Click on the Add slice button to register a new slice.
  3. Fill in the name field (e.g. Test slice) and choose a template (e.g. Debian) for slivers. If you want to use isolated sliver interfaces for routing experiments (see Node architecture), click on Show next to the Advanced section header to unfold it and select the Request isolated VLAN tag box. If needed as well, set there the common data file for slivers. Scroll to the bottom and click on Save and continue editing.

More detailed information can be found at the tutorial.

Adding slivers to a slice

Since the slice just created does not have any sliver associated, the next step will be to add some slivers to it:

  1. From your slice page, click on Add slivers. You will see a list of all the available nodes on the testbed, select the nodes where you want to run your slivers and click on the Create slivers button.
  2. If several nodes were selected, you may configure the interfaces of several slivers at once (see Node architecture). Select the interfaces you want and click on the Yes, create slivers button.
  3. You are brought back to the slice page. Its slivers are listed at the bottom. To edit a sliver, click on its name. There you can override sliver defaults like its template, set state and data file. You can also edit its interfaces. Isolated interfaces must be added manually for each sliver (click on Add another sliver interface, set a name like iso0, the Isolated type and choose a parent interface). Then click on Save.

Steps in more detail can be found at the tutorial.

Starting and stopping slices and slivers

Now your slice is ready to run your experiment, to do so you only need to start your slice:

  1. Log in the controller as a slice administrator and go to the slice page.
  2. Change its set state to START and click on Save and continue editing.

Keep in mind that starting a slice takes a while. You can track your slice status by reloading the slice page and checking each sliver current state at the bottom of the page. Moreover, if you click on a sliver current state, you will be taken to a page where you can find information about the sliver such as its address and some monitoring information.

Also, before starting your slice, you may want to check that the nodes used by your slice are in the PRODUCTION current state by looking at the node list. If they are not, some of the slivers will not start.

More information at the end of the tutorial.

To stop your slice, just change its set state back to REGISTER, but keep in mind that this will remove all slivers on the nodes, so make sure to retrieve any data you may need.

Running an application

If you have not written any automated script to be run when your sliver starts, you will need to log into the slivers and run any command your application requires.

Logging into a sliver

At the moment, the out-of-band remote access to slivers (which allows SSH access to a sliver regardless of its network configuration) is not implemented yet. In the meantime, sliver templates provided by Community-Lab include an SSH server, and researchers are allowed to log in as root into their slivers.

If your sliver has a public address that you know, you can connect directly to it. However, the most reliable way you can reach your sliver is by adding both your computer and the sliver to the testbed management network. For the sliver it is just a matter of adding a management interface to it in the sliver's page, and next you will see its IPv6 management address in the “Ipv6_addr” column. To add your computer to the management network you can follow the steps of the tutorial.

So, to connect to a sliver follow the next steps:

  1. Make sure that the sliver is started and connected to the testbed management network (you can check at the sliver's page).
  2. Add your SSH public key as an authentication token by updating your user information.
  3. Make sure that your computer is connected to the testbed management network (you can check at the hosts page).
  4. Execute the SSH client: $ ssh root@SLIVER_IP

Automating a common task

Once you can connect to one sliver, you may be tempted to work with all your slivers together from your workstation on the command line.

One quick and dirty way to check and use your slivers is by using the vxargs tool (man page). It allows you to apply the same, an arbitrary command, to a list of machines in parallel. It can be ssh, scp, etc, so you can upload files, download files, execute commands, even synchronize a set of files with all slivers in your slice (in the list of IP addresses). Therefore you can run a simple application with it: concurrently for each node, you can upload files, launch a process, monitor its status, stop a process, collect files.

You can create a list of IPv6 management addresses for all slivers with this slivers.sh Bash script: $ sh slivers.sh 10 > ip-list.txt (replace 10 by the number of you slice). See also the list-nodes script.

For instance, with a file ip-list.txt containing a list of the IPv6 management addresses for each sliver, you can see the uptime of all responsive nodes that respond in less than 10 seconds, leaving the stdin, stdout, stderr of each sliver in /tmp/results:
$ ./vxargs.py -a ip-list.txt -t 10 -o /tmp/results ssh root@{} "hostname;uptime".

Some other common operations

On the next subsections we will detail how to achieve some other operations that may come in handy for a slice administrator.

Listing slices

You can obtain a list of all the slices by simply:

  1. Log in the controller and click on the slices icon. You will obtain a list of all the slices belonging to your research group.
  2. If you want to see all the slices, click on all on the right filter By slices.

Deleting a slice

Once your application or experiment is over, please make sure to remove the slice to avoid consuming unnecessary resources:

  1. Log in the controller and click on the slices icon. Select the slice (or slices) that you want to delete.
  2. Select Delete selected slices on the action drop-down menu and click go.
  3. Finally, click on Yes, I'm sure button.

Resetting a slice

Sometimes it may be needed to stop, redeploy and restart all its slivers without changing their configuration. This can be done by resetting a slice:

  1. Log in the controller and click on the slices icon. Select the slice (or slices) that you want to reset.
  2. Select Reset selected slices on the action drop-down menu and click go.

Renewing a slice

Slices have an expiration date, after which the slice will be deleted. If your application or experiment should run longer, remember to renew your slice to extend its duration:

  1. Log in the controller and click on the slices icon. Select the slice (or slices) that you want to renew.
  2. Select Renew selected slices on the action drop-down menu and click go.

Monitoring a slice

To know the state of a slice and its slivers you may either:

  • Use the testbed controller, which periodically queries nodes' API to retrieve sliver states and makes them available via the State button of the sliver's page.
  • Query the node API directly (see CONFINE REST API) and look for the sliver resource description. It is usually located under https://NODE_ADDRESS/confine/api/slivers/.
  • Look at the Community-Lab monitor to see details about the status of slices in this testbed.

The controller also offers a testbed status report summarizing sliver availability per group. It can be accessed via Nodes / Summary in the main menu.

usage/slice-admin.txt · Last modified: 2015/08/25 11:20 by ivilata