|
| 1 | +:_content-type: ASSEMBLY |
| 2 | +[id="installing-mirroring-disconnected"] |
| 3 | += Mirroring images for a disconnected installation using the oc-mirror plug-in |
| 4 | +include::_attributes/common-attributes.adoc[] |
| 5 | +:context: installing-mirroring-disconnected |
| 6 | + |
| 7 | +toc::[] |
| 8 | + |
| 9 | +//// |
| 10 | +General to do list: |
| 11 | +* Confirm that no new content was added since I did the reorg of the disconnected install assemblies (up to date as of 2/13) |
| 12 | +* Add info about mirroring to a namespace |
| 13 | +* Test and get some actual example output |
| 14 | +* Use cases for changing image set config between runs |
| 15 | +//// |
| 16 | + |
| 17 | +You can ensure your clusters only use container images that satisfy your organizational controls on external content. Before you install a cluster on infrastructure that you provision in a restricted network, you must mirror the required container images into that environment. To mirror container images, you must have a registry for mirroring. |
| 18 | + |
| 19 | +You can use the oc-mirror OpenShift CLI (`oc`) plug-in to mirror images to a mirror registry in your fully or partially disconnected environments. |
| 20 | + |
| 21 | +:FeatureName: Mirroring images for disconnected environments using the oc-mirror plug-in |
| 22 | +include::snippets/technology-preview.adoc[leveloffset=+1] |
| 23 | + |
| 24 | +The following steps outline the high-level workflow on how to use the oc-mirror plug-in to mirror images to a mirror registry: |
| 25 | + |
| 26 | +. Create an image set configuration file. |
| 27 | +. Mirror the image set to the mirror registry. |
| 28 | +. Install the `ImageContentSourcePolicy` and `CatalogSource` resources that were generated by oc-mirror into the cluster. |
| 29 | +. Repeat these steps to update your mirror registry as necessary. |
| 30 | + |
| 31 | +// About the oc-mirror plug-in |
| 32 | +include::modules/oc-mirror-about.adoc[leveloffset=+1] |
| 33 | + |
| 34 | +// TODO: Check the content of this module to make sure it's accurate for oc-mirror |
| 35 | +include::modules/installation-about-mirror-registry.adoc[leveloffset=+1] |
| 36 | + |
| 37 | +[role="_additional-resources"] |
| 38 | +.Additional resources |
| 39 | + |
| 40 | +* For information about viewing the CRI-O logs to view the image source, see xref:../../installing/validating-an-installation.adoc#viewing-the-image-pull-source_validating-an-installation[Viewing the image pull source]. |
| 41 | +
|
| 42 | +// TODO: Copied this prereq section + about mirror registry from the orig section. Review/update as necessary |
| 43 | +[id="prerequisites_installing-mirroring-disconnected"] |
| 44 | +== Prerequisites |
| 45 | + |
| 46 | +* You must have a container image registry that supports link:https://docs.docker.com/registry/spec/manifest-v2-2[Docker v2-2] in the location that will host the {product-title} cluster, such as Red Hat Quay. |
| 47 | ++ |
| 48 | +[NOTE] |
| 49 | +==== |
| 50 | +If you use Red Hat Quay, you must use version 3.6 or later with the oc-mirror plug-in. If you have an entitlement to Red Hat Quay, see the documentation on deploying Red Hat Quay link:https://access.redhat.com/documentation/en-us/red_hat_quay/3.6/html/deploy_red_hat_quay_for_proof-of-concept_non-production_purposes/[for proof-of-concept purposes] or link:https://access.redhat.com/documentation/en-us/red_hat_quay/3.6/html/deploy_red_hat_quay_on_openshift_with_the_quay_operator/[by using the Quay Operator]. If you need additional assistance selecting and installing a registry, contact your sales representative or Red Hat Support. |
| 51 | +==== |
| 52 | ++ |
| 53 | +If you do not already have an existing solution for a container image registry, subscribers of {product-title} are provided a xref:../../installing/disconnected_install/installing-mirroring-creating-registry.adoc#installing-mirroring-creating-registry[mirror registry for Red Hat OpenShift]. The _mirror registry for Red Hat OpenShift_ is included with your subscription and is a small-scale container registry that can be used to mirror the required container images of {product-title} in disconnected installations. |
| 54 | + |
| 55 | +[id="mirroring-preparing-your-hosts"] |
| 56 | +== Preparing your mirror hosts |
| 57 | + |
| 58 | +Before you can use the oc-mirror plug-in to mirror images, you must install the plug-in and create a container image registry credentials file to allow the mirroring from Red Hat to your mirror. |
| 59 | + |
| 60 | +// Installing the oc-mirror OpenShift CLI plug-in |
| 61 | +include::modules/oc-mirror-installing-plugin.adoc[leveloffset=+2] |
| 62 | + |
| 63 | +[role="_additional-resources"] |
| 64 | +.Additional resources |
| 65 | + |
| 66 | +* xref:../../cli_reference/openshift_cli/extending-cli-plugins.adoc#cli-installing-plugins_cli-extend-plugins[Installing and using CLI plug-ins] |
| 67 | + |
| 68 | +// Configuring credentials that allow images to be mirrored |
| 69 | +include::modules/installation-adding-registry-pull-secret.adoc[leveloffset=+2] |
| 70 | + |
| 71 | +// Creating the image set configuration |
| 72 | +include::modules/oc-mirror-creating-image-set-config.adoc[leveloffset=+1] |
| 73 | + |
| 74 | +[role="_additional-resources"] |
| 75 | +.Additional resources |
| 76 | + |
| 77 | +* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-imageset-config-params_installing-mirroring-disconnected[Image set configuration parameters] |
| 78 | +* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-image-set-examples_installing-mirroring-disconnected[Image set configuration examples] |
| 79 | + |
| 80 | +[id="mirroring-image-set"] |
| 81 | +== Mirroring an image set to a mirror registry |
| 82 | + |
| 83 | +You can use the oc-mirror CLI plug-in to mirror images to a mirror registry in a xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#mirroring-image-set-partial[partially disconnected environment] or in a xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#mirroring-image-set-full[fully disconnected environment]. |
| 84 | + |
| 85 | +These procedures assume that you already have your mirror registry set up. |
| 86 | + |
| 87 | +[id="mirroring-image-set-partial"] |
| 88 | +=== Mirroring an image set in a partially disconnected environment |
| 89 | + |
| 90 | +In a partially disconnected environment, you can mirror an image set directly to the target mirror registry. |
| 91 | + |
| 92 | +// Mirroring from mirror to mirror |
| 93 | +include::modules/oc-mirror-mirror-to-mirror.adoc[leveloffset=+3] |
| 94 | + |
| 95 | +[id="mirroring-image-set-full"] |
| 96 | +=== Mirroring an image set in a fully disconnected environment |
| 97 | + |
| 98 | +To mirror an image set in a fully disconnected environment, you must first xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-mirror-to-disk_installing-mirroring-disconnected[mirror the image set to disk], then xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-disk-to-mirror_installing-mirroring-disconnected[mirror the image set file on disk to a mirror]. |
| 99 | + |
| 100 | +// Mirroring from mirror to disk |
| 101 | +include::modules/oc-mirror-mirror-to-disk.adoc[leveloffset=+3] |
| 102 | + |
| 103 | +// Mirroring from disk to mirror in a disconnected environment |
| 104 | +include::modules/oc-mirror-disk-to-mirror.adoc[leveloffset=+3] |
| 105 | + |
| 106 | +// Installing the ImageContentSourcePolicy and CatalogSource resources into the cluster |
| 107 | +include::modules/oc-mirror-updating-cluster-manifests.adoc[leveloffset=+1] |
| 108 | + |
| 109 | +// TODO: Consider whether we want any sort of reference module on how to use `oc mirror` (the 3 ways etc) |
| 110 | +// Maybe consider adding the blurb just to the beginning of the procedure modules (the combo of params?) |
| 111 | + |
| 112 | +// Updating your mirror registry with differential updates |
| 113 | +include::modules/oc-mirror-differential-updates.adoc[leveloffset=+1] |
| 114 | + |
| 115 | +[role="_additional-resources"] |
| 116 | +.Additional resources |
| 117 | + |
| 118 | +* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#mirroring-image-set-partial[Mirroring an image set in a partially disconnected environment] |
| 119 | +* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#mirroring-image-set-full[Mirroring an image set in a fully disconnected environment] |
| 120 | +* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#oc-mirror-updating-cluster-manifests_installing-mirroring-disconnected[Installing the ImageContentSourcePolicy and CatalogSource resources into the cluster] |
| 121 | + |
| 122 | +// Image set configuration parameters |
| 123 | +include::modules/oc-mirror-imageset-config-params.adoc[leveloffset=+1] |
| 124 | + |
| 125 | +// Image set configuration examples |
| 126 | +include::modules/oc-mirror-image-set-config-examples.adoc[leveloffset=+1] |
| 127 | + |
| 128 | +// TODO: Add an additional resources section to link to the non-TP assembly? |
0 commit comments