Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion _topic_maps/_topic_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ Topics:
File: installing-mirroring-creating-registry
- Name: Mirroring images for a disconnected installation
File: installing-mirroring-installation-images
- Name: Mirroring images for a disconnected installation using the oc-mirror plugin
- Name: Mirroring images for a disconnected installation using V1
File: installing-mirroring-disconnected
- Name: Mirroring images for a disconnected installation using V2
File: installing-mirroring-disconnected-v2
- Name: Installing on Alibaba
Dir: installing_alibaba
Distros: openshift-origin,openshift-enterprise
Expand Down
7 changes: 4 additions & 3 deletions installing/disconnected_install/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ You can use a mirror registry to ensure that your clusters only use container im

If you already have a container image registry, such as Red Hat Quay, you can use it as your mirror registry. If you do not already have a registry, you can xref:../../installing/disconnected_install/installing-mirroring-creating-registry.adoc#installing-mirroring-creating-registry[create a mirror registry using the _mirror registry for Red Hat OpenShift_].

[id="mirroring-images-disconnected-install"]
== Mirroring images for a disconnected installation
[id="additional-resources-mirroring-images-disconnected"]
== Additional Resources

You can use one of the following procedures to mirror your {product-title} image repository to your mirror registry:

* xref:../../installing/disconnected_install/installing-mirroring-installation-images.adoc#installing-mirroring-installation-images[Mirroring images for a disconnected installation]
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#installing-mirroring-disconnected[Mirroring images for a disconnected installation using the oc-mirror plugin]
* xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#installing-mirroring-disconnected[Mirroring images for a disconnected installation using V1]
* xref:../../installing/disconnected_install/installing-mirroring-disconnected-v2[Mirroring images for a disconnected installation using V2]
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ toc::[]

The _mirror registry for Red Hat OpenShift_ is a small and streamlined container registry that you can use as a target for mirroring the required container images of {product-title} for disconnected installations.

If you already have a container image registry, such as Red Hat Quay, you can skip this section and go straight to xref:../../installing/disconnected_install/installing-mirroring-installation-images.adoc#installation-mirror-repository_installing-mirroring-installation-images[Mirroring the OpenShift Container Platform image repository].
If you already have a container image registry, such as Red Hat Quay, you can skip this section and go straight to link:https://access.redhat.com/documentation/en-us/openshift_container_platform/4.15/html/installing/disconnected-installation-mirroring#mirroring-images-disconnected-install[Mirroring the OpenShift Container Platform image repository].

[id="prerequisites_installing-mirroring-creating-registry"]
== Prerequisites
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
:_mod-docs-content-type: ASSEMBLY
[id="installing-mirroring-disconnected-v2"]
= Mirroring images for a disconnected installation using the V2
include::_attributes/common-attributes.adoc[]
:context: installing-mirroring-disconnected

toc::[]

:FeatureName: oc-mirror v2
include::snippets/technology-preview.adoc[]

Running your cluster in a restricted network without direct internet connectivity is possible by installing the cluster from a mirrored set of {product-title} container images in a private registry. This registry must be running at all times provided that the cluster is running. See the link:https://access.redhat.com/documentation/en-us/openshift_container_platform/4.15/html/installing/disconnected-installation-mirroring#prerequisites_installing-mirroring-disconnected[Prerequisites] section for more information.

You can use the oc-mirror OpenShift CLI (`oc`) plugin to mirror images to a mirror registry in your fully or partially disconnected environments. You must run oc-mirror from a system with internet connectivity in order to download the required images from the official Red Hat registries.

.High level workflow

The following steps outline the high-level workflow on how to use the oc-mirror plugin to mirror images to a mirror registry:

. Create an image set configuration file.

. Mirror the image set to the target mirror registry by using one of the following workflows:

** Mirror an image set directly to the target mirror registry (Mirror-to-Mirror).

** Mirror an image set to disk (Mirror-to-Disk), transfer the tar file to the target environment, then mirror the image set to the target mirror registry (Disk-to-Mirror).

. Configure your cluster to use the resources generated by the oc-mirror.

. Repeat these steps to update your target mirror registry as necessary.

// About V2
include::modules/oc-mirror-v2-about.adoc[leveloffset=+1]

// oc-mirror compatibility and support
include::modules/oc-mirror-support.adoc[leveloffset=+2]


[id="prerequisites_oc-mirror-v2"]
== Prerequisites

