DESCRIPTION
-----------
This package contains scripts for applications that are executed in the QCG
environment. Apart from the application launch, they:
- loads the appropriate modules,
- converts input files to UNIX character encoding,
- setup environment,
- can launch user's helper scripts - preprocess, postprocess, assistent,
- can monitor the execution of application through defined schemes or user
  scripts,
- handles interactive jobs,
- etc.

All files are installed in directory:

	/usr/share/qcg-appscripts

This directory contains following directories:
- apps - application configuration files,
- app-scripts - application scripts,
- config - QCG application scripts configuration,
- core - QCG scripts library,
- tools - QCG tools used by applications.

The administrator must edit application configuration files (apps) that
contains settings specific to each cluster, such as:
- name of the application module,
- environment variables needed by application.
Files from 'apps' directory should be referenced by QCG-Computing application
mapping file (/etc/qcg/qcg-comp/application_mapfile).

During QCG application script package upgrade, directory 'apps' ISN'T
overwrited.


The application scripts must be accessible by jobs running on cluster worker
nodes.  Thus directories 'apps', 'app-scripts', 'config', 'core' and 'tools'
must be copied to directory shared by all worker nodes. This is done by:

	/usr/sbin/qcg-appscripts-deploy

script included in the package. This script reads:

	/etc/qcg/qcg-comp/app-scripts/config

configuration file for destination directory, where scripts should deployed.


Please modify '/etc/qcg/qcg-comp/app-scripts/config' configuration file
according to cluster file system configuration and run 'qcg-appscripts-deploy'
command (as root) to deploy application scripts into final destination.


INSTALLATION
------------

1. edit '/etc/qcg/qcg-comp/app-scripts/config' configuration file and set
   'cluster_shared_path' variable to point to a directory shared by all worker
   nodes
2. launch 'qcg-appscripts-deploy' script
3. edit (create new) application configuration files in
   $cluster_shared_path/apps directory and refer to them in the QCG-Computing
   application mapping file (/etc/qcg/qcg-comp/application_mapfile)


UPGRAGE
-------
After instalation of new QCG application scripts package, deploy script
'qcg-appscripts-deploy' must be called to update files in shared directory.


NEW APPLICATION
---------------

To register new application in QCG-Computing following elements must exists:

- application configuraiton file in 'apps' subdirectory,
- application script file in 'app-scripts',
- entry in the QCG-Computing application mapping file.

The application configuration file can be based on already existed file, or
template file in '/usr/share/qcg-appscripts/apps/template.app' can be used.

From the application configuration file, the application script is called. Thus
apropriate script must exists in 'app-scripts' directory. These scripts are
created by QCG Team and distributed in the package.


NEW APPLICATION VERSION
-----------------------

To create new version of already supported application, it is sufficient to
copy already existing application configuration file (apps directory), change
module configuration and add new version to the application mapping file.


PL-GRID CLUSTER CONFIGURATION
-----------------------------

The distributed package contains application configuration files created for
each PL-Grid clusters. They are placed in directory:

	/usr/share/qcg-appscripts/sites

To use them, content of the cluster subdirectory should be copied to directory
specified in '/etc/qcg/qcg-comp/app-scripts/config' configuration file.
