3.3. 配置 RHUI 备用内容源
先决条件
- 在 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 使用胶囊的 HTTP 代理,请选择 Use HTTP 代理。
- 输入 Red Hat Update Infrastructure CDS 节点的基本 URL。
- 输入以逗号分隔的子路径列表。
- 如果需要 , 提供内容凭据。
- 如果需要 SSL 验证,请启用 验证 SSL 并选择 SSL 证书。
- 检查详情并点 Add。
- 导航到 Content > Alternate Content Sources,点新创建的备用内容源旁边的垂直 ellipsis,然后选择 Refresh。
CLI 过程
在 Satellite 服务器上输入以下命令:
# hammer alternate-content-source create \ --alternate-content-source-type rhui \ --base-url "https://rhui-cds-node/pulp/content" \ --name "My_ACS_Name" \ --smart-proxy-ids My_Capsule_ID \ --ssl-client-cert-id My_SSL_Client_Certificate_ID \ --ssl-client-key-id My_SSL_Client_Key_ID \ --subpaths path/to/repo/1/,path/to/repo/2/ \ --verify-ssl 1
检查新创建的备用内容源是否已列出:
# hammer alternate-content-source list
刷新备用内容源:
# hammer alternate-content-source refresh --id My_Alternate_Content_Source_ID
添加要同步备用内容源的 Capsule:
# hammer alternate-content-source update \ --id My_Alternate_Content_Source_ID \ --smart-proxy-ids My_Capsule_ID
刷新备用内容源:
# hammer alternate-content-source refresh --id My_Alternate_Content_Source_ID