Skip to content

A library for converting Docker images into CVMFS filesystems in response to registry notifications

License

Notifications You must be signed in to change notification settings

lscsoft/cvmfs-docker-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This code is intended for use as a worker that runs jobs queued using python-rq. In particular, those jobs are expected to be queued using, e.g.

import rq
q = rq.Queue(connection=StrictRedis(host='redis'))
q.enqueue('webhook.job', payload)

where payload is a dictionary representing a JSON webhook generated by a private Docker registry (e.g. the GitLab Container Registry) or the special webhooks generated by DockerHub.

The Webhook Queue queues webhooks for use by this worker and exposes the redis queue to the localhost.

Acknowledgements

The CVMFS publishing code derives largely from code developed by Brian Bockelman and Derek Weitzel of the University of Nebraska and the Open Science Grid (OSG). Their code was modified to support Python 3, arbitrary CVMFS filesystems and to simplify intermediate steps in the unpacking of the Docker image. Their work was released under the Apache License 2.0 as is this work.

Although it has now diverged greatly, the file cvmfs/publisher.py was originally forked from work performed by Vanessa Sochat for the Singularity project. This is noted within the file and that file remains under the 3-Clause BSD License.

Running

Install this code to a directory of your choice and run rq worker. You may need to set environment variables as below.

LC_ALL=C.UTF-8 LANG=C.UTF-8 rq worker

Python 3

This code is deliberately aimed at Python 3. I have made no attempt to make it Python 2.x compatible though I'd imagine it might require only importing the future print function. I'd gladly accept pull requests to support Python 2.x.

About

A library for converting Docker images into CVMFS filesystems in response to registry notifications

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages