迁移红帽更新基础架构


Red Hat Update Infrastructure 4

迁移到 Red Hat Update Infrastructure 4 并升级到最新版本的 Red Hat Update Infrastructure

Red Hat Customer Content Services

摘要

本文档列出了要求,并提供了有关帮助云供应商迁移到 Red Hat Update Infrastructure 4(RHUI 4)的详细信息。它还提供了升级到 Red Hat Update Infrastructure 最新版本的详细说明。

使开源包含更多

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。我们从这四个术语开始:master、slave、黑名单和白名单。由于此项工作十分艰巨,这些更改将在即将推出的几个发行版本中逐步实施。有关更多详情,请参阅我们的首席技术官 Chris Wright 提供的消息

第 1 章 迁移红帽更新基础架构

安装 Red Hat Update Infrastructure(RHUI)4 后,可以将您现有的软件仓库从 RHUI 3 迁移到 RHUI 4。

迁移在您的 RHUI 4 机器上启用 RHUI 3 软件仓库。但是,它不会迁移 RPM 内容或 RPM 数据。您必须自动重新同步这些软件仓库,或者在迁移完成后手动进行。

在开始迁移过程前,请注意以下建议和限制:

  • 您无法直接从 RHUI 3 升级到 RHUI 4。您必须安装 RHUI 4 和当前的 RHUI 3 安装。然后,您可以使用来自 RHUI 3 的相同 CA 证书在 RHUI 4 上同步 RHUI 3 存储库。这也确保旧客户端能够从 RHUI 4 访问内容。最后,您可以更改 RHUI 3 负载均衡器以指向 RHUI 4 CDS 节点。
  • 您不能使用 LEAPP 从 RHUI 3 升级到 RHUI 4。您必须设置 RHUI 4 和 RHUI 3,然后迁移 RHUI 数据。
  • 使用 RHUI 4 时,您可以在迁移之前和之后使用任何负载均衡器版本。例如,您可以使用来自 RHUI 3 的 HAProxy 节点的 RHEL 7 版本和 RHUI 4 实例,而不是来自 RHUI 4 的 RHEL 8 版本。
  • 要路由到 RHUI 的不同实例,例如 RHUI 3 实例和一个 RHUI 4 实例(从一个地址或负载均衡器),您必须设置一个 RHUI 4 实例,以便可以接管来自旧 RHUI 3 实例的所有内容。

    但是,不建议使用单一地址或负载均衡器运行 RHUI3 和 RHUI4 实例的配置。您可能会遇到很多问题,从 SSL 证书冲突到请求之间的存储库路径更改。

1.1. Red Hat Update Infrastructure 迁移概述

迁移使用 Red Hat Update Infrastructure(RHUI)4 安装中的 rhui-manager 实用程序,将您的仓库从 RHUI 3 转移到 RHUI 4。在迁移软件仓库前,您必须安装 RHUI 4。

rhui-manager 实用程序使用子命令 迁移和 以下强制参数:

  1. --hostname - 远程 RHUI 3 RHUA 节点的主机名
  2. --password - 远程 RHUI 3 RHUA 节点的 rhui-manager 密码
注意

您必须在 RHUI 4 机器上为当前用户的 SSH 密钥对添加公共部分到 RHUI 3 机器的 .ssh/authorized_keys 文件。

虽然提供了默认路径,但您的密钥文件的路径可能与所提供的默认值不匹配。您可能需要在迁移命令中添加以下参数:

  • --keyfile_path - RHUI 4 计算机上的 SSH 私钥路径。默认路径为 /root/.ssh/id_rsa_rhua

1.2. 将软件仓库从 RHUI 3 迁移到 RHUI 4

以下流程解释了如何将 RHUI 3 软件仓库迁移到 RHUI 4。

先决条件

  • 确定在您的目标机器上安装了 RHUI 4。如需更多信息,请参阅安装 Red Hat Update Infrastructure
  • 确定您有访问您的 RHUI 3 机器所需的凭证。
  • 确定您的 RHUI 4 机器上有 RHUI 授权证书。如果没有,请运行以下命令来添加证书:

    # rhui-subscription-sync
    Copy to Clipboard Toggle word wrap
  • 可选: 请确定您缓存了仓库信息来加快迁移速度。您可以使用以下命令:

    # rhui-manager repo unused
    Copy to Clipboard Toggle word wrap

