Documentation survey

Connect PAYG instance

在三大主流公有云提供商(AWS、GCP 和 Azure)中,SUSE:

  • 提供 SLES、SLES for SAP 等产品的自定义 PAYG 产品映像。

  • 为以 PAYG 形式提供的产品操作按区域 RMT 服务器镜像储存库

This document describes how to connect existing PAYG instance to SUSE Multi-Linux Manager server, and gives basic information about credentials collection from the instance. The goal of this connection is to extract authentication data so the SUSE Multi-Linux Manager Server can connect to a cloud RMT host. Then the SUSE Multi-Linux Manager Server has access to products on the RMT host that are not already available with the SCC organization credentials.

Before using PAYG feature make sure that:

  • PAYG 实例是从正确的 SUSE 产品映像(例如 SLES、SLES for SAP、SLE HPC)启动的,以便能够访问所需储存库

  • SUSE Multi-Linux Manager 服务器可以直接或通过堡垒连接到 PAYG 实例(最好位于同一区域)

  • A basic SCC account is required. Enter your valid SCC credentials in Admin  Setup Wizard  Organization Credentials. This account is required for accessing the SUSE Multi-Linux Manager client tools for boostrapping regardless of PAYG instances.

  • If you bootstrap the PAYG instance to SUSE Manager, SUSE Manager will disable its PAYG repositories then add repositories from where it mirrored the data from the RMT server. The final result will be PAYG instances acquiring the same repositories from the RMT servers but through the SUSE Manager server itself. Of course repositories can still be setup primarily from SCC.

1. Connecting PAYG instance

Procedure: Connecting new PAYG instance
  1. 在 SUSE Multi-Linux Manager Web UI 中,导航到管理  安装向导  PAYG,然后单击 添加 PAYG

  2. 从页面的 PAYG 连接说明部分开始。

  3. 说明字段中添加说明。

  4. 转移到页面的实例 SSH 连接数据部分。

  5. 主机字段中,键入要从 SUSE Multi-Linux Manager 连接的实例 DNS 或 IP 地址。

  6. SSH 端口字段中输入端口号或使用默认值 22。

  7. 用户字段中输入云中指定的用户名。

  8. 口令字段中输入口令。

  9. SSH 私用密钥字段中输入实例密钥。

  10. SSH 私用密钥通行口令字段中输入密钥通行口令。

身份验证密钥必须采用 PEM 格式。

如果您要通过 SSH 堡垒连接实例而不是直接连接,请执行Procedure: Adding SSH bastion connection data

Procedure: Adding SSH bastion connection data
  1. 导航到页面的堡垒 SSH 连接数据部分。

  2. 主机字段中输入堡垒主机名。

  3. SSH 端口字段中输入堡垒端口号。

  4. 用户字段中输入堡垒用户名。

  5. 口令字段中输入堡垒口令。

  6. SSH 私用密钥字段中输入堡垒密钥。

  7. SSH 私用密钥通行口令字段中输入堡垒密钥通行口令。

执行Procedure: Finishing PAYG connecting完成设置过程。

Procedure: Finishing PAYG connecting
  1. 要完成添加新 PAYG 连接数据的过程,请单击 创建

  2. 返回 PAYG 连接数据细节页面。 顶部的信息部分会显示更新的连接状态。

  3. 管理 > 安装向导 > Pay-as-you-go 屏幕中也会显示连接状态。

  4. 如果实例的身份验证数据正确,状态列会显示“已成功更新身份凭证”。

如果在任何时间输入了无效数据,管理 > 安装向导 > PAYG 中会显示新创建的实例,同时状态列会显示错误消息。

一旦服务器上有可用的身份验证信息,可用产品列表即会更新。

