SUSE Multi-Linux Manager 5.1 服务器部署
本指南介绍如何在 SL Micro 6.1 或 SUSE Linux Enterprise Server 15 SP7 上安装和配置 SUSE Multi-Linux Manager 5.1 容器。
1. SUSE Multi-Linux Manager 的硬件要求
These tables shows the software and hardware requirements for deploying SUSE Multi-Linux Manager Server on your bare metal machine. For the purposes of this guide your machine should have 16 GB of RAM, and at least 200 GB of disk space. For background information about disk space, see 硬件要求.
| Software | Recommended |
|---|---|
Operating System |
SL Micro 6.1 or SUSE Linux Enterprise Server 15 SP7 |
| Architecture | x86-64, ARM, s390x, ppc64le |
|---|---|
Processor (CPU) |
Minimum of four (4) 64-bit CPU cores |
RAM |
16 GB |
Disk Space |
200 GB |
Channel Requirements |
50 GB per SUSE or openSUSE product 360 GB per Red Hat product |
Swap space: |
8 to 12 GB |
|
服务器容器主机支持的操作系统
容器主机支持的操作系统为 SL Micro 6.1 和 SUSE Linux Enterprise Server 15 SP7。
|
|
必须使用完全限定的域名 (FQDN) 才能完成服务器部署。如果您的路由器或网络无法为 FQDN 提供自动 DNS 置备,则部署过程将无法成功进行。FQDN 通常采用 <主机>.<域>.com 格式。 例如:
有关详细信息,请参见 网络要求 中有关网络要求的章节。 |
2. 永久性卷
SUSE Multi-Linux Manager 5.1 defines the required persistent storage volumes by default. These are created during installation by the mgradm tool if they do not already exist.
These volumes are created in /var/lib/containers/storage/volumes/, where Podman stores its volumes by default.
|
建议
您可以通过将外部存储设备挂载到此目录来利用存储的简便性。由于这样会存储 PostgreSQL 数据库、储存库的二进制软件包、缓存、操作系统映像、自动安装发行套件和配置文件,我们提出了三项建议:
|
有关容器中所有永久性卷的列表,请参见 永久性容器卷。
3. 准备 SUSE Multi-Linux Manager 服务器主机
您可以在 SL Micro 6.1 或 SUSE Linux Enterprise Server 15 SP7 上部署 SUSE Multi-Linux Manager。SL Micro 是事务性系统,而 SUSE Linux Enterprise Server 则是完整的服务器操作系统。
根据您的决定,继续按照 准备 SL Micro 6.1 主机 或 准备 SUSE Linux Enterprise Server 15 SP7 主机 中的说明操作,并跳过未选择的部分。
3.1. 准备 SL Micro 6.1 主机
3.1.1. 下载安装媒体
访问 https://www.suse.com/download/sle-micro/,找到 SL Micro 6.1 的安装媒体,并下载相应媒体文件。
Prepare a DVD or USB flash drive with the downloaded
.isoimage for installation.
3.1.2. 安装 SL Micro 6.1
插入包含 SLE Micro 6.1 安装映像的 DVD 或 USB 闪存盘(USB 磁盘或密钥)。
引导或重引导您的系统。
Use the arrow keys to select
Installation.调整键盘和语言。
Click the
checkboxto accept the license agreement.Click
Nextto continue.选择注册方法。在本示例中,我们将在 SUSE Customer Center 中注册服务器。
SUSE Multi-Linux Manager 5.1 容器会安装为扩展。根据以下列出的所需特定扩展,您还需要有各个扩展的 SUSE Customer Center 注册代码。
SUSE Multi-Linux Manager 5.1 服务器
SUSE Multi-Linux Manager 5.1 代理
SUSE Multi-Linux Manager 5.1 零售分支服务器
SL Micro 6.1 权利包含在 SUSE Multi-Linux Manager 权利中,因此不需要单独的注册代码。
输入您的 SUSE Customer Center 电子邮件地址。
输入您的 SL Micro 6.1 注册代码。
Click
Nextto continue.To install a proxy, select the SUSE Multi-Linux Manager 5.1 Proxy extension; to install a server, select the SUSE Multi-Linux Manager 5.1 Server extension
Checkbox.Click
Nextto continue.输入您的 SUSE Multi-Linux Manager 5.1 扩展注册代码。
单击 下一步 继续。
On the
NTP Configurationpage click Next.On the
Authentication for the Systempage enter a password for the root user. Click Next.On the
Installation Settingspage click Install.
至此,SL Micro 6.1 及 SUSE Multi-Linux Manager 5.1 扩展的安装已完成。有关虚拟机或物理机准备工作的详细信息,请参见 SL Micro 部署指南。
3.1.3. 从命令行注册(可选)
如果您在安装 SL Micro 6.1 期间已将 SUSE Multi-Linux Manager 5.1 添加为扩展,则可以跳过此过程。不过,您也可以选择在安装 SL Micro 6.1 期间单击 跳过注册 按钮来跳过注册。本节提供了在安装 SL Micro 6.1 后注册产品的步骤。
|
以下步骤将注册 x86-64 体系结构的 SUSE Multi-Linux Manager 5.1 扩展,因此需要提供适用于 x86-64 体系结构的注册代码。要注册 ARM 或 s390x 体系结构,请使用正确的注册代码。 |
运行以下命令列出可用扩展:
transactional-update --quiet register --list-extensions从可用扩展列表中选择一个要安装的扩展:
如果要安装服务器,请使用您的 SUSE Multi-Linux Manager Server Extension 5.1 x86_64 注册代码运行以下命令:
transactional-update register -p Multi-Linux-Manager-Server/5.1/x86_64 -r <reg_code>如果要安装代理,请使用您的 SUSE Multi-Linux Manager Proxy Extension 5.1 x86_64 注册代码运行以下命令:
transactional-update register -p Multi-Linux-Manager-Proxy/5.1/x86_64 -r <reg_code>重引导。
3.1.4. 更新系统
以 root 身份登录。
运行 transactional-update:
transactional-update重引导。
|
SL Micro 设计为默认自动更新,并会在应用更新后重引导。但是,这种行为对于 SUSE Multi-Linux Manager 环境而言是不利的。为了防止服务器自动更新,SUSE Multi-Linux Manager 会在引导过程中禁用 transactional-update 计时器。 如果您希望保留 SL Micro 的默认行为,请运行以下命令来启用计时器:
|
要继续部署,请参见 配置自定义永久性存储。
3.2. 准备 SUSE Linux Enterprise Server 15 SP7 主机
或者,您也可以在 SUSE Linux Enterprise Server 15 SP7 上部署 SUSE Multi-Linux Manager。
下面的过程介绍安装流程的主要步骤。
3.2.1. 在 SUSE Linux Enterprise Server 上安装 SUSE Multi-Linux Manager 扩展
Locate and download SUSE Linux Enterprise Server 15 SP7
.isoat https://www.suse.com/download/sles/.确保您拥有主机操作系统 (SUSE Linux Enterprise Server 15 SP7) 和扩展的注册代码
启动 SUSE Linux Enterprise Server 15 SP7 的安装流程。
On the
Language, keyboard and product selectionselect the product to install.On the
License agreementread the agreement and checkI Agree to the License Terms.选择注册方法。在本示例中,我们将在 SUSE Customer Center 中注册服务器。
输入您的 SUSE Customer Center 电子邮件地址。
输入 SUSE Linux Enterprise Server 15 SP7 的注册代码。
Click
Nextto continue.
请注意,对于 SUSE Linux Enterprise Server 15 SP7,您需要拥有有效的 SUSE Linux Enterprise Server 订阅及相应的注册代码,并在此界面提供。您还需要在下方输入 SUSE Multi-Linux Manager 扩展的注册代码。
In the screen
Extensions and Modules Selectioncheck the following:
选择 SUSE Multi-Linux Manager 服务器扩展以安装服务器,或选择 SUSE Multi-Linux Manager 代理扩展以安装代理。
Basesystem 模块
Containers 模块
Click
Nextto continue.输入您的 SUSE Multi-Linux Manager 5.1 扩展注册代码。
单击 下一步 继续。
完成安装。
安装完成后,以 root 身份登录新安装的服务器。
更新系统(可选,如果在安装期间未将系统设置为自动下载更新):
zypper up重引导。
3.2.2. 从命令行注册(可选)
如果您在安装 SUSE Linux Enterprise Server 期间已将 SUSE Multi-Linux Manager 5.1 添加为扩展,则可以跳过此过程。
不过,您也可以选择在安装 SUSE Linux Enterprise Server 期间单击 跳过注册 按钮来跳过注册。本节提供了在安装 SUSE Linux Enterprise Server 后注册产品的步骤。
|
以下步骤将注册 x86-64 体系结构的 SUSE Multi-Linux Manager 5.1 扩展,因此需要提供适用于 x86-64 体系结构的注册代码。 要注册 ARM 或 s390x 体系结构,请使用正确的注册代码。 |
运行以下命令列出可用扩展:
SUSEConnect --list-extensions从可用扩展列表中选择一个要安装的扩展:
If installing the Server, use your SUSE Multi-Linux Manager Server Extension 5.1 x86_64 registration code.
For example for SUSE Linux Enterprise 15 SP7, use the following commands:
SUSEConnect -r <regcode> SUSEConnect -p sle-module-containers/15.7/x86_64 SUSEConnect -p Multi-Linux-Manager-Server-SLE/5.1/x86_64 -r <regcode>如果要安装代理,请运行以下命令,并提供您的 SUSE Multi-Linux Manager Proxy Extension 5.1 x86_64 注册代码:
SUSEConnect -p Multi-Linux-Manager-Proxy-SLE/5.1/x86_64 -r <regcode>
3.2.3. Install and enable podman
podman
以
root身份登录并安装产品软件包。
在服务器上:
zypper in podman zypper in -t product Multi-Linux-Manager-Server-SLE在代理上:
zypper in podman zypper in -t product Multi-Linux-Manager-Proxy-SLE
Make sure that package
podmanis installed. Additionally, on the servermgradmandmgradm-bash-completionor on the proxies,mgrpxyandmgrpxy-bash-completionalso need to be installed.重引导系统或运行以下命令,以启动 Podman 服务:
systemctl enable --now podman.service
要继续部署,请参见 配置自定义永久性存储。
4. 配置自定义永久性存储
Configuring persistent storage is optional, but it is the only way to avoid serious trouble with container full disk conditions. It is highly recommended to configure custom persistent storage with the mgr-storage-server tool.
For more information, see mgr-storage-server --help.
This tool simplifies creating the container storage and database volumes.
如下所示使用命令:
mgr-storage-server <storage-disk-device> [<database-disk-device>]
例如:
mgr-storage-server /dev/nvme1n1 /dev/nvme2n1
|
This command will create the persistent storage volumes at 有关详细信息,请参见 |
5. Deploy SUSE Multi-Linux Manager with mgradm
|
如果您希望使用第三方 SSL 证书而非自我签名证书,请在执行以下部署过程时导入相应证书。 有关第三方 SSL 证书要求的详细信息,请参见 导入 SSL 证书。 |
|
SUSE Multi-Linux Manager server hosts that are hardened for security may restrict execution of files from the 例如:
在 SUSE Multi-Linux Manager 的后续更新中,相关工具将进行优化,届时无需再使用此临时解决方案。 |
mgradm-
以 root 身份登录。
-
部署 SUSE Multi-Linux Manager。
If you use VM images as a migration target, here as the last step, execute the command
mgradm migrateinstead ofmgradm install.根据 SSL 证书类型(自我签名证书或第三方证书),执行以下命令之一。 请将
<FQDN>替换为 SUSE Multi-Linux Manager 服务器的完全限定域名:-
使用 SUSE Multi-Linux Manager 提供的自我签名证书:
mgradm install podman <FQDN> -
使用第三方 SSL 证书标志导入相应 SSL 证书(如果无需全部证书,可调整示例):
mgradm install podman <FQDN> \ --ssl-ca-intermediate <strings> \ --ssl-ca-root <string> \ --ssl-server-cert <string> \ --ssl-server-key <string> \ --ssl-db-ca-intermediate <strings> \ --ssl-db-ca-root <string> \ --ssl-db-cert <string> \ --ssl-db-key <string>For more information, see
mgradm install podman --help.
如果执行的命令失败,请确保已注册 SUSE Multi-Linux Manager 5.1。如果您在安装期间跳过了注册,则现在需要从命令行注册。按照以下步骤登录仓库:
set +o history echo SCC_MIRRORING_PASSWORD | podman login -u "SCC_MIRRORING_USER" --password-stdin registry.suse.com set -o history根据提示使用 SUSE Multi-Linux Manager 5.1 注册密钥。
-
-
根据提示输入 CA 密钥(证书颁发机构)和管理员帐户口令。
管理员帐户口令长度必须至少为 5 个字符且不超过 48 个字符。
-
按 Enter。
-
Enter the email address of the administration account.
按 Enter。
-
等待部署完成。
-
打开浏览器并访问您的服务器 FQDN。
-
Enter your username (default is
admin) and the password you set during the deployment process.
在本指南中,您已将 SUSE Multi-Linux Manager 5.1 服务器部署为容器。请继续阅读下一节来添加您的组织身份凭证,以便与 SUSE Customer Center 同步。
6. 将 SUSE Multi-Linux Manager 5.1 连接到 SUSE Customer Center
本节介绍如何通过 Web UI 与 SCC 同步,以及如何添加第一个客户端通道。
-
打开浏览器并访问您的服务器 FQDN。
-
Enter your username (default is
admin) and the password you set during the deployment process. -
在 SUSE Multi-Linux Manager Web UI 中,选择。
-
From the
Setup Wizardpage select the Organization Credentials tab. -
单击 添加新身份凭证。
-
在浏览器中访问 SUSE Customer Center。
-
在左侧导航栏中选择您的组织。
-
在页面顶部选择用户选项卡,然后单击 组织身份凭证。
-
记下您的镜像身份凭证。
-
Back in the SUSE Multi-Linux Manager Web UI enter your
UsernameandPassword, and confirm with Save.
在系统以绿色打勾图标的形式确认身份凭证后,请继续执行过程:与 SUSE Customer Center 同步。
-
在 Web UI 中,导航到。
-
From the
Setup Wizardpage select theSUSE Productstab.If you recently registered with SUSE Customer Center a list of products will begin populating the table. This operation could take up to a few minutes.
You can monitor the progress of the operation in section on the right
Refresh the product catalog from SUSE Customer Center.The table of products lists architecture, channels, and status information. For more information, see Wizard.
-
Use the
Filter by product descriptionandFilter by architectureto filter the list of displayed products.The channels listed on the Products page provide repositories for clients.
-
选中每个通道左侧的复选框将相应通道添加到 SUSE Multi-Linux Manager。
单击说明左侧的箭头符号可以展开产品并列出可用的模块。
-
单击页面顶部的 添加产品 开始产品同步。
-
After adding the channel, SUSE Multi-Linux Manager will schedule the channel to be synchronized. This can take a long time as SUSE Multi-Linux Manager will copy channel software sources from the SUSE repositories located at SUSE Customer Center to the local /var/lib/containers/storage/volumes/var-spacewalk/ directory of your server.
通道完全同步后,将自动为其生成引导储存库。此步骤对于成功引导客户端至关重要,可确保通道同步和分发能够在客户端正常运行。SUSE Multi-Linux Manager 的安装和配置,以及为引导客户端准备所需通道的过程到此完成。
通道同步过程完成后,可以继续注册 SUSE Multi-Linux Manager 5.1 代理或其他客户端。
有关详细说明,请参见 客户端注册。
7. 进入容器进行管理
要在容器内访问外壳,请在容器主机上运行以下命令:
mgrctl term