流程

  1. 在 RHUI 4 机器上,使用 rhui-manager 实用程序开始迁移:

    # rhui-manager migrate --hostname my-rhui3-rhua.example.com --password <your_password> --keyfile_path ~/.ssh/id_rsa_rhua
    Copy to Clipboard Toggle word wrap
  2. 如果迁移失败并显示类似如下的错误,则在 RHUI 4 机器上已存在的软件仓库之间发生冲突。

    ERROR: Configured repos detected. Use --force to ignore. Exiting
    Copy to Clipboard Toggle word wrap

    要解决这个问题,使用 --force 参数运行迁移。

    注意

    使用 --force 参数删除并重新创建与 RHUI 3 存储库 ID 匹配的所有存储库。

    # rhui-manager migrate --hostname my-rhui3-rhua.example.com --password <your_password> --keyfile_path ~/.ssh/id_rsa_rhua --force
    Copy to Clipboard Toggle word wrap
  3. 可选: 如果迁移了自定义软件仓库,则需要手动将 RPM 内容上传到它们。

    有关如何操作的详细信息,请参阅 /root/.rhui/migration/ 目录中的 upload_rpms_document.txt 文件。

验证

  • 运行以下命令,并验证 RHUI 3 软件仓库现在在您的 RHUI 4 机器上可用:

    # rhui-manager repo list
    Copy to Clipboard Toggle word wrap

1.3. 将客户端 RPM 从 RHUI 3 迁移到 RHUI 4

升级到 RHUI 4 后,您可能需要继续使用 RHUI 3 客户端 RPM。您可以将 RHUI 3 证书颁发机构(CA)迁移到您的 RHUI 4 系统,并将 RHUI 4 配置为使用 CA。

先决条件

  • 确定您有访问您的 RHUI 3 机器所需的凭证。

流程

  1. 将 CA 证书和密钥从 RHUI 3 复制到 RHUI 4。

    • 证书 rhui-default-ca.crt 位于 /etc/pki/rhui/certs/ 目录中。
    • 密钥 rhui-default-ca.key 位于 /etc/pki/rhui/private/ 目录中。
  2. 在 RHUA 节点上,重新运行 rhui-installer 并指定从 RHUI 3 安装中复制的 CA。

    # rhui-installer --rerun --remote-fs-server <address> --rhua-hostname <RHUA hostname> --cds-lb-hostname <HAProxy hostname> --user-supplied-rhui-ca-crt rhui-default-ca.crt --user-supplied-rhui-ca-key rhui-default-ca.key
    Copy to Clipboard Toggle word wrap
    • --remote-fs-server: 共享文件系统的远程挂载点。
    • --RHUA-hostname: RHUA 节点的主机名。您必须将名称指定为完全限定域名(FQDN)。
    • --CDs-lb-hostname: 客户端用于访问 CDS 的负载均衡器的名称。您必须将名称指定为完全限定域名(FQDN)。
    • --user-supplied-rhui-ca-crt rhui-default-ca.crt: 从 RHUI 3 安装中复制的 CA 证书。
    • --user-supplied-​rhui-ca-key rhui-default-ca.key: 从 RHUI 3 安装中复制的 CA 密钥。

      注意

      如果 RHUI 3 HAProxy 配置为使用新的 RHUI 4 CDS 节点,您可以使用 RHUI 3 HAProxy。或者,您可以通过更新 DNS 来使用新的 RHUI 4 HAProxy,以便 RHUI 3 HAProxy 主机名指向新的 HAProxy。

第 2 章 升级红帽更新基础架构

Red Hat Update Infrastructure(RHUI)定期升级,以引入程序错误修复、改进并修复常见漏洞和暴露。

重要

红帽建议通过应用最新的 RHUI 更新来保持安装最新。

2.1. 更新 Red Hat Update Infrastructure

要将 Red Hat Update Infrastructure (RHUI)实例更新至最新版本,您必须执行以下步骤。

先决条件

  • 根访问 RHUA 节点.
  • 所有 RHUI 节点均已订阅,并在 安装 Red Hat Update Infrastructure 中使用正确的存储库。
  • 存储库同步任务在更新完成后调度到运行。在更新进行过程中运行的任务可能会被中止。如需更多信息,请参阅 已知问题
重要

rhui-installer 支持升级 PostgreSQL 的版本。在这样做前,备份 PostgreSQL 数据库非常重要。

