The GPIR providers are responsible for getting data about resources and putting it into XML format, and ingesting the data into GPIR. There are two categories of providers: central and remote. Central providers can be run on any server, including the GridPort server. Remote providers need to be installed and deployed on all end resources that will be monitored by GPIR. Sample providers that gather different types of data (e.g. jobs, load, motd) for two three different resource managers (LSF, PBS, LoadLeveler, Condor) are included in the GridPort distribution.
In order to install the remote GPIR providers, please carry out the following steps:
> cd gpir-<version>/src
> tar cvfz providers.tar.gz providers/
> scp providers.tar.gz provideruser@myremotehost.edu:~/.
> ssh provideruser@myremotehost.edu
> tar xvfz providers.tar.gz
$HOME/.profile file
(the provider runs as an sh shell command via cron).
providers/perl/soap. In
the same directory, there is also a simple shell script
that will install the bundle. Make sure to execute this
script from the providers/perl/soap directory.
(Note: you may need to modify the script to account for
various resources' tar commands.)
# as provideruser on the remote resource
> cd ~/providers/perl/soap
> ./install.soap.sh
> cd ~/providers/perl/lsf_showq
> ./install.sh
perl-providers/perl/conf/providers.conf. These
parameters include hostname, GPIR servers (and ports),
administrator email addresses, and resource manager specification.
The following configuration utilizes the sample data gathering
modules that interact with a PBS resource manager. If your resource
utilizes a different resource manager, please point the module
paths to the appropriate data gathering module for that resource
manager (see the providers/src/modules directory
for a full list of the example modules provided). For more
details on the configuration parameters, see the documentation
in the configuration file.
# as provideruser on the remote resource
> vi ~/providers/perl/conf/providers.conf
...
### RESOURCE INFO
hostname=myremotehost.edu
### MODULE PATHS
motd.module=../modules/motd.pl
load.module=../modules/jobs.pbs.pl
jobs.module=../modules/load.pbs.pl
jobs.condor.module=<path-to-load-module>
pcgrid.condor.module=<path-to-load-module>
### CONDOR INFO
central.manager=centralmanager.edu
pool.name=<pool-name>
pool.description=<pool-description>
pool.state=<enabled || disabled>
### GPIR INFO
gpir.contact=gpirserver.edu:8080
### ADMIN INFO
admin.email=portaladmin@myorg.edu
providers/perl/src/core directory, run the provider's
main.pl script with the appropriate arguments.
It is a good idea to first test the providers without ingesting
the data to GPIR (by passing the -n command-line
parameter to main.pl).
main.pl
script to ingest the data will not work. However, it is
still useful to test proper data gathering and xml formatting
without ingesting to GPIR.
# as provideruser on the remote resource
> cd ~/providers/perl/src/core
> ./main.pl
Usage: ./main.pl -f <function> [-d] [-n]
<function> = motd | jobs | load | nodes
[-d] = print debug info
[-n] = do not ingest data in GPIR
### first test without ingesting
> ./main.pl -f motd -d -n
> ./main.pl -f load -d -n
> ./main.pl -f jobs -d -n
> ./main.pl -f jobs.condor -d -n
> ./main.pl -f pcgrid.condor -d -n
### then test with ingesting
> cd ~/providers/perl
> ./run.sh motd
> ./run.sh load
> ./run.sh jobs
> ./run.sh jobs.condor
> ./run.sh pcgrid.condor
providers/perl/cron directory.
The sample entries gather motd information every half
hour and gather load and jobs information every fifteen
minutes. The sample entries also specify that the output
and error of the provider execution be written to files
in the providers/perl/logs directory.
# as provideruser on the remote resource
> crontab ~/providers/perl/cron/compute.crontab
The remote GPIR providers are architected to separate the various responsibilities they carry out into modular scripts. The tasks carried out can be listed as follows:
Step 1, the gathering of resource data, is encapsulated in the perl scripts
in the providers/perl/src/modules directory. The provider's
infrastructure code will execute these scripts, and will take the resulting
output produced by the scripts and pass it to the xml formatting code in
providers/perl/src/xml_formatters. Thus, if you wish to
include a customized data gathering mechanism for your resource, simply
create an executable script (in the programming language of your choice)
that gathers the data and writes it to STDOUT in the expected format of
for the particular function (i.e. motd, load, jobs).
The existing xml formatters expect a well-defined format to be written to STDOUT. A description of the format for each supported function follows:
providers/perl/src/xml_formatters/jobs.pl script.
The remote provider is separated into three groups of functionality: core, modules, and xml formatters. The core scripts are responsible for the provider's configuration, main logic, and GPIR web service interaction. The modules are responsible for gathering a specific type of data about the resource. The xml formatters convert data obtained by the modules into a format that the GPIR web service expects. In order to use the remote provider to gather another type of information from the resource, please do the following:
providers/perl/src/modules
directory and follow the following naming convention:
<function>.<resource_manager>.pl
providers/perl/src/xml_formatters
directory and follow the following naming convention:
<function>.pl
providers/perl/src/core/config.pl.
Simply add the function to the VALID_FUNCTIONS list (line 3).
# as provideruser on the remote resource
vi ~/providers/perl/src/core/config.pl
...
# line 3
@VALID_FUNCTIONS = ('motd', 'jobs', 'jobs.condor', 'load', 'pcgrid.condor', 'nodes');
-f
flag when executing the providers/perl/src/core/main.pl script.