-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Restructured oc-mirror section to include V2 changes #74485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 135 additions & 0 deletions
135
installing/disconnected_install/installing-mirroring-disconnected-v2.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]. | ||
|
||
|
||
* 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]. |
4 changes: 2 additions & 2 deletions
4
installing/disconnected_install/installing-mirroring-disconnected.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|=== |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 ?