Example of an RSpec request for a node with software to install and run at startup.
This is a request which specifies a tarball to download and run together with a simple startup script on a node:
After you have created your rspec, you can take a look at ServicesFaq for more help on getting your shell script to run properly on the node itself.
RSpec V2 Example
<?xml version="1.0" encoding="UTF-8"?>
<rspec xmlns="http://www.protogeni.net/resources/rspec/2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.protogeni.net/resources/rspec/2
http://www.protogeni.net/resources/rspec/2/request.xsd"
type="request" >
<node client_id="node">
<sliver_type name="raw-pc" />
<services>
<install url="http://example.net/path/tarball.tgz" install_path="/local"/>
<install url="http://example.net/path/other.tgz" install_path="/usr/local"/>
<execute shell="sh" command="sudo /local/myserver.sh"/>
</services>
</node>
</rspec>
RSpec V0.1 Example (Deprecated)
<?xml version="1.0" encoding="UTF-8"?>
<rspec xmlns="http://www.protogeni.net/resources/rspec/0.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.protogeni.net/resources/rspec/0.1
http://www.protogeni.net/resources/rspec/0.1/request.xsd"
type="request" >
<node virtual_id="my-node"
virtualization_type="emulab-vnode"
exclusive="1"
tarfiles="/local http://www.protogeni.net/example.tar.gz"
startup_command="/bin/echo Example Text Here > /local/example.txt; /bin/cat /local/example/text.txt >> /local/example.txt">
<node_type type_name="pc" type_slots="1"/>
<interface virtual_id="control"/>
</node>
</rspec>
The above request is suitable for asking a component manager for a single node. The component manager will uncompress the file at "http://www.protogeni.net/example.tar.gz" into the path "/local" on the node and then execute a simple shell program on that node.
Note that "http://www.protogeni.net/example.tar.gz" doesn't point to a valid file.
