在 OpenShift Container Platform 上安装 Red Hat Developer Hub


Red Hat Developer Hub 1.4

Red Hat Customer Content Services

摘要

Red Hat Developer Hub 是一个用于构建开发人员门户的企业级平台。管理用户可以配置角色、权限和其他设置,以使其他授权用户能够使用 Operator 或 Helm Chart 在 Red Hat OpenShift Container Platform 上部署 Developer Hub 实例。

前言

您可以使用以下方法之一在 OpenShift Container Platform 上安装 Red Hat Developer Hub:

Red Hat Developer Hub Operator
  • 管理员使用 OperatorHub 安装它后,可以在 OpenShift Container Platform 中立即使用
  • 使用 Operator Lifecycle Management (OLM)在 OpenShift Container Platform 上管理自动订阅更新
  • 需要预安装 Operator 生命周期管理(OLM)来管理 Kubernetes 上的自动订阅更新
Red Hat Developer Hub Helm chart
  • 准备好在 OpenShift Container Platform 和 Kubernetes 中立即使用
  • 需要手动安装和管理

使用最能满足您需求和偏好的安装方法。

其他资源

您可以使用 OpenShift Container Platform 控制台中的 Red Hat Developer Hub Operator 在 OpenShift Container Platform 上安装 Red Hat Developer Hub。

1.1. 安装 Red Hat Developer Hub Operator

作为管理员,您可以安装 Red Hat Developer Hub Operator。授权用户可以使用 Operator 在以下平台上安装 Red Hat Developer Hub:

  • Red Hat OpenShift Container Platform (OpenShift Container Platform)
  • Amazon Elastic Kubernetes Service (EKS)
  • Microsoft Azure Kubernetes Service (AKS)

如需有关 OpenShift Container Platform 支持的版本的更多信息,请参阅 Red Hat Developer Hub 生命周期

容器可用于以下 CPU 架构:

  • AMD64 和 Intel 64 (x86_64)

先决条件

  • 以管理员身份在 OpenShift Container Platform Web 控制台中登录。
  • 您已在项目中配置了适当的角色和权限,以创建或访问应用程序。如需更多信息,请参阅有关构建应用程序的 Red Hat OpenShift Container Platform 文档
重要

为提高安全性,更好地控制 Operator 生命周期,并防止潜在的权限升级,请在专用默认 rhdh-operator 命名空间中安装 Red Hat Developer Hub Operator。您可以通过角色绑定或集群角色绑定限制其他用户对 Operator 资源的访问。

您还可以通过创建所需资源(如 Operator 组)在另一个命名空间中安装 Operator。如需更多信息,请参阅 在自定义命名空间中安装全局 Operator

但是,如果 Red Hat Developer Hub Operator 与其他 Operator 共享一个命名空间,则它也会共享相同的更新策略,从而导致自定义更新策略。例如,如果一个 Operator 设置为手动更新,Red Hat Developer Hub Operator 更新策略也会设置为 manual。如需更多信息,请参阅 在命名空间中重新定位 Operator

流程

  1. 在 OpenShift Container Platform Web 控制台的 Administrator 视角中,点 Operators > OperatorHub
  2. Filter by keyword 框中,输入 Developer Hub 并点 Red Hat Developer Hub Operator 卡。
  3. Red Hat Developer Hub Operator 页面中,点 Install
  4. Install Operator 页面中,使用 Update channel 下拉菜单选择您要使用的更新频道:

    • fast 通道提供 y-stream (x.y)和 z-stream (x.y.z)更新,例如从 1.1 升级到 1.2,或者从 1.1.0 升级到 1.1.1。

      重要

      fast 通道包括特定版本可用的所有更新。任何更新都可能会在 Red Hat Developer Hub 部署中引入意外更改。参阅发行注记以了解任何可能破坏更改的详细信息。

    • fast-1.1 频道只提供 z-stream 更新,例如从 1.1.1 升级到 1.1.2。如果要在以后更新 Red Hat Developer Hub y-version,例如从 1.1 更新至 1.2,您必须手动切换到 fast 频道。
  5. Install Operator 页面中,为 Operator 选择 Update approval 策略:

    • 如果选择 Automatic 选项,Operator 会更新,而无需手动确认。
    • 如果选择 Manual 选项,则当更新频道中发布新更新时,会打开通知。在开始安装前,管理员必须手动批准更新。
  6. Install

验证

  • 要查看已安装的 Red Hat Developer Hub Operator,请点 View Operator

作为开发者,您可以使用 Red Hat OpenShift Container Platform Web 控制台中的 Developer Catalog 在 OpenShift Container Platform 上部署 Red Hat Developer Hub 实例。此部署方法使用 Red Hat Developer Hub Operator。

流程

  1. 在 OpenShift Container Platform web 控制台中,选择您的 < my-rhdh-project> 项目。
  2. 从 OpenShift Container Platform Web 控制台的 Developer 视角,点 +Add
  3. Developer Catalog 面板中,单击 Operator Backed
  4. Filter by keyword 框中,输入 Developer Hub 并点 Red Hat Developer Hub 卡。
  5. Create
  6. 添加 Backstage 自定义资源内容
  7. Create Backstage 页面上,单击 Create

验证

pod 就绪后,您可以通过打开 URL 来访问 Red Hat Developer Hub 平台。

  1. Topology 视图中的 pod 并确认 Details 面板中的 Status,以确认 pod 已就绪。当 pod 就绪时,pod 状态为 Active
  2. Topology 视图中,点 Developer Hub pod 上的 Open URL 图标。

    Operator 安装 1

您可以使用以下方法之一在 OpenShift Container Platform 上安装 Red Hat Developer Hub:

  • OpenShift Container Platform 控制台
  • Helm CLI

