Skip to content

Commit

Permalink
RHIDP-5351: Apply SME review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
linfraze committed Feb 6, 2025
1 parent 8180a90 commit 3109bc3
Showing 1 changed file with 26 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,14 @@ where:

`<results-directory>` :: Specifies the name of the image content source policy file, for example, `ImageContentSourcePolicy.yaml `.
--
. In your air-gapped environment, deploy the Helm chart to the namespace that you want to use by running the `helm install` command and `namespace` options. For example:
. 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:
+
[source,terminal,subs="attributes+"]
----
helm install <rhdh-instance> <workspace-directory>/<results-directory>/<charts-directory>/<archive-file> --namespace <your-namespace> --create-namespace
CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
helm install <rhdh-instance> <workspace-directory>/<results-directory>/<charts-directory>/<archive-file> --namespace <your-namespace> --create-namespace \
--set global.clusterRouterBase="$CLUSTER_ROUTER_BASE"
----
+
--
Expand All @@ -138,31 +141,23 @@ where:
`<your-namespace>` :: Specifies the namespace that you want to deploy the Helm chart to, for example, `{my-product-namespace}`.
--

.Verification
. To verify that all resources are successfully deployed and running, check the status of your deployments and pods in the cluster.
. View the router base URL by entering the following command:
+
[source,terminal,subs="attributes+"]
----
CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
helm install redhat-developer-hub./mirror-archive/oc-mirror-workspace/src/charts/redhat-developer-hub-1.4.1.tgz \
--set global.clusterRouterBase="$CLUSTER_ROUTER_BASE"
----
. Ensure that the route matches the expected URL based on the router base of the cluster. If necessary, update the route to align with your expected configuration.

== Installing {product} on {ocp-short} in a fully disconnected environment with the Helm chart

If your network has access to the registry through a bastion host or physical disk, you can use the Helm chart to install {product} by mirroring specified resources and transferring them to your air-gapped environment without any connection to the internet.

.Prerequisites

* You have installed {ocp-brand-name} {ocp-version-min} or later.
* You have access to the `registry.redhat.io`.
* You have access to a mirror registry that can be reached from the disconnected cluster, for example, the {ocp-brand-name} image registry. For more information about exposing the {ocp-short} image registry, see https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html-single/registry/index#securing-exposing-registry[Exposing the registry].
* You have installed the {openshift-cli} on your workstation.
* You are logged in to your target mirror registry and have permissions to push images to it. For more information, see link:https://docs.openshift.com/container-platform/4.17/disconnected/mirroring/installing-mirroring-disconnected.html#installation-adding-registry-pull-secret_installing-mirroring-disconnected[Configuring credentials that allow images to be mirrored].
* You have installed the oc-mirror {openshift-cli} plugin, for more information see https://docs.openshift.com/container-platform/4.17/disconnected/mirroring/installing-mirroring-disconnected.html#installation-oc-mirror-installing-plugin_installing-mirroring-disconnected[Installing the oc-mirror OpenShift CLI plugin].
* You have an account in https://developers.redhat.com/[{rhdeveloper-name}] portal.
* You have set up your workstation.
** You have access to the registry.redhat.io.
** You have access to the charts.openshift.io Helm chart repository.
** You have installed the {openshift-cli} on your workstation.
** You have installed the oc-mirror {openshift-cli} plugin, for more information see https://docs.openshift.com/container-platform/4.17/disconnected/mirroring/installing-mirroring-disconnected.html#installation-oc-mirror-installing-plugin_installing-mirroring-disconnected[Installing the oc-mirror OpenShift CLI plugin].
** You have an account in https://developers.redhat.com/[{rhdeveloper-name}] portal.
* You have set up your intermediary host.
** 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 https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html-single/registry/index#securing-exposing-registry[Exposing the registry].
** You have installed the oc-mirror {openshift-cli} plugin, for more information see https://docs.openshift.com/container-platform/4.17/disconnected/mirroring/installing-mirroring-disconnected.html#installation-oc-mirror-installing-plugin_installing-mirroring-disconnected[Installing the oc-mirror OpenShift CLI plugin].
** You have installed {ocp-brand-name} {ocp-version-min} or later.
** You have installed the {openshift-cli} on your workstation.

