Difference between revisions of "Deploying to PlanetLab"

From NMSL
(New page: __TOC__ == Deploying Files to PlanetLab Nodes == To deploy your app to PlanetLab use the command below: <pre> pscp -h ''nodes.txt'' -l ''slice_name'' -t 180 -p 200 yourapp.tar /home/''s...)
 
Line 6: Line 6:
  
 
<pre>
 
<pre>
pscp -h ''nodes.txt'' -l ''slice_name'' -t 180 -p 200 yourapp.tar /home/''slice_name''/yourapp.tar
+
pscp -h ''nodes.txt'' -l slice_name -t 180 -p 200 yourapp.tar /home/slice_name/yourapp.tar
 +
</pre>
 +
 
 +
Replace ''slice_name'' and ''yourapp.tar'' with the appropriate values.
 +
 
 +
The '''-t''' switch denotes the timeout period for each node. For example, ''-t 180'' sets the pscp command timeout period to 3 minutes. A "Timeout" status will be returned if the node failed to response within the timeout period.
 +
 
 +
 
 +
The '''-p 200''' denotes the max number of parallel threads for the pscp process. A value of 200 means the process will attempt to copy the file to 200 nodes concurrently. Please do not abuse this setting. You will run out of memory if you spawn too many threads.
 +
 
 +
 
 +
== Executing Remote Commands ==
 +
 
 +
You can use '''pssh''' to issue a command to all nodes in your slice. For example, the command below will untar yourapp.tar from the above example.
 +
 
 +
<pre>
 +
pssh -h nodes.txt -l sfu_games -t 180 -p 200 -o /tmp "tar xvf yourapp.tar"
 
</pre>
 
</pre>

Revision as of 21:33, 18 August 2009

Deploying Files to PlanetLab Nodes

To deploy your app to PlanetLab use the command below:

pscp -h ''nodes.txt'' -l slice_name -t 180 -p 200 yourapp.tar /home/slice_name/yourapp.tar

Replace slice_name and yourapp.tar with the appropriate values.

The -t switch denotes the timeout period for each node. For example, -t 180 sets the pscp command timeout period to 3 minutes. A "Timeout" status will be returned if the node failed to response within the timeout period.


The -p 200 denotes the max number of parallel threads for the pscp process. A value of 200 means the process will attempt to copy the file to 200 nodes concurrently. Please do not abuse this setting. You will run out of memory if you spawn too many threads.


Executing Remote Commands

You can use pssh to issue a command to all nodes in your slice. For example, the command below will untar yourapp.tar from the above example.

pssh -h nodes.txt -l sfu_games -t 180 -p 200 -o /tmp "tar xvf yourapp.tar"