GridBank Installation Instructions

 

DOWNLOAD SOURCE CODE

 

IMPLEMENTATION DETAILS

 

 

Pre-requisites: Please make sure you follow instructions in strict order. Copy GridBank code to any installation directory. Make sure GLOBUS_LOCATION environment variable points to location where your Globus Toolkit is installed (requires globus server bundle version 2 or later).

 

 

1) Set up Globus Toolkit for use with GridBank.

 

First, generate header files and libraries of Globus I/O Module:

 

$GLOBUS_LOCATION/sbin/globus-makefile-header -flavor=gcc32dbg globus_io

 

Note: run the above command with the same flavor that you used when installing Globus Toolkit

 

Second, modify file called globus_job_manager.c (this link is for version 2.0) in directory $GLOBUS_LOCATION/BUILD/globus_gram_job_manager-2.1. If you have different version of Globus, then just copy and paste resource usage code (search for "GRIDBANK MODIFICATION" keywords). Then execute in the same directory:

 

make

make install

 

This modification to Globus Toolkit will write job requests file and resource usage files to /tmp directory after job(s) finished executing. GridBank Charging Module operation depends on this file. The name of the file is the client's certificate name (with all '/' replaced by '_') followed by .rur extension.

 

Run Globus normally (e.g. globus-job-run) to make sure the resource usage file is generated.

 

2) GridBank code assumes that you have MySQL installed in /usr directory (requires /usr/include/mysql and /usr/lib/mysql in order to compile as is; you can have MySQL installed in another directory, but you'd have to change Makefile in gridbank/server/protocols to point to the right directory). If you don't have MySQL installed, a tar archive is included (from mysql web site). Untar it, follow installation instructions in /Docs/manual.html section 2.3, and run ./configure --prefix=/usr (to install the database in /usr).

 

3) Compile soapcpp and xerces-c libraries that come with GridBank (see instructions inside directories).

 

4) Create file in /etc/grid-security called "template-accounts":

 

Open the file and add local (system) account names (see section 2.3 of my GridBank article for explanation of template accounts). Each account name must by followed by new line character (just like in grid-mapfile).

 

5) Create GridBank database by executing following commands (partial paths are given):

 

Replace "globus_location" variable in all subdirectories of gridbank with the path to your Globus installation (i.e. GLOBUS_LOCATION).

 

cd gridbank/server/accounting

mv Makefile MakefileNormal

mv MakefileCreateDB Makefile

make

su

./createdb -admin <Administrator Certificate Name> -bank <bank number> -branch <branch number>

exit

mv Makefile MakefileCreateDB

mv MakefileNormal Makefile

rm createdb

rm *.o

 

Note: this assumes that MySQL server is running as root and must have root-only access (for security reasons). <Administrator Certificate Name> is the (Globus) X509v3 Certificate Subject Name of the initial administrator who can create other administrators and perform account management operations (i.e. open account, deposit, withdraw, etc.). <bank number> is usually "1" for GridBank, and <branch number> is the number of your GridBank branch and has to be unique. GridBank account numbers consists of the following: 2 digits for bank number, 4 digits for branch number, and 8 digits for account number. E.g. 01-0001-00000001. The branch number has to be unique. So each GridBank branch is identified by the first 6 digits, e.g. 01-0001. So to create database for branch 01-0012 you need to execute

 

./createdb -admin "bla bla" -bank 1 -branch 12

 

6) Replace "globus_location" variable in all Makefiles in all subdirectories (ie. gb_io, server, gbpm, gbcm) with the path to your Globus installation (i.e. the value of $GLOBUS_LOCATION).

 

7) Compile GridBank Server:

 

cd gridbank/server

 

Make sure to replace "globus_location" variable in Makefiles in all subdirectories with the path to your Globus installation.

 

sh install (or csh install depending on your shell)

 

This should create 'gbserver' executable in gridbank/server directory. Run 'gbserver' as root:

 

su

./gbserver -dbname gridbank<bank no.>_<branch no.>

 

Server is started by specifying the name of the database. For example, if your branch is 01-0012, then execute

./gbserver -dbname gridbank1_12

 

 

8)Compile GridBank Charging Module:

 

cd gridbank/gbcm

 

Note: make sure to replace "globus_location" variable in Makefiles in all subdirectories with path to your Globus installation.

 

sh install (or csh install depending on your shell)

 

Make sure that 'gbcm.conf' file contains the right configuration parameters.

The first parameter, "gbcm tcp port", is the port number to run GridBank Charging Module server. The default is set to 3000. That's what the GridBank Payment Module expects, but can be reconfigured. If you change this parameter, you also need to change "default gbcm port" parameter in gridbank/gbpm directory as well.

"charging enabled" is either 0 or some other integer (usually 1). Value 0 disables charging, and will only report resource usage.

"gb server address" specifies the URL of the GridBank server. Note that by default server runs on port 2500.

The rest of parameters specify hardware characteristics of the resource. The parameters and their corresponding values are self-explanatory (and should be taken from hardware specs).

 

This should create 'gbcm' executable in the same directory. Run 'gbcm' as root:

 

su

./gbcm

 

 

9) Compile GridBank Payment Module:

 

cd gridbank/gbpm

 

Note: make sure to replace "globus_location" variable in Makefiles in all subdirectories with path to your Globus installation.

 

sh install (or csh install depending on your shell)

 

This should create 'gb-pre-pay' executable in gridbank/gbpm directory. Use this command to pre-pay for the resource (i.e. to set up a local account) and then use Globus commands normally to submit job(s).

 

E.g. to run /bin/date command on machine 'somehost', execute:

 

./gb-pre-pay -amount 1.2 -destacc 01-0001-00000002 somehost.csse.uwa.edu.au (Make sure you run $GLOBUS_LOCATION/bin/grid-proxy-init first)

 

$GLOBUS_LOCATION/bin/globus-job-run somehost.csse.uwa.edu.au /bin/date

 

Don't forget to set up your 'gbpm.conf' file.

"account" is the GridBank account number of the client. Each client obtains an account by asking administrator to create one for them. When administrator opens a new account, account number is returned and must be saved as this parameter.

"gb server address" is the URL of the GridBank server.

"default gbcm port" is the port number that GridBank Charging Module runs on. By default, it's 3000.

 

 

10) There is a GUI which you can run:

 

java GBClient

 

Make sure that you have 'libgbapi.so' located in gridbank/gbpm directory in your environment. You can set up LD_LIBRARY_PATH environment to point to this lib.

 

Also make sure you run $GLOBUS_LOCATION/bin/grid-proxy-init first.

 

The GUI allows GridBank clients (users) to request account statements. It allows administrators to create other administrators, open and close accounts, deposit and withdraw. The deposit and withdraw operations are the means by which currency is created in the GridBank. The amount of currency that should be created must correspond to resource reservations. This area is under research.

 

 

If you have further questions please email me.

 

 

 

LAST UPDATED 18/08/2003