Skip to content

[REQUEST]: Include steps to customize packages for the Elastic Package Registry container #1818

@mrodm

Description

@mrodm

Description

Sometimes it would be interesting to customize the packages available in the docker distribution images (e.g. docker.elastic.co/package-registry/distribution:9.0.1) to include other packages.

This is also interesting for air-gapped environments.

For instance, there could be some content packages that are not available in the current docker images or maybe it is needed to add custom built packages too.

The steps to follow would be the next ones:

  1. Download all the required packages from Elastic Package Registry (https://epr.elsatic.co) and their corresponding signatures into a new folder (e.g. packages). For instance:
    mkdir -p packages
    cd packages
    wget "https://epr.elastic.co/epr/kubernetes_otel/kubernetes_otel-1.1.0.zip"
    wget "https://epr.elastic.co/epr/kubernetes_otel/kubernetes_otel-1.1.0.zip.sig"
    ...
  2. Get the current configuration of the docker distribution image:
    # Current configuration
     $ docker run --rm -it \
         --entrypoint /bin/cat \
         docker.elastic.co/package-registry/distribution:8.17.2 /package-registry/config.yml
    package_paths:
      - /packages/package-storage
    
    cache_time.search: 1m
    cache_time.categories: 10m
    cache_time.catch_all: 10m
  3. Based on that configuration, create a new configuration file config.yml adding a new path under package_paths key:
    • Example adding /packages/custom folder (to be used as a volume mount in next step):
     $ cat config.yml 
    package_paths:
      - /packages/package-storage
      - /packages/custom
    
    cache_time.search: 1m
    cache_time.categories: 10m
    cache_time.catch_all: 10m
  4. Finally, they should run the distribution docker mounting both the configuration file and the new folder with the packages (along with all the other needed parameters according to the air-gapped docs)
    • This would be a minimal example without any TLS or any other flags
      docker run --rm -it \
        -v ./config.yml:/package-registry/config.yml \
        -v ./packages:/packages/custom \
        docker.elastic.co/package-registry/distribution:9.0.1

Resources

IIRC there are these docs about how to run Elastic Package Registry in air-gapped environments: https://www.elastic.co/docs/reference/fleet/air-gapped#air-gapped-diy-epr

I'm not sure if there would be other related docs.

Collaboration

The product team will provide the initial content.

Point of contact.

Main contact: @mrodm

Stakeholders: @elastic/ecosystem

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions