wiki:GENIExperimenter/Tutorials/TrainTheTA-Fall2014/SliceAccessTutorial

Version 3 (modified by sedwards@bbn.com, 10 years ago) (diff)

--

Accessing Resources in Slices Created by your Students

Portal Reservation

When students reserve resources through the GENI Portal, the Project Lead and the Project Admins get accounts on the compute resources as well.

Let's try that:

  1. Login to the Portal and load the Slices Tab
  2. Choose the slice called sliceaccess-portal
  3. Check the status for all the aggregates in the slice by pressing the Ready? button. Where does this slice have resources?
  4. Press the Details button for that specific aggregate and wait until all the information is loaded.
  5. Login to the node using your own account

Action: Send an email to tutorials@geni.net with the keys installed for user vthomas

Tip The installed keys are located in a text file under the .ssh directory of the user.
Tip You will need to use sudo to access the directory of another user

Reservation with other tools

When students are reserving resource with other tools then only their key is loaded onto the nodes. To help your students debug in this case you should ask your students to load a common public SSH key into their account on the Portal.

Note We are working to have all tools support multi-user slices directly which will eliminate the need for this workaround. Check back periodically to see which tools support this.

The process of loading a common public SSH key has two steps...

A. Generate SSH Keypairs

To generate an SSH Key pair use keygen.

  1. In a terminal run
    ssh-keygen
    
  2. Follow the instructions:
    • You can name your key anything you like, for this exercise name it common-key
    • Make sure to remember the passphrase you set.
  3. Run ls to see the contents of your directory. There should be two files generated from the previous command:
    • common-key: This is the private key. You keep this to your self and maybe share it with the professor of the class and other admins of the project.
    • common-key.pub: This is the public key. This is the key you give to the students to load to their profile.
      Tip If you have too many files, try to filter the output to make it easier to find your keys. Try:
             ls comm*
          

Action: Send an email to tutorials@geni.net with the public key you generated.

The next step in your classroom would be to send this public key to your students to load it in their profile; Instructions about how to do that.

B. Access nodes

Let's try this and see how this approach works and how you would login in using this common key. For the purpose of this exercise we have generated a common public key that you can download from: http://tinyurl.com/TACommonKey (actual URL: http://www.gpolab.bbn.com/experiment-support/TrainTheTA/common-key )

Tip If you load it in the browser then just save the file using your browser's menus.

The first steps are exactly the same as before:

  1. Login to the portal and load the Slices Tab
  2. Choose the slice called sliceaccess-flack
  3. Check the status for all the aggregates in the slice by pressing the Get All button. Where does this slice have resources?
  4. Press the Details button for that specific aggregate and wait until all the information is loaded.
  5. Notice that there is only one account created.

Warning You will need to change the permissions so this file is only accessible to you. In a terminal do:
      chmod 600 <location_of_downloaded_key>
  1. Use this key to login to the nodes:
    1. Copy the ssh command from the portal
    2. Paste it in the terminal
    3. Add at the end: -i <location_of_downloaded_key>

Action: Send an email to tutorials@geni.net with the contents of the file done.txt