SUSE Multi-Linux Manager 5.1 Proxy Deployment
This guide outlines the deployment process for the SUSE Multi-Linux Manager 5.1 Proxy container on SL Micro 6.1 or SUSE Linux Enterprise Server 15 SP7. This guide presumes you have already successfully deployed a SUSE Multi-Linux Manager 5.1 Server.
SL Micro is only supported as regular minion ( |
要成功完成部署,请执行以下操作:
-
查看硬件要求。
-
Synchronize the SL Micro 6.1 or SUSE Linux Enterprise Server 15 SP7 parent channel and the proxy extension child channel on the server.
-
Install SL Micro or SUSE Linux Enterprise Server on a bare-metal machine.
-
During the installation, register SL Micro or SUSE Linux Enterprise Server along with the SUSE Multi-Linux Manager Proxy extension.
-
创建 Salt 激活密钥。
-
使用
default
连接方法将代理作为客户端引导。 -
生成代理配置。
-
将服务器中的代理配置传输到代理。
-
使用代理配置将客户端作为代理注册到 SUSE Multi-Linux Manager。
代理容器主机支持的操作系统
The supported operating system for the container host are SL Micro 6.1 and SUSE Linux Enterprise Server 15 SP7.
|
1. 代理的硬件要求
有关部署 SUSE Multi-Linux Manager 代理的硬件要求,请参见 installation-and-upgrade:hardware-requirements.adoc#proxy-hardware-requirements。
2. 同步父通道和代理扩展子通道
This section presumes that you have already entered your organization credentials under the Proxy
as an extension option selected.
-
在 SUSE Multi-Linux Manager Web UI 中,选择
。 -
From the products page enter SL Micro or SUSE Linux Enterprise Server in the filter field.
-
接下来,在下拉列表中选择所需的体系结构,在本示例中为 x86-64。
-
In the
Product Description
field select the SL Micro 6.1 or SUSE Linux Enterprise Server 15 SP7 checkbox then use the drop-down to select theSUSE Multi-Linux Manager Proxy Extension 5.1 x86_64
extension. -
单击 添加产品 按钮。
-
等待同步完成。
3. Prepare SUSE Multi-Linux Manager Proxy Host
3.1. Install SL Micro 6.1 and Deploy Proxy
-
Locate the SL Micro 6.1 installation media at https://www.suse.com/download/sl-micro/.
-
需有一个 SUSE Customer Center 帐户并且必须登录才能下载 ISO。
-
Download
SL-Micro-6.1-DVD-x86_64-GM-Media1.iso
. -
准备一个 USB 闪存盘或 DVD 用于安装。
-
Insert a DVD or a bootable USB stick containing the installation image for SL Micro 6.1.
-
引导或重引导您的系统。
For detailed documentation on preparing your machines OS (virtual or physical), see Introduction to SL Micro 6.1 Deployment.
-
使用箭头键选择
安装
。 -
调整键盘和语言。单击
复选框
接受许可协议。 -
单击
下一步
继续。 -
选择注册方法。对于本示例,我们将在 SUSE Customer Center 中注册代理。
-
输入您的 SUSE Customer Center 电子邮件地址。
-
Enter your registration code for SL Micro 6.1.
-
单击
下一步
继续。 -
选中 SUSE Multi-Linux Manager 5.1 代理扩展
复选框
。 -
单击
下一步
继续。 -
输入您的 SUSE Multi-Linux Manager 5.1 代理扩展注册代码。
-
单击 下一步 继续。
-
在
NTP 配置
页面上,单击 下一步。 -
在
系统身份验证
页面上,输入 root 用户的口令。单击 下一步。 -
在
安装设置
页面上单击 安装。
This finalizes installation of SL Micro 6.1 and SUSE Multi-Linux Manager 5.1 Proxy as an extension.
3.1.1. 更新系统
-
以 root 身份登录。
-
运行 transactional-update:
transactional-update
-
重引导系统。
-
以 root 身份登录。
-
Install the container utilities (
mgrpxy
should already be installed automatically):transactional-update pkg install mgrpxy-bash-completion
或者,可以安装
mgrpxy-zsh-completion
或mgrpxy-fish-completion
。 -
重引导系统。
SL Micro is designed to update itself automatically by default and will reboot after applying updates. However, this behavior is not desirable for the SUSE Multi-Linux Manager environment. To prevent automatic updates on your server, SUSE Multi-Linux Manager disables the transactional-update timer during the bootstrap process. If you prefer the SL Micro default behavior, enable the timer by running the following command:
|
To continue with deployment, see 配置自定义永久性存储.
3.2. Install SUSE Linux Enterprise Server 15 SP7 and Deploy Proxy
Alternatively, you can install SUSE Multi-Linux Manager Proxy on SUSE Linux Enterprise Server 15 SP7. The following procedure describes the main steps of the installation process.
-
Locate and download SUSE Linux Enterprise Server 15 SP7
.iso
at https://www.suse.com/download/sles/. -
Make sure that the SCC code you plan to use has the Extensions enabled.
-
Start the installation of SUSE Linux Enterprise Server 15 SP7.
-
On the
Language, keyboard and product selection
select the product to install. -
On the
License agreement
read the agreement and checkI Agree to the License Terms
.
-
-
Select the registration method.
For SUSE Linux Enterprise Server 15 SP7, you are required to have a valid SUSE Linux Enterprise Server subscription and corresponding regcode, which you must provide on this screen. You will be required to enter the SUSE Multi-Linux Manager Extension regcode below.
-
In the screen
Extensions and Modules Selection
check the following:-
SUSE Multi-Linux Manager Proxy Extension
-
Basesystem Module
-
Containers Module
Enter the SUSE Multi-Linux Manager Extension regcode.
-
-
完成安装。
-
When the installation completes, log in to the newly installed server as root.
-
Update the System (optional, if the system was not set to download updates during install):
zypper up
-
重引导。
-
Log in as root and install
podman
plusmgrpxy
andmgrpxy-bash-completion
(if not already automatically installed):zypper install podman mgrpxy mgrpxy-bash-completion
-
Start the Podman service by rebooting the system, or running a command:
systemctl enable --now podman.service
To continue with deployment, see 配置自定义永久性存储.
4. 配置自定义永久性存储
Configuring persistent storage is optional, but it is the only way to avoid serious trouble with container full disk conditions. If custom persistent storage is required for your infrastructure, use the mgr-storage-proxy
tool.
-
有关详细信息,请参见
mgr-storage-proxy --help
。此工具可以简化容器存储和 Squid 缓存卷的创建。
如下所示使用命令:
mgr-storage-proxy <存储磁盘设备>
例如:
mgr-storage-proxy /dev/nvme1n1
此命令将在 有关详细信息,请参见 |
5. 为代理创建激活密钥
-
Navigate to
, and click Create key. -
为代理主机创建激活密钥并使用 SLE Micro 6.1 作为父通道。此密钥应包括所有建议的通道以及用作扩展子通道的代理。
-
继续将代理主机作为
default
客户端进行引导。
6. 将代理主机作为客户端进行引导
-
选择
。 -
填写代理主机的相关字段。
-
从下拉列表中选择上一步骤中创建的激活密钥。
-
单击 引导。
-
等待引导过程成功完成。检查 Salt 菜单,确认 Salt 密钥已列出并已接受。
-
重引导代理主机。
-
从系统列表中选择主机,并在所有事件完成后再次触发重引导以完成初始配置。
-
从系统列表中选择主机,并应用所有补丁以将其更新。
-
重引导代理主机。
7. Generate Proxy Configuration
SUSE Multi-Linux Manager 代理的配置存档由 SUSE Multi-Linux Manager 服务器生成。每个附加代理都需要自身的配置存档。
对于 Podman 部署,在生成此代理配置之前,必须将 SUSE Multi-Linux Manager 代理的容器主机作为客户端注册到 SUSE Multi-Linux Manager 服务器。 |
如果使用代理 FQDN 生成非注册客户端的代理容器配置(如 Kubernetes 用例中那样),系统列表中将出现一个新的系统项。此新项将显示在之前输入的“代理 FQDN”值下方并属于外部
系统类型。
7.1. 使用 Web UI 生成代理配置
-
在 Web UI 中,导航到
,然后填写所需数据: -
在
代理 FQDN
字段中,键入代理的完全限定域名。 -
在
父 FQDN
字段中,键入 SUSE Multi-Linux Manager 服务器或另一个 SUSE Multi-Linux Manager 代理的完全限定域名。 -
在
代理 SSH 端口
字段中,键入 SSH 服务在 SUSE Multi-Linux Manager 代理上监听的 SSH 端口。建议保留默认值 8022。 -
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 证书。
-
单击 生成 以在 SUSE Multi-Linux Manager 服务器中注册新代理 FQDN,并生成包含容器主机细节的配置存档 (
config.tar.gz
)。 -
片刻之后,系统会显示文件可供下载。请将此文件保存在本地。
7.2. Generate Proxy Configuration With spacecmd
and Self-Signed Certificate
可以使用 spacecmd
生成代理配置。
-
通过 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
7.3. Generate Proxy Configuration With spacecmd
and Custom Certificate
可以使用 spacecmd
为自定义证书(而不是默认的自我签名证书)生成代理配置。
-
通过 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
8. 传输代理配置
Web UI 将生成配置存档。需要在代理容器主机上提供此存档。
-
从服务器容器将上一步生成的配置存档 (
config.tar.gz
) 复制到服务器主机(如果还未执行此操作):mgrctl cp server:/root/config.tar.gz
-
将服务器主机中的文件复制到代理主机(如果还未执行此操作):
scp config.tar.gz <代理 FQDN>:/root
-
在代理主机上使用以下命令安装代理:
mgrpxy install podman config.tar.gz
9. 启动 SUSE Multi-Linux Manager 代理
现在可以使用 mgrpxy
命令启动容器:
-
调用以下命令启动代理:
mgrpxy start
-
调用以下命令检查容器状态:
mgrpxy status
应该会显示以下五个 SUSE Multi-Linux Manager 代理容器,并且它们应该是
proxy-pod
容器 Pod 的一部分:-
proxy-salt-broker
-
proxy-httpd
-
proxy-tftpd
-
proxy-squid
-
proxy-ssh
-
10. Use a Custom Container Image for a Service
默认情况下,SUSE Multi-Linux Manager 代理套件配置为针对其每个服务使用相同的映像版本和注册表路径。但是,可以使用以 -tag
和 -image
结尾的 install 参数覆盖特定服务的默认值。
例如:
mgrpxy install podman --httpd-tag 0.1.0 --httpd-image registry.opensuse.org/uyuni/proxy-httpd /path/to/config.tar.gz
该命令会在重启动 httpd 服务之前调整其配置文件。其中 registry.opensuse.org/uyuni/proxy-httpds
是要使用的映像,0.1.0
是版本标记。
要重置为默认值,请再次运行 install 命令但不要指定这些参数:
mgrpxy install podman /path/to/config.tar.gz
此命令首先将所有服务的配置重置为全局默认值,然后重新装载配置。