从客户端转换为代理
1. 概述
本章介绍如何通过 Web UI 将客户端系统转换为 SUSE Multi-Linux Manager 代理。
本文假定代理主机系统已完成引导,且已订阅基础操作系统通道。
有关客户端初始配置的详细信息,请参见 客户端注册。
2. 要求
开始转换前,请确保满足以下要求。
2.1. 客户端需满足的条件
-
已在 SUSE Multi-Linux Manager 中完成初始配置
-
可通过网络访问
3. 准备工作
进行代理转换前,请完成以下准备工作,以免转换过程中出现中断。
3.1. SSL 证书
为确保代理与其他组件之间的通信安全,需要具备有效的 SSL 证书。
您需要准备:
-
为 SUSE Multi-Linux Manager 服务器证书签名的证书颁发机构 (CA) 的公共证书。
-
代理专用证书。
-
代理证书对应的私用密钥。
|
如果您的 CA 使用中间证书链,还必须包含所有中间证书。 |
如果不使用第三方证书,可在 SUSE Multi-Linux Manager 容器内通过 rhn-ssl-tool 生成证书。
-
在 SUSE Multi-Linux Manager 服务器主机上运行以下命令:
mgrctl exec -ti -- rhn-ssl-tool --gen-server \ --set-hostname="<PROXY-FQDN>" \ --dir="/root/ssl-build"有关其他参数的详细信息,请参见 自我签名 SSL 证书。
-
将证书传输至 SUSE Multi-Linux Manager 服务器主机
mgrctl cp server:/root/ssl-build/<PROXY-FQDN>/server.crt /root/proxycert.pem mgrctl cp server:/root/ssl-build/<PROXY-FQDN>/server.key /root/proxykey.pem mgrctl cp server:/root/ssl-build/RHN-ORG-TRUSTED-SSL-CERT /root/rootca.pem如需确认证书和密钥文件的具体生成目录,可以执行以下命令列出相关目录:
mgrctl exec -ti -- ls -ltd /root/ssl-build/*/
-
从 SUSE Multi-Linux Manager 服务器主机传输证书
scp <UYUNI-FQDN>:/root/proxycert.pem ./ scp <UYUNI-FQDN>:/root/proxykey.pem ./ scp <UYUNI-FQDN>:/root/rootca.pem ./
3.2. 软件包准备
3.2.1. 安装 mgrpxy 工具
必须从与您的系统匹配的储存库安装 mgrpxy 工具。请从以下地址选择适当的储存库:
zypper ar https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/ContainerUtils/openSUSE_Tumbleweed/ uyuni-containerutils
zypper ref
zypper in mgrpxy
3.2.2. 安装容器映像
建议以 RPM 软件包形式部署容器映像。请确保客户端上已安装以下软件包:
zypper ar https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/containerfile/ uyuni-proxy-images
zypper ref
zypper in uyuni-proxy-httpd-image \
uyuni-proxy-salt-broker-image \
uyuni-proxy-squid-image \
uyuni-proxy-ssh-image \
uyuni-proxy-tftpd-image
有关隔离部署的详细信息,请参见 SUSE Multi-Linux Manager 代理隔离的部署。
4. 设置代理客户端
-
Navigate to the client’s
Overviewpage. -
单击 转换为代理 按钮。
确认您已重定向至代理配置表单。
This page can be accessed later from the
Details>Proxy>Configurationtab. -
在 Web UI 中,导航到,并填写所需数据:
过程:配置代理-
In the
Parent FQDNfield, type the fully qualified domain name for the parent server or proxy. -
In the
Proxy SSH portfield, type the SSH port on which the SSH service is listening on the SUSE Multi-Linux Manager Proxy. It is recommended to keep the default: 8022. -
In the
Max Squid cache sizefield, type the maximum allowed size for the Squid cache, in Gigabytes. -
In the
Proxy admin emailfield, type the administrator’s email address. -
In the
Certificatessection, provide the certificates for the SUSE Multi-Linux Manager Proxy, obtained in the preparation step. -
In the
Sourcesection, select one of the two options:RPMorRegistry.-
The
RPMoption is recommended for air-gapped or restricted environments. TheRegistryoption can be used if connectivity to the container image registry is available. + If selected, you will be prompted to choose between two sub-options:SimpleorAdvanced.-
If
Simpleis selected, provide values in theRegistry URLandContainers Tagfields.-
For
Registry URLuse:registry.opensuse.org/uyuni. -
从下拉列表中选择标记。
-
-
If
Advancedis selected, an additional section of the form is shown:-
For each individual container URL field, use the registry:
registry.opensuse.org/uyunifollowed by the corresponding suffix, for example,proxy-httpdorsalt-broker. -
从下拉列表中选择标记。
-
-
-
-
-
填写完所有字段后,单击 应用 按钮保存配置并调度代理安装任务。
5. 校验代理激活状态
查看客户端的事件历史记录,确认任务执行成功。
(可选)访问代理的 HTTP 端点,验证其是否显示欢迎页面。