Skip to content

Commit 7376242

Browse files
jmagakGitHub Actions
andauthored
RHDHBUGS-2140: Air-gapped install fails because oc-mirror command is missing --v2 flag (#2228)
* Add --v2 flag requirement note for OCP 4.21+ * Add --v2 flag requirement notes to air-gapped procedures * Update the install guides --------- Co-authored-by: GitHub Actions <github-actions@github.com>
1 parent 42ffbe4 commit 7376242

9 files changed

Lines changed: 38 additions & 28 deletions

modules/extend_orchestrator-in-rhdh/proc-install-rhdh-with-orchestrator-in-a-fully-disconnected-ocp-environment-using-the-helm-chart.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ include::snip-installing-the-orchestrator-common-prerequisites.adoc[]
1414

1515
.Procedure
1616

17-
. Create an `ImageSetConfiguration.yaml` file for `oc-mirror`. You must use an `ImageSetConfiguration` file to include all mirrored images required, as shown in the following example:
17+
. Create an `ImageSetConfiguration.yaml` file for `oc mirror`. You must use an `ImageSetConfiguration` file to include all mirrored images required, as shown in the following example:
1818
+
1919
[source,yaml,subs="+attributes,+quotes"]
2020
----
@@ -76,16 +76,17 @@ unpack "registry.access.redhat.com/rhdh/plugin-catalog-index:{product-version}"
7676
# you can then find the `dynamic-plugins.default.yaml` under /tmp/registry.access.redhat.com/rhdh/plugin-catalog-index_{product-version}/dynamic-plugins.default.yaml
7777
----
7878

79-
. Mirror the images in the `ImageSetConfiguration.yaml` file by running the `oc-mirror` command. For example:
79+
. Mirror the images in the `ImageSetConfiguration.yaml` file by running the `oc mirror` command. For example:
8080
+
8181
[source,terminal,subs="+attributes,+quotes"]
8282
----
83-
$ oc-mirror --config=ImageSetConfiguration.yaml file:///path/to/mirror-archive --authfile /path/to/authfile --v2
83+
$ oc mirror --config=ImageSetConfiguration.yaml file:///path/to/mirror-archive --authfile /path/to/authfile --v2
8484
----
8585
+
8686
[NOTE]
8787
====
88-
The `oc-mirror` command pulls the charts listed in the `ImageSetConfiguration` file and makes them available as `tgz` archives under the `/path/to/mirror-archive` directory.
88+
. The `--v2` flag is required for {ocp-short} 4.21 and later.
89+
. The `oc mirror` command pulls the charts listed in the `ImageSetConfiguration` file and makes them available as `tgz` archives under the `/path/to/mirror-archive` directory.
8990
====
9091
+
9192
. Apply the cluster-wide resources generated during the push step to redirect all image pulls to your local registry, as shown in the following example:
@@ -102,7 +103,7 @@ $ oc apply -f .
102103
+
103104
[source,terminal,subs="+attributes,+quotes"]
104105
----
105-
$ oc-mirror --v2 --from <mirror-archive-file> docker://<target-registry-url:port> --workspace file://<workspace folder> --authfile /path/to/authfile
106+
$ oc mirror --v2 --from <mirror-archive-file> docker://<target-registry-url:port> --workspace file://<workspace folder> --authfile /path/to/authfile
106107
----
107108
+
108109
where:

modules/extend_orchestrator-in-rhdh/proc-install-rhdh-with-orchestrator-in-a-fully-disconnected-ocp-environment-using-the-operator.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ include::snip-installing-the-orchestrator-common-prerequisites.adoc[]
1818

1919
.Procedure
2020

21-
. Create an `ImageSetConfiguration` file for `oc-mirror`. You must include the images and operators required by the Serverless Logic Operator in the `ImageSetConfiguration` file, as shown in the following example:
21+
. Create an `ImageSetConfiguration` file for `oc mirror`. You must include the images and operators required by the Serverless Logic Operator in the `ImageSetConfiguration` file, as shown in the following example:
2222
+
2323
[source,yaml,subs="+attributes,+quotes"]
2424
----
@@ -71,16 +71,17 @@ unpack "registry.access.redhat.com/rhdh/plugin-catalog-index:{product-version)"
7171
# you can then find the `dynamic-plugins.default.yaml` under /tmp/registry.access.redhat.com/rhdh/plugin-catalog-index_{product-version)/dynamic-plugins.default.yaml
7272
----
7373

74-
. Mirror the images in the `ImageSetConfiguration.yaml` file by running the `oc-mirror` command. For example:
74+
. Mirror the images in the `ImageSetConfiguration.yaml` file by running the `oc mirror` command. For example:
7575
+
7676
[source,terminal,subs="+attributes,+quotes"]
7777
----
78-
$ oc-mirror --config=ImageSetConfiguration.yaml file:///path/to/mirror-archive --authfile /path/to/authfile --v2
78+
$ oc mirror --config=ImageSetConfiguration.yaml file:///path/to/mirror-archive --authfile /path/to/authfile --v2
7979
----
8080
+
8181
[NOTE]
8282
====
83-
The `oc-mirror` command generates a local workspace containing the mirror archive files and the required cluster manifests.
83+
. The `--v2` flag is required for {ocp-short} 4.21 and later.
84+
. The `oc mirror` command generates a local workspace containing the mirror archive files and the required cluster manifests.
8485
====
8586
+
8687
. Transfer the directory specified by `/path/to/mirror-archive` to a bastion host within your disconnected environment.
@@ -89,7 +90,7 @@ The `oc-mirror` command generates a local workspace containing the mirror archiv
8990
+
9091
[source,yaml,subs="+attributes,+quotes"]
9192
----
92-
$ oc-mirror --v2 --from <mirror-archive-file> docker://<target-registry-url:port> --workspace file://<workspace folder> --authfile /path/to/authfile
93+
$ oc mirror --v2 --from <mirror-archive-file> docker://<target-registry-url:port> --workspace file://<workspace folder> --authfile /path/to/authfile
9394
----
9495
+
9596
where:

modules/extend_orchestrator-in-rhdh/proc-install-rhdh-with-orchestrator-in-a-partially-disconnected-ocp-environment-using-the-helm-chart.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ You can install {product} ({product-very-short}) with the Orchestrator plugin in
88

99
A disconnected installation prevents unauthorized access, data transfer, or communication with external sources.
1010

11-
You can use the `oc-mirror` command to mirror resources directly to your accessible local registry and apply the generated cluster resources.
11+
You can use the `oc mirror` command to mirror resources directly to your accessible local registry and apply the generated cluster resources.
1212

1313
.Prerequisites
1414

1515
include::snip-installing-the-orchestrator-common-prerequisites.adoc[]
1616

1717
.Procedure
1818

19-
. Create an `ImageSetConfiguration.yaml` file for `oc-mirror`. You must use an `ImageSetConfiguration` file to include all mirrored images required, as shown in the following example:
19+
. Create an `ImageSetConfiguration.yaml` file for `oc mirror`. You must use an `ImageSetConfiguration` file to include all mirrored images required, as shown in the following example:
2020
+
2121
[source,yaml,subs="+attributes,+quotes"]
2222
----
@@ -54,16 +54,17 @@ mirror:
5454
maxVersion: {rhoserverless-version}
5555
----
5656

57-
. Mirror the images in the `ImageSetConfiguration.yaml` file by running the `oc-mirror` command to pull images and charts, and push the images directly to the target registry. For example:
57+
. Mirror the images in the `ImageSetConfiguration.yaml` file by running the `oc mirror` command to pull images and charts, and push the images directly to the target registry. For example:
5858
+
5959
[source,terminal,subs="+attributes,+quotes"]
6060
----
61-
$ oc-mirror --config=imagesetconfiguration.yaml docker://<registry URL:port> --workspace file://<workspace folder> --authfile /path/to/authfile --v2
61+
$ oc mirror --config=imagesetconfiguration.yaml docker://<registry URL:port> --workspace file://<workspace folder> --authfile /path/to/authfile --v2
6262
----
6363
+
6464
[NOTE]
6565
====
66-
The `oc-mirror` command pulls the charts listed in the `ImageSetConfiguration` file and makes them available as `tgz` archives under the `<workspace folder>` directory.
66+
. The `--v2` flag is required for {ocp-short} 4.21 and later.
67+
. The `oc mirror` command pulls the charts listed in the `ImageSetConfiguration` file and makes them available as `tgz` archives under the `<workspace folder>` directory.
6768
====
6869

6970
. Apply the generated cluster resources to the disconnected cluster. For example:

modules/extend_orchestrator-in-rhdh/proc-install-rhdh-with-orchestrator-in-a-partially-disconnected-ocp-environment-using-the-operator.adoc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ You can install {product} with Orchestrator plugin in a partial air-gapped envir
88

99
A disconnected installation prevents unauthorized access, data transfer, or communication with external sources.
1010

11-
You can use the `oc-mirror` command to mirror resources directly to your accessible local mirror registry and apply the generated cluster resources.
11+
You can use the `oc mirror` command to mirror resources directly to your accessible local mirror registry and apply the generated cluster resources.
1212

1313
.Prerequisites
1414

@@ -18,7 +18,7 @@ include::snip-installing-the-orchestrator-common-prerequisites.adoc[]
1818

1919
.Procedure
2020

21-
. Create an `ImageSetConfiguration` file for `oc-mirror`. You must include the images and operators required by the Serverless Logic Operator in the `ImageSetConfiguration` file, as shown in the following example:
21+
. Create an `ImageSetConfiguration` file for `oc mirror`. You must include the images and operators required by the Serverless Logic Operator in the `ImageSetConfiguration` file, as shown in the following example:
2222
+
2323
[source,yaml,subs="+attributes,+quotes"]
2424
----
@@ -71,15 +71,20 @@ unpack "registry.access.redhat.com/rhdh/plugin-catalog-index:{product-version)"
7171
# you can then find the `dynamic-plugins.default.yaml` under /tmp/registry.access.redhat.com/rhdh/plugin-catalog-index_{product-version)/dynamic-plugins.default.yaml
7272
----
7373

74-
. Mirror the images in the `ImageSetConfiguration.yaml` file by running the `oc-mirror` command. For example:
74+
. Mirror the images in the `ImageSetConfiguration.yaml` file by running the `oc mirror` command. For example:
7575
+
7676
[source,terminal,subs="+attributes,+quotes"]
7777
----
78-
$ oc-mirror --config=imagesetconfiguration.yaml docker://<registry URL:port> --workspace file://<workspace folder> --authfile /path/to/authfile --v2
78+
$ oc mirror --config=imagesetconfiguration.yaml docker://<registry URL:port> --workspace file://<workspace folder> --authfile /path/to/authfile --v2
7979
$ cd <workspace folder>/working-dir/cluster-resources/
8080
$ oc apply -f .
8181
----
8282
+
83+
[NOTE]
84+
====
85+
The `--v2` flag is required for {ocp-short} 4.21 and later.
86+
====
87+
+
8388
. Install the OpenShift Serverless Operator and OpenShift Serverless Logic Operators using `OperatorHub`.
8489

8590
. Create a {product-custom-resource-type} custom resource (CR).

modules/extend_orchestrator-in-rhdh/snip-installing-the-orchestrator-common-prerequisites.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
55
* You have permissions to push OCI images to your internal container registry.
66
7-
* You have installed the {ocp-docs-link}/html-single/disconnected_environments/index#installation-oc-mirror-installing-plugin_about-installing-oc-mirror-v2[`oc-mirror`] tool, with a version corresponding to the version of your {ocp-short} cluster.
7+
* You have installed the {ocp-docs-link}/html-single/disconnected_environments/index#installation-oc-mirror-installing-plugin_about-installing-oc-mirror-v2[`oc mirror`] tool, with a version corresponding to the version of your {ocp-short} cluster.

modules/install_installing-rhdh-in-an-air-gapped-environment/proc-install-rhdh-in-a-fully-disconnected-environment-with-the-operator.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ where:
6262
`_<my_pulled_image_location>_/install.sh`:: Enter the downloaded installation script and the absolute path to the directory where you stored it on your system.
6363
`--from-dir _<my_pulled_image_location>_`:: Enter the directory where you want to pull all of the necessary images.
6464
`--to-registry`:: (Optional) Enter the URL for the target mirror registry where you want to mirror the images.
65-
`--use-oc-mirror true`:: Recommended on {ocp-short}: Use the `oc-mirror` {ocp-short} CLI plugin to mirror images.
65+
`--use-oc-mirror true`:: Recommended on {ocp-short}: Use the `oc mirror` {ocp-short} CLI plugin to mirror images.
6666
+
6767
[IMPORTANT]
6868
====
69-
If you used `oc-mirror` to mirror the images to disk, you must also use `oc-mirror` to mirror the images from disk due to the folder layout that `oc-mirror` uses.
69+
If you used `oc mirror` to mirror the images to disk, you must also use `oc mirror` to mirror the images from disk due to the folder layout that `oc mirror` uses.
7070
====
7171
+
7272
[NOTE]

modules/install_installing-rhdh-in-an-air-gapped-environment/proc-install-rhdh-in-a-partially-disconnected-environment-with-the-operator.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ For more information, see link:https://access.redhat.com/articles/RegistryAuthen
3434
* You have installed the `opm` CLI tool.
3535
For more information, see {ocp-docs-link}/html/cli_tools/opm-cli#olm-about-opm_cli-opm-install[Installing the opm CLI].
3636
* If you are using an {ocp-short} cluster, you have the following prerequisites:
37-
** Recommended: You have installed the `oc-mirror` tool, with a version corresponding to the version of your {ocp-short} cluster.
37+
** Recommended: You have installed the `oc mirror` tool, with a version corresponding to the version of your {ocp-short} cluster.
3838
* If you are using a supported Kubernetes cluster, you have the following prerequisites:
3939
** You have installed the Operator Lifecycle Manager (OLM) on the disconnected cluster.
4040
** You have a mirror registry that is reachable from the disconnected cluster.
@@ -61,7 +61,7 @@ $ bash prepare-restricted-environment.sh \
6161
----
6262
where:
6363
`--to-registry _<my.registry.example.com>`:: Enter the URL for the target mirror registry where you want to mirror the images.
64-
`--use-oc-mirror true`:: Optional: Use the `oc-mirror` {ocp-short} CLI plugin to mirror images.
64+
`--use-oc-mirror true`:: Optional: Use the `oc mirror` {ocp-short} CLI plugin to mirror images.
6565
+
6666
[NOTE]
6767
====

modules/install_installing-rhdh-in-an-air-gapped-environment/proc-install-rhdh-on-ocp-in-a-fully-disconnected-environment-with-the-helm-chart.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ mirror:
4242
where:
4343
`version: "{product-version}"`:: Enter the {product} version to mirror.
4444

45-
. Mirror the resources specified in the `ImageSetConfiguration.yaml` file by running the `oc-mirror` command. For example:
45+
. Mirror the resources specified in the `ImageSetConfiguration.yaml` file by running the `oc mirror` command. For example:
4646
+
4747
[source,terminal,subs="+quotes"]
4848
----
@@ -59,7 +59,8 @@ where:
5959
+
6060
[NOTE]
6161
====
62-
Running the `oc-mirror` command generates a local workspace containing the mirror archive file, the Helm chart, `ImageDigestMirrorSet` (IDMS) and `ImageTagMirrorSet` (ITMS) manifests. The IDMS and ITMS manifests contain files that you must apply against the cluster in a later step.
62+
. The `--v2` flag is required for {ocp-short} 4.21 and later.
63+
. Running the `oc mirror` command generates a local workspace containing the mirror archive file, the Helm chart, `ImageDigestMirrorSet` (IDMS) and `ImageTagMirrorSet` (ITMS) manifests. The IDMS and ITMS manifests contain files that you must apply against the cluster in a later step.
6364
====
6465
+
6566
Example output:
@@ -75,7 +76,7 @@ Creating archive /path/to/mirror-archive/mirror_seq1_000000.tar
7576
. The local target registry
7677
. The target {ocp-short} cluster
7778
+
78-
. From your air-gapped environment, mirror the resources from the archive to the target registry by running the `oc-mirror` command. For example:
79+
. From your air-gapped environment, mirror the resources from the archive to the target registry by running the `oc mirror` command. For example:
7980
+
8081
[source,terminal,subs="+quotes"]
8182
----

modules/install_installing-rhdh-in-an-air-gapped-environment/proc-install-rhdh-on-ocp-in-a-partially-disconnected-environment-with-the-helm-chart.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ where:
6363
+
6464
[NOTE]
6565
====
66-
Running the `oc mirror` command generates a local workspace containing the Helm chart, `ImageDigestMirrorSet` (IDMS) and `ImageTagMirrorSet` (ITMS) manifests. The IDMS and ITMS manifests contain files that you must apply against the cluster in a later step.
66+
. The `--v2` flag is required for {ocp-short} 4.21 and later.
67+
. Running the `oc mirror` command generates a local workspace containing the Helm chart, `ImageDigestMirrorSet` (IDMS) and `ImageTagMirrorSet` (ITMS) manifests. The IDMS and ITMS manifests contain files that you must apply against the cluster in a later step.
6768
====
6869
+
6970
. In your workspace, locate the `ImageDigestMirrorSet` (IDMS) and `ImageTagMirrorSet` (ITMS) files by running the `ls` command. For example:

0 commit comments

Comments
 (0)