Forge Home

zot

zot registry management

1,005 downloads

245 latest version

3.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 2.1.0 (latest)
  • 2.0.0
  • 1.2.0
  • 1.1.1
  • 1.1.0
  • 1.0.0
released Aug 28th 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2021.7.x
  • Puppet >= 7.24 < 9.0.0
  • , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'deric-zot', '2.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add deric-zot
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install deric-zot --version 2.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

deric/zot — version 2.1.0 Aug 28th 2024

puppet-zot

Puppet Forge Tests

Puppet module to manage zot registry.

Usage

Following code would start zot registry based on configuration values defined in in Hiera common.yaml.

include zot

Examples

Override installed version, see zot releases.

zot::version: 2.0.0-rc7

Bind on all interfaces and port 8080

zot::config:
  http:
    address: 0.0.0.0
    port: 8080

Turn on debugging:

zot::config:
  log:
    level: debug

Prometheus metrics:

zot::config:
  extensions:
    metrics:
      enable: true
      prometheus:
        path: /metrics

Full example:

---
zot::version: 1.4.3
zot::log_dir: /var/log/zot
zot::data_dir: /var/lib/zot
zot::config:
  distSpecVersion: 1.0.1
  http:
    address: 0.0.0.0
    port: 5000
    realm: zot
    tls:
      cert: /etc/letsencrypt/live/my.registry/fullchain.pem
      key: /etc/letsencrypt/live/my.registry/privkey.pem
  storage:
    dedupe: true
    gc: true
    gcDelay: 1h
    gcInterval: 6h
  log:
    level: info
  extensions:
    metrics:
      enable: true
      prometheus:
        path: /metrics
    search:
      enable: true
      cve:
        updateInterval: 24h
    sync:
      enable: true
      registries:
        - urls:
            - https://docker.io/library
          onDemand: true  # only requested images will be cached
          maxRetries: 3
          retryDelay: 5m
          pollInterval: 6h
    scrub:
      interval: 24h
    ui:
      enable: true

retention:

zot::data_dir: /tmp/zot
zot::config:
  distSpecVersion: 1.1.0-dev
  storage:
    gc: true
    gcDelay: 2h
    gcInterval: 1h
    retention:
      dryRun: false
      delay: 24h
      policies:
        - repositories:
            - infra/*
            - prod/*
          deleteReferrers: false
          keepTags:
            - patterns:
                - v2.*
                - .*-prod
            - patterns:
                - v3.*
                - .*-prod
              pulledWithin: 168h
        - repositories:
            - tmp/**
          deleteReferrers: true
          deleteUntagged: true
          keepTags:
            - patterns:
                - v1.*
              pulledWithin: 168h
              pushedWithin: 168h
        - repositories:
            - '**'
          deleteReferrers: true
          deleteUntagged: true
          keepTags:
            - mostRecentlyPushedCount: 10
              mostRecentlyPulledCount: 10
              pulledWithin: 720h
              pushedWithin: 720h
    subPaths:
      /a:
        rootDirectory: /tmp/zot1
        dedupe: true
        retention:
          policies:
            - repositories:
                - infra/*
                - prod/*
              deleteReferrers: false
  http:
    address: 127.0.0.1
    port: 8080
  log:
    level: debug

Configuration

For full parameter reference see the official documentation for the installed version. This module doesn't attempt to validate registry config specification. Merged configuration is serialized to JSON which will be syntactically correct but the config should be validated against distSpecVersion using e.g. zot verify /etc/zot/config.json.

Change storage directory:

zot::data_dir: /srv/zot

Change log directory:

zot::log_dir: /srv/log

In order to bind the zot service on ports < 1024, you'll need either root priviledges or configure bind capabilities, e.g. using file_capability

file_capability::file_capabilities:
  "/usr/bin/zot-%{lookup('zot::version')}":
    ensure: present
    capability: 'cap_net_bind_service=eip'

All Puppet variables are documented in REFERENCE.md.