搜索

2.2. 在 OpenShift 4.x 服务器上安装 Fuse 镜像流和模板

download PDF
注意

在 Fuse 7.13 中,不支持在 IBM Power Systems、IBM Z 和 LinuxONE 上的 OpenShift 镜像流和模板上安装 Fuse。

IBM Power Systems、IBM Z 和 LinuxONE 仅支持在 OpenShift Operator 上使用 Fuse 安装的组件。

OpenShift Container Platform 4.x 使用 Samples Operator (在 OpenShift 命名空间中运行),安装和更新基于 Red Hat Enterprise Linux (RHEL)的 OpenShift Container Platform 镜像流和模板。在 OpenShift 镜像流和模板上安装 Fuse:

  • 重新配置 Samples Operator
  • 将 Fuse 镜像流和模板添加到 Skipped Imagestreams 和 Skipped Templates 字段中。

    • 跳过的 Imagestreams:位于 Samples Operator 清单中的 Imagestreams,但集群管理员希望 Operator 忽略或不管理。
    • 跳过的模板:位于 Samples Operator 清单中的模板,但集群管理员希望 Operator 忽略或不予管理。

先决条件

  • 您可以访问 OpenShift 服务器。
  • 您已将身份验证配置为 registry.redhat.io

流程

  1. 启动 OpenShift 4 服务器。
  2. 以管理员身份登录 OpenShift 服务器。

    oc login --user system:admin --token=my-token --server=https://my-cluster.example.com:6443
  3. 验证您是否使用您为其创建 docker-registry secret 的项目。

    oc project openshift
  4. 查看 Samples operator 的当前配置。

    oc get configs.samples.operator.openshift.io -n openshift-cluster-samples-operator -o yaml
  5. 配置 Samples operator 以忽略添加的 fuse 模板和镜像流。

    oc edit configs.samples.operator.openshift.io -n openshift-cluster-samples-operator
  6. 添加 Fuse imagestreams Skipped Imagestreams 部分,并将 Fuse 和 Spring Boot 2 模板添加到 Skipped Templates 部分。

    [...]
    spec:
      architectures:
      - x86_64
      managementState: Managed
      skippedImagestreams:
      - fuse-console-rhel8
      - fuse-eap-openshift-jdk8-rhel7
      - fuse-eap-openshift-jdk11-rhel8
      - fuse-java-openshift-rhel8
      - fuse-java-openshift-jdk11-rhel8
      - fuse-karaf-openshift-rhel8
      - fuse-karaf-openshift-jdk11-rhel8
      - fuse-apicurito-generator-rhel8
      - fuse-apicurito-rhel8
      skippedTemplates:
      - s2i-fuse713-eap-camel-amq
      - s2i-fuse713-eap-camel-cdi
      - s2i-fuse713-eap-camel-cxf-jaxrs
      - s2i-fuse713-eap-camel-cxf-jaxws
      - s2i-fuse713-karaf-camel-amq
      - s2i-fuse713-karaf-camel-log
      - s2i-fuse713-karaf-camel-rest-sql
      - s2i-fuse713-karaf-cxf-rest
      - s2i-fuse713-spring-boot-2-camel-amq
      - s2i-fuse713-spring-boot-2-camel-config
      - s2i-fuse713-spring-boot-2-camel-drools
      - s2i-fuse713-spring-boot-2-camel-infinispan
      - s2i-fuse713-spring-boot-2-camel-rest-3scale
      - s2i-fuse713-spring-boot-2-camel-rest-sql
      - s2i-fuse713-spring-boot-2-camel
      - s2i-fuse713-spring-boot-2-camel-xa
      - s2i-fuse713-spring-boot-2-camel-xml
      - s2i-fuse713-spring-boot-2-cxf-jaxrs
      - s2i-fuse713-spring-boot-2-cxf-jaxws
      - s2i-fuse713-spring-boot-2-cxf-jaxrs-xml
      - s2i-fuse713-spring-boot-2-cxf-jaxws-xml
  7. 在 OpenShift 镜像流上安装 Fuse。

    BASEURL=https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.0.fuse-7_13_0-00014-redhat-00001
    
    oc create -n openshift -f ${BASEURL}/fis-image-streams.json
  8. 在 OpenShift 快速启动模板上安装 Fuse:

    for template in eap-camel-amq-template.json \
     eap-camel-cdi-template.json \
     eap-camel-cxf-jaxrs-template.json \
     eap-camel-cxf-jaxws-template.json \
     karaf-camel-amq-template.json \
     karaf-camel-log-template.json \
     karaf-camel-rest-sql-template.json \
     karaf-cxf-rest-template.json ;
     do oc create -n openshift -f \
     ${BASEURL}/quickstarts/${template}
     done
  9. 安装 Spring Boot 2 Quickstart 模板:

    for template in spring-boot-2-camel-amq-template.json \
     spring-boot-2-camel-config-template.json \
     spring-boot-2-camel-drools-template.json \
     spring-boot-2-camel-infinispan-template.json \
     spring-boot-2-camel-rest-3scale-template.json \
     spring-boot-2-camel-rest-sql-template.json \
     spring-boot-2-camel-template.json \
     spring-boot-2-camel-xa-template.json \
     spring-boot-2-camel-xml-template.json \
     spring-boot-2-cxf-jaxrs-template.json \
     spring-boot-2-cxf-jaxws-template.json \
     spring-boot-2-cxf-jaxrs-xml-template.json \
     spring-boot-2-cxf-jaxws-xml-template.json ;
     do oc create -n openshift -f \
     ${BASEURL}/quickstarts/${template}
     done
  10. (可选) 查看 OpenShift 模板上安装的 Fuse:

    oc get template -n openshift
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.