注册 Raspberry Pi OS 客户端

本节包含有关注册运行 Raspberry Pi OS 操作系统的客户端的信息。

可以通过引导 Raspberry Pi OS 客户端来执行初始状态的运行以及配置文件的更新。

  • Raspberry Pi OS 储存库 URL 可从 SUSE Customer Center 获取。

  • 软件包和元数据由 Raspberry Pi OS 而不是 SUSE 提供。

  • 有关支持的产品,请参见支持表格和版本说明。

1. 准备注册

需要完成一些准备工作,然后才能将 Raspberry Pi OS 客户端注册到 SUSE Multi-Linux Manager 服务器:

  • Ensure DNS is correctly configured and provides an entry for the client. Alternatively, you can configure the /etc/hosts files on both the SUSE Multi-Linux Manager Server and the client with the appropriate entries.

  • 注册前,客户端的日期和时间必须已与 SUSE Multi-Linux Manager 服务器同步。

2. 添加软件通道

将 Raspberry Pi OS 客户端注册到 SUSE Multi-Linux Manager 服务器之前,需要添加并同步所需的软件通道。

目前支持的体系结构有 arm64。

例如,使用 arm64 体系结构时,您需要如下产品:

Table 1. Raspberry Pi 操作系统 - WebUI
OS Version Product Name

Raspberry Pi OS 12

Raspberry Pi OS 12 (Tech Preview)

Raspberry Pi OS 13

Raspberry Pi OS 13 (Tech Preview)

过程:添加软件通道
  1. 在 SUSE Multi-Linux Manager Web UI 中,导航到管理  安装向导  产品

  2. Locate the appropriate products for your client operating system and architecture using the search bar, and check the appropriate product. This will automatically check all mandatory channels. Also all recommended channels are checked as long as the include recommended toggle is turned on. Click the arrow to see the complete list of related products, and ensure that any extra products you require are checked.

  3. 单击 添加产品 并等待产品完成同步。

或者,您也可以在命令提示符处添加通道。

此过程所需的通道包括:

Table 2. Raspberry Pi OS 通道 - CLI
OS Version Base Channel

Raspberry Pi OS 12

raspberrypios-12-pool-arm64

Raspberry Pi OS 13

raspberrypios-13-pool-arm64

过程:在命令提示符处添加软件通道
  1. With the spacewalk-common-channels command you can add the appropriate channels. At the command prompt on the SUSE Multi-Linux Manager container host, as root, execute the following command:

    mgrctl exec -ti -- spacewalk-common-channels \
    <base_channel_label> \
    <child_channel_label_1> \
    <child_channel_label_2> \
    ... <child_channel_label_n>

    要列出所有可用储存库,请执行以下命令:

    mgrctl exec -- spacewalk-common-channels -l
  2. 如果自动同步处于关闭状态,请同步通道:

    mgrctl exec -ti -- spacewalk-repo-sync -p <base_channel_label>
  3. 确保同步已完成,然后再继续操作。

The client tools channel provided by spacewalk-common-channels is sourced from Uyuni and not from SUSE.

在引导任何 Raspberry Pi OS 客户端之前,需要完全同步所有新通道。

3. 检查同步状态

过程:通过 Web UI 检查同步进度
  1. In the SUSE Multi-Linux Manager Web UI, navigate to Admin  Setup Wizard and select the Products tab. This dialog displays a completion bar for each product when they are being synchronized.

  2. Alternatively, you can navigate to Software  Manage  Channels, then click the channel associated to the repository. Navigate to the Repositories tab, then click Sync and check Sync Status.

过程:通过命令行检查同步进度
  1. 要在跟踪日志前列出可用日志,请在容器主机上运行以下命令:

    mgrctl exec ls /var/log/rhn/reposync/
  2. 在 SUSE Multi-Linux Manager 容器主机的命令提示符处,以 root 身份检查通道日志文件的同步:

    mgrctl exec -ti -- tail -f /var/log/rhn/reposync/<channel-label>.log
  3. 每个子通道在同步过程中会生成自身的日志。您需要检查所有基础通道和子通道日志文件,以确保同步完成。

Raspberry Pi OS 通道可能非常大。同步所需的时间可能长达数小时。

4. 创建激活密钥

需要创建与您的 Raspberry Pi OS 通道关联的激活密钥。

有关激活密钥的详细信息,请参见 激活密钥

5. 管理 GPG 密钥

安装软件包之前,客户端会使用 GPG 密钥检查这些软件包的真实性。只有可信软件才能安装在客户端上。

信任 GPG 密钥对于客户端的安全非常重要。由管理员来决定需要哪些密钥,可以信任哪些密钥。这是因为如果不信任 GPG 密钥,便无法使用软件通道,是否将通道指派给客户端取决于是否信任密钥。

有关 GPG 密钥的详细信息,请参见 GPG 密钥

Raspberry Pi OS 客户端可能需要安装多个 GPG 密钥。

同步第三方 Raspberry Pi OS 储存库时,需要在服务器上导入相应的 GPG 密钥。如果缺少 GPG 密钥,同步将会失败。

使用 Raspberry Pi OS 储存库时,系统只会对元数据签名。因此不需要导入软件通道的 GPG 密钥。SUSE Multi-Linux Manager 将不会对软件包重新签名。

要查看已导入 SUSE Multi-Linux Manager 服务器的 GPG 密钥,请运行以下命令:

mgrctl exec -- gpg --homedir /var/lib/spacewalk/gpgdir --list-keys

要导入新的 GPG 密钥,请运行以下命令:

mgradm gpg add <文件名>.gpg

6. Root 访问权限

默认会为 Raspberry Pi OS 上的 root 用户禁用 SSH 访问权限。

To be able to onboard using a regular user, you need to edit the sudoers file.

过程:授予 Root 用户访问权限
  1. On the client, edit the sudoers file:

    sudo visudo

    Grant sudo access to the user by adding this line at the end of the sudoers file. Replace <user> with the name of the user that is bootstrapping the client in the Web UI:

    <user>  ALL=NOPASSWD: /usr/bin/python, /usr/bin/python2, /usr/bin/python3, /var/tmp/venv-salt-minion/bin/python

This procedure grants root access without requiring a password, which is required for registering the client. When the client is successfully installed it runs with root privileges, so the access is no longer required. We recommend that you remove the line from the sudoers file after the client has been successfully installed.

7. 注册客户端

要注册您的客户端,需要有引导储存库。系统默认会自动创建引导储存库,并且每天会为所有同步的产品重新生成该储存库。您可以在容器主机的命令提示符处手动创建引导储存库:

mgrctl exec -ti mgr-create-bootstrap-repo

有关注册客户端的详细信息,请参见 客户端注册