Skip to content

Commit ae0d736

Browse files
vvolklamalthundiyil
authored andcommitted
update snapshotter instructions (#232)
1 parent bb0ef49 commit ae0d736

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

cpt-containers.rst

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ directory when containers using it are stopped.
219219
How to use the CernVM-FS Snapshotter
220220
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
221221

222-
The CernVM-FS snapshotter runs alongside the containerd service.
222+
The CernVM-FS snapshotter runs alongside the containerd service (compatible with v1.4.0 < containerd < v2.0) .
223223
The snapshotter communicates with ``containerd`` via gRPC over a UNIX domain socket.
224224
The default socket is ``/run/containerd-cvmfs-grpc/containerd-cvmfs-grpc.sock``.
225225
This socket is created automatically by the snapshotter if it does not exist.
@@ -242,20 +242,20 @@ A template ``config.toml`` file looks like this:
242242
243243
# /etc/containerd/config.toml
244244
245+
# important: explicitly use version 2 config format -
246+
# the plugin configuration does not work in v1!
245247
version = 2
246248
247-
# Source of image layers
248-
repository = "unpacked.cern.ch"
249-
absolute-mountpoint = "/cvmfs/unpacked.cern.ch"
250249
251250
# Ask containerd to use this particular snapshotter
252251
[plugins."io.containerd.grpc.v1.cri".containerd]
253252
snapshotter = "cvmfs-snapshotter"
253+
# important: the cvmfs snapshotter needs annotations to work.
254254
disable_snapshot_annotations = false
255255
256256
# Set the communication endpoint between containerd and the snapshotter
257257
[proxy_plugins]
258-
[proxy_plugins.cvmfs]
258+
[proxy_plugins.cvmfs-snapshotter]
259259
type = "snapshot"
260260
address = "/run/containerd-cvmfs-grpc/containerd-cvmfs-grpc.sock"
261261
@@ -272,6 +272,27 @@ A template ``config.toml`` file looks like this:
272272
Note that if only the repository is specified under the key value ``repository``, the mountpoint
273273
(under the key value ``absolute-mountpoint``) is by default constructed as ``/cvmfs/<repo_name>``.
274274

275+
Running with nerdctl
276+
^^^^^^^^^^^^^^^^^^^^
277+
278+
The snapshotter can be tested and used with nerdctl (> 1.7.0). Start both containerd and cvmfs-snapshotter:
279+
280+
::
281+
282+
systemctl start containerd cvmfs-snapshotter
283+
284+
and then run or pull images:
285+
286+
::
287+
288+
nerdctl pull --snapshotter cvmfs-snapshotter clelange/cms-higgs-4l-full:latest
289+
nerdctl run -it --rm --snapshotter cvmfs-snapshotter clelange/cms-higgs-4l-full:latest
290+
291+
292+
Pulling this 9GB (4.3GB compressed) image usually takes about two minutes, with the cvmfs-snapshotter, this should be reduces to a few seconds (however cvmfs will need to download files when accessed later).
293+
294+
295+
See also the `cvmfs documentation page in nerdctl. <https://github.com/containerd/nerdctl/blob/main/docs/cvmfs.md>`_.
275296

276297
Running with k3s
277298
^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)