Skip to content

Commit

Permalink
add docs on dumping the catalog snapshot (#7689)
Browse files Browse the repository at this point in the history
* find the versions of the operators in the catalog snapshots
  • Loading branch information
newgoliath authored Mar 15, 2024
1 parent 567b718 commit e3b30f1
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion docs/Operator_Catalog_Snapshots.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ There are 4 catalogs in OpenShift (as of July 2020):

An operator catalog snapshot is created by building a container image containing the YAML definitions of a catalog at that particular state in time. Once the catalog image has been built it needs to be hosted in a (public) container registry.

This image should no longer change - even if the online catalogs get updated with newer releases of any given operator. This is achieved by tagging the image with a unique tag.
This image should no longer change - even if the online catalogs get updated with newer releases of any given operator. This is achieved by tagging the image with a unique tag.

Once the catalog snapshot image is available a catalog source can be created in OpenShift that points to this particular catalog image thus freezing the available operator versions.

Expand All @@ -39,6 +39,32 @@ The full process for creating an operator catalog snapshot image is:
. Wait for the operator to be running.
. Optional: Create the custom resources for the operator to "do its magic".

== Dumping all the entries from a catalog snapshot image

Prerequisites:

* Install `opm` from https://mirror.openshift.com/pub/openshift-v4/
* Install `podman`

Procedure:

* Login to the https://quay.io/repository/gpte-devops-automation/olm_snapshot_redhat_catalog?tab=tags&tag=latest[container registry]
** `podman login quay.io`
* Browse the WWW to: https://quay.io/repository/gpte-devops-automation/
* Choose the snapshot image that matches the date you want and the OCP version you want
** e.g. `v4.14_2024_03_11`
* Click on the "Fetch Tag" button and use the UI to copy get the image, tag, and digest
** e.g. `quay.io/gpte-devops-automation/olm_snapshot_redhat_catalog@sha256:664bfd475d0b1e7690c761fd9c59530cee5de830016bb672568867c440aa463f`
* Run `opm render` to get the YAML definition of the catalog
+
[source]
----
mkdir ~/catalog
opm render quay.io/gpte-devops-automation/olm_snapshot_redhat_catalog@sha256:664bfd475d0b1e7690c761fd9c59530cee5de830016bb672568867c440aa463f -oyaml > ~/catalog/index.yaml
----
+
* Browse the YAML file for `entries` stanzas which might have your desired operators.

== Preparing to create an operator catalog snapshot image

* Determine the catalogs for which you want to create a catalog snapshot image.
Expand Down

0 comments on commit e3b30f1

Please sign in to comment.