在 Google Cloud Platform 上的 OpenShift Dedicated 上安装 Red Hat Developer Hub


Red Hat Developer Hub 1.6

使用 Operator 或 Helm Chart 在 Red Hat OpenShift Dedicated 上运行 Red Hat Developer Hub

Red Hat Customer Content Services

摘要

平台管理员可以配置角色、权限和其他设置,以使其他授权用户在 Google Cloud Platform (GCP)上的 Red Hat OpenShift Dedicated 上部署 Red Hat Developer Hub (RHDH)实例。

前言

您可以使用以下方法之一在 Google Cloud Platform (GCP)上安装 OpenShift Dedicated 上的 Developer Hub:

  • Red Hat Developer Hub Operator
  • Red Hat Developer Hub Helm chart
重要

您必须在 app-config.yaml 中设置 baseUrl,以匹配 Developer Hub 实例的外部 URL。Red Hat Developer Hub 需要这个值才能正常工作。如果没有设置,前端和后端服务无法正确通信,功能可能无法按预期工作。

您可以使用 Red Hat Developer Hub Operator 在 GCP 上的 OpenShift Dedicated 上安装 Developer Hub。

先决条件

  • 您有一个有效的 GCP 帐户。
  • 您的 OpenShift Dedicated 集群在 GCP 上运行。如需更多信息,请参阅 Red Hat OpenShift Dedicated 文档中的在 GCP 上创建集群
  • 具有 OpenShift Dedicated 集群和 GCP 项目的管理员访问权限。

流程

  1. 在 OpenShift Container Platform Web 控制台菜单中,进入 Operators > OperatorHub
  2. Filter by keyword 字段中输入 Developer Hub,然后点 Red Hat Developer Hub Operator 卡。
  3. Red Hat Developer Hub Operator 页面中,点 Install
  4. 安装完成后,进入 Installed Operators 并选择 Red Hat Developer Hub Operator
  5. 置备自定义配置:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: app-config-rhdh
    data:
      "app-config-rhdh.yaml": |
        app:
          title: Red Hat Developer Hub
          baseUrl: https://__<my_developer_hub_url>__
        backend:
          auth:
            externalAccess:
                - type: legacy
                  options:
                    subject: legacy-default-config
                    secret: "${BACKEND_SECRET}"
          baseUrl: https://__<my_developer_hub_url>__
          cors:
            origin: https://__<my_developer_hub_url>__

    您必须创建一个名为 app-config-rhdh 的配置映射,以及包含 BACKEND_SECRET 的 Kubernetes Secret。Developer Hub 实例使用这些资源进行身份验证和应用程序设置。

    如需更多信息,请参阅置备自定义 Red Hat Developer Hub 配置

  6. 创建名为 app-config-rhdh 的配置映射,其中包含 app-config.yaml,如下所示:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: app-config-rhdh
    data:
      "app-config-rhdh.yaml": |
        app:
          title: Red Hat Developer Hub
          baseUrl: https://__<my_developer_hub_url>__
        backend:
          auth:
            externalAccess:
                - type: legacy
                  options:
                    subject: legacy-default-config
                    secret: "${BACKEND_SECRET}"
          baseUrl: https://__<my_developer_hub_url>__
          cors:
            origin: https://__<my_developer_hub_url>__
  7. 创建名为 my-rhdh-secrets 的 secret,并添加名为 BACKEND_SECRET 的键,其带有 Base64 编码的字符串 作为值:

    apiVersion: v1
    kind: Secret
    metadata:
      name: my-rhdh-secrets
    stringData:
      # TODO: Add the necessary auth secrets for service-to-service auth setup
      BACKEND_SECRET: "xxx" # Replace with your Base64-encoded secret
  8. 返回到 Developer Hub Operator 页面,再点 Create New Instance
  9. 指定 Developer Hub 部署的名称和命名空间。
  10. 配置所需的选项,如 Git 集成、secret 和用户权限。
  11. 检查配置,选择部署选项,然后单击 Create

验证

  • 要访问 Developer Hub,请导航到 OpenShift Container Platform Web 控制台中提供的 Developer Hub URL。

您可以使用 Red Hat Developer Hub Helm Chart 在 GCP 上的 OpenShift Dedicated 上安装 Developer Hub。

先决条件

  • 您有一个有效的 GCP 帐户。
  • 您的 OpenShift Dedicated 集群在 GCP 上运行。如需更多信息,请参阅 Red Hat OpenShift Dedicated 文档中的在 GCP 上创建集群
  • 已安装 Helm 3 或最新的。

流程

  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 实例。

    重要

    在使用 Helm Chart 部署 Developer Hub 之前,您必须定义自定义配置设置,如您的实例的公共 baseUrl。如果没有设置 baseUrl,应用程序无法正常工作。您可以通过 Form view 或 Helm install 向导中的 YAML 视图 来定义此配置。

    要配置 baseUrl,请在 Helm 配置中设置以下值:

    global:
      app:
        baseUrl: https://<your-developer-hub-url>
      backend:
        baseUrl: https://<your-developer-hub-url>
        cors:
          origin: https://<your-developer-hub-url>

    您还可以在 values.yaml 文件中定义额外的 secret、插件和高级配置。具体步骤请参阅: 置备自定义 Red Hat Developer Hub 配置

    Form 视图 会被默认选择。

    1. 使用 Form view

      1. 要使用 Form 视图配置实例,请转至 Backstage 实例中 Root Schema → global → Enable service authentication,并将 OpenShift Container Platform 路由器主机粘贴到表单上的字段。
    2. 使用 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. 如果需要,编辑其他值,然后点 Create 并等待数据库和 Developer Hub 启动。

验证

  • 要访问 Developer Hub,点 Open URL 图标。

法律通告

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 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

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

Theme

© 2026 Red Hat
返回顶部