Automating the Simple Experiment: Editing Rspecs
The first part of this second step is to understand the rspecs, specifically the request rspec. The GENI wiki talks about various types of Rspecs and points to resources that may be used to create your own (see link). Honestly, I did not find them useful as yet because it has too much information to be useful at this point. May be when I become a power user, I can make more sense out of those. I think, the best way to write and learn to write a Request Rspec is to actually read one that can be downloaded from your flack interface after you create your network graph. Take a look at the rspec that I got from the simple experiment along with the explanation of how I got it.
Now we need to see how to modify it. First, lets see how we can modify the Rspec so that the execution of our scripts on VM and VM-0 happens automatically on system boot up.
All we need to do is to add a “services” tag with three other tags in it to execute a chmod command to make our script executable, then to execute the script and finally to download the script on to the nodes. This is done by adding the following within the tags for VM and VM-0
<services>
<execute command=”sudo chmod +x /local/client_script.sh” shell=”sh”/>
<execute command=”sudo /local/client_script.sh” shell=”sh”/>
<install install_path=”/local” url=”http:///theurl.com/client_install.tar.gz”/>
</services>
<services>
<execute command=”sudo chmod +x /local/server_script.sh” shell=”sh”/>
<execute command=”sudo /local/server_script.sh” shell=”sh”/>
<install install_path=”/local” url=”http:///theurl.com/server_install.tar.gz”/>
</services>
If you read the services tag carefully, you will see that I need a client_script.sh and a server_script.sh that I am going to execute on the nodes. These files are contained in client_install.tar.gz and server_install.tar.gz respectively. The only way to get them on the nodes on GENI is to download from a web server. This means you need to have a webserver where you can freely keep your files so that GENI resources can see them.
The final Request rspec can be found here.