Difference between revisions of "HOWTO Install and Use the CVMFS Client"

From GlueXWiki
Jump to: navigation, search
Line 3: Line 3:
 
The procedure described below requires root access. If root access is not available, there is an alternate method for accessing CVMFS from user space described in [[HOWTO use prebuilt GlueX software from any linux user account using cvmfsexec|this HOWTO]]. At this writing, the alternate will only work for RedHat, CentOS, and SUSE distributions.
 
The procedure described below requires root access. If root access is not available, there is an alternate method for accessing CVMFS from user space described in [[HOWTO use prebuilt GlueX software from any linux user account using cvmfsexec|this HOWTO]]. At this writing, the alternate will only work for RedHat, CentOS, and SUSE distributions.
  
[This version of the HOWTO describes a build from the source code. Other options for installing the CVMFS are described in the [https://cvmfs.readthedocs.io/en/stable/cpt-quickstart.html# CVMFS Getting Started Guide]. The configuration steps are pulled from that guide, but modified to be relevant for GlueX. This initial version of this HOWTO describes an installation on Fedora 34.]
+
Disclaimers:
 +
*This version of the HOWTO describes a build from the source code. Other options for installing the CVMFS are described in the [https://cvmfs.readthedocs.io/en/stable/cpt-quickstart.html# CVMFS Getting Started Guide].
 +
* The configuration steps are pulled from the guide, but modified to be relevant for GlueX.
 +
* This initial version of this HOWTO describes an installation on Fedora 34.
 +
* These instructions are appropriate for an installation on a single host. If the client is meant to be used by a large cluster, there are additional steps needed to maintain performance.
  
 
== Installing the CVMFS Client ==
 
== Installing the CVMFS Client ==
Line 24: Line 28:
 
   sudo make install
 
   sudo make install
  
The tricky part is to get a successful cmake. That requires that all packages needed as dependencies are installed. The list of packages that need to be installed depends on the distribution and the roster of packages already installed, as usual. Thus a general list is nearly impossible to supply. Here are some hints:
+
The tricky part is to get a successful cmake. That requires that all packages needed as dependencies are installed. The list of packages that need to be installed depends on the distribution and the roster of packages already installed, as usual. Thus a one-size-fits-all list does not exist. Here are some hints:
  
 
* '''Fedora 34''': fuse-devel, libcap-devel, autofs
 
* '''Fedora 34''': fuse-devel, libcap-devel, autofs
 +
 +
Collaborators are encouraged to contribute to these hints.
  
 
== Configuring the CVMFS Client ==
 
== Configuring the CVMFS Client ==
 +
 +
All commands in this section require root privilege unless otherwise noted.
 +
 +
=== Configuring AutoFS ===
 +
 +
Run
 +
 +
  cvmfs_config setup
 +
 +
This will modify the autofs configuration.
 +
 +
=== Create default.local ===
 +
 +
Create the file /etc/cvmfs/default.local. It should contain:
 +
 +
  CVMFS_REPOSITORIES=oasis.opensciencegrid.org,singularity.opensciencegrid.org
 +
  CVMFS_CLIENT_PROFILE=single
 +
 +
=== Verifing the File System ===
 +
 +
Run
 +
 +
  cvmfs_config probe
 +
 +
This can be run from a non-privileged account. Here is example output:
 +
 +
  $ cvmfs_config probe
 +
  Probing /cvmfs/oasis.opensciencegrid.org... OK
 +
  Probing /cvmfs/singularity.opensciencegrid.org... OK

Revision as of 22:10, 30 May 2021

We use CVMFS to distribute our software at remote productions sites, like the OSG and NERSC. Binaries, resource files, CCDB SQLite, and helper scripts are all available via CVMFS. This HOWTO will describe how to install the CVMFS client on a local Linux machine. After that, all of the pieces needed to build and run GlueX software locally on the machine are available if the native OS is CentOS 7 Linux. If some other distribution is run and singularity is available on that distribution, CVMFS will provide a CentOS 7 singularity container that can be used to run the CVMFS-provided GlueX software.

The procedure described below requires root access. If root access is not available, there is an alternate method for accessing CVMFS from user space described in this HOWTO. At this writing, the alternate will only work for RedHat, CentOS, and SUSE distributions.

Disclaimers:

  • This version of the HOWTO describes a build from the source code. Other options for installing the CVMFS are described in the CVMFS Getting Started Guide.
  • The configuration steps are pulled from the guide, but modified to be relevant for GlueX.
  • This initial version of this HOWTO describes an installation on Fedora 34.
  • These instructions are appropriate for an installation on a single host. If the client is meant to be used by a large cluster, there are additional steps needed to maintain performance.

Installing the CVMFS Client

The source code is available from GitHub. To get it:

 git clone https://github.com/cvmfs/cvmfs

Checkout a tagged version:

 cd cvmfs
 git checkout cvmfs-2.8.1

There is an INSTALL file in the top-level directory, but the gist is to run, from the top-level directory:

 mkdir -p build
 cd build
 cmake ../
 make
 sudo make install

The tricky part is to get a successful cmake. That requires that all packages needed as dependencies are installed. The list of packages that need to be installed depends on the distribution and the roster of packages already installed, as usual. Thus a one-size-fits-all list does not exist. Here are some hints:

  • Fedora 34: fuse-devel, libcap-devel, autofs

Collaborators are encouraged to contribute to these hints.

Configuring the CVMFS Client

All commands in this section require root privilege unless otherwise noted.

Configuring AutoFS

Run

 cvmfs_config setup

This will modify the autofs configuration.

Create default.local

Create the file /etc/cvmfs/default.local. It should contain:

 CVMFS_REPOSITORIES=oasis.opensciencegrid.org,singularity.opensciencegrid.org
 CVMFS_CLIENT_PROFILE=single

Verifing the File System

Run

 cvmfs_config probe

This can be run from a non-privileged account. Here is example output:

 $ cvmfs_config probe
 Probing /cvmfs/oasis.opensciencegrid.org... OK
 Probing /cvmfs/singularity.opensciencegrid.org... OK