From 71d80a9503dbbd6f146c0cce0579f48afefca747 Mon Sep 17 00:00:00 2001 From: bmcelvee Date: Fri, 8 Jan 2021 13:54:56 -0500 Subject: [PATCH] OSDOCS-1616 using Cluster Samples Operator disconnected mirroring assistance --- ...ling-restricted-networks-preparations.adoc | 6 +++ ...ples-operator-deprecated-image-stream.adoc | 37 +++++++++++++++++++ ...samples-disconnected-mirroring-assist.adoc | 22 +++++++++++ .../configuring-samples-operator.adoc | 22 +++++------ openshift_images/image-streams-manage.adoc | 3 ++ .../samples-operator-alt-registry.adoc | 4 ++ 6 files changed, 83 insertions(+), 11 deletions(-) create mode 100644 modules/images-samples-operator-deprecated-image-stream.adoc create mode 100644 modules/installation-images-samples-disconnected-mirroring-assist.adoc diff --git a/installing/install_config/installing-restricted-networks-preparations.adoc b/installing/install_config/installing-restricted-networks-preparations.adoc index 86d83141fa..0bc658419f 100644 --- a/installing/install_config/installing-restricted-networks-preparations.adoc +++ b/installing/install_config/installing-restricted-networks-preparations.adoc @@ -53,6 +53,12 @@ include::modules/installation-preparing-restricted-cluster-to-gather-support-dat include::modules/installation-restricted-network-samples.adoc[leveloffset=+1] +include::modules/installation-images-samples-disconnected-mirroring-assist.adoc[leveloffset=+2] + +See xref:../install_config/installing-restricted-networks-preparations.adoc#installation-restricted-network-samples_installing-restricted-networks-preparations[Using Cluster Samples Operator image streams with alternate or mirrored registries] for a detailed procedure. + + + == Next steps //* TODO need to add the registry secret to the machines, which is different diff --git a/modules/images-samples-operator-deprecated-image-stream.adoc b/modules/images-samples-operator-deprecated-image-stream.adoc new file mode 100644 index 0000000000..f0973afc14 --- /dev/null +++ b/modules/images-samples-operator-deprecated-image-stream.adoc @@ -0,0 +1,37 @@ +// Module included in the following assemblies: +// +// * openshift_images/configuring-samples-operator.adoc + + +[id="images-samples-operator-deprecated-image-stream_{context}"] += Removing deprecated image stream tags from the Cluster Samples Operator + +The Cluster Samples Operator leaves deprecated image stream tags in an image stream because users can have deployments that use the deprecated image stream tags. + +You can remove deprecated image stream tags by editing the image stream with the `oc tag` command. + +[NOTE] +==== +Deprecated image stream tags that the samples providers have removed from their image streams are not included on initial installations. +==== + +.Prerequisites + +* You installed the `oc` CLI. + +.Procedure + +* Remove deprecated image stream tags by editing the image stream with the `oc tag` command. ++ +[source,terminal] +---- +$ oc tag -d +---- ++ +.Example output +[source,terminal] +---- +Deleted tag default/. +---- + +//Similar procedure in images-imagestreams-remove-tag.adoc diff --git a/modules/installation-images-samples-disconnected-mirroring-assist.adoc b/modules/installation-images-samples-disconnected-mirroring-assist.adoc new file mode 100644 index 0000000000..9a1c93f062 --- /dev/null +++ b/modules/installation-images-samples-disconnected-mirroring-assist.adoc @@ -0,0 +1,22 @@ +// Module included in the following assemblies: +// +// * installing/install_config/installing-restricted-networks-preparations.adoc +// * openshift_images/samples-operator-alt-registry.adoc +// * openshift_images/configuring-samples-operator.adoc + +[id="installation-images-samples-disconnected-mirroring-assist_{context}"] += Cluster Samples Operator assistance for mirroring + +During installation, {product-title} creates a config map named `imagestreamtag-to-image` in the `openshift-cluster-samples-operator` namespace. The `imagestreamtag-to-image` config map contains an entry, the populating image, for each image stream tag. + +The format of the key for each entry in the data field in the config map is `_`. + +During a disconnected installation of {product-title}, the status of the Cluster Samples Operator is set to `Removed`. If you choose to change it to `Managed`, it installs samples. + +You can use this config map as a reference for which images need to be mirrored for your image streams to import. + +* While the Cluster Samples Operator is set to `Removed`, you can create your mirrored registry, or determine which existing mirrored registry you want to use. +* Mirror the samples you want to the mirrored registry using the new config map as your guide. +* Add any of the image streams you did not mirror to the `skippedImagestreams` list of the Cluster Samples Operator configuration object. +* Set `samplesRegistry` of the Cluster Samples Operator configuration object to the mirrored registry. +* Then set the Cluster Samples Operator to `Managed` to install the image streams you have mirrored. diff --git a/openshift_images/configuring-samples-operator.adoc b/openshift_images/configuring-samples-operator.adoc index ecc574ceb0..6ac6aa9ca1 100644 --- a/openshift_images/configuring-samples-operator.adoc +++ b/openshift_images/configuring-samples-operator.adoc @@ -4,27 +4,27 @@ include::modules/common-attributes.adoc[] :context: configuring-samples-operator toc::[] -The Cluster Samples Operator, which operates in the `openshift` namespace, installs and -updates the Red Hat Enterprise Linux (RHEL)-based {product-title} imagestreams -and {product-title} templates. - -== Prerequisites -* Deploy an {product-title} cluster. - -//Add any other prereqs that are always valid before you modify the CRD. -//If you must configure a different resource before you configure this one, point it out here. +The Cluster Samples Operator, which operates in the `openshift` namespace, installs and updates the {op-system-base-full}-based {product-title} image streams and {product-title} templates. include::modules/samples-operator-overview.adoc[leveloffset=+1] +[discrete] == Additional resources -* If the Cluster Samples Operator is removed during installation, you can xref:../openshift_images/samples-operator-alt-registry.adoc#samples-operator-alt-registry[use the Cluster Samples Operator with an alternate registry]. -* To ensure the Cluster Samples Operator bootstraps as `Removed` in a restricted network installation with initial network access in order to defer samples installation until you have decided which samples are desired, follow the instructions for xref:../openshift_images/samples-operator-alt-registry.adoc#samples-operator-alt-registry[using the Cluster Samples Operator with an alternate registry] and xref:../installing/install_config/installing-customizing.adoc#installing-customizing[Customizing nodes], to override the Cluster Samples Operator default configuration and initially come up as `Removed`. +* If the Cluster Samples Operator is removed during installation, you can xref:../openshift_images/samples-operator-alt-registry.adoc#samples-operator-alt-registry[use the Cluster Samples Operator with an alternate registry] so content can be imported, and then set the Cluster Samples Operator to `Managed` to get the samples. +* To ensure the Cluster Samples Operator bootstraps as `Removed` in a restricted network installation with initial network access to defer samples installation until you have decided which samples are desired, follow the instructions for xref:../installing/install_config/installing-customizing.adoc#installing-customizing[customizing nodes] to override the Cluster Samples Operator default configuration and initially come up as `Removed`. +** To host samples in your disconnected environment, follow the instructions for xref:../openshift_images/samples-operator-alt-registry.adoc#samples-operator-alt-registry[using the Cluster Samples Operator with an alternate registry]. + +include::modules/installation-images-samples-disconnected-mirroring-assist.adoc[leveloffset=+2] + +See xref:../openshift_images/samples-operator-alt-registry.adoc#installation-restricted-network-samples_samples-operator-alt-registry[Using Cluster Samples Operator image streams with alternate or mirrored registries] for a detailed procedure. include::modules/samples-operator-configuration.adoc[leveloffset=+1] include::modules/samples-operator-crd.adoc[leveloffset=+1] +include::modules/images-samples-operator-deprecated-image-stream.adoc[leveloffset=+1] + [discrete] == Additional resources diff --git a/openshift_images/image-streams-manage.adoc b/openshift_images/image-streams-manage.adoc index fcb381a863..4f31e61c99 100644 --- a/openshift_images/image-streams-manage.adoc +++ b/openshift_images/image-streams-manage.adoc @@ -29,6 +29,9 @@ include::modules/images-imagestream-adding-tags.adoc[leveloffset=+2] include::modules/images-imagestream-external-image-tags.adoc[leveloffset=+2] include::modules/images-imagestream-update-tag.adoc[leveloffset=+2] include::modules/images-imagestream-remove-tag.adoc[leveloffset=+2] + +See xref:../openshift_images/configuring-samples-operator.adoc#images-samples-operator-deprecated-image-stream_configuring-samples-operator[Removing deprecated image stream tags from the Cluster Samples Operator] for more information on how the Cluster Samples Operator handles deprecated image stream tags. + include::modules/images-imagestream-import.adoc[leveloffset=+2] include::modules/images-imagestream-import-images-private-registry.adoc[leveloffset=+1] diff --git a/openshift_images/samples-operator-alt-registry.adoc b/openshift_images/samples-operator-alt-registry.adoc index 4aee7f0b41..1a94abc231 100644 --- a/openshift_images/samples-operator-alt-registry.adoc +++ b/openshift_images/samples-operator-alt-registry.adoc @@ -29,3 +29,7 @@ include::modules/installation-adding-registry-pull-secret.adoc[leveloffset=+1] include::modules/installation-mirror-repository.adoc[leveloffset=+1] include::modules/installation-restricted-network-samples.adoc[leveloffset=+1] + +include::modules/installation-images-samples-disconnected-mirroring-assist.adoc[leveloffset=+2] + +See xref:../openshift_images/samples-operator-alt-registry.adoc#installation-restricted-network-samples_samples-operator-alt-registry[Using Cluster Samples Operator image streams with alternate or mirrored registries] for a detailed procedure.