您可以使用 Helm Chart 在 Red Hat OpenShift Container Platform Web 控制台中安装 Developer Hub。

Helm 是 OpenShift Container Platform 上的软件包管理器,它提供以下功能:

  • 使用自定义 hook 应用常规应用程序更新
  • 管理复杂应用程序的安装
  • 提供您可以在公共和私有服务器上托管的图表
  • 支持回滚到以前的应用程序版本

Red Hat Developer Hub Helm Chart 位于 OpenShift Dedicated 和 OpenShift Container Platform 上的 Helm 目录中。

先决条件

  • 已登陆到 OpenShift Container Platform 帐户。
  • 具有 OpenShift Container Platform admin 角色的用户已在项目中配置了适当的角色和权限来创建应用程序。如需有关 OpenShift Container Platform 角色的更多信息,请参阅使用 RBAC 定义和应用权限
  • 您已在 OpenShift Container Platform 中创建了一个项目。有关在 OpenShift Container Platform 中创建项目的更多信息,请参阅 Red Hat OpenShift Container Platform 文档

流程

  1. Developer Hub web 控制台的 Developer 视角,点 +Add
  2. Developer Catalog 面板中点击 Helm Chart
  3. Filter by keyword 框中,输入 Developer Hub 并点 Red Hat Developer Hub 卡。
  4. 在 Red Hat Developer Hub 页面中,单击 Create
  5. 在集群中,复制 OpenShift Container Platform 路由器主机(例如: apps.<clusterName>.com)。
  6. 选择单选按钮,以使用表单视图或 YAML 视图来配置 Developer Hub 实例。Form 视图会被默认选择。

    • 使用 Form view

      1. 要使用 Form 视图配置实例,请转至 Backstage 实例中 Root Schemaglobal → Enable service authentication,并将 OpenShift Container Platform 路由器主机粘贴到表单上的字段。
    • 使用 YAML 视图

      1. 要使用 YAML 视图配置实例,请将 OpenShift Container Platform 路由器主机名粘贴到 global.clusterRouterBase 参数值中,如下例所示:

        global:
          auth:
            backend:
              enabled: true
          clusterRouterBase: apps.<clusterName>.com
          # other Red Hat Developer Hub Helm Chart configurations
  7. 如果需要,请编辑其他值。

    注意

    有关主机的信息被复制,并可以被 Developer Hub 后端访问。

    当自动生成 OpenShift Container Platform 路由时,路由的主机值会被推断出来,同一主机信息发送到 Developer Hub。另外,如果在自定义域上存在 Developer Hub,通过使用值手动设置主机,则自定义主机具有优先权。

  8. Create 并等待数据库和 Developer Hub 启动。
  9. Open URL 图标以使用 Developer Hub 平台启动。

    rhdh helm install
注意

如果 Developer Hub 容器无法访问配置文件,则 developer-hub Pod 可能会处于 CrashLoopBackOff 状态。这个错误由以下日志表示:

Loaded config from app-config-from-configmap.yaml, env
...
2023-07-24T19:44:46.223Z auth info Configuring "database" as KeyStore provider type=plugin
Backend failed to start up Error: Missing required config value at 'backend.database.client'

要解决错误,请验证配置文件。

您可以使用 Helm CLI 在 Red Hat OpenShift Container Platform 上安装 Red Hat Developer Hub。

先决条件

  • 已在工作站上安装了 OpenShift CLI (oc)。
  • 已登陆到 OpenShift Container Platform 帐户。
  • 具有 OpenShift Container Platform admin 角色的用户已在项目中配置了适当的角色和权限来创建应用程序。如需有关 OpenShift Container Platform 角色的更多信息,请参阅使用 RBAC 定义和应用权限
  • 您已在 OpenShift Container Platform 中创建了一个项目。有关在 OpenShift Container Platform 中创建项目的更多信息,请参阅 Red Hat OpenShift Container Platform 文档
  • 已安装 Helm CLI 工具。

流程

  1. 创建并激活 < my-rhdh-project> OpenShift Container Platform 项目:

    NAMESPACE=<emphasis><rhdh></emphasis>
    oc new-project ${NAMESPACE} || oc project ${NAMESPACE}
  2. 安装 Red Hat Developer Hub Helm Chart:

    helm upgrade redhat-developer-hub -i https://github.com/openshift-helm-charts/charts/releases/download/redhat-redhat-developer-hub-1.4.3/redhat-developer-hub-1.4.3.tgz
  3. 使用 OpenShift Container Platform 集群中的 Developer Hub 数据库密码和路由器基本 URL 值配置 Developer Hub Helm Chart 实例:

    PASSWORD=$(oc get secret redhat-developer-hub-postgresql -o jsonpath="{.data.password}" | base64 -d)
    CLUSTER_ROUTER_BASE=$(oc get route console -n openshift-console -o=jsonpath='{.spec.host}' | sed 's/^[^.]*\.//')
    helm upgrade redhat-developer-hub -i "https://github.com/openshift-helm-charts/charts/releases/download/redhat-redhat-developer-hub-1.4.3/redhat-developer-hub-1.4.3.tgz" \
        --set global.clusterRouterBase="$CLUSTER_ROUTER_BASE" \
        --set global.postgresql.auth.password="$PASSWORD"
  4. 显示正在运行的 Developer Hub 实例 URL:

    echo "https://redhat-developer-hub-$NAMESPACE.$CLUSTER_ROUTER_BASE"

验证

  • 在浏览器中打开正在运行的 Developer Hub 实例 URL,以使用 Developer Hub。

其他资源

法律通告

Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

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

让开源更具包容性

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

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部