第 12 章中描述了如何备份您的 PostgreSQL 数据库。备份和恢复 Red Hat Update Infrastructure 文档中的 配置和管理 Red Hat Update Infrastructure 文档。

重要

不要尝试通过应用所有可用的软件包更新来保持 RHUA 节点最新状态。这样做可能会破坏 RHUA。更新 RHUA 必须完全通过以下流程来执行。

如果您只想应用操作系统更新并排除任何 RHUI 软件包更新,请在更新事务中排除 RHUI 存储库。例如,在命令行中运行以下命令:

# dnf --disablerepo=rhui-4-for-rhel-8-x86_64-rpms update
Copy to Clipboard Toggle word wrap

您可能需要在此事务后重启系统或重启 RHUI 服务。

注意

要让 CDS 节点保持最新状态,无法在其上应用可用的软件包更新。由于许多 RHUI 版本中修改了各种配置,因此需要按照以下步骤重新应用配置。

流程

  1. 在 RHUA 节点上,更新 RHUI 安装程序。

    # dnf update rhui-installer
    Copy to Clipboard Toggle word wrap
  2. 运行 RHUI 安装程序:

    • 如果您要从 RHUI 4.10 更新,并且已使用 on_demand 同步策略启动,请将配置的相关部分复制到自定义配置文件,如 Preserv ing Custom Configuration After RHUI 升级 中所述。
    • 运行 rhui-installer 命令,如下所示:

      • 如果要从 RHUI 4.1.0 或更早版本更新,则必须指定自定义 RHUI CA 以及 重新运行 选项:

        # rhui-installer --rerun --user-supplied-rhui-ca-crt <custom_RHUI_CA.crt> --user-supplied-rhui-ca-key <custom_RHUI_CA_key>
        Copy to Clipboard Toggle word wrap
      • 如果您要从 RHUI 4.1.1 或更新版本更新,请使用 重新运行 选项运行 RHUI 安装程序:

        # rhui-installer --rerun
        Copy to Clipboard Toggle word wrap
      • 如果要将 PostgreSQL 的版本从 12 更新至 15,则必须使用 --postgresql-version 选项以及 重新运行 选项来指定它:

        # rhui-installer --postgresql-version 15 --rerun
        Copy to Clipboard Toggle word wrap
  3. 可选: 在一些环境中,rhui-installer 无法重新运行,并显示以下错误:

    There have been identified artifacts with forbidden checksum md5. Run pulpcore-manager handle-artifact-checksums first to unset forbidden checksums.
    Copy to Clipboard Toggle word wrap

    修复此错误:

    1. 在 RHUA 节点上运行以下命令:

      # env PULP_SETTINGS=/etc/pulp/settings.py pulpcore-manager handle-artifact-checksums
      Copy to Clipboard Toggle word wrap
    2. 使用 rerun 选项运行 rhui-installer
  4. 检查 rhui-installer 是否安装了更新的软件包。

    默认情况下,rhui-installer 将安装任何可用的 RHEL 软件包更新。如果任何软件包已更新,则必须重启 RHUA。要检查这一点的命令是:

    # needs-restarting -r
    Copy to Clipboard Toggle word wrap
    注意

    此命令是 yum-utils 软件包的一部分,该软件包必须安装在 RHUA 上,以便命令可用。

  5. 要应用更新的模板和 playbook,请重新安装所有 CDS 节点。

    这也将安装任何可用的 RHEL 软件包更新。为避免这种情况,请使用-- no_update 标志运行以下命令。

    # rhui-manager --noninteractive cds reinstall --all
    Copy to Clipboard Toggle word wrap
  6. 检查 CDS 节点上是否已安装了更新的软件包。

    如果安装了软件包更新,可能需要重新引导 CDS 节点。要检查您的 CDS 节点是否需要重新引导,请登录它们并运行这个命令:

    # needs-restarting -r
    Copy to Clipboard Toggle word wrap
    注意

    这个命令是 yum-utils 软件包的一部分,该软件包必须安装在 CDS 中,以便命令可用。

  7. 登录到 RHUI Manager。

    # rhui-manager
    Copy to Clipboard Toggle word wrap

验证

  • 在 RHUA 节点上,运行以下命令并验证是否安装了 RHUI 的最新版本。

    # rpm -q rhui-tools
    Copy to Clipboard Toggle word wrap

法律通告

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
返回顶部