Skip to content
chaen edited this page May 6, 2019 · 8 revisions

Migration from Externals/LcgBundle to DIRACOS

This wiki page aims at giving you guidelines to migrate from an existing installation with Externals/LcgBundle to an installation with DIRACOS. Once your installation will have been migrated to DIRACOS, no more manual actions will be needed. We recommend to stop all the services and agents on the server while doing the migration.

For more information about DIRACOS itself, see DIRACOS repo

runit

DIRACOS will not come with runit anymore. This means that, if you have not already done it, you must make sure that your runit installation does not depend on DIRAC.

Please see here for how it should be.

bashrc

The bashrc file is not compatible with the existing one, and need to be adapted. dirac-install generates a bashrc only at the first installation, but never modifies it, so you likely have its definition in a configuration management tool (puppet, chef, quattor if masochist, ...).

This is what a fresh bashrc looks when installed with Externals/LcgBundle:

# DIRAC bashrc file, used by service and agent run scripts to set environment
export PYTHONUNBUFFERED=yes
export PYTHONOPTIMIZE=x
[ -z "$HOME" ] && export HOME=/home/dirac
# CAs path for SSL verification
export X509_CERT_DIR=/etc/grid-security/certificates
export SSL_CERT_DIR=/etc/grid-security/certificates
export REQUESTS_CA_BUNDLE=/etc/grid-security/certificates
export X509_VOMS_DIR=/opt/dirac/pro/etc/grid-security/vomsdir
# Some DIRAC locations
[ -z "$DIRAC" ] && export DIRAC=/opt/dirac/pro
export DIRACBIN=$DIRAC/Linux_x86_64_glibc-2.12/bin
export DIRACSCRIPTS=$DIRAC/scripts
export DIRACLIB=$DIRAC/Linux_x86_64_glibc-2.12/lib
export TERMINFO=$DIRAC/Linux_x86_64_glibc-2.12/share/terminfo:/usr/share/terminfo:/etc/terminfo
export RRD_DEFAULT_FONT=$DIRAC/Linux_x86_64_glibc-2.12/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf
# Prepend the PYTHONPATH, the LD_LIBRARY_PATH, and the DYLD_LIBRARY_PATH
( echo $PATH | grep -q $DIRACBIN ) || export PATH=$DIRACBIN:$PATH
( echo $PATH | grep -q $DIRACSCRIPTS ) || export PATH=$DIRACSCRIPTS:$PATH
( echo $LD_LIBRARY_PATH | grep -q $DIRACLIB ) ||                     export LD_LIBRARY_PATH=$DIRACLIB:$LD_LIBRARY_PATH
( echo $LD_LIBRARY_PATH | grep -q $DIRACLIB/mysql ) ||                     export LD_LIBRARY_PATH=$DIRACLIB/mysql:$LD_LIBRARY_PATH
( echo $DYLD_LIBRARY_PATH | grep -q $DIRACLIB ) ||                     export DYLD_LIBRARY_PATH=$DIRACLIB:$DYLD_LIBRARY_PATH
( echo $DYLD_LIBRARY_PATH | grep -q $DIRACLIB/mysql ) ||                     export DYLD_LIBRARY_PATH=$DIRACLIB/mysql:$DYLD_LIBRARY_PATH
( echo $PYTHONPATH | grep -q $DIRAC ) || export PYTHONPATH=$DIRAC:$PYTHONPATH
# new OpenSSL version require OPENSSL_CONF to point to some accessible location
export OPENSSL_CONF=/tmp
# Gfal2 configuration and plugins
export GFAL_CONFIG_DIR=$DIRAC/Linux_x86_64_glibc-2.12/etc/gfal2.d
export  GFAL_PLUGIN_DIR=$DIRACLIB/gfal2-plugins
# IPv6 support
export GLOBUS_IO_IPV6=TRUE
export GLOBUS_FTP_CLIENT_IPV6=TRUE
# ARC Computing Element
export ARC_PLUGIN_PATH=$DIRACLIB/arc

This is what a fresh bashrc looks when installed with DIRACOS:

# DIRAC bashrc file, used by service and agent run scripts to set environment
export PYTHONUNBUFFERED=yes
export PYTHONOPTIMIZE=x
[ -z "$DIRACOS" ] && export DIRACOS=/opt/dirac/pro/diracos
. /opt/dirac/pro/diracos/diracosrc
[ -z "$HOME" ] && export HOME=/home/dirac
# CAs path for SSL verification
export X509_CERT_DIR=/etc/grid-security/certificates
export SSL_CERT_DIR=/etc/grid-security/certificates
export X509_VOMS_DIR=/opt/dirac/pro/etc/grid-security/vomsdir
# Some DIRAC locations
[ -z "$DIRAC" ] && export DIRAC=/opt/dirac/pro
export DIRACSCRIPTS=$DIRAC/scripts
export TERMINFO=$DIRACOS/usr/share/terminfo:/usr/share/terminfo:/etc/terminfo
export RRD_DEFAULT_FONT=$DIRACOS/usr/share/fonts/DejaVuSansMono-Roman.ttf
# Prepend the PYTHONPATH, the LD_LIBRARY_PATH, and the DYLD_LIBRARY_PATH
( echo $PATH | grep -q $DIRACSCRIPTS ) || export PATH=$DIRACSCRIPTS:$PATH
( echo $PYTHONPATH | grep -q $DIRAC ) || export PYTHONPATH=$DIRAC:$PYTHONPATH
# new OpenSSL version require OPENSSL_CONF to point to some accessible location
export OPENSSL_CONF=/tmp
# Gfal2 configuration and plugins
export GFAL_CONFIG_DIR=$DIRACOS/etc/gfal2.d
export  GFAL_PLUGIN_DIR=$DIRACOS/usr/lib64/gfal2-plugins/
# IPv6 support
export GLOBUS_IO_IPV6=TRUE
export GLOBUS_FTP_CLIENT_IPV6=TRUE
# ARC Computing Element
export ARC_PLUGIN_PATH=$DIRACLIB/arc

Check the differences and adapt it to your setup

installing

DIRACOS is available as of DIRAC v6r21.

You just have to call dirac-install as you normally do, adding --dirac-os. Updating via the web interface is not supported for this migration.

Clone this wiki locally