Home | About Gush | Using Gush | Gush Examples | Gush Tutorial at GEC 11 | GENI Summer Camp
A Stork/Raven Example
Now we will walk through a simple example that shows how Gush can use Stork/Raven to install software as part of a trivial experiment on PlanetLab. (Note that you must have stork enabled in your slice before starting this example.) This example will install vim-enhanced using stork, copy a software tarball to 2 PlanetLab hosts, untar it, and then cat the file included. This simple application goes over the basic building blocks needed to manage applications using Gush.
The following files are needed to run this application and are described below. They must be modified slightly (look for machine names and user names) to run on your machines.
- stork.xml
- directory.xml (please check out SimpleExample for details)
- gush.prefs (please check out SimpleExample details)
- software.tar (includes software.txt, which consists of 1 line of text that says "Hello World", please check out SimpleExample for details)
Application Description: stork.xml
stork.xml is a Gush application description file. At the highest level, we define the project, which in this case is called "simple." Next we define any software packages that are needed. Gush application descriptions are comprised of different types of "blocks."
<?xml version="1.0" encoding="utf-8"?>
<gush>
<project name="simple">
<software name="SimpleSoftwareName" type="none">
<package name="Package" type="web">
<path>http://sysnet.cs.williams.edu/~jeannie/software.tar</path> //Software tarball
<dest_path>software.tar</dest_path>
</package>
</software>
<software name="SimpleSoftwareName2" type="stork">
<package name="vim-enhanced" type="stork" />
</software>
<component name="Cluster1">
<rspec>
<num_hosts>2</num_hosts> //Number of remote clients
</rspec>
<software name="SimpleSoftwareName" />
<software name="SimpleSoftwareName2" />
<resources>
<resource type="geni-plc" group="williams_gush"/>
</resources>
</component>
<experiment name="simple">
<execution>
<component_block name="cb1">
<component name="Cluster1" />
<process_block name="p2">
<process name="cat"> //Define actual execution
<path>cat</path> //"cat software.txt"
<cmdline>
<arg>software.txt</arg>
</cmdline>
<cwd/>
</process>
</process_block>
</component_block>
</execution>
</experiment>
</project>
</gush>
Start Gush
Now we are ready to run our example. The following shows the output from a run using two clients. You only need to type the commands that appear after "gush>".
$ ./gush -P 15413 gush> Gush has learned about the slice williams_gush. gush> load stork.xml Project "simple" is selected. Experiment "simple" is selected. gush> run gush> gush> The configuration matcher has finished matching. The resource allocator has finished successfully. williams_gush@planetlab2.williams.edu:15413 has joined the mesh. williams_gush@planetlab2.williams.edu:15413,2008: WARNING: Unknown option: 'repositorypath' in /usr/local/stork/etc/stork.conf williams_gush@planetlab2.williams.edu:15413,2008: WARNING: Unknown option: 'bittorrentseedlookuptimeout' in /usr/local/stork/etc/stork.conf The file transfer of package to planetlab2.williams.edu has been completed. williams_gush@planetlab1.williams.edu:15413 has joined the mesh. The software installation of package on planetlab2.williams.edu was successful. williams_gush@planetlab2.williams.edu:15413,2008: Failed to import SFA libraries williams_gush@planetlab2.williams.edu:15413,2008: unable to find a tpfile file that starts with ['williams_gush'] williams_gush@planetlab2.williams.edu:15413,2008: williams_gush@planetlab2.williams.edu:15413,2008: reverting default filename: default.MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKgZCjfKDl9ISoclfBuZsQze6bXtu+QYF64TLQlI9fgEg2CDyGQVOsZ2CaX1ZEZ_O69AYZp8nj+YJLIJM3+W3DMCAwEAAQ.tpfile williams_gush@planetlab2.williams.edu:15413,2008: williams_gush@planetlab1.williams.edu:15413,17653: WARNING: Unknown option: 'repositorypath' in /usr/local/stork/etc/stork.conf WARNING: Unknown option: 'bittorrentseedlookuptimeout' in /usr/local/stork/etc/stork.conf The file transfer of package to planetlab1.williams.edu has been completed. The software installation of package on planetlab1.williams.edu was successful. williams_gush@planetlab2.williams.edu:15413,2008: Downloading: williams_gush@planetlab2.williams.edu:15413,2008: Retrieving gpm-1.20.1-89.fc8.i386.rpm with metahash=af14949077987749f9e033662a1e90cd912fd343, filehash=09744f40e3c9d9f68e20d50be8210a61737232c0 from http://archive.kernel.org/fedora-archive/fedora/linux/releases/8/Everything/i386/os/Packages/gpm-1.20.1-89.fc8.i386.rpm williams_gush@planetlab1.williams.edu:15413,17653: Waiting for stork to finish... williams_gush@planetlab2.williams.edu:15413,2008: Retrieving vim-common-7.1.245-1.fc8.i386.rpm with metahash=433aacb829536539c9cc7dbb671dfe101bdb8aae, filehash=fcf1588abae8726fde841f1366e1dc6da25744fc from http://archive.kernel.org/fedora-archive/fedora/linux/updates/8/i386.newkey/vim-common-7.1.245-1.fc8.i386.rpm williams_gush@planetlab1.williams.edu:15413,17653: Installed package(s) ['vim-enhanced-2:7.1.245-1.fc8'] already satisfies the requirement vim-enhanced williams_gush@planetlab1.williams.edu:15413,17653: williams_gush@planetlab1.williams.edu:15413,17653: Success [8] (already installed: 1) williams_gush@planetlab1.williams.edu:15413,17653: The software installation of vim-enhanced on planetlab1.williams.edu was successful. williams_gush@planetlab2.williams.edu:15413,2008: Retrieving vim-enhanced-7.1.245-1.fc8.i386.rpm with metahash=3fb122bd8d75f84de1cd0afdee9a88d0dc0600b3, filehash=8ee6208b9cbf83b2ff5a354c12cd0b58e92827a1 from http://archive.kernel.org/fedora-archive/fedora/linux/updates/8/i386.newkey/vim-enhanced-7.1.245-1.fc8.i386.rpm williams_gush@planetlab2.williams.edu:15413,2008: williams_gush@planetlab2.williams.edu:15413,2008: Transaction List: INSTALL /tmp/gpm-1.20.1-89.fc8.i386.rpm williams_gush@planetlab2.williams.edu:15413,2008: INSTALL /tmp/vim-common-7.1.245-1.fc8.i386.rpm INSTALL /tmp/vim-enhanced-7.1.245-1.fc8.i386.rpm Executing: williams_gush@planetlab2.williams.edu:15413,2008: Success [0] (installed: 3) The software installation of vim-enhanced on planetlab2.williams.edu was successful. williams_gush@planetlab2.williams.edu:15413,26627: Hello World williams_gush@planetlab1.williams.edu:15413,21509: Hello World The experiment has ended. gush> disconnect gush> quit

