Skip to main content

DCI downloader module

Project description

DCI Downloader

dci-downloader is a useful tool for downloading the latest versions of Red Hat products.

TLDR

$ sudo dnf -y install https://packages.distributed-ci.io/dci-release.el8.noarch.rpm
$ sudo dnf -y install dci-downloader
$ source ~/dcirc.sh
$ dci-downloader RHEL-9.2 /tmp/repo

Requirements

Red Hat SSO

DCI is connected to the Red Hat SSO. You will need a Red Hat account.

Remoteci

A remoteci is a Virtual Machine or a baremetal server running RHEL. You should check that your remoteci:

  • Is running the latest RHEL 8 release.
  • Has enough free space in the destination folder.
  • Should be able to reach:
    • https://api.distributed-ci.io (443).
    • https://repo.distributed-ci.io (443).
    • https://registry.distributed-ci.io (443).

Installation

The dci-downloader is packaged and available as a RPM files.

$ sudo dnf -y install https://packages.distributed-ci.io/dci-release.el8.noarch.rpm
$ sudo dnf -y install dci-downloader

Configuration

Remoteci creation

DCI is connected to the Red Hat SSO. You need to log in https://www.distributed-ci.io with your redhat.com SSO account. Your user account will be created in our database the first time you connect.

After the first connection you can create a remoteci. Go to https://www.distributed-ci.io/remotecis and click Create a new remoteci button. Once your remoteci is created, you can retrieve the connection information in the Authentication column. Save those information in ~/dcirc.sh file.

At this point, you can validate your credentials with the following commands:

$ source ~/dcirc.sh
$ dcictl remoteci-list

If you see your remoteci in the list, everything is working great so far.

Topic access

Before using dci-downloader, we need to check the list of topic (version of the product) you have access to:

$ source ~/dcirc.sh
$ dcictl topic-list

If you don't see any topic then you should contact your EPM at Red Hat which will give you access to the topic you need.

Usage

You can now download the latest version of a product using dci-downloader.

RHEL examples

Example command to download the latest RHEL-9.2 components into /tmp/repo folder.

$ dci-downloader RHEL-9.2 /tmp/repo

RHOSP examples

$ dci-downloader OSP16.1 /tmp/repo

dci-downloader also allows to mirror the container images associated with the component to a local anonymous registry.

$ dci-downloader OSP16.1 /tmp/repo --registry local_registry_host:5000

ℹ NOTE: except when using dci-openstack-agent, it's the user's responsibility to provide a working anonymous registry. If needed a simple way to setup one is by using Docker Distribution registry in a container

$ podman run --rm -p 5000:5000 registry:2

ℹ NOTE: dci-downloader does not currently clean/purge/untag any image on the registry, leaving this responsibility to the the user until a suitable solution is provided.

Options

By default dci-downloader will download all variants for x86_64 architecture without debug RPMs.

Download other architectures

To download other architectures you can specify those using --arch option

Download x86_64 and ppc64le architectures for RHEL-9.2 topic:

$ dci-downloader RHEL-9.2 /tmp/repo --arch x86_64 --arch ppc64le

Specific variants

To download only specific variants you can specify those using --variant

Download only AppStream and BaseOS variants:

$ dci-downloader RHEL-9.2 /tmp/repo --variant AppStream --variant BaseOS

Filters

By default dci-downloader download the latest components attached to a topic. But if you want to filter those component, you can use the --filter <type> or --filter <type>:<tag> option.

Download only the latest RHEL-9.2 compose

$ dci-downloader RHEL-9.2 /tmp/repo --filter=compose

Download only the latest RHEL-9.2 compose with tag nightly

$ dci-downloader RHEL-9.2 /tmp/repo --filter=compose:nightly

Download the whole compose

To download everything you can add the --all flag

$ dci-downloader RHEL-9.2 /tmp/repo --all

Debug RPMs

To download debug RPMs you can add the --debug flag

Download RHEL-9.2 compose with debug rpms

$ dci-downloader RHEL-9.2 /tmp/repo --debug

Download only specified packages

To download packages specified on the command line, use the --package-filter flag

Download all kernel and glibc packages for RHEL-8.8 for the ppc64le architecture

$ dci-downloader RHEL-8.8 /tmp --variant BaseOS --arch ppc64le --package-filter=kernel --package-filter=glibc

Settings file

You can use a settings file to send parameters to parameterize dci-downloader.

Use --settings parameter:

$ dci-downloader --settings "/etc/dci-rhel-agent/settings.yml"

All settings from settings.yml file will overwrite cli parameters.

Examples of a settings file:

download_folder: /tmp/repo
topics:
  - name: RHEL-9.2
    filters:
      - type: compose
        tag: nightly
  - name: RHEL-8.6
    filters:
      - type: compose
        tag: milestone
    archs:
      - ppc64le
    variants:
      - AppStream
      - name: BaseOS
        with_debug: true

Proxy

If you are using a proxy, just add HTTP_PROXY or HTTPS_PROXY env variable pointing to your proxy.

License

Apache License, Version 2.0 (see LICENSE file)

Help

If something is not working correctly, ensure you have the latest version installed

$ dci-downloader --version
$ dci-downloader --help

To contact DCI see Questions and help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dci-downloader-3.2.0.post202510211212.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dci_downloader-3.2.0.post202510211212-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file dci-downloader-3.2.0.post202510211212.tar.gz.

File metadata

File hashes

Hashes for dci-downloader-3.2.0.post202510211212.tar.gz
Algorithm Hash digest
SHA256 963148ca412b961b5236d1643ba42c8ee51047583e5e3f880733e384846f8b36
MD5 f3bb4e0df2770a92c6752e4573e432bf
BLAKE2b-256 ce7185226302e1b6b572de2bdb8da18e04f0a86293d62fa260bf1e2fe1e640e3

See more details on using hashes here.

File details

Details for the file dci_downloader-3.2.0.post202510211212-py3-none-any.whl.

File metadata

File hashes

Hashes for dci_downloader-3.2.0.post202510211212-py3-none-any.whl
Algorithm Hash digest
SHA256 32449bd123bbd81b8c02281fae953c88283b8ca67d6da916a22bbe16fe265c1f
MD5 21df696f407f4060c61577d78a21f316
BLAKE2b-256 b10b16ed26640574bd368fa97b5d0f73b530324e7367a620b875ec86f0c67119

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page