Relocation instructions for the NorduGrid middleware 
====================================================


These instructions cover only the binary 'runtime external software'
and middleware relocation. It is your task to figure out how to build
the software if some of build dependencies are installed in an unusual
location.

The info here is relevant only to binary packages downloaded from the
NorduGrid download area. NorduGrid offers binary RPMs and binary
tarballs.  The latter are the gzipped tarballs created by stripping
RPM information from RPMs. 

Installation of a binary package from an RPM with 'rpm -ivh ..'
(without relocation) or unpacking a binary tarball will normally
result in the same installation tree for all BUT one package: the
Globus RPM is an exception. It relies on a post-install script which
is executed during Globus RPM install but naturally can not be
executed by simple tarball unpacking. This Globus post-install script
has to be run manually if you install Globus from the tarball:

> $GLOBUS_LOCATION/setup/globus-post-install-script $GLOBUS_LOCATION

Relocation can be done by using the 

> rpm -ivh --relocate <olddir>=<newdir>

or by simple unpacking and moving the directories to the desired new
locations.

IMPORTANT: Relocating a package implies configuration changes:
nordugrid.conf, globus.conf and /etc/sysconfig/{nordugrid,globus}
files have to be modified accordingly, as they assume default
locations!!!

What follows is package-by-package instructions on relocation.


Quick summary
-------------

If you relocate packages or configuration files, you will have
to adjust the following environment variables in two system 
configuration files:

In /etc/sysconfig/globus:

   GPT_LOCATION=/new/gpt-path
   GLOBUS_LOCATION=/new/globus-path
   GRID_FUNCTIONS=/new/gridfunctions-path
   GLOBUS_CONFIG=/new/etc-path/globus.conf
   
In /etc/sysconfig/nordugrid:

   VOMS_LOCATION=/new/voms-path
   NORDUGRID_LOCATION=/new/nordugrid-path
   NORDUGRID_CONFIG=/new/etc-path/nordugrid.conf
   
Also, certain modifications to /etc/nordugrid.conf and
/etc/globus.conf must be applied (relocatable themselves, see next
section). Details are described below.


Configuration files
-------------------

-- nordugrid.conf --

The default file is /etc/nordugrid.conf, can be relocated, and an
environment variable NORDUGRID_CONFIG=/new/etc-path/nordugrid.conf
must be set in /etc/sysconfig/nordugrid

-- globus.conf --

The default file is /etc/globus.conf, can be relocated, and an
environment variable GLOBUS_CONFIG=/new/etc-path/globus.conf must be set in
/etc/sysconfig/globus

-- nordugridmap.conf --

(from the nordugrid-gridmap-utils package)

Default is /etc/grid-security/nordugridmap.conf, can be relocated, and
the cron.d entry has to be edited manually (see bug #325)

-- /etc/cron.d/nordugridmap.cron

(from the nordugrid-gridmap-utils package)

This file is formatted according to the format described in crontab(5).

If /opt/nordugrid is relocated this file should be modified accordingly.

-- /etc/cron.d/grid-update-crls.cron

(from the nordugrid-ca-utils package)

This file is formatted according to the format described in crontab(5).

If /opt/nordugrid is relocated this file should be modified accordingly.



External software (runtime dependency)
--------------------------------------

-- GPT --

GPT installs into two directories:  

 /opt/gpt
 /etc/profile.d/

Both can be relocated. Relocating /opt/gpt requires the
GPT_LOCATION=/new/gpt-path environment variable to be set in
/etc/sysconfig/globus. Relocation of the GPT profile files from
/etc/profile.d/ is transparent.

-- Globus --

Globus installs into a single diretory: 

  /opt/globus 

which is relocatable. Moving Globus to a new directory requires the
GLOBUS_LOCATION=/new/globus-path environment variable to be set in
/etc/sysconfig/globus.

-- globus-config --

Note: is on its way out of ARC

globus-config installs into three directories:

  /opt/globus
  /etc/profile.d/
  /etc/rc.d/init.d/ 

ARC does not use anything from /opt/globus, hence it can be relocated
anywhere or even completely removed. The profile files in
/etc/profile.d/ (relocatable) are not used by ARC either (the ARC
profile files take care of the settings instead). The
/etc/rc.d/init.d/ is relocatable, ARC makes use of two files from that
directory: globus-mds startup script and the grid-functions file.
GRID_FUNCTIONS=/new/gridfunctions-path environment variable has to be
set in /etc/sysconfig/globus if the /etc/rc.d/init.d/ is relocated.

-- voms --

voms installs into a single root path /opt/voms, which is relocatable.
Set the VOMS_LOCATION=/new/voms-path environment variable in
/etc/sysconfig/nordugrid in this case.

-- libxml --

libxml is a standard package of any Linux distribution, and does not
need any special treatment in the ARC


ARC binary packages
-------------------

-- nordugrid-server--

The server installs into two directories: 

  /etc/init.d/
  /opt/nordugrid/

Relocating /opt/nordugrid requires the specification of
NORDUGRID_LOCATION=/new/nordugrid-path in /etc/sysconfig/nordugrid.
Modify the 'pluginpath' in [gridftpd] block of /etc/nordugrid.conf as
well (the default value is OK).  The 'provider_path' of the [mds]
block in /etc/globus.conf needs to be checked too.  Relocating the
startup scripts from the /etc/init.d/ requires the setting of
GRID_FUNCTIONS=/new/gridfunctions-path in /etc/sysconfig/globus.
There is an open issue with the infoprovider scripts
(NORDUGRID_LOCATION from the /etc/sysconfig/nordugrid is not propagated to
them by the globus-mds script, #117), a workaround is to manually
export the NORDUGRID_LOCATION before starting up the globus-mds.

-- nordugrid-devel --

The devel package installs under

  /opt/nordugrid

Relocation requires the NORDUGRID_LOCATION=/new/nordugrid-path to be
set in /etc/sysconfig/nordugrid.

-- nordugrid-client --

The client files are installed under 

  /opt/nordugrid/
  /etc/profile.d/

The /opt/nordugrid is relocatable, don't forget to set the
NORDUGRID_LOCATION=/new/nordugrid-path in /etc/sysconfig/nordugrid.
The profile files from /etc/profile.d can be relocated as well.

-- nordugrid-doc --

Extra documentation is installed under 

  /opt/nordugrid/share/doc/

It can be transparently moved anywhere.

-- nordugrid-ca-utils --

Relocation of the CRL utilities from /opt/nordugrid/
has some problems, see bug #323

-- nordugrid-gridmap-utils --

Relocation of the nordugridmap script (grid-mapfile generator)
has some problems, see bug #325

