3.3. 在受限环境中的 OpenShift 镜像上安装 Fuse
fis-image-streams.json
文件包含 OpenShift 上 Red Hat Fuse 的 imageStream 定义。但是,所有镜像流都引用 registry.redhat.io
。您必须更改对 psi-internal-registry
URL 的所有 registry.redhat.io
引用。
流程
从 OpenShift 镜像流 json 文件下载 Red Hat Fuse。
curl -o fis-image-streams.json {BASEURL}
打开 fis-image-streams.json 文件,并找到对 registry.redhat.io 的所有引用。例如,
{ "name": "1.8", "annotations": { "description": "Red Hat Fuse 7.8 Karaf S2I images.", "openshift.io/display-name": "Red Hat Fuse 7.8 Karaf", "iconClass": "icon-rh-integration", "tags": "builder,jboss-fuse,java,karaf,xpaas,hidden", "supports":"jboss-fuse:7.8.0,java:8,xpaas:1.2", "version": "1.8" }, "referencePolicy": { "type": "Local" }, "from": { "kind": "DockerImage", "name": "registry.redhat.io/fuse7/fuse-karaf-openshift:1.8" } },
将文件中的所有
registry.redhat.io
引用替换为psi-internal-registry
名称。例如,{ "name": "1.8", "annotations": { "description": "Red Hat Fuse 7.8 Karaf S2I images.", "openshift.io/display-name": "Red Hat Fuse 7.8 Karaf", "iconClass": "icon-rh-integration", "tags": "builder,jboss-fuse,java,karaf,xpaas,hidden", "supports":"jboss-fuse:7.8.0,java:8,xpaas:1.2", "version": "1.8" }, "referencePolicy": { "type": "Local" }, "from": { "kind": "DockerImage", "name": "docker-registry.upshift.redhat.com/fuse7/fuse-karaf-openshift:1.8" } },
替换所有引用后,运行以下命令在 OpenShift 镜像流上安装 Fuse:
oc create -f fis-image-streams.json -n {namespace}