4.3. 配置 RHUI Alternate 内容源
前提条件
- 在 RHUA 节点上为所需的存储库生成客户端证书,如 配置和管理红帽更新基础架构管理工具 中的 使用 Red Hat Update Infrastructure 管理工具创建 客户端证书 中所述。
- 将客户端授权证书导入到 Satellite。如需更多信息,请参阅 管理内容 中的 导入自定义 SSL 证书。
获取所需存储库的子路径列表。在 RHUA 服务器上执行以下命令:
# rhui-manager repo info --repo_id My_Repo_ID-
请注意,备用内容源路径由您提供的子路径附加的基本 URL 组成。例如,如果您的基本 URL 是
https://server.example.com,并且您的子路径为rhel7/和rhel8/,则会搜索https://server.example.com/rhel7/和https://server.example.com/rhel8/。
流程
- 在 Satellite Web UI 中,导航到 Content > Alternate Content Sources。
- 单击 Add Source,并将 Source 类型设置为 RHUI。
- 使用 Satellite Web UI 中提供的命令生成 RHUI 证书。确保传递所需存储库的 repo 标签。
- 在 Name 字段中输入备用内容源的名称。
- 可选:在 Description 字段中,为 ACS 提供描述。
- 选择要同步备用内容源的 Capsule。
- 可选: 如果您希望 ACS 使用 Capsule 的 HTTP 代理,请选择 Use HTTP proxy。
- 输入 Red Hat Update Infrastructure CDS 节点的 Base URL。
- 输入以逗号分隔的 Subpath 列表。
- 如果需要 , 请提供内容凭据。
- 如果需要 SSL 验证,请启用 Verify SSL 并选择 SSL CA 证书。
- 查看详情并点 Add。
- 导航到 Content > Alternate Content Sources,点新创建的备用内容源旁的垂直 ellipsis,然后选择 Refresh。
CLI 过程
在 Satellite 服务器中输入以下命令:
# hammer alternate-content-source create \ --name "My_ACS_Name" \ --alternate-content-source-type rhui \ --base-url "https://rhui-cds-node/pulp/content" \ --subpaths path/to/repo/1/,path/to/repo/2/ \ --ssl-client-cert-id My_SSL_Client_Certificate_ID \ --ssl-client-key-id My_SSL_Client_Key_ID \ --smart-proxy-ids MyCapsule_ID_ \ --verify-ssl 1检查是否列出了新创建的备用内容源:
# hammer alternate-content-source list刷新备用内容源:
# hammer alternate-content-source refresh --id My_Alternate_Content_Source_ID添加要同步备用内容源的胶囊:
# hammer alternate-content-source update \ --id My_Alternate_Content_Source_ID \ --smart-proxy-ids Capsule_ID刷新备用内容源:
# hammer alternate-content-source refresh --id My_Alternate_Content_Source_ID