.Procedure
. Create an `ImageSetConfiguration` file to specify the resources that you want to mirror. For example:
Expand All @@ -185,11 +180,11 @@ mirror:
<3> The name of the Helm chart that you want to mirror, for example, `redhat-developer-hub`.
<4> The version of {product} that you want to use, for example, `{product-version}`

. Mirror the resources specified in the `ImageSetConfiguration` file by running the `oc-mirror` command. For example:
. Mirror the resources specified in the `ImageSetConfiguration.yaml` file by running the `oc-mirror` command. For example:
+
[source,terminal,subs="attributes+"]
----
oc-mirror --config=<mirror-config-directory>/<mirror-configuration-file> <mirror-archive-directory>/<mirror-archive-file>
oc-mirror --config=<mirror-config-directory>/<mirror-configuration-file> <mirror-archive-directory>/
----
+
--
Expand All @@ -201,14 +196,12 @@ where:

`<mirror-configuration-file>` :: Specifies the name of your mirror configuration yaml file, for example, `mirror-config.yaml`

`<mirror-archive-directory>` :: Specifies the location of your `.tar` file containing the mirror archive, for example,`.user`.

`<mirror-archive-file>` :: Specifies the location and name of your `.tar` file containing the mirror archive, for example,`file://mirror-archive`.
`<mirror-archive-directory>` :: Specifies the location of your directory where the mirror archive will be created, for example,`file://.user`.
--
+
[NOTE]
====
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.
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.
====
+
.Example output
Expand All @@ -217,7 +210,7 @@ Running the `oc-mirror` command creates a local workspace containing the Helm ch
Creating archive /path/to/mirror-archive/mirror_seq1_000000.tar
----
+
. Transfer the generated `.tar` archive file (for example, `mirror_seq1_000000.tar`) to the air-gapped environment.
. Transfer the generated archive file (for example, `mirror_seq1_000000.tar`) to the air-gapped environment.
. Connect to your air-gapped environment and make sure that you are also connected to the following objects:
+
* The local target registry
Expand Down Expand Up @@ -277,11 +270,14 @@ where:

`<results-directory>` :: Specifies the name of the image content source policy file, for example, `ImageContentSourcePolicy.yaml `.
--
. In your air-gapped environment, deploy the Helm chart to the namespace that you want to use by running the `helm install` command and `namespace` options. For example:
. 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:
+
[source,terminal,subs="attributes+"]
----
helm install <rhdh-instance> <workspace-directory>/<results-directory>/<charts-directory>/<archive-file> --namespace <your-namespace> --create-namespace
CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
helm install <rhdh-instance> <workspace-directory>/<results-directory>/<charts-directory>/<archive-file> --namespace <your-namespace> --create-namespace \
--set global.clusterRouterBase="$CLUSTER_ROUTER_BASE"
----
+
--
Expand All @@ -299,15 +295,3 @@ where:

`<your-namespace>` :: Specifies the namespace that you want to deploy the Helm chart to, for example, `{my-product-namespace}`.
--

.Verification
. To verify that all resources are successfully deployed and running, check the status of your deployments and pods in the cluster.
. View the router base URL by entering the following command:
+
[source,terminal,subs="attributes+"]
----
CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
helm install redhat-developer-hub./mirror-archive/oc-mirror-workspace/src/charts/redhat-developer-hub-1.4.1.tgz \
--set global.clusterRouterBase="$CLUSTER_ROUTER_BASE"
----
. Ensure that the route matches the expected URL based on the router base of the cluster. If necessary, update the route to align with your expected configuration.

0 comments on commit 3109bc3

Please sign in to comment.