* 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.
+
[NOTE]
====
If you use Red Hat Quay, you must use version 3.6 or later with the oc-mirror plugin. 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/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/html/deploying_the_red_hat_quay_operator_on_openshift_container_platform/index[by using the Red Hat Quay Operator]. If you need additional assistance selecting and installing a registry, contact your sales representative or Red Hat Support.
====

* Every machine in the provisioned clusters must have access to the mirror registry. If the registry is unreachable, tasks like installation, updating, or routine operations such as workload relocation may fail. Therefore, mirror registries must be operated in a highly available manner, ensuring their availability aligns with the production availability of your {product-title} clusters.

* You have set the umask parameter to `0022` on the operating system that uses oc-mirror.

//Preparing your mirror hosts
include::modules/oc-mirror-preparing-mirror-hosts.adoc[leveloffset=+1]

//Configuring credentials that allow images to be mirrored
include::modules/oc-mirror-configuring-credentials-v2.adoc[leveloffset=+1]

[id="using-oc-mirror"]
== Mirroring an image set to a mirror registry

This section describes all the steps required for each oc-mirror workflow.

[id="building-image-set-configuration"]
=== Building the image set configuration

The Image Set Configuration is the input file used by oc-mirror to discover which images are necessary to be mirrored.

.Example for the `ImageSetConfiguration` input file:

[source,yaml]
----
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v2alpha1
mirror:
platform:
channels:
- name: stable-4.13
minVersion: 4.13.10
maxVersion: 4.13.10
graph: true
operators:
- catalog: registry.redhat.io/redhat/redhat-operator-index:v4.15
packages:
- name: aws-load-balancer-operator
- name: 3scale-operator
- name: node-observability-operator
additionalImages:
- name: registry.redhat.io/ubi8/ubi:latest
- name: registry.redhat.io/ubi9/ubi@sha256:20f695d2a91352d4eaa25107535126727b5945bff38ed36a3e59590f495046f0
----

//oc-mirror-workflows: mirroring in partially disconnected environment
include::modules/oc-mirror-workflows-partially-disconnected-v2.adoc[leveloffset=+2]

//Mirroring an image set in a fully disconnected environment: Mirror-to-Disk and Disk-to-Mirror
include::modules/oc-mirror-workflows-fully-disconnected-v2.adoc[leveloffset=+2]

// About custom resources generated by v2
include::modules/oc-mirror-IDMS-ITMS-about.adoc[leveloffset=+1]

// Configuring your cluster to use the resources generated by oc-mirror
include::modules/oc-mirror-updating-cluster-manifests-v2.adoc[leveloffset=+2]

//Delete Feature
include::modules/oc-mirror-workflows-delete-v2.adoc[leveloffset=+1]
include::modules/oc-mirror-procedure-delete-v2.adoc[leveloffset=+2]

// Dry-run for V2
include::modules/oc-mirror-dry-run-v2.adoc[leveloffset=+1]

//oc-mirror-enclave-support-about
include::modules//oc-mirror-enclave-support-about.adoc[leveloffset=+1]

// How to mirror to an Enclave
include::modules/oc-mirror-enclave-support.adoc[leveloffset=+1]

//operator catalog filtering
include::modules/oc-mirror-operator-catalog-filtering.adoc[leveloffset=+1]

//Image set configuration parameters
include::modules/oc-mirror-imageset-config-parameters-v2.adoc[leveloffset=+1]

// Command reference for oc-mirror V2
include::modules/oc-mirror-command-reference-v2.adoc[leveloffset=+1]


[role="_additional-resources"]
[id="additional-resources_oc-mirror-v2"]
== Additional resources

* 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].

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@subhtk I thought we decided to remove this in one of the doc meeting, no ?



* For more information on CLI plugins, see xref:../../cli_reference/openshift_cli/extending-cli-plugins#cli-installing-plugins_cli-extend-plugins[Installing and using CLI plugins].
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
:_mod-docs-content-type: ASSEMBLY
[id="installing-mirroring-disconnected"]
= Mirroring images for a disconnected installation using the oc-mirror plugin
= Mirroring images for a disconnected installation using v1
include::_attributes/common-attributes.adoc[]
:context: installing-mirroring-disconnected

toc::[]

