Changes between Version 20 and Version 21 of DICLOUD/GEC12tutorial


Ignore:
Timestamp:
10/18/11 13:40:18 (13 years ago)
Author:
David Irwin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DICLOUD/GEC12tutorial

    v20 v21  
    303303
    304304=== Application Description: simple.xml ===
     305
     306simple.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."
     307
     308{{{
     309<?xml version="1.0" encoding="utf-8"?>
     310<gush>
     311  <project name="simple">
     312    <software name="SimpleSoftwareName" type="none">
     313      <package name="Package" type="web">
     314        <path>http://localhost/software.tar</path>   //Software tarball
     315        <dest_path>software.tar</dest_path>
     316      </package>
     317    </software>
     318    <component name="Cluster1">
     319      <rspec>
     320        <num_hosts>2</num_hosts>                                           //Number of remote clients
     321      </rspec>
     322      <software name="SimpleSoftwareName" />
     323      <resources>
     324        <resource type="ssh" group="local"/>
     325      </resources>
     326    </component>
     327    <experiment name="simple">
     328      <execution>
     329        <component_block name="cb1">
     330          <component name="Cluster1" />
     331          <process_block name="p2"> 
     332            <process name="cat">                                        //Define actual execution
     333              <path>cat</path>                                          //"cat software.txt"
     334              <cmdline>                 
     335                <arg>software.txt</arg>
     336              </cmdline>
     337              <cwd/>
     338            </process>
     339          </process_block>
     340        </component_block>
     341      </execution>
     342    </experiment>
     343  </project>
     344</gush>
     345}}}
     346
     347=== Environment Configuration: directory.xml ===
     348
     349directory.xml defines the Gush resource directory. This file tells the Gush default matcher where to locate resources during execution. In the following example, we specify PlanetLab slices available to us, and define a mapping between slice names and port numbers.
     350
     351{{{
     352<?xml version="1.0" encoding="UTF-8"?>
     353<gush>
     354    <resource_manager type="ssh">
     355        <node hostname="amazon.machine.ip:15400" user="root" group="local" />
     356    </resource_manager>
     357    <resource_manager type="ssh">
     358        <node hostname="amazon.machine.ip:15400" user="root" group="local" />
     359    </resource_manager>
     360</gush>
     361}}}
     362
     363=== Gush Preferences: gush.prefs ===
     364
     365The gush.prefs file defines basic preferences that customize the way applications are run. In this example we specify the ClientPrefix and ClientPath which control how the client is started ({ClientPrefix}/client) and what working directory the client uses when executing commands (chdir {ClientPath}). We can leave UsePlanetLab set to true even though we aren't using PlanetLab in this example.
     366
     367{{{
     368<preferences>
     369  <pref key="ClientPrefix">./</pref>
     370  <pref key="ClientPath">./</pref>
     371  <pref key="UsePlanetLab">true</pref>
     372</preferences>
     373}}}
     374
     375=== Start Gush ===
     376
     377Now 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>".
     378
     379{{{
     380$ ./gush -P 15000
     381gush>
     382gush> info nodes
     383There are 2 known nodes:
     384[   U       ] root@amazon.machine.ip:15400(pref=0) (Disconnected.)
     385[   U       ] root@amazon.machine2.ip:15400(pref=0) (Disconnected.)
     386gush>
     387gush> load tests/simple-ssh.xml
     388Project "simple" is selected.
     389Experiment "simple" is selected.
     390gush>
     391gush> run
     392Starting experiment run.
     393Running experiment simple...
     394gush> The configuration matcher has finished matching.
     395The resource allocator has finished successfully.
     396root@amazon.machine.ip:15400 has joined the mesh.
     397The file transfer of Package to amazon.machine.ip has been completed.
     398The software installation of Package on amazon.machine.ip was successful.
     399root@amazon.machine2.ip:15400 has joined the mesh.
     400The file transfer of Package to amazon.machine2.ip has been completed.
     401The software installation of Package on amazon.machine2.ip was successful.
     402root@amazon.machine2.ip:15400,26347: Hello World
     403
     404jeannie@machine2.cs.williams.edu:15400,18302: Hello World
     405
     406The experiment has ended.
     407
     408gush> disconnect
     409gush> geni@amazon.machine.ip:15400 has decided to leave the mesh.
     410geni@amazon.machine.ip:15400 has decided to leave the mesh.
     411
     412gush> quit
     413}}}