Skip to content

Commit cc2cc43

Browse files
themr0crm3ljmagak
authored
RHDHBUGS-2070 - Added oc-mirror prerequisite (redhat-developer#1430)
Co-authored-by: Armel Soro <[email protected]> Co-authored-by: Judith Magak <[email protected]>
1 parent d168d6b commit cc2cc43

5 files changed

+82
-73
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ In a partially disconnected environment, the cluster cannot access external regi
1919

2020
. In a terminal, download and extract the Helm chart by running the following commands:
2121
+
22-
[source,terminal,subs="attributes+"]
22+
[source,terminal,subs="+attributes,+quotes"]
2323
----
2424
helm repo add _<helm_chart_repo_name>_ https://charts.openshift.io/
2525
helm repo update
2626
helm pull _<helm_chart_repo_name>_/redhat-developer-hub --version _<rhdh_version>_
2727
helm show values _<helm_chart_repo_name>_/redhat-developer-hub --version _<rhdh_version>_ > values.default.yaml
2828
----
2929
+
30-
where
30+
where:
3131

32-
_<helm_chart_repo_name>_ :: Specifies the name of the Helm chart repository, for example, `openshift-helm-charts`.
33-
_<rhdh_version>_ :: Specifies the {product} version that you want to use, for example, `{product-chart-version}`.
32+
_<helm_chart_repo_name>_ :: Enter the name of the Helm chart repository, for example, `openshift-helm-charts`.
33+
_<rhdh_version>_ :: Enter the {product} version that you want to use, for example, `{product-chart-version}`.
3434
+
3535
. Use `yq` to extract the image digests by running the following commands:
3636
+

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

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,36 @@ If your network has access to the registry through a bastion host, you can use t
88
.Prerequisites
99

1010
* You have set up your workstation.
11-
** You have access to the registry.redhat.io.
11+
** 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-
* {ocp-docs-link}/html-single/disconnected_environments/index#about-installing-oc-mirror-v2[You have installed the oc-mirror OpenShift CLI plugin].
15-
** You have an account in https://developers.redhat.com/[{rhdeveloper-name}] portal.
16-
** You have set up your intermediary host.
17-
** Your host has access to the disconnected cluster and to the target mirror registry, for example, the {ocp-brand-name} 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].
18-
** {ocp-docs-link}/html-single/disconnected_environments/index#about-installing-oc-mirror-v2[You have installed the oc-mirror OpenShift CLI plugin].
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.
15+
* You have set up your intermediary host.
16+
** Your host has access to the link:https://registry.redhat.io[{company-name} Ecosystem Catalog].
17+
** Your host has access to image registry on the destination host.
18+
See {ocp-docs-link}/html-single/registry/index#securing-exposing-registry[Exposing the registry].
19+
* You have set up your destination host.
1920
** You have installed {ocp-brand-name} {ocp-version-min} or later.
20-
** You have installed the {openshift-cli} on your workstation.
21-
* Make sure that your system meets the minimum sizing requirements. See {about-book-link}#rhdh-sizing_about-rhdh[Sizing requirements for {product}].
21+
** Your system meets the minimum sizing requirements. See {about-book-link}#rhdh-sizing_about-rhdh[Sizing requirements for {product}].
2222

2323
.Procedure
2424
. Create an `ImageSetConfiguration` file to specify the resources that you want to mirror. For example:
2525
+
26-
[source,terminal,subs="+quotes"]
26+
[source,yaml,subs="+attributes,+quotes"]
2727
----
2828
apiVersion: mirror.openshift.io/v1alpha2
2929
kind: ImageSetConfiguration
3030
mirror:
3131
helm:
3232
repositories:
33-
- name: _<repository_name>_ (1)
34-
url: _<repository_url>_ (2)
33+
- name: openshift-charts
34+
url: https://charts.openshift.io
3535
charts:
36-
- name: _<chart_name>_ (3)
37-
version: "_<rhdh_version>_" (4)
36+
- name: redhat-developer-hub
37+
version: "{product-version}"
3838
----
39-
<1> The name of the repository that you want to mirror, for example, `openshift-charts`.
40-
<2> The URL for the repository that you want to mirror, for example, `https://charts.openshift.io`.
41-
<3> The name of the Helm chart that you want to mirror, for example, `redhat-developer-hub`.
42-
<4> The version of {product} that you want to use, for example, `{product-version}`
39+
where:
40+
`version: "{product-version}"`:: Enter the {product} version to mirror.
4341

4442
. Mirror the resources specified in the `ImageSetConfiguration.yaml` file by running the `oc-mirror` command. For example:
4543
+
@@ -51,19 +49,18 @@ oc-mirror --config=_<mirror_config_directory>_/ImageSetConfiguration.yaml _<mirr
5149
--
5250
where:
5351

