激活密钥

激活密钥用于确保客户端拥有正确的软件权利、可连接到适当的通道以及订阅相关的组。每个激活密钥都绑定到一个组织,您可以在创建密钥时设置此项。

在 SUSE Multi-Linux Manager 中,激活密钥是一组带有标签的配置设置。您可以通过将某个激活密钥的标签作为参数添加到引导脚本,来应用与该激活密钥关联的所有配置设置。我们建议您结合引导脚本来使用激活密钥标签。当执行引导脚本时,与该标签关联的所有配置设置都将应用到运行脚本的系统上。

激活密钥可以指定以下各项:

  • 通道指派

  • 系统类型或附加权利

  • 联系方法

  • 配置文件

  • 要安装的软件包

  • 要启用的 AppStream

  • 系统组指派

在注册客户端时需使用激活密钥,之后将不再使用。无论激活密钥指定了什么内容,注册好客户端后,就能以任何方式对其进行更改。记录激活密钥与客户端之间的关联仅为了历史记载。

provision config keys
过程:创建激活密钥
  1. 在 SUSE Multi-Linux Manager Web UI 中,以管理员身份导航到系统  激活密钥

  2. 单击 创建密钥 按钮。

  3. On the Activation Key Details page, in the Description field, enter a description of the activation key.

  4. In the Key field, enter a name for the activation key. For example, SLES15-SP7 for SUSE Linux Enterprise Server 15 SP7.

    Do not use commas or double quotes in the Key field for any SUSE products. However, you must use commas for Red Hat Products.

    • 所有其他字符均可使用,不过系统会自动去除 <> (){}(包括空格)。

    • 如果将字段留空,系统会生成一个随机字符串。

  5. In the Usage add number of times the key can be used, or leave it blank for unlimited usage.

  6. In the Base Channels drop-down box, select the appropriate base software channel, and allow the relevant child channels to populate. For more information, see 安装向导 and 自定义通道.

  7. Select the Child Channels you need (for example, the mandatory SUSE Multi-Linux Manager tools and updates channels).

  8. Check the Add-On System Types checkbox if you need to enable any of the options. For more information about system types, see 系统类型.

  9. We recommend you leave the Contact Method set to Default. For more information about contact methds, see 客户端联系方法.

  10. We recommend you leave the Universal Default setting unchecked.

  11. 单击 创建激活密钥 以创建激活密钥。

  12. After the activation key is created, the page shows additional checkbox Configuration File Deployment below the list of Add-On System Types. To enable deploying configuration files to systems on registration, select this checkbox.

  13. 单击 更新激活密钥 保存更改。

激活密钥创建完毕后,页面顶部会显示额外的选项卡。使用它们可查看和设置其他功能。这些选项卡包括:

  • Packages

  • Configuration

  • Groups

  • Activated Systems

  • AppStreams (available whenever a modular channel is associated with the activation key)

1. 重新激活密钥

重新激活密钥可用来重新注册客户端并重新获得所有 SUSE Multi-Linux Manager 设置,但只能使用一次。重新激活密钥为客户端特定密钥,包含系统 ID、历史记录、组和通道。

To create a reactivation key, navigate to Systems, click the client to create a reactivation key for, and navigate to the Details  Reactivation tab. Click Generate New Key to create the reactivation key. Record the details of the key for later use. Unlike typical activation keys, which are not associated with a specific system ID, keys created here do not show up on the Systems  Activation Keys page.

After you have created a reactivation key, you can use it as the management_key grain in /etc/salt/minion.d/susemanager.conf. For example:

grains:
    susemanager:
         management_key: "re-1-daf44db90c0853edbb5db03f2b37986e"

Restart the venv-salt-minion or salt-minion process to apply the reactivation key.

您可以结合引导脚本来使用重新激活密钥。有关引导脚本的详细信息,请参见 使用引导脚本注册客户端

如果您使用客户端现有的 SUSE Multi-Linux Manager 配置文件自动安装客户端,该配置文件会使用重新激活密钥来重新注册系统并恢复其设置。请勿在正在进行基于配置文件的自动安装时重新生成、删除或使用此密钥, 否则会导致自动安装失败。

2. 激活密钥最佳实践

默认父通道

Avoid using the SUSE Multi-Linux Manager Default parent channel. This setting forces SUSE Multi-Linux Manager to choose a parent channel that best corresponds to the installed operating system, which can sometimes lead to unexpected behavior. Instead, we recommend you create activation keys specific to each distribution and architecture.

使用激活密钥引导

如果您要使用引导脚本,请考虑为每个脚本创建一个激活密钥。这有助于您调整通道指派、软件包安装、系统组成员资格和配置通道指派。注册后,您需要与系统手动交互的情形也会减少。

引导 LTSS 客户端

如果您要引导订阅了 LTSS 的客户端,请在创建激活密钥期间包含 LTSS 通道。

带宽要求

使用激活密钥可能导致在注册时自动下载软件,这对于存在带宽限制的环境来说可能并不适宜。

下列选择会产生带宽用量:

  • 指派 SUSE Product Pool 通道会导致自动安装相应的产品描述符软件包。

  • Any package in the Packages section is installed.

  • Any Salt state from the Configuration section might trigger downloads depending on its contents.

密钥标签命名

如果您没有为激活密钥输入直观易懂的名称,系统会自动生成一串数字字符串,这会使得您的密钥难以管理。

请考虑为您的激活密钥使用一种命名模式,以方便您进行跟踪。设计与您组织的基础结构相关的名称有助于您更轻松地执行较复杂的操作。

在创建密钥标签时,请考虑以下提示:

  • 操作系统命名(必需):密钥应始终代表提供的设置所适用的操作系统

  • 体系结构命名(建议):除非您的公司仅在一个体系结构上运行(例如 x86_64),否则最好提供含体系结构类型的标签。

  • 服务器类型命名:此服务器的用途是什么?

  • 位置命名:服务器位于何处?机房、建筑物或部门?

  • 日期命名:维护时段、季度等。

  • 自定义命名:哪种命名模式符合您组织的需求?

    激活密钥标签名称示例:

    sles15-sp4-web_server-room_129-x86_64
    sles15-sp4-test_packages-blg_502-room_21-ppc64le
包含的通道

在创建激活密钥时,您还需要注意哪些软件通道与其关联。应为密钥指派特定的基础通道, 不建议使用默认基础通道。有关详细信息,请在 客户端注册 中查看您要安装的客户端操作系统。