Running your cluster in a restricted network without direct internet connectivity is possible by installing the cluster from a mirrored set of {product-title} container images in a private registry. This registry must be running at all times as long as the cluster is running. See the xref:../../installing/disconnected_install/installing-mirroring-disconnected.adoc#prerequisites_installing-mirroring-disconnected[Prerequisites] section for more information.
Running your cluster in a restricted network without direct internet connectivity is possible by installing the cluster from a mirrored set of {product-title} container images in a private registry. This registry must be running at all times as long as the cluster is running. See the link:https://access.redhat.com/documentation/en-us/openshift_container_platform/4.15/html/installing/disconnected-installation-mirroring#prerequisites_installing-mirroring-disconnected[Prerequisites] section for more information.

You can use the oc-mirror OpenShift CLI (`oc`) plugin to mirror images to a mirror registry in your fully or partially disconnected environments. You must run oc-mirror from a system with internet connectivity in order to download the required images from the official Red Hat registries.

Expand Down
16 changes: 16 additions & 0 deletions modules/oc-mirror-IDMS-ITMS-about.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Module included in the following assemblies:
//
// * installing/disconnected_install/installing-mirroring-disconnected-v2.adoc
// * updating/updating_a_cluster/updating_disconnected_cluster/mirroring-image-repository.adoc

:_mod-docs-content-type: CONCEPT
[id="oc-mirror-custom-resources-v2_{context}"]
= About custom resources generated by v2

With oc-mirror v2, `ImageDigestMirrorSet` (IDMS) is generated by default, and `ImageTagMirrorSet` (ITMS) is generated if at least one image referenced by tag is found. These sets contain mirrors for images referenced by digest or tag in releases, operator catalogs, and additional images.

The `ImageDigestMirrorSet` (IDMS) resource associates the mirror registry with the source registry and redirects image pull requests using digest specifications. Whereas, the `ImagetagMirrorSet` (ITMS) redirects the image pull requests using image tags.

The `CatalogSource` resource is used by Operator Lifecycle Manager (OLM) to retrieve information about the available Operators in the mirror registry.

The `UpdateService` resource is used by the OSUS service to provide Cincinnati graph to the disconnected environment.
47 changes: 0 additions & 47 deletions modules/oc-mirror-about.adoc

This file was deleted.

80 changes: 80 additions & 0 deletions modules/oc-mirror-command-reference-v2.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Module included in the following assemblies:
//
// * installing/disconnected_install/installing-mirroring-disconnected-v2.adoc


:_mod-docs-content-type: REFERENCE
[id="oc-mirror-command-reference-v2_{context}"]
= Command reference for V2

The following tables describe the `oc mirror` subcommands and flags for V2:

.oc mirror subcommands
[cols="1,2",options="header"]
|===
|Subcommand
|Description

|`help`
|Show help about any subcommand.

|`version`
|Output the oc-mirror version.

|`delete`
|Used to delete images in remote registry and local cache.

|===

.oc mirror flags
[cols="1,2",options="header"]
|===
|Flag
|Description

|`--authfile`
|String path of the authentication file. Default is `${XDG_RUNTIME_DIR}/containers/auth.json`.

|`-c`, `--config` `<string>`
|Specify the path to an image set configuration file.

|`--dest-tls-verify`
|Requires HTTPS and verify certificates when talking to the container registry or daemon.

|`--dry-run`
|Print actions without mirroring images.

|`--from <string>`
|Specify the path to an image set archive that was generated by an execution of oc-mirror to load into a target registry.

|`-h`, `--help`
|Show the help.

|`--loglevel`
|String Log level one of (info, debug, trace, error). The default is `info`.

|`-p`, `--port`
|HTTP port used by oc-mirror's local storage instance. The default is `55000`.

|`--max-nested-paths <int>`
|Specify the maximum number of nested paths for destination registries that limit nested paths. The default is `0`.

|`--secure-policy`
|If set, with default as false, will enable signature verification (secure policy for signature verification).

|`--since`
|String Include all new content since specified date (format yyyy-MM-dd). When not provided, new content since previous mirroring is mirrored.

|`--src-tls-verify`
|Require HTTPS and verify certificates when talking to the container registry or daemon.

|`--strict-archive`
|If set (default is `false`), generates archives that are strictly less than archiveSize (set in the `imageSetConfig`). Mirroring will exit in error if a file being archived exceed archiveSize (GB).

|`-v`, `--version`
|Version for oc-mirror

|`--workspace`
|String oc-mirror workspace where resources and internal artifacts are generated

|===
Loading