Documentation survey

容器化 SUSE Multi-Linux Manager Proxy 设置

为 SUSE Multi-Linux Manager Proxy 容器准备好容器主机后,需要额外执行几步容器设置才能完成配置。

过程
  1. 生成 SUSE Multi-Linux Manager Proxy 配置存档文件

  2. 将配置存档传输到在安装步骤中准备的容器主机并解压缩

  3. 使用 mgrpxy 启动代理服务

1. Generate Proxy Configuration

SUSE Multi-Linux Manager 代理的配置存档由 SUSE Multi-Linux Manager 服务器生成。每个附加代理都需要自身的配置存档。

For the containerized SUSE Multi-Linux Manager Proxy, you must build a new proxy configuration file and then redeploy the container for the changes to take effect. This is the process for updating settings, including the SSL certificate.

对于 Podman 部署,在生成此代理配置之前,必须将 SUSE Multi-Linux Manager 代理的容器主机作为客户端注册到 SUSE Multi-Linux Manager 服务器。

如果使用代理 FQDN 生成非注册客户端的代理容器配置(如 Kubernetes 用例中那样),系统列表中将出现一个新的系统项。此新项将显示在之前输入的“代理 FQDN”值下方并属于外部系统类型。

1.1. 使用 Web UI 生成代理配置

Procedure: Generating a Proxy Container Configuration Using Web UI
  1. In the Web UI, navigate to Systems  Proxy Configuration and fill the required data.

  2. 代理 FQDN字段中,键入代理的完全限定域名。

  3. 父 FQDN字段中,键入 SUSE Multi-Linux Manager 服务器或另一个 SUSE Multi-Linux Manager 代理的完全限定域名。

  4. 代理 SSH 端口字段中,键入 SSH 服务在 SUSE Multi-Linux Manager 代理上监听的 SSH 端口。建议保留默认值 8022。

  5. In the Max Squid cache size [MB] field type maximal allowed size for Squid cache. Recommended is to use at most 80% of available storage for the containers.

    2 GB 表示默认的代理 squid 缓存大小。需要根据您的环境调整此大小。

SSH 证书选择列表中,选择应为 SUSE Multi-Linux Manager 代理生成新服务器证书还是使用现有证书。您可以考虑作为 SUSE Multi-Linux Manager 内置(自我签名)证书生成的证书。

+

然后根据所做的选择提供用于生成新证书的签名 CA 证书的路径,或者要用作代理证书的现有证书及其密钥的路径。

+

服务器生成的 CA 证书存储在 /var/lib/containers/storage/volumes/root/_data/ssl-build 目录中。

+

有关现有或自定义证书的详细信息以及企业和中间证书的概念,请参见 导入 SSL 证书

  1. 单击 生成 以在 SUSE Multi-Linux Manager 服务器中注册新代理 FQDN,并生成包含容器主机细节的配置存档 (config.tar.gz)。

  2. 片刻之后,系统会显示文件可供下载。请将此文件保存在本地。

1.2. Generate Proxy Configuration With spacecmd and Self-Signed Certificate

可以使用 spacecmd 生成代理配置。

过程:使用 spacecmd 和自我签名证书生成代理配置
  1. 通过 SSH 连接到您的容器主机。

  2. 执行以下命令(替换其中的服务器和代理 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'
  3. 从服务器容器复制生成的配置:

    mgrctl cp server:/tmp/config.tar.gz

1.3. Generate Proxy Configuration With spacecmd and Custom Certificate

可以使用 spacecmd 为自定义证书(而不是默认的自我签名证书)生成代理配置。

过程:使用 spacecmd 和自定义证书生成代理配置
  1. 通过 SSH 连接到您的服务器容器主机。

  2. 执行以下命令(替换其中的服务器和代理 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'
  3. 从服务器容器复制生成的配置:

    mgrctl cp server:/tmp/config.tar.gz

2. Transfer SUSE Multi-Linux Manager Proxy Configuration

Both spacecmd command and generating via Web UI ways create a configuration archive. This archive needs to be made available on container host. Transfer this generated archive to the container host.

3. Start SUSE Multi-Linux Manager Proxy Containers

Container can be started with the mgrpxy command.

Procedure: Start SUSE Multi-Linux Manager Proxy Containers
  1. Run command:

    mgrpxy start uyuni-proxy-pod
  2. Check if all containers started up as expected by calling:

    podman ps

Five SUSE Multi-Linux Manager Proxy containers should be present and should be part of proxy-pod container pod.

  • proxy-salt-broker

  • proxy-httpd

  • proxy-tftpd

  • proxy-squid

  • proxy-ssh