Under example1 directory you find the following files:
-rw-r--r-- 1 tomcat4 tomcat4 818 Nov 14 10:25 description
-rw-r--r-- 1 tomcat4 tomcat4 254 Nov 11 10:34 example1.in
-rw-r--r-- 1 tomcat4 tomcat4 992 Nov 13 11:06 example1.script
-rw-r--r-- 1 tomcat4 tomcat4 3203 Nov 11 09:41 example1.xyz
-rw-r--r-- 1 tomcat4 tomcat4 2606 Nov 13 04:10 input-files.xml
-rw-r--r-- 1 tomcat4 tomcat4 3567 Nov 13 11:23 output-files.xml
-rw-r--r-- 1 tomcat4 tomcat4 2513 Nov 17 08:18 status.xml
status.xml -- describes all stages of running
a job. Again, this is a template and it contains tags which need to be
replaced. The execution is always controlled from the Web server. In our
case, we can execute local commands on the Web Server machine, and the remote
commands via
ssh. But we could use the
globus-job-* and the
globus-sh-exec commands to access remote hosts.
The messages from the batch script described on the previous slide trigger
actions listed in the
status.xml file listed below.
The file contains actuall shell commands. Note that shell commands could
execute other programs or utilities either locally or on
remote systems (e.g., file format conversion filters,
storing files on mass store, starting another job/application, etc.)
if needed. While this is only a proof of concept, this file represents
our
XMLet ({:-)}). It represents a self contained
unit of execution with all needed information how to conduct itself.
<status>
<applicationName>Wilkins Code</applicationName>
<fileVersion>1.0</fileVersion>
<event name="CreateRemoteRunDirectory">
<eventPassword>@@**PASSWORD1**@@</eventPassword>
<eventTimestamp>none</eventTimestamp>
<eventType>COMMAND_ON_WEB_SERVER</eventType>
<eventCommand>ssh -l @@**REMOTE_USER**@@ @@**REMOTE_MACHINE**@@ \
mkdir -p @@**REMOTE_TOP_DIR**@@/@@**USER_NAME**@@/@@**PROJECT_NAME**@@</eventCommand>
<eventMessage>none</eventMessage>
</event>
<event name="CopyFilesToBackend">
<eventPassword>@@**PASSWORD2**@@</eventPassword>
<eventTimestamp>none</eventTimestamp>
<eventType>COMMAND_ON_WEB_SERVER</eventType>
<eventCommand>scp -pAv\
@@**USERS_TOP_DIR**@@/@@**USER_NAME**@@/@@**PROJECT_NAME**@@/\
@@**PROJECT_NAME**@@.* @@**REMOTE_USER**@@@@@**REMOTE_MACHINE**@@:\
@@**REMOTE_TOP_DIR**@@/@@**USER_NAME**@@/@@**PROJECT_NAME**@@</eventCommand>
<eventMessage>none</eventMessage>
</event>
<event name="SubmitJob">
<eventPassword>@@**PASSWORD3**@@</eventPassword>
<eventTimestamp>none</eventTimestamp>
<eventType>COMMAND_ON_WEB_SERVER</eventType>
<eventCommand>ssh -l @@**REMOTE_USER**@@ \
@@**REMOTE_MACHINE**@@ '( cd @@**REMOTE_TOP_DIR**@@/@@**USER_NAME**@@/\
@@**PROJECT_NAME**@@; /usr/local/pbs/bin/qsub @@**PROJECT_NAME**@@.script )'</eventCommand>
<eventMessage>none</eventMessage>
</event>
<event name="JobStarted">
<eventPassword>@@**PASSWORD4**@@</eventPassword>
<eventTimestamp>none</eventTimestamp>
<eventType>COMMAND_ON_WEB_SERVER</eventType>
<eventCommand>ssh -l @@**REMOTE_USER**@@ @@**REMOTE_MACHINE**@@ \
'/usr/local/pbs/bin/qstat -a | grep @@**PROJECT_NAME**@@'</eventCommand>
<eventMessage>none</eventMessage>
</event>
<event name="CopyOutputFiles">
<eventPassword>@@**PASSWORD5**@@</eventPassword>
<eventTimestamp>none</eventTimestamp>
<eventType>COMMAND_ON_WEB_SERVER</eventType>
<eventCommand>/usr/bin/batch <<EOF
sleep 5
/usr/local/bin/scp -pAvr '@@**REMOTE_USER**@@@@@**REMOTE_MACHINE**@@:\
@@**REMOTE_TOP_DIR**@@/@@**USER_NAME**@@/@@**PROJECT_NAME**@@/*' \
@@**USERS_TOP_DIR**@@/@@**USER_NAME**@@/@@**PROJECT_NAME**@@
EOF
</eventCommand>
<eventMessage>none</eventMessage>
</event>
<event name="JobFinished">
<eventPassword>@@**PASSWORD6**@@</eventPassword>
<eventTimestamp>none</eventTimestamp>
<eventType>NO_ACTION</eventType>
<eventCommand>none</eventCommand>
<eventMessage>none</eventMessage>
</event>
</status>