Version 3.0.0 of the QCG-Computing service introduced some major changes in files and configuration layout, namely:
* the layout of the directories adheres now general packages guidances, i.e. service is not installed anymore in `/opt/plgrid` but in standard paths (whit a few minor exceptions):
* configuration is now stored in `/etc/qcg/qcg-comp/`,
* logs can be found in `/var/log/qcg/qcg-comp/`,
* the service and client binaries can be found in `/usr/sbin/` and `/usr/bin` respectively.
* the 5.X Globus packages from EPEL/IGE repository are used (instead of providing it qcg-dep packaged),
* the service can use the host certificate and key from standard location (i.e. /etc/grid-security),
* the service can listen on standard 443 (HTTPs port),
* optional integration with [[VOMSIntegration|VOMS infrastructure]].
This guide aims to help with migration from 2.X version.
= Step 0 - Do a backup of configuration files =
{{{
cp -r /opt/plgrid/qcg/etc/ /opt/plgrid/qcg/etc.backup
cp -r /opt/plgrid/var/run/qcg-acc/ /opt/plgrid/var/run/qcg-acc.backup
}}}
= Stop the services =
{{{
/etc/init.d/qcg-compd stop
killall -9 qcg-compd
/etc/init.d/qcg-ntfd stop
}}}
= Install EPEL repository (needed for VOMS libraries) =
{{{
yum install epel-release
}}}
= Update the qcg-comp packges =
{{{
yum clean all
yum update qcg-comp qcg-comp-client qcg-comp-logrotate qcg-gridmapfilegenerator
}}}
= Update database schema =
{{{
psql qcg-comp qcg-comp -h localhost -f /usr/share/qcg-comp/db/qcg-comp-migrate-2.X-to-3.0-psql.sql
}}}
where `qcg-comp` and `qcg-comp` is the name of the QCG-Computing database and database user (look into `qcg-compd.xml` for reference).
= Update GridFTP to Globus 5.X =
1. Remove the old packages:
{{{
yum erase qcg-dep qcg-dep-gridftp-server
}}}
2. Install new one using this [[GridFTPInstallation|instruction]] as reference.
= Update configuration file =
Upon update the old configuration files should be stored as `.rpmsave files`. Instead of configuring the service from scratch its easier to copy old configuration files and modify just paths in order to adjust to the new directory layout:
* archive and copy
{{{
#save dist file for reference
cp /etc/qcg/qcg-comp/qcg-compd.xml /etc/qcg/qcg-comp/qcg-compd.xml.dist
cp /etc/qcg/qcg-comp/qcg-comp.xml /etc/qcg/qcg-comp/qcg-comp.xml.dist
#copy old configuration files
cp /opt/plgrid/qcg/etc/qcg-comp/qcg-compd.xml.rpmsave /etc/qcg/qcg-comp/qcg-compd.xml
cp /opt/plgrid/qcg/etc/qcg-comp/qcg-comp.xml.rpmsave /etc/qcg/qcg-comp/qcg-comp.xml
cp /opt/plgrid/qcg/etc/qcg-comp/application_mapfile.rpmsave /etc/qcg/qcg-comp/application_mapfile
cp /opt/plgrid/qcg/etc/qcg-comp/sysconfig/qcg-compd.rpmsave /etc/sysconfig/qcg-compd
cp /opt/plgrid/qcg/etc/qcg-comp/plggridmapfilegenerator.conf.rpmsave /etc/qcg/qcg-gridmapfile/plggridmapfilegenerator.conf
}}}
* modify /etc/qcg/qcg-comp/qcg-comp**d**.xml by replacing:
{{{
/opt/plgrid/qcg/lib/qcg-core/modules/
/opt/plgrid/qcg/lib/qcg-comp/modules/
...
/opt/plgrid/var/log/qcg-comp/qcg-compd.log
INFO
...
/opt/plgrid/qcg/etc/qcg-comp/certs/qcgcert.pem
/opt/plgrid/qcg/etc/qcg-comp/certs/qcgkey.pem
...
/opt/plgrid/qcg/etc/qcg-comp/application_mapfile
...
}}}
* with:
{{{
/usr/lib64/qcg-core/modules/
/usr/lib64/qcg-comp/modules/
...
/var/log/qcg/qcg-comp/
/var/log/qcg/qcg-comp/qcg-compd.log
INFO
...
/etc/grid-security/hostcert.pem
/etc/grid-security/hostkey.pem
...
/etc/qcg/qcg-comp/application_mapfile
...
}}}
* also replace all occurrences of `/opt/qcg/lib/qcg-comp/modules/python/` with `/usr/lib64/qcg-comp/modules/python`, e.g. in VIM it can be done by issuing the following command:
{{{
:%s/\/opt\/plgrid\/qcg\/lib\/qcg-comp\/modules\/python/\/usr\/lib64\/qcg-comp\/modules\/python/g
}}}
* you may want to edit the `/etc/sysconfig/qcg-compd` and remove all `export` keywords (there are not needed anymore) and leave just key=value pairs, e.g:
{{{
DRMAA_LOG_LEVEL=INFO
QCG_AR_MAUI_PARTITION=qcg
MAUI_SCHEDULING_INTERVAL=120
}}}
instead of
{{{
export DRMAA_LOG_LEVEL=INFO
export QCG_AR_MAUI_PARTITION="qcg"
export MAUI_SCHEDULING_INTERVAL=120
}}}
* edit `/etc/qcg/qcg-comp/qcg-comp.xml` and replace
{{{
/opt/plgrid/qcg/lib/qcg-core/modules/
/opt/plgrid/qcg/lib/qcg-comp/modules/
}}}
* with
{{{
/usr/lib64/qcg-core/modules/
/usr/lib64/qcg-comp/modules/
}}}
* now you are ready to start the service
{{{
/etc/init.d/qcg-compd start
}}}
= Updating other components =
* [http://apps.man.poznan.pl/trac/qcg-notification/wiki/MigrationTo30 QCG-Notification]
* [http://apps.man.poznan.pl/trac/qcg-computing/wiki/QCG-Accounting QCG-Accounting] (section: "Migration from version 2.X to 3.0")
= Verification =
* check all the following logs for exceptions:
{{{
tail -n 100 /var/log/qcg/qcg-comp/qcg-compd.log
tail -n 100 /var/log/qcg/qcg-ntf/qcg-ntfd.log
tail -n 100 /var/log/qcg/qcg-gridmapfile/qcg-gridmapfilegenerator.log
}}}
* try to submit job using QCG-Icon and QCG-Broker.
= Listening on 443 port =
We advice you to reconfigure service to add another HTTPS compilant endpoint listening on standard 443 port (this would allow [[http://www.qoscosgrid.org/trac/qcg-icon| QCG-Icon]] users to access resources even from networks where outgoing traffic is restricted only to standard ports ([[PrivilegedPorts|howto]]).
= VOMS support =
if you plan to offer resources via QCG for the external VO that manages membership using VOMS infrastructure then you should read this [[VOMSIntegration| guide]].