|
| 1 | +:_mod-docs-content-type: PROCEDURE |
| 2 | + |
| 3 | +[id="proc-install-rhdh-orchestrator-airgapped-env-using-helm-chart-full_{context}"] |
| 4 | += Installing {product} with Orchestrator in a fully disconnected {ocp-short} environment using the Helm chart |
| 5 | + |
| 6 | +You can install {product} ({product-very-short}) with the Orchestrator plugin in a fully air-gapped {ocp-short} environment using the Helm chart. |
| 7 | + |
| 8 | +You can mirror images to an intermediary disk, and then mirror from the disk to your target local registry and apply the generated cluster resources. |
| 9 | + |
| 10 | +.Prerequisites |
| 11 | + |
| 12 | +include::snip-installing-the-orchestrator-common-prerequisites.adoc[] |
| 13 | + |
| 14 | +.Procedure |
| 15 | + |
| 16 | +. Create an `ImageSetConfiguration.yaml` file for `oc-mirror`. You must use an `ImageSetConfiguration` file to include all mirrored images required by the Serverless Logic Operator, as shown in the following example: |
| 17 | ++ |
| 18 | +[source,yaml,subs="+attributes,+quotes"] |
| 19 | +---- |
| 20 | +apiVersion: mirror.openshift.io/v2alpha1 |
| 21 | +kind: ImageSetConfiguration |
| 22 | +mirror: |
| 23 | + additionalimages: |
| 24 | + - name: registry.redhat.io/openshift-serverless-1/logic-jobs-service-postgresql-rhel8:{rhoserverless-version}.0 |
| 25 | + - name: registry.redhat.io/openshift-serverless-1/logic-jobs-service-ephemeral-rhel8:{rhoserverless-version}.0 |
| 26 | + - name: registry.redhat.io/openshift-serverless-1/logic-data-index-postgresql-rhel8:{rhoserverless-version}.0 |
| 27 | + - name: registry.redhat.io/openshift-serverless-1/logic-data-index-ephemeral-rhel8:{rhoserverless-version}.0 |
| 28 | + - name: registry.redhat.io/openshift-serverless-1/logic-db-migrator-tool-rhel8:{rhoserverless-version}.0 |
| 29 | + - name: registry.redhat.io/openshift-serverless-1/logic-swf-builder-rhel8:{rhoserverless-version}.0 |
| 30 | + - name: registry.redhat.io/openshift-serverless-1/logic-swf-devmode-rhel8:{rhoserverless-version}.0 |
| 31 | +
|
| 32 | + helm: |
| 33 | + repositories: |
| 34 | + - name: openshift-charts |
| 35 | + url: https://charts.openshift.io |
| 36 | + charts: |
| 37 | + - name: redhat-developer-hub |
| 38 | + version: "{product-bundle-version}" |
| 39 | + - name: redhat-developer-hub-orchestrator-infra |
| 40 | + version: "{product-bundle-version}" |
| 41 | + operators: |
| 42 | + - catalog: registry.redhat.io/redhat/redhat-operator-index:{ocp-version} |
| 43 | + # For example: registry.redhat.io/redhat/redhat-operator-index:v4.19 |
| 44 | + packages: |
| 45 | + - name: logic-operator-rhel8 |
| 46 | + channels: |
| 47 | + - name: alpha |
| 48 | + minVersion: {rhoserverless-version}.0 |
| 49 | + maxVersion: {rhoserverless-version}.0 |
| 50 | + - name: serverless-operator |
| 51 | + channels: |
| 52 | + - name: stable |
| 53 | + minVersion: {rhoserverless-version}.0 |
| 54 | + maxVersion: {rhoserverless-version}.1 |
| 55 | +---- |
| 56 | ++ |
| 57 | +Alternatively, you can use `podman` commands to find the missing images and add them to the `additionalimages` list if the versions change: |
| 58 | ++ |
| 59 | +[source,terminal,subs="+attributes,+quotes"] |
| 60 | +---- |
| 61 | +IMG=registry.redhat.io/openshift-serverless-1/logic-operator-bundle:{rhoserverless-version} |
| 62 | +mkdir local-manifests-osl |
| 63 | +podman create --name temp-container "$IMG" -c "cat /manifests/logic-operator-rhel8.clusterserviceversion.yaml" |
| 64 | +podman cp temp-container:/manifests ./local-manifests-osl |
| 65 | +podman rm temp-container |
| 66 | +yq -r '.data."controllers_cfg.yaml" | from_yaml | .. | select(tag == "!!str") | select(test("^.*\\/.*:.*$"))' ./local-manifests-osl/manifests/logic-operator-rhel8-controllers-config_v1_configmap.yaml |
| 67 | +---- |
| 68 | + |
| 69 | +. Mirror the images in the `ImageSetConfiguration.yaml` file by running the `oc-mirror` command. For example: |
| 70 | ++ |
| 71 | +[source,terminal,subs="+attributes,+quotes"] |
| 72 | +---- |
| 73 | +oc-mirror --config=ImageSetConfiguration.yaml file:///path/to/mirror-archive --authfile /path/to/authfile --v2 |
| 74 | +---- |
| 75 | ++ |
| 76 | +[NOTE] |
| 77 | +==== |
| 78 | +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. |
| 79 | +==== |
| 80 | ++ |
| 81 | +. 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: |
| 82 | ++ |
| 83 | +[source,terminal,subs="+attributes,+quotes"] |
| 84 | +---- |
| 85 | +cd <workspace folder>/working-dir/cluster-resources/ |
| 86 | +oc apply -f . |
| 87 | +---- |
| 88 | ++ |
| 89 | +. Transfer the generated mirror archive file, for example, `/path/to/mirror-archive/mirror_000001.tar`, to a bastion host within your disconnected environment. |
| 90 | + |
| 91 | +. From the bastion host in your disconnected environment, which has access to the mirror registry, mirror the images from the archive file to your target registry. For example: |
| 92 | ++ |
| 93 | +[source,terminal,subs="+attributes,+quotes"] |
| 94 | +---- |
| 95 | +oc-mirror --v2 --from <mirror-archive-file> docker://<target-registry-url:port> --workspace file://<workspace folder> --authfile /path/to/authfile |
| 96 | +---- |
| 97 | ++ |
| 98 | +where: |
| 99 | + |
| 100 | +`<mirror-archive-file>`:: Enter the name of the transferred `tar` file. |
| 101 | + |
| 102 | +`<target-registry-url:port>`:: Enter your local registry, for example, `registry.localhost:5000`. |
| 103 | ++ |
| 104 | +include::snip-installing-the-orchestrator-common-steps.adoc[] |
| 105 | + |
| 106 | +. Apply the `redhat-developer-hub-orchestrator-infra` Helm chart and approve the install plans. See {installing-in-air-gap-book-link}#assembly-install-rhdh-airgapped-environment-ocp-helm_title-install-rhdh-air-grapped[Air-gapped installation with Helm chart instructions] for details. |
| 107 | + |
| 108 | +. Apply the {product-very-short} {product-version} Helm chart. Include the version {product-bundle-version} and enable the Orchestrator plugin, as shown in the following example: |
| 109 | ++ |
| 110 | +[source,yaml] |
| 111 | +---- |
| 112 | +orchestrator.enabled=true |
| 113 | +---- |
| 114 | + |
| 115 | +. The {product-very-short} {product-version} Helm chart defaults to pulling Orchestrator plugins from the official {company-name} NPM registry using full URL references. You must override this behavior to point to your local registry. |
| 116 | ++ |
| 117 | +To configure the Orchestrator plugins to use a custom registry, complete the following steps: |
| 118 | ++ |
| 119 | +* Open your `values.yaml` file. |
| 120 | ++ |
| 121 | +* Explicitly list the Orchestrator plugin packages under the `orchestrator.plugins` section. |
| 122 | +You must replace the simplified package references with the full URLs that point to your custom NPM registry, as shown in the following example: |
| 123 | ++ |
| 124 | +[source,yaml] |
| 125 | +---- |
| 126 | +orchestrator: |
| 127 | + plugins: |
| 128 | + - disabled: false |
| 129 | + package: <custom_NPM_registry_URL>[:<port>]/@redhat/backstage-plugin-orchestrator-backend-dynamic/-/backstage-plugin-orchestrator-backend-dynamic-{product-bundle-version}.tgz |
| 130 | + integrity: sha512-xxxxxx |
| 131 | + - disabled: false |
| 132 | + package: <custom_NPM_registry_URL>[:<port>]/@redhat/backstage-plugin-orchestrator/-/backstage-plugin-orchestrator-{product-bundle-version}.tgz |
| 133 | + integrity: sha512-xxxxxy |
| 134 | + - disabled: false |
| 135 | + package: <custom_NPM_registry_URL>[:<port>]/@redhat/backstage-plugin-orchestrator-form-widgets/-/backstage-plugin-orchestrator-form-widgets-{product-bundle-version}.tgz |
| 136 | + integrity: sha512-xxxxxz |
| 137 | + - disabled: false |
| 138 | + package: <custom_NPM_registry_URL>[:<port>]/@redhat/backstage-plugin-scaffolder-backend-module-orchestrator-dynamic/-/backstage-plugin-scaffolder-backend-module-orchestrator-dynamic-{product-bundle-version}.tgz |
| 139 | + integrity: sha512-xxxx1 |
| 140 | +---- |
| 141 | ++ |
| 142 | +where: |
| 143 | + |
| 144 | +`<custom_NPM_registry_URL>`:: |
| 145 | +Enter the address of your custom registry and make sure the integrity checksum, such as sha512-xxxxxx, matches the files in your registry. |
| 146 | + |
| 147 | +.Verification |
| 148 | + |
| 149 | +* Restart the {product-very-short} Pod and wait for the components to deploy properly. |
| 150 | + |
| 151 | +* After deployment is complete, go to the **{product-very-short}** UI and confirm that the Orchestrator UI is accessible and functioning correctly. |
| 152 | + |
| 153 | +[NOTE] |
| 154 | +==== |
| 155 | +The successful accessibility of the Orchestrator UI confirms that the underlying components are running and the cluster recognizes the plugin. |
| 156 | +==== |
0 commit comments