Skip to content

Commit 571eead

Browse files
jmagakGitHub Actions
andauthored
RHDHBUGS-2062: Update RHDH Air-gapped Installation for oc-mirror v2 as oc-mirror v1 is deprecated since OCP 4.18 (#1592)
* Update RHDH Air-gapped Installation for oc-mirror v2 * Apply new suggestion * Apply suggestion * Apply new suggestion --------- Co-authored-by: GitHub Actions <[email protected]>
1 parent 5c412af commit 571eead

File tree

2 files changed

+19
-38
lines changed

2 files changed

+19
-38
lines changed

modules/installation/proc-install-rhdh-helm-airgapped-full.adoc

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ If your network has access to the registry through a bastion host, you can use t
1111
** You have an account in https://developers.redhat.com/[{rhdeveloper-name}] portal.
1212
** You have access to the charts.openshift.io Helm chart repository.
1313
** You have installed the {openshift-cli} on your workstation.
14-
** 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.
14+
** You have installed the `oc-mirror` OpenShift CLI (oc) plugin *v2*. For more information, see {ocp-docs-link}/html-single/disconnected_environments/index#installation-oc-mirror-installing-plugin_about-installing-oc-mirror-v2[Installing the oc-mirror OpenShift CLI plugin].
1515
* You have set up your intermediary host.
1616
** Your host has access to the {rhcr-long}.
1717
** Your host has access to image registry on the destination host.
@@ -25,7 +25,7 @@ See {ocp-docs-link}/html-single/registry/index#securing-exposing-registry[Exposi
2525
+
2626
[source,yaml,subs="+attributes,+quotes"]
2727
----
28-
apiVersion: mirror.openshift.io/v1alpha2
28+
apiVersion: mirror.openshift.io/v2alpha1
2929
kind: ImageSetConfiguration
3030
mirror:
3131
helm:
@@ -43,7 +43,7 @@ where:
4343
+
4444
[source,terminal,subs="+quotes"]
4545
----
46-
oc-mirror --config=_<mirror_config_directory>_/ImageSetConfiguration.yaml _<mirror_archive_directory>_/
46+
oc mirror --v2 -c <mirror_config_directory>/ImageSetConfiguration.yaml file://<mirror_archive_directory>/
4747
----
4848
+
4949
--
@@ -56,7 +56,7 @@ where:
5656
+
5757
[NOTE]
5858
====
59-
Running the `oc-mirror` command generates a local workspace containing the mirror archive file, the Helm chart, and a `ImageContentSourcePolicy` (ICSP) manifest. The ICSP manifest contains an `imageContentSourcePolicy.yaml` file that you must apply against the cluster in a later step.
59+
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.
6060
====
6161
+
6262
Example output:
@@ -76,7 +76,7 @@ Creating archive /path/to/mirror-archive/mirror_seq1_000000.tar
7676
+
7777
[source,terminal,subs="+quotes"]
7878
----
79-
oc-mirror --from _<mirror-archive-file>_ _<target-registry>_
79+
oc mirror --v2 -c <image-set-config> --from file://<mirror-archive-directory> docker://<target-registry>
8080
----
8181
+
8282
--
@@ -87,19 +87,11 @@ where:
8787
`<target_registry>` :: Enter the name of the target registry that you want to push the mirrored images to, for example, `docker://registry.localhost:5000`.
8888
--
8989
+
90-
.Example output
91-
[source,terminal,subs="+quotes"]
92-
----
93-
Wrote release signatures to oc-mirror-workspace/results-1738075410
94-
Writing image mapping to oc-mirror-workspace/results-1738075410/mapping.txt
95-
Writing ICSP manifests to oc-mirror-workspace/results-1738075410
96-
----
97-
+
98-
. In your workspace, locate the `imageContentSourcePolicy.yaml` file by running the `ls` command. For example:
90+
. In your workspace, locate the IDMS and ITMS files by running the following command. For example:
9991
+
10092
[source,terminal,subs="+quotes"]
10193
----
102-
ls _<workspace_directory>_/_<results_directory>_
94+
ls _<workspace_directory>/working-dir/cluster-resources/_
10395
----
10496
+
10597
--
@@ -110,11 +102,11 @@ where:
110102
`<results_directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
111103
--
112104
+
113-
. To mirror the Helm chart, deploy the `imageContentSourcePolicy.yaml` file in the disconnected cluster by running the `oc apply` command. For example:
105+
. To mirror the Helm chart, deploy the IDMS and ITMS files in the disconnected cluster by running the `oc apply` command. For example:
114106
+
115107
[source,terminal,subs="+quotes"]
116108
----
117-
oc apply -f _<workspace_directory>_/_<results_directory>_/ImageContentSourcePolicy.yaml
109+
oc apply -f <workspace_directory>/working-dir/cluster-resources
118110
----
119111
+
120112
--
@@ -128,10 +120,7 @@ where:
128120
+
129121
[source,terminal,subs="+quotes"]
130122
----
131-
CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
132-
133-
helm install _<rhdh_instance>_ _<workspace_directory>_/_<results_directory>_/charts/_<archive_file>_ --namespace _<your_namespace>_ --create-namespace \
134-
--set global.clusterRouterBase="$CLUSTER_ROUTER_BASE"
123+
CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//') helm install <rhdh_instance> <workspace_directory>/working-dir/helm/charts/<archive_file> --namespace <your_namespace> --create-namespace \ --set global.clusterRouterBase="$CLUSTER_ROUTER_BASE"
135124
----
136125
+
137126
--

modules/installation/proc-install-rhdh-helm-airgapped-partial.adoc

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ If your network has access to the `registry.redhat.io` registry and the `charts.
1313
* You have access to a mirror registry that can be reached from the disconnected cluster, for example, the {ocp-short} image registry. For more information about exposing the {ocp-short} image registry, see {ocp-docs-link}/html-single/registry/index#securing-exposing-registry[Exposing the registry].
1414
* You are logged in to your target mirror registry and have permissions to push images to it. For more information, see {ocp-docs-link}/html-single/disconnected_environments/index#installation-adding-registry-pull-secret_about-installing-oc-mirror-v2[Configuring credentials that allow images to be mirrored].
1515
* You have installed the {openshift-cli} on your workstation.
16-
* Recommended on {ocp-short}: 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.
16+
* Recommended on {ocp-short}: You have installed the `oc-mirror` OpenShift CLI (oc) plugin *v2*. For more information, see {ocp-docs-link}/html-single/disconnected_environments/index#installation-oc-mirror-installing-plugin_about-installing-oc-mirror-v2[Installing the oc-mirror OpenShift CLI plugin].
1717
* You have an account in https://developers.redhat.com/[{rhdeveloper-name}] portal.
1818
* Make sure that your system meets the minimum sizing requirements. See {about-book-link}#rhdh-sizing_about-rhdh[Sizing requirements for {product}].
1919

@@ -26,12 +26,11 @@ oc login -u <user> -p <password> https://api.<hostname>:6443
2626
----
2727

2828
. From your disconnected cluster, log in to the image registry that you want to mirror, for example, the {ocp-short} image registry.
29-
. Create an `ImageSetConfiguration.yaml` file.
30-
. In your `ImageSetConfiguration.yaml` file, specify the resources that you want to mirror. For example:
29+
. Create an `ImageSetConfiguration.yaml` file to specify the resources that you want to mirror. For example:
3130
+
3231
[source,yaml,subs="+attributes,+quotes"]
3332
----
34-
apiVersion: mirror.openshift.io/v1alpha2
33+
apiVersion: mirror.openshift.io/v2alpha1
3534
kind: ImageSetConfiguration
3635
mirror:
3736
helm:
@@ -64,18 +63,11 @@ where:
6463
Running the `oc-mirror` command creates a local workspace containing the Helm chart and a `ImageContentSourcePolicy` (ICSP) manifest. The ICSP manifest contains an automatically-generated `imageContentSourcePolicy.yaml` file that you must apply against the cluster in a later step.
6564
====
6665
+
67-
.Example output
68-
[source,terminal,subs="+quotes"]
69-
----
70-
Writing image mapping to oc-mirror-workspace/results-1738070846/mapping.txt
71-
Writing ICSP manifests to oc-mirror-workspace/results-1738070846
72-
----
73-
+
74-
. In your workspace, locate the `imageContentSourcePolicy.yaml` file by running the `ls` command. For example:
66+
. In your workspace, locate the `ImageDigestMirrorSet` (IDMS) and `ImageTagMirrorSet` (ITMS) files by running the `ls` command. For example:
7567
+
7668
[source,terminal,subs="+quotes"]
7769
----
78-
ls _<workspace_directory>_/_<results_directory>_
70+
ls _<workspace_directory>/working-dir/cluster-resources/_
7971
----
8072
+
8173
--
@@ -86,19 +78,19 @@ where:
8678
`<results_directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
8779
--
8880
+
89-
. To mirror the Helm chart, deploy the `imageContentSourcePolicy.yaml` file in the disconnected cluster by running the `oc apply` command. For example:
81+
. To configure image mirroring, deploy the IDMS and ITMS files in the disconnected cluster by running the `oc` apply command. For example:
9082
+
9183
[source,terminal,subs="+quotes"]
9284
----
93-
oc apply -f _<workspace_directory>_/_<results_directory>_/`ImageContentSourcePolicy.yaml`
85+
oc apply -f <workspace_directory>/working-dir/cluster-resources
9486
----
9587
+
9688
--
9789
where:
9890

99-
`<workspace_directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
91+
`<workspace_directory>` :: Enter the name of your workspace directory, for example, `oc-mirror-workspace`.
10092

101-
`<results_directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
93+
`<results_directory>` :: Enter the name of your results directory, for example, `results-1738070846`.
10294
--
10395
. In your air-gapped environment, deploy the Helm chart to the namespace that you want to use by running the `helm install` command with `namespace` and `set` options. For example:
10496
+

0 commit comments

Comments
 (0)