Difference between revisions of "Getting the latest active nodes"
Line 3: | Line 3: | ||
== Latest Active PlanetLab Nodes == | == Latest Active PlanetLab Nodes == | ||
− | To generate a list of latest active PlanetLab nodes point your browser to | + | To generate a list of latest active PlanetLab nodes point your browser to [http://comon.cs.princeton.edu/status/tabulator.cgi?table=table_nodeviewshort&select=%27resptime%20%3E%200%27&format=nameonly this] URL. |
− | [http://comon.cs.princeton.edu/status/tabulator.cgi?table=table_nodeviewshort&select=%27resptime%20%3E%200%27&format=nameonly] | ||
Copy the output to a text file. For example, nodes.txt | Copy the output to a text file. For example, nodes.txt | ||
+ | |||
+ | |||
+ | == Adding Node to the Slice == | ||
+ | |||
+ | You must add nodes to your slice in order to gain access to them. One way to do this would be to select them one-by-one via the Planet-Lab website. However, when your experiments are to be deployed on a large number of nodes, this may turn out to be inefficient. In such cases, it would be easier to use the PlanetLab API to automatically add a list of nodes (such as the one obtained in the previous section) to your site. | ||
+ | |||
+ | The PlanetLab API functions can be accessed either using the PlanetLab Shell or through any scripting language that supports XMLRPC. An example is presented here in Python. | ||
+ | |||
+ | In your PlanetLab working directory, run the following commands in a terminal window. The final python command should return the value “1” on success. | ||
+ | |||
+ | <pre> | ||
+ | $ python | ||
+ | >>> import xmlrpclib | ||
+ | >>> api_server = \ | ||
+ | ... xmlrpclib.ServerProxy('https://www.planet-lab.org/PLCAPI/') | ||
+ | >>> | ||
+ | >>> auth = {} | ||
+ | >>> auth['Username'] = "user" <-- substitute your actual username here | ||
+ | >>> auth['AuthString'] = "pass" <-- substitute your actual password here | ||
+ | >>> auth['AuthMethod'] = "password" | ||
+ | >>> | ||
+ | >>> node_list = [line.strip() for line in open("nodes.txt")] | ||
+ | >>> | ||
+ | >>> api_server.AddSliceToNodes(auth, \ | ||
+ | ... "your_slice_name", node_list) | ||
+ | >>> ^D | ||
+ | </pre> | ||
+ | |||
+ | You will now need to wait some time, at least 15 minutes but possibly longer, for virtual servers to be allocated to your slice on all the nodes. |
Revision as of 05:42, 31 December 2009
Latest Active PlanetLab Nodes
To generate a list of latest active PlanetLab nodes point your browser to this URL.
Copy the output to a text file. For example, nodes.txt
Adding Node to the Slice
You must add nodes to your slice in order to gain access to them. One way to do this would be to select them one-by-one via the Planet-Lab website. However, when your experiments are to be deployed on a large number of nodes, this may turn out to be inefficient. In such cases, it would be easier to use the PlanetLab API to automatically add a list of nodes (such as the one obtained in the previous section) to your site.
The PlanetLab API functions can be accessed either using the PlanetLab Shell or through any scripting language that supports XMLRPC. An example is presented here in Python.
In your PlanetLab working directory, run the following commands in a terminal window. The final python command should return the value “1” on success.
$ python >>> import xmlrpclib >>> api_server = \ ... xmlrpclib.ServerProxy('https://www.planet-lab.org/PLCAPI/') >>> >>> auth = {} >>> auth['Username'] = "user" <-- substitute your actual username here >>> auth['AuthString'] = "pass" <-- substitute your actual password here >>> auth['AuthMethod'] = "password" >>> >>> node_list = [line.strip() for line in open("nodes.txt")] >>> >>> api_server.AddSliceToNodes(auth, \ ... "your_slice_name", node_list) >>> ^D
You will now need to wait some time, at least 15 minutes but possibly longer, for virtual servers to be allocated to your slice on all the nodes.