3.3. 在受限环境中的 OpenShift 镜像上安装 Fuse

fis-image-streams.json 文件包含 Red Hat Fuse on OpenShift 的 imageStream 定义。但是,所有镜像流都引用 registry.redhat.io。您必须更改对 psi-internal-registry URL 的所有 registry.redhat.io 引用。

流程

  1. 下载 Red Hat Fuse on OpenShift imagestream json 文件。

    curl -o fis-image-streams.json {BASEURL}
  2. 打开 fis-image-streams.json 文件,找到对 'registry.redhat.io 的所有引用。例如:

    {
    "name": "1.9",
    "annotations": {
    "description": "Red Hat Fuse 7.10 Karaf S2I images.",
    "openshift.io/display-name": "Red Hat Fuse 7.10 Karaf",
    "iconClass": "icon-rh-integration",
    "tags": "builder,jboss-fuse,java,karaf,xpaas,hidden",
    "supports":"jboss-fuse:7.10.0,java:8,xpaas:1.2",
    "version": "1.9"
    },
    "referencePolicy": {
    "type": "Local"
    },
    "from": {
    "kind": "DockerImage",
    "name": "registry.redhat.io/fuse7/fuse-karaf-openshift-rhel8:1.10"
    }
    },
  3. 将文件中的所有 registry.redhat.io 引用替换为 psi-internal-registry 名称。例如:

    {
    "name": "1.9",
    "annotations": {
    "description": "Red Hat Fuse 7.10 Karaf S2I images.",
    "openshift.io/display-name": "Red Hat Fuse 7.10 Karaf",
    "iconClass": "icon-rh-integration",
    "tags": "builder,jboss-fuse,java,karaf,xpaas,hidden",
    "supports":"jboss-fuse:7.10.0,java:8,xpaas:1.2",
    "version": "1.9"
    },
    "referencePolicy": {
    "type": "Local"
    },
    "from": {
    "kind": "DockerImage",
    "name": "docker-registry.upshift.redhat.com/fuse7/fuse-karaf-openshift-rhel8:1.10"
    }
    },
  4. 替换所有引用后,运行以下命令在 OpenShift 镜像流上安装 Fuse:

    oc create -f fis-image-streams.json -n {namespace}