54-
`<mirror_config_directory>` :: Specifies the location of your image set configuration file on your system, for example, `.user`.
52+
`<mirror_config_directory>` :: Enter the location of your image set configuration file on your system, for example, `.user`.
5553

56-
`<mirror_configuration_file>` :: Specifies the name of your mirror configuration yaml file, for example, `mirror-config.yaml`
57-
58-
`<mirror_archive_directory>` :: Specifies the location of your directory where the mirror archive will be created, for example, `pass:[file://.user]`.
54+
`<mirror_archive_directory>` :: Enter the location of your directory where the mirror archive will be created, for example, `pass:[file://.user]`.
5955
--
6056
+
6157
[NOTE]
6258
====
6359
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.
6460
====
6561
+
66-
.Example output
62+
Example output:
63+
+
6764
[source,terminal,subs="+quotes"]
6865
----
6966
Creating archive /path/to/mirror-archive/mirror_seq1_000000.tar
@@ -85,9 +82,9 @@ oc-mirror --from _<mirror-archive-file>_ _<target-registry>_
8582
--
8683
where:
8784

88-
`<mirror_archive_file>` :: Specifies the name of the file containing the resources that you want to mirror, for example,`mirror_seq1_0000.tar`.
85+
`<mirror_archive_file>` :: Enter the name of the file containing the resources that you want to mirror, for example,`mirror_seq1_0000.tar`.
8986

90-
`<target_registry>` :: Specifies the name of the target registry that you want to push the mirrored images to, for example, `docker://registry.localhost:5000`.
87+
`<target_registry>` :: Enter the name of the target registry that you want to push the mirrored images to, for example, `docker://registry.localhost:5000`.
9188
--
9289
+
9390
.Example output
@@ -123,9 +120,9 @@ oc apply -f _<workspace_directory>_/_<results_directory>_/ImageContentSourcePoli
123120
--
124121
where:
125122

126-
`<workspace-directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
123+
`<workspace-directory>` :: Enter the name of your workspace directory, for example, `oc-mirror-workspace`.
127124

128-
`<results-directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
125+
`<results-directory>` :: Enter the name of your results directory, for example, `results-1738070846`.
129126
--
130127
. 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:
131128
+
@@ -140,13 +137,13 @@ helm install _<rhdh_instance>_ _<workspace_directory>_/_<results_directory>_/cha
140137
--
141138
where:
142139

143-
`<rhdh_instance>` :: Specifies the name of your {product} instance, for example, `my-rhdh`.
140+
`<rhdh_instance>` :: Enter the name of your {product} instance, for example, `{my-product-namespace}`.
144141

145-
`<workspace_directory>` :: Specifies the name of your workspace directory, for example, `oc-mirror-workspace`.
142+
`<workspace_directory>` :: Enter the name of your workspace directory, for example, `oc-mirror-workspace`.
146143

147-
`<results_directory>` :: Specifies the name of your results directory, for example, `results-1738070846`.
144+
`<results_directory>` :: Enter the name of your results directory, for example, `results-1738070846`.
148145

149-
`<archive_file>` :: Specifies the name of the archive file containing the resources that you want to mirror, for example, `redhat-developer-hub-1.4.1.tgz`.
146+
`<archive_file>` :: Enter the name of the archive file containing the resources that you want to mirror, for example, `redhat-developer-hub-1.4.1.tgz`.
150147

151-
`<your_namespace>` :: Specifies the namespace that you want to deploy the Helm chart to, for example, `{my-product-namespace}`.
148+
`<your_namespace>` :: Enter the namespace that you want to deploy the Helm chart to, for example, `{my-product-namespace}`.
152149
--

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

Lines changed: 7 additions & 10 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-
* {ocp-docs-link}/html-single/disconnected_environments/index#about-installing-oc-mirror-v2[You have installed the oc-mirror OpenShift CLI plugin].
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.
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

@@ -29,23 +29,20 @@ oc login -u <user> -p <password> https://api.<hostname>:6443
2929
. Create an `ImageSetConfiguration.yaml` file.
3030
. In your `ImageSetConfiguration.yaml` file, specify the resources that you want to mirror. For example:
3131
+
32-
[source,terminal,subs="+quotes"]
32+
[source,yaml,subs="+attributes,+quotes"]
3333
----
3434
apiVersion: mirror.openshift.io/v1alpha2
3535
kind: ImageSetConfiguration
3636
mirror:
3737
helm:
3838
repositories:
39-
- name: _<repository_name>_ (1)
40-
url: _<repository_url>_ (2)
39+
- name: openshift-charts
40+
url: https://charts.openshift.io
4141
charts:
42-
- name: _<chart_name>_ (3)
43-
version: "_<rhdh_version>_" (4)
42+
- name: redhat-developer-hub
43+
version: "{product-version}"
4444
----
45-
<1> The name of the repository containing the Helm chart that you want to mirror, for example, `openshift-charts`.
46-
<2> The URL for the repository containing the Helm chart that you want to mirror, for example, `https://charts.openshift.io`.
47-
<3> The name of the Helm chart containing the images that you want to mirror, for example, `redhat-developer-hub`.
48-
<4> The {product} version that you want to use, for example, `{product-version}`
45+
`version: "{product-version}"`:: Enter the {product} version to mirror.
4946

