Difference between revisions of "Unimore PLE/Docs"

From Web
Jump to navigation Jump to search
Line 1: Line 1:
 
<accesscontrol>luser</accesscontrol>
 
<accesscontrol>luser</accesscontrol>
Work in progress
 
  
 +
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.
 +
<br>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:
 +
 +
<i>import xmlrpclib
 +
<br>server = xmlrpclib.ServerProxy('https://www.planet-lab.eu/PLCAPI/')
 +
<br>auth={'AuthMethod':'password','Username':'<your-email>','AuthString':'<your-password>'}
 +
<br>node_list=[line.strip() for line in open('pathToNodeList/nodelist.txt')]
 +
<br>server.AddSliceToNodes(auth,'yourSliceName',node_list)</i>
 +
 +
If successful, this should return '1'.
 +
<br>If you want to do another verify that the above procedure went fine, you can issue, still in Python environment:
 +
 +
<i>slice_nodeids=server.GetSlices(auth,'yourSliceName')[0]['node_ids']
 +
<br>added_nodeid=server.GetNodes(auth,node_list)[0]['node_id']
 +
<br>added_nodeid in slice_nodeids</i>
 +
 +
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 <b>PLE Tools</b>).
 +
 +
*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>
  
* [[Unimore PLE/Docs/Tools|PLE Tools]]
+
Work in progress

Revision as of 11:57, 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