https://web.ing.unimo.it/wiki/api.php?action=feedcontributions&user=44736&feedformat=atomWeb - User contributions [en]2024-03-28T12:06:21ZUser contributionsMediaWiki 1.34.2https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs&diff=6960Unimore PLE/Docs2009-11-02T13:39:43Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
<br />
*[[/How to add a slice to nodes]]<br />
*[[Unimore PLE/Docs/Tools|PLE Tools]]<br />
*[[/Useful Linux commands]]<br />
<br />
Work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs&diff=6958Unimore PLE/Docs2009-11-02T13:35:21Z<p>44736: Replaced content with '<accesscontrol>luser</accesscontrol>
*/How to add a slice to nodes
*PLE Tools
Work in progress'</p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
<br />
*[[/How to add a slice to nodes]]<br />
*[[Unimore PLE/Docs/Tools|PLE Tools]]<br />
<br />
Work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs&diff=6957Unimore PLE/Docs2009-11-02T13:34:29Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
<br />
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 />
<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.<br />
*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:<br />
<br />
http://comon.cs.princeton.edu/status/tabulator.cgi?table=table_nodeviewshort&format=nameonly&persite=1&select='resptime>0<br />
<br />
*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:<br />
<br />
<i>import xmlrpclib<br />
<br>server = xmlrpclib.ServerProxy('https://www.planet-lab.eu/PLCAPI/')<br />
<br>auth={'AuthMethod':'password','Username':'<your-email>','AuthString':'<your-password>'}<br />
<br>node_list=[line.strip() for line in open('pathToNodeList/nodelist.txt')]<br />
<br>server.AddSliceToNodes(auth,'yourSliceName',node_list)</i><br />
<br />
If successful, this should return '1'.<br />
<br>If you want to do another verify that the above procedure went fine, you can issue, still in Python environment:<br />
<br />
<i>slice_nodeids=server.GetSlices(auth,'yourSliceName')[0]['node_ids']<br />
<br>added_nodeid=server.GetNodes(auth,node_list)[0]['node_id']<br />
<br>added_nodeid in slice_nodeids</i><br />
<br />
If successful, this returns "True", otherwise "False" and something went wrong.<br />
<br />
*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>).<br />
<br />
*Finally, you can use the nodes by logging into them with SSH, copying files with scp or rsync or the CoDeploy tools.<br />
<br />
*[[/How to add a slice to nodes]]<br />
*[[Unimore PLE/Docs/Tools|PLE Tools]]<br />
<br />
Work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/Multiquery&diff=6956Unimore PLE/Docs/Tools/Multiquery2009-11-02T13:29:38Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
<br />
Multiquery syntax is quite simple, just issuing<br />
<br />
<i>multiquery 'command1; command2; command3 &'</i><br />
<br />
will execute command1, command2 and, in the background, command3 (thanks to the '&' parameter).<br />
<br>Another example, if you want to create a directory called "test" on the remote nodes, issue<br />
<br />
<i>multiquery 'mkdir test'</i><br />
<br />
Or, if you need to kill a process that you started remotely on all the nodes, you can try<br />
<br />
<i>multiquery 'pkill processName'</i><br />
<br />
work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/CoDeploy&diff=6955Unimore PLE/Docs/Tools/CoDeploy2009-11-02T13:28:20Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
<br />
CoDeploy needs an HTTP server, such as Apache2, running on the local host containing the software to be deployed. So, if you are behind a firewall, you need to have the port 80 of the local host "open" so that remote machines can access contents by mean of an HTTP connection, as if they are downloading a file from a Web site.<br />
<br />
You have to setup the HTTP server so that, when you give an URL pointing to a directory on your local host, then this can be find by remote nodes. On Ubuntu, you have to modify the file <i>/etc/apache2/sites-available/default</i> so that the "DocumentRoot" parameter, which by default is /var/www/, points e.g. to your PlanetLab directory.<br />
<br>So, if you have: <b>DocumentRoot /var/www/</b><br />
<br>then replace with <b>DocumentRoot /home/yourUserName/choosenFolder/</b><br />
<br>This should work just fine if your Linux box is being used by a single user. After that, you should be able to view a sample index.html file, that you save into "choosenFolder", with a Web browser by connecting to the IP of your local host. Be sure that you can view it when connecting from outside your LAN: if you can't, then the firewall is blocking your port 80.<br />
<br />
The syntax of the CoDeploy command is something like this: <i>codeploy -a localDirectory http://localHostIP_orName/localDirectory/ remoteDirectory</i>.<br />
<br>With -a you specify you want to send compressed data, useful if deploying large files for the first time; <i>localDirectory</i> is the directory containing the files you want to be deployed and MUST be inside the "choosenFolder" with which you configured the DocumentRoot; the URL is where remote nodes will find the files and <i>remoteDirectory</i> is the remote directory where the files will be copied. Before issuing the command, you can check if the files are in the correct folder by opening with a Web browser the page <b>http://localHostIP_orName/localDirectory/</b>, it should display the list of files that you want to transfer.<br />
<br />
CoDeploy then generates a script that is copied to the remote nodes and then executed, for downloading the files from hosts of a CDN ([http://codeen.cs.princeton.edu/ CoDeen]) or from the local host. It seems to be a quite slow method compared to MultiCopy, but maybe it depends on the volume of data to be transferred.<br />
<br />
work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/CoDeploy&diff=6954Unimore PLE/Docs/Tools/CoDeploy2009-11-02T11:29:34Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
<br />
CoDeploy needs an HTTP server, such as Apache2, running on the local host containing the software to be deployed. So, if you are behind a firewall, you need to have the port 80 of the local host "open" so that remote machines can access contents by mean of an HTTP connection, as if they are downloading a file from a Web site.<br />
<br />
You have to setup the HTTP server so that, when you give an URL pointing to a directory on your local host, then this can be find by remote nodes. On Ubuntu, you have to modify the file <i>/etc/apache2/sites-available/default</i> so that the "DocumentRoot" parameter, which by default is /var/www/, points e.g. to your PlanetLab directory.<br />
<br>So, if you have: <b>DocumentRoot /var/www/</b><br />
<br>then replace with <b>DocumentRoot /home/yourUserName/choosenFolder/</b><br />
<br>This should work just fine if your Linux box is being used by a single user.<br />
<br />
The syntax of the CoDeploy command is something like this: <i>codeploy -a localDirectory http://localHostIP_orName/localDirectory/ remoteDirectory</i>.<br />
<br>With -a you specify you want to send compressed data, useful if deploying large files for the first time. <i>localDirectory</i> is the directory containing the files you want to be deployed and MUST be inside the "choosenFolder" with which you configured DocumentRoot, the URL is where remote nodes will find the files and <i>remoteDirectory</i> is the remote directory where the files will be copied.<br />
<br />
work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/CoDeploy&diff=6953Unimore PLE/Docs/Tools/CoDeploy2009-11-02T11:28:42Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
<br />
CoDeploy needs an HTTP server, such as Apache2, running on the local host containing the software to be deployed. So, if you are behind a firewall, you need to have the port 80 of the local host "open" so that remote machines can access contents by mean of an HTTP connection, as if they are downloading a file from a Web site.<br />
<br />
You have to setup the HTTP server so that, when you give an URL pointing to a directory on your local host, then this can be find by remote nodes. On Ubuntu, you have to modify the file <i>/etc/apache2/sites-available/default</i> so that the "DocumentRoot" parameter, which by default is /var/www/, points e.g. to your PlanetLab directory.<br />
<br>If you have: <i>DocumentRoot /var/www/</i><br />
<br>replace with <i>DocumentRoot /home/yourUserName/choosenFolder/</i><br />
<br>This should work fine if your Linux box is being used by a single user.<br />
<br />
The syntax of the CoDeploy command is something like this: <i>codeploy -a localDirectory http://localHostIP_orName/localDirectory/ remoteDirectory</i>.<br />
<br>With -a you specify you want to send compressed data, useful if deploying large files for the first time. <i>localDirectory</i> is the directory containing the files you want to be deployed and MUST be inside the "choosenFolder" with which you configured DocumentRoot, the URL is where remote nodes will find the files and <i>remoteDirectory</i> is the remote directory where the files will be copied.<br />
<br />
work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs&diff=6952Unimore PLE/Docs2009-11-02T10:57:08Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
<br />
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 />
<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.<br />
*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:<br />
<br />
http://comon.cs.princeton.edu/status/tabulator.cgi?table=table_nodeviewshort&format=nameonly&persite=1&select='resptime>0<br />
<br />
*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:<br />
<br />
<i>import xmlrpclib<br />
<br>server = xmlrpclib.ServerProxy('https://www.planet-lab.eu/PLCAPI/')<br />
<br>auth={'AuthMethod':'password','Username':'<your-email>','AuthString':'<your-password>'}<br />
<br>node_list=[line.strip() for line in open('pathToNodeList/nodelist.txt')]<br />
<br>server.AddSliceToNodes(auth,'yourSliceName',node_list)</i><br />
<br />
If successful, this should return '1'.<br />
<br>If you want to do another verify that the above procedure went fine, you can issue, still in Python environment:<br />
<br />
<i>slice_nodeids=server.GetSlices(auth,'yourSliceName')[0]['node_ids']<br />
<br>added_nodeid=server.GetNodes(auth,node_list)[0]['node_id']<br />
<br>added_nodeid in slice_nodeids</i><br />
<br />
If successful, this returns "True", otherwise "False" and something went wrong.<br />
<br />
*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>).<br />
<br />
*Finally, you can use the nodes by logging into them with SSH, copying files with scp or rsync or the CoDeploy tools.<br />
<br />
* <b>[[Unimore PLE/Docs/Tools|PLE Tools]]</b><br />
<br />
Work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/Multicopy&diff=6951Unimore PLE/Docs/Tools/Multicopy2009-11-02T10:24:52Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
<br />
This program makes use of a parameter, @, which has different meanings depending on how it is written:<br />
* if alone, it is replaced by a machine (remote node) name, e.g. <i>planetlab-1.remoteDomain</i>;<br />
* if followed by a colon, that is @:, it is replaced by slice name at the remote nodes, e.g. <i>yourSliceName@planetlab-1.remoteDomain</i>.<br />
<br />
So, if you want to transfer a local file to remote nodes in a particular directory, e.g. test, you run<br />
<br />
<i>multicopy filename @:test</i><br />
<br />
and MultiCopy will start <i>scp</i> with proper parameters for copying the file to the nodes specified in the node list.<br />
<br>If you want, instead, to copy files from remote nodes to the local host, you can create local directories using remote node names and then copy the files you need into their folders, using this syntax on the local host:<br />
<br />
<i>mkdir newdir<br />
<br>multicopy newdir @<br />
<br>multicopy '@:test/*.log' @</i><br />
<br />
In this way, you create a directory called "newdir" on the local host, then you make copies of it using the remote machine names (thanks to @ parameter). After that, you copy the log files from the remote directory "test" from each remote node into the local directories corresponding to the remote node name.<br />
<br />
work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/Multicopy&diff=6949Unimore PLE/Docs/Tools/Multicopy2009-11-02T10:18:12Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
<br />
This program makes use of a parameter, @, which has different meanings depending on how it is written:<br />
<br>- if alone, it is replaced by a machine (remote node) name, e.g. <i>planetlab-1.remoteDomain</i>;<br />
<br>- if followed by a colon, that is @:, it is replaced by slice name at the remote nodes, e.g. <i>yourSliceName@planetlab-1.remoteDomain</i>.<br />
<br />
So, if you want to transfer a local file to remote nodes in a particular directory, e.g. test, you run<br />
<br />
<i>multicopy filename @:test</i><br />
<br />
and MultiCopy will start <i>scp</i> with proper parameters for copying the file to the nodes specified in the node list.<br />
<br>If you want, instead, to copy files from remote nodes to the local host, you can create local directories using remote node names and then copy the files you need into their folders, using this syntax on the local host:<br />
<br />
<i>mkdir newdir<br />
<br>multicopy newdir @<br />
<br>multicopy '@:test/*.log' @</i><br />
<br />
In this way, you create a directory called "newdir" on the local host, then you make copies of it using the remote machine names (thanks to @ parameter). After that, you copy the log files from the remote directory "test" from each remote node into the local directories corresponding to the remote node name.<br />
<br />
work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/Multicopy&diff=6948Unimore PLE/Docs/Tools/Multicopy2009-11-02T10:17:23Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
<br />
This program makes use of a parameter, @, which has different meanings depending on how it is written:<br />
<br>- if alone, it is replaced by a machine (remote node) name, e.g. <i>planetlab-1.remoteDomain</i>;<br />
<br>- if followed by a colon, that is @:, it is replaced by slice name at the remote nodes, e.g. <i>yourSliceName@planetlab-1.remoteDomain</i>.<br />
<br />
So, if you want to transfer a local file to remote nodes in a particular directory, e.g. test, you run<br />
<br />
<i>multicopy filename @:test</i><br />
<br />
and MultiCopy will start <i>scp</i> with proper parameters for copying the file to the nodes specified in the node list.<br />
<br>If you want, instead, to copy files from remote nodes to the local host, you can create local directories using remote node names and then copy the files you need into their folders, using this syntax on the local host:<br />
<br />
<b>mkdir newdir<br />
<br>multicopy newdir @<br />
<br>multicopy '@:test/*.log' @</b><br />
<br />
In this way, you create a directory called "newdir" on the local host, then you make copies of it using the remote machine names (thanks to @ parameter). After that, you copy the log files from the remote directory "test" from each remote node into the local directories corresponding to the remote node name.<br />
<br />
work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/CoDeploy&diff=6947Unimore PLE/Docs/Tools/CoDeploy2009-11-02T10:08:10Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
<br />
CoDeploy needs an HTTP server, such as Apache2, running on the local host containing the software to be deployed. So, if you are behind a firewall, you need to have the port 80 of the local host "open" so that remote machines can access contents by mean of an HTTP connection, as if they are downloading a file from a Web site.<br />
<br />
work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/Multicopy&diff=6946Unimore PLE/Docs/Tools/Multicopy2009-11-02T09:58:31Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
<br />
This program makes use of a parameter, @, which has different meanings depending on how it is written:<br />
<br>- if alone, it is replaced by a machine (remote node) name, e.g. <i>planetlab-1.remoteDomain</i>;<br />
<br>- if followed by a colon, that is @:, it is replaced by slice name at the remote nodes, e.g. <i>yourSliceName@planetlab-1.remoteDomain</i>.<br />
<br />
work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/CoDeploy&diff=6945Unimore PLE/Docs/Tools/CoDeploy2009-11-02T09:51:18Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol></div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/CoDeploy&diff=6944Unimore PLE/Docs/Tools/CoDeploy2009-11-02T09:48:32Z<p>44736: Blanked the page</p>
<hr />
<div></div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/CoDeploy&diff=6942Unimore PLE/Docs/Tools/CoDeploy2009-11-02T09:37:46Z<p>44736: Created page with '<accesscontrol>luser</accesscontrol>'</p>
<hr />
<div><accesscontrol>luser</accesscontrol></div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/Multicopy&diff=6941Unimore PLE/Docs/Tools/Multicopy2009-11-02T09:37:39Z<p>44736: Created page with '<accesscontrol>luser</accesscontrol>'</p>
<hr />
<div><accesscontrol>luser</accesscontrol></div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/Multiquery&diff=6940Unimore PLE/Docs/Tools/Multiquery2009-11-02T09:36:50Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
<br />
Multiquery syntax is quite simple, just issuing<br />
<br />
<i>multiquery 'command1; command2; command3 &'</i><br />
<br />
will execute command1, command2 and, in the background, command3 (thanks to the '&' parameter).<br />
<br>Another example, if you want to create a directory called "test" on the remote nodes, issue<br />
<br />
<i>multiquery 'mkdir test'</i><br />
<br />
work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs/Tools/Multiquery&diff=6931Unimore PLE/Docs/Tools/Multiquery2009-11-02T09:23:58Z<p>44736: Created page with '<accesscontrol>luser</accesscontrol>'</p>
<hr />
<div><accesscontrol>luser</accesscontrol></div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs&diff=6914Unimore PLE/Docs2009-10-22T09:30:33Z<p>44736: </p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
Work in progress<br />
<br />
<br />
* [[Unimore PLE/Docs/Tools|PLE Tools]]</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE/Docs&diff=6913Unimore PLE/Docs2009-10-22T09:29:16Z<p>44736: Created page with '<accesscontrol>luser</accesscontrol> Work in progress'</p>
<hr />
<div><accesscontrol>luser</accesscontrol><br />
Work in progress</div>44736https://web.ing.unimo.it/wiki/index.php?title=Unimore_PLE&diff=6912Unimore PLE2009-10-22T09:27:57Z<p>44736: </p>
<hr />
<div>List of projects running on [http://www.planet-lab.eu/ PlanetLab europe] at the University of Modena e Reggio Emilia<br />
<br />
* [[Unimore PLE/Video P2P]] video peer to peer...<br />
<br />
* [[Unimore PLE/Docs|Documentation about PlanetLab (authorized users only)]]</div>44736