Ubuntu

From NorduGrid

Ubuntu is a Linux distribution that has its roots with Debian Linux. It is still driven by volunteers but has a strong commercial backing by the company Canonical. It has an enormous amount of followers on desktop machines. Technically, however, except for the naming or versioning of a few libraries, the two distributions remain identical. The build scripts for either distribution for instance should not differ.

For the preparation of Ubuntu packages on your system please follow the instructions given for Debian. Some reports claim that the very same binaries are functional on both (strongly related) platforms.

Quick start

Repositories

Note: In addition to ARC itself, a number of Globus packages is needed to enable the Globus Securty Infrastructure (GSI) and the popular GridFTP file transfer protocol. VOMS is needed for Virtual Organisation management, and LFC is needed for data indexing.

Globus packages are accepted by Debian and hence Ubuntu distributions, and are available for Karmic and later releases. For earlier Ubuntu versions, and for ARC packages, use the NorduGrid repositories.

There are two branches in the repository:

  • Stable branch contains the latest stable version of ARC
  • Testing branch during a release-cycle contains the latest tagged version (alpha, beta, release candidate). If you want more recent than that, you will have to check the code out of our SVN. The testing repositories only contains updated packages, so in order to get a full testing-installation you will need both repositories.

For server-installation install the nordugrid-arc-server package and for the client-installation install the nordugrid-arc-client package. In all likelihood, you will also need nordugrid-arc-plugins-globus.

The archives are signed by the key available at:

 http://download.nordugrid.org/DEB-GPG-KEY-nordugrid.asc. 

Download the key and then install it in your apt configuration using the command:

sudo apt-key add DEB-GPG-KEY-nordugrid.asc

Repository configuration for each Ubuntu and ARC version is maintained in the NorduGrid repository page.

The Base repositories are mandatory and must always be enabled. Updates repository should be enabled; Experimental repository contains unstable test packages and add-ons and may be enabled in addition.

When using command line tools, remember to run the following after adding these new repositories:

sudo apt-get update

Client installation

Globus certificate utilities are needed if you need to request a new NorduGrid Grid certificate. Other Certificate Authorities (CAs) may provide different means of issuing Grid certificates.

  sudo apt-get install globus-gsi-cert-utils-progs

Keys of potentially relevant CAs are required in order to validate the authenticity of Grid services; a simple approach is to install all accredited ones by:

  sudo apt-get install ca-policy-igtf-classic ca-policy-igtf-mics ca-policy-igtf-slcs

This will install all the certificates covered by those IGTF policies. The security-conscious people may want to take detailed looks at what particular certificates to trust, in particular for smaller grids or end-users with only a few well-known resources, sites participating in WLCG or other big projects have their own policies for which CAs must be trusted (typically all IGTF accredited CAs).

To keep Certificate Revocation Lists updated there is also the package nordugrid-arc-ca-utils which provides a cron job to update CRL:s to install:

  sudo apt-get install nordugrid-arc-ca-utils

This is especially needed on servers, but might also be a good idea for client installs so you don't delegate a proxy to a known stolen host certificate.


One can also install CA certificates from the original IGTF repository, see section #Installing CA keys from IGTF repository


Then install ARC client itself, which will pull in other necessary packages (Globus plugins must be requested explicitly, as they are not a direct dependency):

  sudo apt-get install nordugrid-arc-client nordugrid-arc-plugins-globus


Installing CA keys from EGI repository

EGI has experimental support for Debian/Ubuntu when it comes to CA keys:add this repository

  #### EGI Trust Anchor Distribution ####
  deb http://repository.egi.eu/sw/production/cas/1/current egi-igtf core

Get the GPG key

  wget -q -O - \
    https://dist.eugridpma.info/distribution/igtf/current/GPG-KEY-EUGridPMA-RPM-3 \
    | apt-key add -

And install the packages:

  apt-get update
  apt-get install ca-policy-egi-core


Installing CA keys from IGTF repository

When nothing works or you need an urgent update before the packages are in repositories, get the keys directly from the upstream provider:

  wget http://dist.eugridpma.info/distribution/current/igtf-policy-installation-bundle-1.40.tar.gz
  tar xvzf igtf-policy-installation-bundle-1.40.tar.gz
  cd igtf-policy-installation-bundle-1.40
  ./configure --with-profile=classic
  sudo make install

You may need to browse to that repository first and find out what is the most recent version number, instead of 1.40

Build on vanilla Globus (obsolete now, kept for historical reasons)

Originally from NDGF Technical Wiki

This section describes how to install ARC on a Ubuntu (6.06, 7.10 and 8.04 currently tested) from sources.

Prerequisites

Starting with Ubuntu 7.10 the default sh is dash, not bash as it used to be. Some of the ARC scripts have not been modified to explicitly use bash even if the use bash specific features, the same also applies for of the packages needed by ARC. The easy fix is to make bash the default sh by running

cd /bin
sudo ln -sf bash sh

Required packages

