Skip to content

Commit 1cef69b

Browse files
authored
Merge pull request #89383 from xenolinux/image-set-config
OCPBUGS#51001: Update disconnected mirroring steps for HCP
2 parents 7008a7f + bfeb438 commit 1cef69b

File tree

3 files changed

+46
-17
lines changed

3 files changed

+46
-17
lines changed

hosted_control_planes/hcp-disconnected/hcp-deploy-dc-bm.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ include::modules/hcp-dc-registry.adoc[leveloffset=+1]
1717
include::modules/hcp-dc-mgmt-cluster.adoc[leveloffset=+1]
1818
include::modules/hcp-dc-web-server.adoc[leveloffset=+1]
1919
include::modules/hcp-dc-image-mirror.adoc[leveloffset=+1]
20+
21+
[role="_additional-resources"]
22+
.Additional resources
23+
* xref:../../disconnected/mirroring/about-installing-oc-mirror-v2.adoc#oc-mirror-workflows-partially-disconnected-v2_about-installing-oc-mirror-v2[Mirroring an image set in a partially disconnected environment]
24+
* xref:../../disconnected/mirroring/about-installing-oc-mirror-v2.adoc#oc-mirror-workflows-fully-disconnected-v2_about-installing-oc-mirror-v2[Mirroring an image set in a fully disconnected environment]
25+
2026
include::modules/hcp-dc-apply-objects.adoc[leveloffset=+1]
2127

2228
[role="_additional-resources"]

hosted_control_planes/hcp-disconnected/hcp-deploy-dc-virt.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ When you deploy {hcp} in a disconnected environment, some of the steps differ de
1515
* You have an internal registry to mirror images on. For more information, see xref:../../disconnected/mirroring/index.adoc#installing-mirroring-disconnected-about[About disconnected installation mirroring].
1616

1717
include::modules/hcp-dc-image-mirror.adoc[leveloffset=+1]
18+
19+
[role="_additional-resources"]
20+
.Additional resources
21+
* xref:../../disconnected/mirroring/about-installing-oc-mirror-v2.adoc#oc-mirror-workflows-partially-disconnected-v2_about-installing-oc-mirror-v2[Mirroring an image set in a partially disconnected environment]
22+
* xref:../../disconnected/mirroring/about-installing-oc-mirror-v2.adoc#oc-mirror-workflows-fully-disconnected-v2_about-installing-oc-mirror-v2[Mirroring an image set in a fully disconnected environment]
23+
1824
include::modules/hcp-dc-apply-objects.adoc[leveloffset=+1]
1925

2026
[role="_additional-resources"]
@@ -61,4 +67,4 @@ include::modules/hcp-virt-wildcard-dns.adoc[leveloffset=+3]
6167
You can monitor the deployment of a hosted cluster from two perspectives: the control plane and the data plane.
6268

6369
include::modules/hcp-monitor-cp.adoc[leveloffset=+2]
64-
include::modules/hcp-monitor-dp.adoc[leveloffset=+2]
70+
include::modules/hcp-monitor-dp.adoc[leveloffset=+2]

modules/hcp-dc-image-mirror.adoc

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ In the following procedures, the `oc-mirror` tool is used, which is a binary tha
1717
1818
.Prerequisites
1919

20-
Ensure that the registry server is running before you start the mirroring process.
20+
* Ensure that the registry server is running before you start the mirroring process.
2121
2222
.Procedure
2323

