Skip to content

Commit f3c53fd

Browse files
committed
add section about singularity/cvmfsexec
1 parent 34071f4 commit f3c53fd

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

docs/05_advanced.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,40 @@ making some changes to the repository at `/cvmfs/repo.organization.tld`, and the
306306
cvmfs_server publish repo.organization.tld
307307
```
308308

309-
## 5.5 Using a configuration repository
309+
## 5.5 Mounting CernVM-FS repositories as an unprivileged user
310+
311+
The default way of installing and configuring the CernVM-FS client requires you to have root privileges.
312+
In case you want to use CernVM-FS repositories on systems where you do not have these, there are still some ways to install the client and mount repositories.
313+
We will show two different methods: using a [Singularity](https://sylabs.io/singularity/) container, and [cvmfsexec](https://github.com/cvmfs/cvmfsexec).
314+
315+
### 5.5.1 Singularity
316+
317+
Recent versions of Singularity offer a `--fusemount` option that allow you to mount CernVM-FS repositories.
318+
In order for this to work, you will need to install the `cvmfs` and `cvmfs-fuse3` package inside your container,
319+
and add the right configuration files and public keys for the repositories.
320+
Furthermore, you need two make two directories on the host system that will store the CernVM-FS cache and sockets;
321+
these need to be made available via a bind mount inside the container at `/var/lib/cvmfs` and `/var/run/cvmfs`, respectively.
322+
323+
As an example, you can run the [EESSI pilot client container](https://eessi.github.io/docs/pilot/#accessing-the-eessi-pilot-repository-through-singularity) using Singularity by doing:
324+
```
325+
mkdir -p /tmp/$USER/{var-lib-cvmfs,var-run-cvmfs}
326+
export SINGULARITY_BIND="/tmp/$USER/var-run-cvmfs:/var/run/cvmfs,/tmp/$USER/var-lib-cvmfs:/var/lib/cvmfs"
327+
export EESSI_CONFIG="container:cvmfs2 cvmfs-config.eessi-hpc.org /cvmfs/cvmfs-config.eessi-hpc.org"
328+
export EESSI_PILOT="container:cvmfs2 pilot.eessi-hpc.org /cvmfs/pilot.eessi-hpc.org"
329+
singularity shell --fusemount "$EESSI_CONFIG" --fusemount "$EESSI_PILOT" docker://eessi/client-pilot:centos7-$(uname -m)
330+
```
331+
332+
Note that you have to be careful when launching multiple containers on the same machine:
333+
in this case, they all need a separate location for the cache, as it cannot be shared across containers.
334+
335+
### 5.5.2 cvmfsexec
336+
As an alternative, especially when Singularity is not available on your host system, you can try [cvmfsexec](https://github.com/cvmfs/cvmfsexec).
337+
Depending on the availability of `fusermount` and user namespaces on the host system, it has several mechanisms for mounting CernVM-FS repositories,
338+
either in a user's own file space or even under `/cvmfs`.
339+
340+
An advantage of this method is that the cache can be shared by several processes running on the same machines, even if you bind the mountpoint into multiple container instances.
341+
342+
## 5.6 Using a configuration repository
310343

311344
In the [first hands-on part of this tutorial](02_stratum0_client.md#22-setting-up-a-client) we have manually
312345
configured our CernVM-FS client.

0 commit comments

Comments
 (0)