Note: This web site is only kept up to date for OSG Software 1.2 (VDT 2.0.0). If you are looking for information for the most recent release, the RPM-based OSG Software 3.0, please see the OSG documentation web site

Creating a tarball of a CVMFS repository

This page documents how to create a portable CVMFS repository for testing purposes via tarball. It focuses on CVMFS server 2.0 because it works with client versions 2.0 and 2.1.

Installing the server software

CVMFS server 2.0 only works on EL5 because of a dependence on the redirfs and cvmfsflt kernel modules. All of the necessary pieces can be found in the CERN-VM yum repository (http://cvmrepo.web.cern.ch/cvmrepo/yum).

  1. Edit /etc/yum.repos.d/cvmfs.repo to contain the following:
    [cvmfs]
    name=CVMFS for Enterprise Linux 5 - $basearch
    baseurl=http://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs/$basearch
    enabled=1
    priority=97
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CernVM
        
  2. Download the CernVM GPG key and place it into /etc/pki/rpm-gpg/:
    wget http://cvmrepo.web.cern.ch/cvmrepo/yum/RPM-GPG-KEY-CernVM
    mv RPM-GPG-KEY-CernVM /etc/pki/rpm-gpg
  3. Install the appropriate software:
    yum install cvmfs-server redirfs cvmfsflt

Configuring and publishing the repository

  1. Create the repository:
    cvmfs_server mkfs <repo_name>
  2. Place the files you want in the repository in /cvmfs/<repo_name>
  3. Publish the repository:
    cvmfs_server publish <repo_name>

Putting everything into a tarball

  1. The actual repository is in /srv/cvmfs/<repo_name>/pub/, tar that:
    cd /srv/cvmfs/<repo_name>/
    tar -cvvf <repo_name>.tar pub/
  2. You'll also need the repo public key:
    cd /etc/cvmfs/keys/
    tar -rvvf <repo_name>.pub /srv/cvmfs/<repo_name>/<repo_name>.tar

Client requirements

    This section is incomplete as I haven't gotten this part working completely yet.
  1. Unpack the tarball somewhere:
    tar -xvvf <repo_name>.tar
  2. Set up /etc/httpd/config.d/cvmfs.conf: NOTE: This isn't exactly what you want to set up, this is just an example from Dave Dykstra.
    RewriteEngine on
    # /opt/lt;experimentgt; is forced to be lower case 
    RewriteMap toLower int:tolower
    # Point /opt to latest-catalogs 
    RewriteRule ^/opt/([A-Za-z0-9\-\.]+)/(.*)$ /opt/${toLower:$1}/pub/latest-catalogs/$2 [PT]
    # Translation URL to real pathname 
    # /opt is used on CERN repositories
    Alias /opt /storage/cvmfs
    
    # Point /cvmfs to latest-catalogs
    RewriteRule ^/cvmfs/([A-Za-z0-9\-\.]+)/(.*)$ /cvmfs/$1/pub/latest-catalogs/$2 [PT]
    # /cvmfs is used on OSG repositories
    Alias /cvmfs /storage/cvmfs
    
    lt;Directory "/storage/cvmfs"gt; 
      Options -MultiViews FollowSymLinks 
      AllowOverride All 
      Order allow,deny 
      Allow from all
    
      EnableMMAP Off 
      EnableSendFile Off
    
      AddType application/x-cvmfs .cvmfschecksum .cvmfscatalog .x509        .cvmfspublished .cvmfswhitelist
    
      FileETag INode MTime Size 
      ExpiresActive On 
      ExpiresDefault "access plus 3 days" 
      ExpiresByType text/html "access plus 15 minutes" 
      ExpiresByType application/x-cvmfs "access plus 15 minutes"
    lt;/Directorygt;
        
  3. Place your repo public key in /etc/cvmfs/keys/
  4. Add <repo_name> to CVMFS_REPOSITORIES in /etc/cvmfs/default.local
  5. Create /etc/cvmfs/config.d/<repo_name>.conf and set
    CVMFS_SERVER_URL=http://localhost/cvmfs/<repo_name>
    CVMFS_PUBLIC_KEY=/etc/cvmfs/keys/<repo_name>.pub