Skip to content

Commit f342ffb

Browse files
Fortune-Ndlovunickboldtrm3l
authored
feat: create a new script to mirror dynamic plugin OCI artifacts for airgapped deployments (#1844)
Co-authored-by: Nick Boldt <nboldt@redhat.com> Co-authored-by: Armel Soro <asoro@redhat.com>
1 parent b6dd6d6 commit f342ffb

3 files changed

Lines changed: 1302 additions & 1 deletion

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,7 @@ rhdh-operator-*.yaml
4444
rhdh-disconnected-install/
4545
rhdh-disconnected-install.Dockerfile
4646

47-
.oc-mirror.log
47+
.oc-mirror.log
48+
49+
# from mirror-plugins.sh script
50+
rhdh-plugin-mirroring-summary.txt
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
== Mirroring Red Hat Developer Hub Dynamic Plugins for Disconnected Environments
2+
3+
Red Hat Developer Hub (RHDH) uses dynamic plugins that are distributed as OCI (Open Container Initiative) artifacts. In disconnected or restricted environments, these plugin artifacts must be mirrored to a registry accessible by your cluster.
4+
5+
This guide explains how to use the link:./../scripts/mirror-plugins.sh[mirror-plugins.sh] script to mirror dynamic plugin OCI artifacts for deployments in restricted environments.
6+
7+
=== Prerequisites
8+
9+
The following tools are required to run the mirroring script:
10+
11+
* `skopeo >= 1.20` - For multi-arch image operations and manifest conversion. See link:https://github.com/containers/skopeo/blob/main/install.md[Installing Skopeo].
12+
* `tar >= 1.35` - GNU tar for extracting image layers.
13+
* `jq >= 1.7` - For JSON parsing and manipulation. See link:https://jqlang.github.io/jq/download/[Download jq].
14+
* `podman >= 5.6` - For building catalog index images. See link:https://podman.io/docs/installation[Podman Installation Instructions].
15+
16+
=== Procedures
17+
18+
[#_mirroring_all_plugins_from_catalog_index]
19+
==== Mirroring all plugins from a catalog index (Partially disconnected environment)
20+
21+
. Authenticate to both the source registry (`podman login quay.io`) and your target registry. For more information, see link:https://access.redhat.com/articles/RegistryAuthentication[Red Hat Container Registry Authentication].
22+
23+
. Run the mirroring script with the catalog index (replace `1.9` with your desired RHDH version):
24+
+
25+
[source,console]
26+
----
27+
bash mirror-plugins.sh \
28+
--plugin-index oci://quay.io/rhdh/plugin-catalog-index:1.9 \
29+
--to-registry registry.example.com
30+
----
31+
32+
[#_fully_disconnected_workflow]
33+
==== Mirroring to a fully disconnected environment
34+
35+
Two-phase process: export plugins to disk from a connected host, transfer to restricted network, then import. Authenticate to registries as needed (`podman login quay.io` for export, `podman login <your-registry>` for import). For more information, see link:https://access.redhat.com/articles/RegistryAuthentication[Red Hat Container Registry Authentication].
36+
37+
*Phase 1: Export plugins (Connected Host)*
38+
39+
Export all plugins to a local directory:
40+
41+
[source,console]
42+
----
43+
bash mirror-plugins.sh \
44+
--plugin-index oci://quay.io/rhdh/plugin-catalog-index:1.9 \
45+
--to-dir /tmp/rhdh-plugins
46+
----
47+
48+
*Phase 2: Import plugins (Restricted Network Environment)*
49+
50+
Import and push the plugins to your internal registry:
51+
52+
[source,console]
53+
----
54+
bash mirror-plugins.sh \
55+
--from-dir /tmp/rhdh-plugins \
56+
--to-registry internal-registry.example.com
57+
----
58+

0 commit comments

Comments
 (0)