SUSE Multi-Linux Manager Server Deployment on openSUSE Leap Micro 6.1
1. Deployment Preparations
本节介绍有关设置和部署 SUSE Multi-Linux Manager 服务器的专业知识。过程包括安装 Podman 和 Uyuni 容器实用程序、进行部署,然后通过 mgrctl 开始与容器交互。
|
本节假设您已配置 openSUSE Leap Micro 6.1 主机服务器(不考虑它是在物理机还是虚拟环境中运行)。 |
2. Container Host General Requirements
有关一般要求,请参见一般要求。
An openSUSE Leap Micro 6.1 server should be installed from installation media.
This procedure is described below.
3. 容器主机要求
有关 CPU、RAM 和存储要求,请参见硬件要求。
|
为了保证客户端能够解析 FQDN 域名,容器化服务器和主机都必须连接到正常运行的 DNS 服务器。此外,必须确保反向查找的配置正确。 |
4. Installing Uyuni Tools For Use With Containers
-
在本地主机上打开终端窗口,或启动一个运行 openSUSE Leap Micro 6.1 的虚拟机。
-
Log in.
-
输入
transactional-update shell:transactional-update shell
-
将以下储存库添加到 openSUSE Leap Micro 6.1 服务器:
zypper ar https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/images/repo/Uyuni-Server-POOL-$(arch)-Media1/ uyuni-server-stable
-
刷新储存库列表并接受密钥:
zypper ref
-
安装容器工具:
zypper in mgradm mgrctl mgradm-bash-completion mgrctl-bash-completion uyuni-storage-setup-server -
退出事务外壳:
transactional update # exit
-
重引导主机。
有关 Uyuni 容器实用程序的详细信息,请参见 Uyuni 容器实用程序。
5. 配置自定义永久性存储
此步骤是可选的。但是,如果您的基础架构需要自定义的永久性存储,请使用 mgr-storage-server 工具。
有关详细信息,请参见 mgr-storage-server --help。此工具可以简化容器存储和数据库卷的创建。
如下所示使用命令:
mgr-storage-server <storage-disk-device> [<database-disk-device>]
6. 例如:
mgr-storage-server /dev/nvme1n1 /dev/nvme2n1
[NOTE]
====
此命令将在 [path]``/var/lib/containers/storage/volumes`` 中创建永久性存储卷。
有关详细信息,请参见 xref:installation-and-upgrade:container-management/persistent-container-volumes.adoc[]。
====
== Deploying an Uyuni Container With Podman
=== [command]``mgradm`` Overview
使用 [command]``mgradm`` 工具将 {productname} 部署为容器。可使用两种方法将 {productname} 服务器部署为容器。本节重点介绍基本容器部署。
有关使用自定义配置文件进行部署的信息,请参见 xref:installation-and-upgrade:container-management/mgradm-yaml-custom-configuration.adoc[]。
可以在命令行中运行 [command]``mgradm --help`` 来了解更多信息。
:leveloffset: +2
[NOTE]
====
{productname} server hosts that are hardened for security may restrict execution of files from the [path]``/tmp`` folder. In such cases, as a workaround, export the [literal]``TMPDIR`` environment variable to another existing path before running [command]``mgradm``. For example:
[source, shell]
export TMPDIR=/path/to/other/tmp
In {productname} updates, tools will be changed to make this workaround unnecessary.
====
:leveloffset!:
.过程:使用 Podman 部署 Uyuni 容器
. 在终端中以 sudo 或 root 用户身份运行以下命令。
+
[source, shell]
sudo mgradm install podman
+ [IMPORTANT] ==== 必须以 sudo 或 root 用户身份部署容器。如果您遗漏此步骤,终端中将显示以下错误。 [source, shell]
INF 正在设置 uyuni 网络 9:58AM INF 正在启用系统服务 9:58AM FTL 无法打开 /etc/systemd/system/uyuni-server.service 进行写入,error="open /etc/systemd/system/uyuni-server.service: permission denied"
====
. 等待部署完成。
. 打开浏览器并访问您的服务器 FQDN。
//In this section you learned how to deploy an {productname} Server container.
=== 永久性卷
许多用户希望指定其永久性卷的位置。
[NOTE]
====
If you are just testing out {productname} you do not need to specify these volumes. [command]``mgradm`` will setup the correct volumes by default.
通常只需为较大规模的生产部署指定卷位置。
====
默认情况下,[command]``podman`` 将其卷存储在 [path]``/var/lib/containers/storage/volumes/`` 中。
You can provide custom storage for the volumes by mounting disks on this path or the expected volume path inside it such as: [path]``/var/lib/containers/storage/volumes/var-spacewalk``. This is especially important for the database and package mirrors.
For a list of all persistent volumes in the container, see:
* xref:installation-and-upgrade:container-management/persistent-container-volumes.adoc[]
* xref:administration:troubleshooting/tshoot-container-full-disk.adoc[]