@@ -29,21 +29,18 @@ To configure image mirroring, complete the following steps:
2929
+
3030
[source,yaml,subs="attributes+"]
3131
----
32-
apiVersion: mirror.openshift.io/v1alpha2
32+
apiVersion: mirror.openshift.io/v2alpha1
3333
kind: ImageSetConfiguration
34-
storageConfig:
35-
registry:
36-
imageURL: registry.<dns.base.domain.name>:5000/openshift/release/metadata:latest <1>
3734
mirror:
3835
platform:
3936
channels:
4037
- name: candidate-{product-version}
41-
minVersion: <4.x.y-build> <2>
42-
maxVersion: <4.x.y-build> <2>
38+
minVersion: <4.x.y-build> <1>
39+
maxVersion: <4.x.y-build> <1>
4340
type: ocp
44-
kubeVirtContainer: true <3>
41+
kubeVirtContainer: true <2>
4542
graph: true
46-
additionalImages:
43+
additionalImages: <3>
4744
- name: quay.io/karmab/origin-keepalived-ipfailover:latest
4845
- name: quay.io/karmab/kubectl:latest
4946
- name: quay.io/karmab/haproxy:latest
@@ -67,19 +64,19 @@ mirror:
6764
- name: kubevirt-hyperconverged <4>
6865
----
6966
+
70-
<1> Replace `<dns.base.domain.name>` with the DNS base domain name.
71-
<2> Replace `<4.x.y-build>` with the supported {product-title} version you want to use.
72-
<3> Set this optional flag to `true` if you want to also mirror the container disk image for the {op-system-first} boot image for the KubeVirt provider. This flag is available with oc-mirror v2 only.
67+
<1> Replace `<4.x.y-build>` with the supported {product-title} version you want to use.
68+
<2> Set this optional flag to `true` if you want to also mirror the container disk image for the {op-system-first} boot image for the KubeVirt provider. This flag is available with oc-mirror v2 only.
69+
<3> Images specified in the `additionalImages` field are examples only and are not strictly needed.
7370
<4> For deployments that use the KubeVirt provider, include this line.
7471

7572
. Start the mirroring process by entering the following command:
7673
+
7774
[source,terminal]
7875
----
79-
$ oc-mirror --v2 --config imagesetconfig.yaml docker://${REGISTRY}
76+
$ oc-mirror --v2 --config imagesetconfig.yaml --workspace file://mirror-file docker://<registry>
8077
----
8178
+
82-
After the mirroring process is finished, you have a new folder named `oc-mirror-workspace/results-XXXXXX/`, which contains the IDMS and the catalog sources to apply on the hosted cluster.
79+
After the mirroring process is finished, you have a new folder named `mirror-file`, which contains the `ImageDigestMirrorSet` (IDMS), `ImageTagMirrorSet` (ITMS), and the catalog sources to apply on the hosted cluster.
8380

8481
. Mirror the nightly or CI versions of {product-title} by configuring the `imagesetconfig.yaml` file as follows:
8582
+
@@ -98,11 +95,31 @@ mirror:
9895
<1> Replace `<4.x.y-build>` with the supported {product-title} version you want to use.
9996
<2> Set this optional flag to `true` if you want to also mirror the container disk image for the {op-system-first} boot image for the KubeVirt provider. This flag is available with oc-mirror v2 only.
10097

101-
. Apply the changes to the file by entering the following command:
98+
. If you have a partially disconnected environment, mirror the images from the image set configuration to a registry by entering the following command:
99+
+
100+
[source,terminal]
101+
----
102+
$ oc mirror -c imagesetconfig.yaml --workspace file://<file_path> docker://<mirror_registry_url> --v2
103+
----
104+
+
105+
For more information, see "Mirroring an image set in a partially disconnected environment".
106+
107+
. If you have a fully disconnected environment, perform the following steps:
108+
109+
.. Mirror the images from the specified image set configuration to the disk by entering the following command:
110+
+
111+
[source,terminal]
112+
----
113+
$ oc mirror -c imagesetconfig.yaml file://<file_path> --v2
114+
----
115+
+
116+
For more information, see "Mirroring an image set in a fully disconnected environment".
117+
118+
.. Process the image set file on the disk and mirror the contents to a target mirror registry by entering the following command:
102119
+
103120
[source,terminal]
104121
----
105-
$ oc-mirror --v2 --config imagesetconfig.yaml docker://${REGISTRY}
122+
$ oc mirror -c imagesetconfig.yaml --from file://<file_path> docker://<mirror_registry_url> --v2
106123
----
107124

108125
. Mirror the latest {mce-short} images by following the steps in link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.12/html/clusters/cluster_mce_overview#install-on-disconnected-networks[Install on disconnected networks].

0 commit comments

Comments
 (0)