Available products are all versions of the same product family and architecture as the one installed in the PAYG instance. For example, if the instance has the SUSE Linux Enterprise Server 15 SP1 product installed, SUSE Linux Enterprise Server 15 SP2, SUSE Linux Enterprise Server 15 SP3, SUSE Linux Enterprise Server 15 SP4 and SUSE Linux Enterprise Server 15 SP5 are automatically shown in Admin > Setup Wizard > Products.

当有产品显示为可用时,用户便可选中该产品名称旁边的复选框并单击 添加产品,将产品添加到 SUSE Multi-Linux Manager 中。

成功消息显示后,您可以在 Web UI 中导航到软件 > 通道列表 > 所有校验新添加的通道。

要监控每个通道的同步进度,请查看 SUSE Multi-Linux Manager 服务器上 /var/log/rhn/reposync 目录中的日志文件。

If a product is provided by both the PAYG instance and one of the SCC subscriptions, it will appear only once in the products list.

When the channels belonging to that product are synced, the data might still come from the SCC subscription, and not from the Pay-As-You-Go instance.

1.1. Deleting the instance connection data

下面的过程介绍如何删除实例的 SSH 连接数据。

Procedure: Deleting connection data to instance
  1. 打开管理 > 安装向导 > PAYG

  2. 在现有实例列表中找到该实例。

  3. 单击实例细节。

  4. 选择 删除 并确认您的选择。

  5. 您会返回到实例列表。 刚才删除的实例不再显示。

2. Instance credential collect status

SUSE Multi-Linux Manager 服务器使用从实例收集的身份凭证来连接 RMT 服务器和下载使用 reposync 的软件包。Taskomatic 会使用定义的 SSH 连接数据每 10 分钟刷新一次这些身份凭证。RMT 服务器连接始终使用从 PAYG 实例收集的最新已知身份验证身份凭证。

The status of the PAYG instance credentials collect is shown in the column Status or on the instance details page. When the instance is not reachable, the credential update process will fail.

When the instance is unreachable, the credential update process will fail and the credentials will become invalid after the second failed refresh. Synchronization of channels will fail when the credentials are invalid. To avoid this keep the connected instances running.

除非明确删除了 SSH 连接数据,否则 PAYG 实例将一直连接到 SUSE Multi-Linux Manager 服务器。要删除实例的 SSH 连接数据,请执行Procedure: Deleting connection data to instance

并非在任何时间都可从 SUSE Multi-Linux Manager 服务器访问 PAYG 实例。

  • 如果实例存在但已停止,系统将使用最新的已知身份凭证尝试连接实例。 身份凭证的有效时长取决于云提供商。

  • If the instance no longer exists, but is still registered with SUMA, its credentials are no longer valid and the authentication will fail. “状态”列中会显示错误消息。

    错误消息只会指出实例不再可用。云提供商需要对实例的状态进行进一步诊断。

在 PAYG 实例中进行以下任意操作或更改都将导致身份凭证失效: * 去除 zypper 身份凭证文件 * 去除导入的证书 * 从 /etc/hosts 中去除特定于云的条目

3. Registering PAYG system as a client

您可以将从中收集身份凭证的 PAYG 实例注册为 Salt 客户端。需要为实例注册有效的云连接,否则它将无法访问通道。如果用户去除相关云软件包,身份凭证收集可能会停止工作。

首先,将 PAYG 实例设置为收集身份验证数据,以使其可以同步通道。

该过程的其余步骤与非公有云客户端的步骤相同,包括同步通道、自动创建引导脚本、创建激活密钥,以及启动注册。

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

4. 查错

检查身份凭证
  • 如果脚本无法收集身份凭证,将会在日志和 Web UI 中提供正确的错误消息。

  • 如果身份凭证无法工作,reposync 应该会显示正确的错误消息。

使用 registercloudguest
  • 刷新或更改 registercloudguest 与公有云更新基础架构的连接不应影响身份凭证的使用。

  • 如果未使用 cloud guest 命令注册新的云连接,运行 registercloudguest --clean 将会导致发生问题。