@@ -201,7 +201,13 @@ download nor ingest the layer.
201
201
The conversion simply ingest every layer in an image, create a thin image and
202
202
finally push the thin image to the registry.
203
203
204
- Such images can be used by docker with the plugins.
204
+ Such images can be used by docker with the thin image plugins.
205
+
206
+ The daemon also transform the images into singularity images and store them
207
+ into the repository.
208
+
209
+ The layers are stored into the ` .layer ` subdirectory, while the singularity
210
+ images are stored in the ` singularity ` subdirectory.
205
211
206
212
## General workflow
207
213
@@ -276,7 +282,7 @@ $ ./daemon list-wish
276
282
+----+----------------+-------------------------------------------------+------------+-----------------+------------------------------------------------------------------+
277
283
```
278
284
279
- Of ocurse you can add as many wish as you need.
285
+ Of course you can add as many wish as you need.
280
286
281
287
Now that all the wishes are in place you can simply start converting them:
282
288
@@ -288,7 +294,7 @@ The above command should provide enough logs to be able to infer what is
288
294
happening and to debug any error.
289
295
290
296
Make sure that the user is able to start a cvmfs transaction and that is able
291
- to communicate with docker, anyway this errors should be pretty self evidentds
297
+ to communicate with docker, anyway this errors should be pretty self evident
292
298
in the logs.
293
299
294
300
The above command is quite cheap, it avoids to convert an images that is
@@ -298,7 +304,7 @@ downloaded, command line flags can change this behaviour if necessary.
298
304
You may want to keep the above command running in a loop, hence it will
299
305
automatically pick up changes in the input images and start the conversion.
300
306
301
- We are basically polling the registries for changings in the input image, again
307
+ We are basically polling the registries for changing in the input image, again
302
308
there was not a reliable and easy way to get updates from the registry, not
303
309
even from the one inside CERN that we manage.
304
310
@@ -315,3 +321,61 @@ new wishes, the next loop will pick the adding elements up.
315
321
Only be careful to don't leave the CVMFS repository in an inconsistet state
316
322
(abort the program Ctrl-C while it is doing a transaction).
317
323
324
+
325
+ ## Recipes
326
+
327
+ Recipes are a way to describe the content of the wish list using a simple,
328
+ static YAML file.
329
+
330
+ Recipes are read by the tool and set the wish list accordingly, adding and
331
+ ** removing** wishes.
332
+
333
+ The operation of setting a recipe is idempotence, this means that repeating the
334
+ operation, with the same recipe, multiple times does not change the wish list.
335
+
336
+ Please make sure to be careful if you add a wish manually and then set a recipe,
337
+ if the wish you add manually is not in the recipe the wish will be deleted.
338
+ Similarly avoid to work with multiple recipe files, one will delete the wishes
339
+ of the other.
340
+
341
+ Recipes are thought in such a way that you should have only a single recipe
342
+ for CVMFS repository.
343
+
344
+ ### Recipe Syntax v1
345
+
346
+ An example of a complete recipe file is above, let's go over each key
347
+
348
+ ``` yaml
349
+ version : 1
350
+ user : smosciat
351
+ cvmfs_repo : unpacked.cern.ch
352
+ output_format : ' $(scheme)://registry.gitlab.cern.ch/thin/$(image)'
353
+ input :
354
+ - ' https://registry.hub.docker.com/econtal/numpy-mkl:latest'
355
+ - ' https://registry.hub.docker.com/agladstein/simprily:version1'
356
+ - ' https://registry.hub.docker.com/library/fedora:latest'
357
+ - ' https://registry.hub.docker.com/library/debian:stable'
358
+ ` ` `
359
+
360
+ **version**: indicate what version of recipe we are using, at the moment only
361
+ ` 1` is supported.
362
+ **user**: the user that will push the thin docker images into the registry,
363
+ this user need to be added separately into the database
364
+ **cvmfs_repo**: in which CVMFS repository store the layers and the singularity
365
+ images.
366
+ **output_format**: how to name the thin images. It accepts few "variables" that
367
+ reference to the input image.
368
+
369
+ * $(scheme), the very first part of the image url, most likely `http` or
370
+ ` https`
371
+ * $(registry), in which registry the image is locate, in the case of the
372
+ example it would be `registry.hub.docker.com`
373
+ * $(repository), the repository of the input image, so something like
374
+ ` library/ubuntu` or `atlas/athena`
375
+ * $(tag), the tag of the image examples could be `latest` or `stable` or
376
+ ` v0.1.4`
377
+ * $(image), the $(repository) plus the $(tag)
378
+
379
+ **input**: list of docker images to convert
380
+
381
+
0 commit comments