The following are required to build ARC from an SVN snapshot:

  • build-essential
  • cvs (for reasons unknown is needed by autotools)
  • automake1.9
  • libtool
  • pkg-config
  • autoconf
  • gettext
  • autotools-dev
  • m4
  • python-dev - needed if you want arclib pythonbindings, also needed for LFC
  • libxml2-dev
  • libldap2-dev
  • libexpat1-dev - needed for VOMS
  • doxygen - needed for VOMS documentation and installing CGSI-gSOAP
  • docbook, docbook-utils - needed for VOMS documentation
  • libmysqlclient15-dev - needed for Logger (12 on 6.06)
  • alien (for converting rpm to tgz)
  • flex, bison (for building gsoap)
  • uuid-dev
  • swig - needed by lfc
  • gsoap - for *32 bit* 7.10 and newer, 6.06 or *64 bit* you need to use the special NorduGrid version
  • wget - for downloading stuff from the commandline
  • libssl-dev - for compiling VOMS


At runtime we need:

  • libxml-dom-perl
  • libcrypt-ssleay-perl - needed for VOMS
  • libnet-ldap-perl (might only aply to Gutsy, needed by nordugridmap)

Some environment variables used throughout this guide

  • ARC_LOCATION, where NorduGrid ARC is to be installed
  • GLOBUS_LOCATION, ditto for Globus
  • VOMS_LOCATION, ditto for VOMS
  • GSOAP_LOCATION, ditto for GSoap (only needed on 6.06)
  • LFC_LOCATION, ditto for LFC

Building needed external software

Links to NDGF Wiki

  • GSOAP (only needed on 6.06 or if building on a pre intrepid 64 bit, new Ubuntu releases ships with a newer gsoap)
  • Globus
  • VOMS
  • LFC

Building ARC

Download the tar ball with source from [1] and unpack it somewhere.

For arc1 branch you can also export the code from SVN, and execute autogen.sh instead of bootstrap. Many of the above build dependencies need to be installed even if you don't plan to use Globus: most notably, libxml2-dev and libssl-dev.

We use rpath for hardcoding the location of libraries into ARC - beware that this implies that one cannot relocate the external software that ARC depends on (the adavantage is that we avoid problems with setting $LD_LIBRARY_PATH correctly). The use of $LD_LIBRARY_PATH here is only needed for building ARC (the build process invokes gsoap2cpp).

export CFLAGS="-Wl,-rpath=$GLOBUS_LOCATION/lib,-rpath=$LFC_LOCATION/lib"
export CXXFLAGS=$CFLAGS
export C_INCLUDE_PATH=
export CPLUS_INCLUDE_PATH=

Note: on 6.06 or up to and including hardy on 64 bit (because gsoap is not compiled with -fPIC) you need to do the following:

export CFLAGS="-Wl,-rpath=$GLOBUS_LOCATION/lib,-rpath=$LFC_LOCATION/lib,-rpath=$GSOAP_LOCATION/lib"
export LD_LIBRARY_PATH=$GSOAP_LOCATION/lib

Now lets configure and build ARC.

In order for ARC to find the globus installation, the following environment variables may have to be set

export GPT_FLAVOR_CONFIGURATION=$GLOBUS_LOCATION/sbin/gpt-flavor-configuration
export GPT_QUERY=$GLOBUS_LOCATION/sbin/gpt-query
export GLOBUS_MAKEFILE_HEADER=$GLOBUS_LOCATION/bin/globus-makefile-header


./bootstrap
./configure --prefix=$ARC_LOCATION --with-globus-location=$GLOBUS_LOCATION\
  --with-voms-location=$VOMS_LOCATION --with-lfc-location=$LFC_LOCATION
make

Note: on 6.06 or on 64 bit you need to add GSOAP_LOCATION to the configure line:

./configure --prefix=$ARC_LOCATION --with-globus-location=$GLOBUS_LOCATION\
  --with-voms-location=$VOMS_LOCATION --with-lfc-location=$LFC_LOCATION\
  --with-gsoap-location=$GSOAP_LOCATION


The default install sets up config-files in /etc and it is done the following way

make install

If you just want to install the binaries (for example to test it out as a normal user), then run:

make install-exec
cd $ARC_SRC/arclib/arc
make install-arcincludeHEADERS

if you want to have arclib-python bindings then run these commands too

cd $ARC_SRC/arclib
make install-pythonPYTHON
make install-pythonLTLIBRARIES

If you want to build only the new client from arc1 branch, do:

 ./autogen.sh
 ./configure --disable-a-rex-service --disable-isi-service --disable-charon-service --disable-compiler-service --disable-hopi-service --disable-paul-service --disable-sched-service --disable-storage-service --disable-java
 make install

Additional steps needed for ARC 0.6

The following steps are required for ARC 0.6 and should be carried out before running configure. For ARC 0.6.0.3 and onwards they should not be necessary anymore

Go to the directory where the source ended up. Modify ./grid-manager/globus_makefile.mk.pre

Comment line 11 and 15

Modify ./grid-manager/datamove/globus_makefile.mk.pre

Comment line 5 and 7

Modify ./cli/Makefile.am

If you are building on x86_64 you need to change this to: \-lglobus_rls_client_gcc64dbgpthr

 Add to arccli_LDADD
  -lglobus_rls_client_gcc32dbgpthr

Add GridFTP2 support

 wget http://www.cs.aau.dk/~kleist/arc-0.6.0-enabled-gridftp2.patch
 patch -p1 < arc-0.6.0-enabled-gridftp2.patch