Legacy Proxy Migration to Container
The containerized proxy now is managed by a set of systemd services. For managing the containerized proxy, use the mgrpxy
tool.
This section will help you migrate from the legacy systemd
proxy using the mgrpxy
tool.
An in-place migration from previous releases of SUSE Multi-Linux Manager to 5.1 will remain unsupported due to the HostOS change from openSUSE Leap to openSUSE Leap Micro. The traditional contact protocol is no longer supported in SUSE Multi-Linux Manager 5.1 and later. Before migrating from previous SUSE Multi-Linux Manager releases to 5.1, any existing traditional clients including the traditional proxies must be migrated to Salt. |
1. Migrate From Legacy to Containerized Proxy With Systemd
1.1. Generate Proxy Configuration
-
登录到 SUSE Multi-Linux Manager 服务器 Web UI。
-
在左侧导航栏中,选择
。 -
输入您的代理 FQDN。使用与原始代理主机相同的 FQDN。
-
输入您的服务器 FQDN。
-
Enter the Proxy port number. We recommend using the default port of 8022.
-
证书和私用密钥位于服务器容器主机上的
/var/lib/containers/storage/volumes/root/_data/ssl-build/
中。-
RHN-ORG-TRUSTED-SSL-CERT
-
RHN-ORG-PRIVATE-SSL-KEY
-
-
使用以下命令将证书和密钥复制到您的计算机:
scp root@uyuni-server-example.com:/root/ssl-build/RHN-ORG-PRIVATE-SSL-KEY scp root@uyuni-server-example.com:/root/ssl-build/RHN-ORG-TRUSTED-SSL-CERT
-
选择 选择文件 并在本地计算机上通过浏览找到证书。
-
选择 选择文件 并在本地计算机上通过浏览找到私用密钥。
-
输入 CA 口令。
-
单击 生成。
1.2. 将代理配置传输到新主机
-
在服务器中,将生成的包含代理配置的 tar.gz 文件传输到新代理主机:
scp config.tar.gz <uyuni 代理 FQDN>:/root/
-
在执行下一步之前,请先禁用旧版代理:
spacewalk-proxy stop
-
使用以下命令部署新代理:
systemctl start uyuni-proxy-pod
-
使用以下命令启用新代理:
systemctl enable --now uyuni-proxy-pod
-
运行
podman ps
来校验所有容器是否存在并正在运行:proxy-salt-broker proxy-httpd proxy-tftpd proxy-squid proxy-ssh
2. 将 SUSE Multi-Linux Manager 代理迁移到 SUSE Multi-Linux Manager 5.1 容器化代理
-
引导新计算机,然后开始安装 openSUSE Leap Micro 6.1。
-
完成安装。
-
更新系统:
transactional-update --continue
-
安装
mgrpxy
,并根据需要安装mgrpxy-bash-completion
:transactional-update pkg install mgrpxy mgrpxy-bash-completion
-
重引导。
-
Copy your
tar.gz
proxy configuration to the host.
3. Install Packages Using the Web UI
在受控端已引导并已注册到服务器后,还可以通过 Web UI 安装 mgrpxy
和 mgrpxy-bash-completion
软件包。
-
After installation, ensure that the SLE Micro 6.1 parent channel and Proxy child channels are added and synchronized from the
page. -
In the Web UI, go to
and create an activation key linked for the synchronized SLE Micro 6.1 channel. -
使用
页面将系统作为受控端进行引导。 -
在初始配置新计算机并且其显示在系统列表中后,选择系统并导航到
页面。 -
安装软件包
mgrpxy
和mgrpxy-bash-completion
。 -
重引导系统。
4. Generate Proxy Config With spacecmd
and Self-Signed Certificate
可以使用 spacecmd 生成代理配置。
spacecmd
and Self-Signed Certificate-
通过 SSH 连接到您的容器主机。
-
执行以下命令(替换其中的服务器和代理 FQDN):
mgrctl exec -ti 'spacecmd proxy_container_config_generate_cert -- dev-pxy.example.com dev-srv.example.com 2048 email@example.com -o /tmp/config.tar.gz'
-
将生成的配置复制到代理:
mgrctl cp server:/tmp/config.tar.gz
-
使用以下命令部署代理:
mgrpxy install podman config.tar.gz
5. Generate Proxy Config With spacecmd
and Custom Certificate
You can generate Proxy configuration using spacecmd
for a custom certificates rather than default self-signed certificates.
2 GB 表示默认的代理 squid 缓存大小。需要根据您的环境调整此大小。 |
spacecmd
and Custom Certificate-
通过 SSH 连接到您的服务器容器主机。
-
执行以下命令(替换其中的服务器和代理 FQDN):
for f in ca.crt proxy.crt proxy.key; do mgrctl cp $f server:/tmp/$f done mgrctl exec -ti 'spacecmd proxy_container_config -- -p 8022 pxy.example.com srv.example.com 2048 email@example.com /tmp/ca.crt /tmp/proxy.crt /tmp/proxy.key -o /tmp/config.tar.gz'
-
将生成的配置复制到代理:
mgrctl cp server:/tmp/config.tar.gz
-
使用以下命令部署代理:
mgrpxy install podman config.tar.gz