Tutorial on using NITOS
Creating a User Account
The first step you need to do before you can use NITOS is to create your NITlab account. This process is simple and can be accomplished on the NITlab website. Underneath the login boxes, click the “Create an account” link. Fill in the required information. Once you click the “Register” button, a confirmation mail will come to you and when you confirm it, your request will be sent to the administrator for approval. When the administrator approves the creation of your account, you will receive a confirmation email. At this time, you may continue with the tutorial.
Getting a Slice and Reserving Resources
All access to NITOS resources occurs through the “slice” abstraction.
The NITlab Administrator is in charge of managing your slice. You will need to contact him directly and ask him/her to either create a new slice for you, or add your user account to an existing slice. (This tutorial will assume that you have been given a new, empty slice.) Once your account has been added to a slice, you will be able to view the Reservation page and the "Your ssh-keys" page.
You can then go to the Reservation page and reserve nodes and frequencies for a given interval.
Slice names typically coincide with your NITlab site's account username. This tutorial will assume that your slice is named username. You should replace this value with your slice’s actual name whenever you encounter it in this tutorial.
Connecting to the NITOS Server
You will need ssh public-key authentication to connect to the Console Server in the NITOS testbed. If you do not already have an ssh keypair, or would like to create a new one specifically for NITOS, perform the following commands. This tutorial will assume that ~/.ssh/id_rsa is the private key that you will use for NITOS authentication.
$ ssh-keygen -t rsa -f ~/.ssh/id_rsa
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Once you have created your ssh keypair, you will need to upload your public key to the NITlab database. You can do this easily through the NITlab website. Go to the NITlab home-page and log in using your newly created account. In the user menu on the right, click “Your ssh-keys”. Choose the slice to which you want to associate this public key, click "Submit" and after that, click “Browse” and navigate to your public key file (i.e. ~/.ssh/id_rsa.pub). Click “Upload.” You should see yours appear in the list.
Open a secure shell to "nitlab.inf.uth.gr" (Console Server) using your slice name as username. You do not need a password if you have uploaded your rsa public key in the server. You can log into the console server at anytime you want to. However, you can only access the nodes you booked through Reservation page.
$ ssh email@example.com
For Windows, have a look at this article explaining the respective procedure using Putty.
Using your slice to run OMF experiments
There are two ways to use your slice in order to run OMF experiments during your reservation. The first way is to install the OMF Experiment Controller locally at your PC and configure it appropriately and the second way is to issue OMF commands when logged in the server giving your slice as an option. We describe these methods below.
To use this method, each user must donwload and install the OMF EC locally on his/her own PC. The local EC interacts with the NITOS testbed OMF Aggregate Manager, as well as with the OMF Resource Controllers residing on each testbed resource.
In order to download OMF EC and install it on your PC, follow the instructions at http://omf.mytestbed.net/projects/omf/wiki/Installation_Guide_53 in the section "Installing the Experiment Controller (EC)", but skip the part where configuration of the omf-expctl.yaml is described. Instead, download the NITOS-specific EC configuration file here and copy it to the /etc/omf-expctl-5.3/ directory, replacing the existing file. Then open this file and edit the :slice: section replacing the existing slice name ("my_username") with your slice name at NITOS. Also place your machine's public IP address in the section :host:
Running OMF Experiment Controller from the server
If you don't want to download an OMF Experiment Controller at your PC, you can run OMF experiments while logged in the NITOS console server with your account. All you have to do is use the --slice username option when running the omf exec command (replacing username with your actual username).
Loading an OMF-compatible image on your resource
Ubuntu distributions, stored at the NITOS server as binary .ndz files, can be loaded on the resources overwriting any existing data on the disks of these resources.
Beginners can load a "baseline" distribution on their resources and later modify it according to their needs. There are two types of nodes supporting hard drive images at NITOS, the older Orbit-like nodes (the 'yellow' nodes) and the newer Commell nodes (the 'grid' nodes). For Orbit-like nodes the user should load the "baseline_orbit_madwifi.ndz" image (it has a Madwifi driver installed) or "baseline_orbit_ath5k.ndz" image. For the grid nodes, the user should use "baseline_grid_madwifi.ndz" or "baseline_grid_ath5k.ndz" or "baseline_grid_ath9k.ndz", depending on the driver he is willing to use.
Once logged in the server, you can check which nodes you currently have access to, by issuing the command
$ t_reboot who
The first step for loading an image on your resources is to reboot them with a tight ramfs image using the command
$ t_reboot all pxe
You can then load a "baseline" image for nodes you have reserved using the omf load command. For example, to load the baseline.ndz image to node 16 of NITOS, issue at the command line of your local PC (assuming you've got the OMF EC properly installed as described in the previous section):
$ omf load -i baseline.ndz -t omf.nitos.node016
You can load an image to many nodes simultaneously using a comma separated list, for example:
$ omf load -i baseline.ndz -t omf.nitos.node016,omf.nitos.node017
Once the loading process of one of the 'baseline' images is succesfully completed, you can ssh into these nodes as root with no password. In a terminal where you are connected to the NITOS console server, issue
$ ssh root@node016
You can configure the image as you wish, since you have root privileges. One modification that you have to make is edit the file /etc/omf-resctl-5.3/omf-resctl.yaml and change the :slice section by putting your username instead of the entry default_slice. Another modification that you have to make to ensure no other user has access to your resource during your reservation is to add a root password to the image (using the passwd command). Note that you only need to do these changes once for each of the two types of nodes, since you can then save your modified image, so that you can load your "own" image each of the subsequent times you use some resources. This process of saving images is described in the next section.
Saving an OMF image from the resources to the server
You can save your modified image, in order to maintain the changes you've made and be able to use it again.
If you have set a root password for your image (as advised), you must first boot your node into PXE mode. For example, for node005, you must type
$ t_reboot 5 pxe
You then issue the omf save command. For example, issuing
$ omf save -n omf.nitos.node005
will save the current image of node 5 to the server. The image is saved as an .ndz file in the directory /var/lib/omf-images-5.3 of the NITOS server with a name containing the date and time of the `omf save` command. You can then load this image to your resources using the omf load command and the name of the image. You can also rename the image, so that its name is more meaningful to you.