5047
. Mirror the resources specified in the image set configuration file directly to the target registry by running the `oc-mirror` command. For example:
5148
+

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

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,29 @@ If your network has access to the registry through a bastion host, you can use t
1616
* You have installed `umoci` CLI tool.
1717
* You have an active `oc registry`, `podman`, or `skopeo` session to the `registry.redhat.io` {company-name} Ecosystem Catalog. For more information, see link:link:https://access.redhat.com/articles/RegistryAuthentication[{company-name} Container Registry Authentication].
1818
* You have installed the `opm` CLI tool. For more information, see {ocp-docs-link}/html/cli_tools/opm-cli#olm-about-opm_cli-opm-install[Installing the opm CLI].
19+
* 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.
1920
* Make sure that your system meets the minimum sizing requirements. See {about-book-link}#rhdh-sizing_about-rhdh[Sizing requirements for {product}].
2021

2122
.Procedure
2223
. Download the mirroring script to disk by running the following command:
2324
+
24-
[source,terminal,subs="attributes+"]
25+
[source,terminal,subs="+attributes,+quotes"]
2526
----
2627
curl -sSLO https://raw.githubusercontent.com/redhat-developer/rhdh-operator/refs/heads/release-{product-version}/.rhdh/scripts/prepare-restricted-environment.sh
2728
----
2829
+
2930
. Run the mirroring script by using the `bash` command with the appropriate set of options:
3031
+
31-
[source,terminal,subs="attributes+"]
32+
[source,terminal,subs="+attributes,+quotes"]
3233
----
3334
bash prepare-restricted-environment.sh
3435
--filter-versions "{product-version}"
35-
--to-dir _<my_pulled_image_location>_ <1>
36-
[--use-oc-mirror true] <2>
36+
--to-dir _<my_pulled_image_location>_
37+
[--use-oc-mirror true]
3738
----
38-
<1> Specifies the absolute path to a directory where you want to pull all of the necessary images with the `--to-dir` option, for example, `/home/user/rhdh-operator-mirror-dir`.
39-
<2> (Optional) Uses the `oc-mirror` {ocp-short} CLI plugin to mirror images.
39+
where:
40+
`--to-dir _<my_pulled_image_location>_`:: Enter the absolute path to a directory where you want to pull all of the necessary images, for example, `/home/user/rhdh-operator-mirror-dir`.
41+
`--use-oc-mirror true`:: (Recommended on {ocp-short}) Use the `oc-mirror` {ocp-short} CLI plugin to mirror images.
4042
+
4143
[NOTE]
4244
====
@@ -48,15 +50,16 @@ The script can take several minutes to complete as it copies multiple images to
4850
+
4951
[source,terminal,subs="+quotes,+attributes"]
5052
----
51-
bash _<my_pulled_image_location>_/install.sh <1>
52-
--from-dir _<my_pulled_image_location>_ <2>
53-
[--to-registry _<my.registry.example.com>_] <3>
54-
[--use-oc-mirror true] <4>
53+
bash _<my_pulled_image_location>_/install.sh
54+
--from-dir _<my_pulled_image_location>_
55+
[--to-registry _<my.registry.example.com>_]
56+
[--use-oc-mirror true]
5557
----
56-
<1> The downloaded image and the absolute path to the directory where it is stored on your system.
57-
<2> Specifies the directory where you want to pull all of the necessary images with the `--to-dir` option.
58-
<3> Specifies the URL for the target mirror registry where you want to mirror the images.
59-
<4> (Optional) Uses the `oc-mirror` {ocp-short} CLI plugin to mirror images.
58+
where:
59+
`_<my_pulled_image_location>_/install.sh`:: Enter the downloaded installation script and the absolute path to the directory where it is stored on your system.
60+
`--from-dir _<my_pulled_image_location>_`:: Enter the directory where you want to pull all of the necessary images.
61+
`--to-registry`:: (Optional) Enter the URL for the target mirror registry where you want to mirror the images.
62+
`--use-oc-mirror true`:: Recommended on {ocp-short}: Use the `oc-mirror` {ocp-short} CLI plugin to mirror images.
6063
+
6164
[IMPORTANT]
6265
====

0 commit comments

Comments
 (0)