7 Easy Steps to Install Software on Grid 

by Ilja Livenson (ilja at nicpb dot ee)
  1. Download and unpack archive containing templates and scripts for automated soft installation. 
  2. Start editing "templates/install.sh" file with your favorite editor. The script contains several bash functions that should be modified according to your needs. 
    1. publish_PROGNAME. Publishes corresponding tag in the information system once installation succeeds. Just skip it, the default should be good enough.
    2. install_PROGNAME. That's where you describe the installation process. The usual installation could be something like this:
      cd $VO_BALTICGRID_SW_DIR
      mkdir -p APPS/FUN/MY_USEFUL_PROGRAM-3.12
      cd APPS/FUN/MY_USEFUL_PROGRAM-3.12
      wget http://warez.eenet.ee/my_useful_program.tar.gz
      tar xvfz my_useful_program.tar.gz
      make

    3. cleanup_PROGNAME. Cleanup the temporary stuff you produced. Just to keep the system clean.
    4. test_PROGNAME. Write some validation script here. For instance run your program with some small input.
  3. Now it's time to generate submission scripts for all the job managers in the ce.list file (it's assumed that there's one job manager per host name). For instance you could do something like this:
    > ./generate.pl -h
    Generate install.jdl for each job-manager

    usage: ./generate.pl [-h] [-p name] [-v VO] [-t tag]
     -h        : this help message
     -p name   : program name
     -v VO     : VO name
     -t tag    : information system tag

    > ./generate.pl -p MY_USEFUL_PROGRAM -v balticgrid -t 
    APPS/FUN/MY_USEFUL_PROGRAM-3.1
  4. NB! The tag in this case is a shortened tag, i.e. APPS/FUN/MY_USEFUL_PROGRAM-3.1, not the VO-balticgrid-APPS/FUN/MY_USEFUL_PROGRAM-3.1. The latter is derived automatically.

  5. We are almost there :) Now generate a proxy with a VOMS extension to prove that you have the corresponding role (lcgadmin in our case)...
    > voms-proxy-init -voms balticgrid:/Role=lcgadmin

  6. ... and run submission script specifying the name of the program and the output file where the job ids will be saved:
    > ./submit.sh  -p  MY_USEFUL_PROGNAME  -o  mup_ids

  7. Now it's the best time to go drink a cup of coffee (maybe even two). Afterwards just check the statuses of the jobs (should everything go well they should all succeed).
    > edg-job-get-status  -i  mup_ids

  8. You could also check whether the tags are published correctly and are available from the information system.
    > lcg-infosites --vo balticgrid tag

Hint #1: To do a massive uninstallation just change --add to --remove in the publish_PROGNAME function, delete all the necessary things and make sure test_PROGNAME doesn't run/doesn't fail.

Hint #2: To limit your jobs only to the sites where the needed software is installed you could add the following line to your JDL:

Requirements = Member("VO-balticgrid-APPS/FUN/MY_USEFUL_PROGRAM-3.1", other.GlueHostApplicationSoftwareRunTimeEnvironment);

Hint #3: In order to provide information to the other possible users of your application, please, set up a page describing how to run the program, sample job, etc. You can get inspiration from http://www.csc.fi/grid/rer/.