Difference between revisions of "Unimore PLE/Docs"

From Web
Jump to navigation Jump to search
Line 28: Line 28:
 
*Finally, you can use the nodes by logging into them with SSH, copying files with scp or rsync or the CoDeploy tools.
 
*Finally, you can use the nodes by logging into them with SSH, copying files with scp or rsync or the CoDeploy tools.
  
* <b>[[Unimore PLE/Docs/Tools|PLE Tools]]</b>
+
*[[/How to add a slice to nodes]]
 +
*[[Unimore PLE/Docs/Tools|PLE Tools]]
  
 
Work in progress
 
Work in progress

Revision as of 14:34, 2 November 2009

<accesscontrol>luser</accesscontrol>

After creating a slice, you need to add it to the remote nodes, so that you can access remote machines authenticating with slice name and the SSH public key sent to the PlanetLab web site.
You can choose the nodes you want from the Web site, using an intuitive interface, but this is useful for few nodes only: if you need hundreds of nodes, you can use some Python commands for accessing the PlanetLab API and using some of its commands. If you find references to a "PlanetLab Shell", then unfortunately that tool is not working anymore so Python must be used.

  • First, you need to generate a node list: if you want to use only one node for each PlanetLab site, and only the active ones, then the following link will generate a node list that you can save, for example, as nodelist.txt:

http://comon.cs.princeton.edu/status/tabulator.cgi?table=table_nodeviewshort&format=nameonly&persite=1&select='resptime>0

  • Second, you add the slice to the nodes of the nodelist. Start the Python interpreter by issuing "python" command in a Linux shell, then type the following:

import xmlrpclib
server = xmlrpclib.ServerProxy('https://www.planet-lab.eu/PLCAPI/')
auth={'AuthMethod':'password','Username':'<your-email>','AuthString':'<your-password>'}
node_list=[line.strip() for line in open('pathToNodeList/nodelist.txt')]
server.AddSliceToNodes(auth,'yourSliceName',node_list)

If successful, this should return '1'.
If you want to do another verify that the above procedure went fine, you can issue, still in Python environment:

slice_nodeids=server.GetSlices(auth,'yourSliceName')[0]['node_ids']
added_nodeid=server.GetNodes(auth,node_list)[0]['node_id']
added_nodeid in slice_nodeids

If successful, this returns "True", otherwise "False" and something went wrong.

  • Third, please wait for PlanetLab to add your slice to the selected nodes: this may take some time and, during this, you can't log in into the remote nodes using your SSH credentials because they will still be unknown to the new nodes. During this time, you can start having a look at CoDeploy software package (see below the link PLE Tools).
  • Finally, you can use the nodes by logging into them with SSH, copying files with scp or rsync or the CoDeploy tools.

Work in progress