oc-mirror
Overview
A utility that can be used to mirror OpenShift releases, Operator releases, and atomic signatures between docker registries.
Installation
From pypi.org
$ pip install oc_mirror
From source code
$ git clone https://github.com/crashvb/oc-mirror
$ cd oc-mirror
$ virtualenv env
$ source env/bin/activate
$ python -m pip install --editable .[dev]
Usage
Creating an atomic signature
Note: Currently, only WebDAV upload is supported.
atomic \
--signature-store https://my-webdav-server/ \
sign \
--keyid=my-magic-keyid \
registry.redhat.io/redhat/redhat-operator-index:v4.8@sha256:6ddf56b65877a0d603fcc8f06bca7314f18816d5734c878094b7a1b5598ce251
Verifying an atomic signature
DRCA_CREDENTIALS_STORE=~/.docker/quay.io-pull-secret.json \
atomic \
--signature-store=https://mirror.openshift.com/pub/openshift-v4/signatures/openshift/release \
--signature-type=manifest \
verify \
quay.io/openshift-release-dev/ocp-release:4.4.6-x86_64@sha256:7613d8f7db639147b91b16b54b24cfa351c3cbde6aa7b7bf1b9c80c260efad06
Mirroring an OpenShift release
DRCA_CREDENTIALS_STORE=~/.docker/quay.io-pull-secret.json \
oc-mirror \
--signature-store=https://mirror.openshift.com/pub/openshift-v4/signatures/openshift/release \
mirror \
quay.io/openshift-release-dev/ocp-release:4.4.6-x86_64 \
some-other-registry.com:5000/openshift-release-dev/ocp-release:4.4.6-x86_64
Mirroring an Operator release
DRCA_CREDENTIALS_STORE=~/.docker/quay.io-pull-secret.json \
op-mirror \
--no-check-signatures \
mirror \
registry.redhat.io/redhat/redhat-operator-index:v4.8 \
some-other-registry.com:5000/redhat/redhat-operator-index:v4.8 \
compliance-operator:release-0.1 \
local-storage-operator \
ocs-operator
Environment Variables
| Variable | Default Value | Description |
|---|---|---|
| ATOMIC_KEYID | Identifier of the GnuPG key to use for signing. | |
| ATOMIC_KEYPASS | The corresponding key passphrase. | |
| ATOMIC_SIGNATURE_STORE | https://mirror.openshift.com/pub/openshift-v4/signatures/openshift/release | Signature store location at which atomic signatures are (to be) located. |
| ATOMIC_SIGNATURE_TYPE | iamge-config | Whether atomic signature digest reference Manifests or Image Configurations. |
| ATOMIC_SIGNING_KEY | Path to the GnuPG armored keys used to verify atomic signatures. | |
| OCM_SIGNATURE_STORE | use locations embedded in release metadata | Signature store location at which atomic signatures are located. |
| OCM_SIGNING_KEY | use keys embedded in release metadata | Path to the GnuPG armored keys used to verify atomic signatures. |
| OPM_SIGNATURE_STORE | https://mirror.openshift.com/pub/openshift-v4/signatures/openshift/release | Signature store location at which atomic signatures are located. |
| OPM_SIGNING_KEY | Path to the GnuPG armored keys used to verify atomic signatures. |
Development
Metadata
Release files for oc-mirror 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| oc_mirror-0.1.7.tar.gz | 33.5 kB | Without provenance | Details for oc_mirror-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| oc_mirror-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for oc_mirror-0.1.7-py3-none-any.whl |
Total release size: 96.8 kB
Release files / oc_mirror-0.1.7.tar.gz
| Download URL | oc_mirror-0.1.7.tar.gz |
|---|---|
| Size | 33.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
403eea3fdcad3e93fb7289f0b526a6b4e5fe74a1d8c50f325257ff55d86f5a23
|
|
BLAKE2b-256 checksum How to use checksums |
7e3462011fc855f38886cb61308450994058fa1558131208442fa9c3b45f6e55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.3
|
Release files / oc_mirror-0.1.7-py3-none-any.whl
| Download URL | oc_mirror-0.1.7-py3-none-any.whl |
|---|---|
| Size | 63.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bafbb5fc085e5cc50717e3ea16eb623d2162892289aa5c144f4d34a1fd50048b
|
|
BLAKE2b-256 checksum How to use checksums |
d894ebd41da293196a5b2004a2ce8659a68e4540b61f71516b7aa56cc019a4b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.8.3
|
Security for oc-mirror 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.