将更新安装到 Snowball Edge 设备 - AWS Snowball Edge 开发者指南

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

将更新安装到 Snowball Edge 设备

下载更新后,您必须安装这些更新并重启设备以便更新生效。以下过程将指导您手动安装更新。

对于 Snowball Edge 设备集群,必须将更新下载到集群中的每台设备并安装更新。

注意

在安装软件更新之前,请暂停设备上的所有活动。安装更新会停止正在运行的实例,并中断对设备上的 Amazon S3 存储桶的任何写入操作。这可能会导致数据丢失

安装已经下载到独立版 Snowball Edge 的软件更新
  1. 打开一个终端窗口,并确保使用 describe-device 命令解锁 Snowball Edge 设备。如果设备已锁定,请使用 unlock-device 命令来解锁它。有关更多信息,请参阅解锁 Snowball Edge

  2. 运行 list-services 命令来查看设备上可用的服务。该命令返回设备上每 IDs 项可用服务的服务。

    snowballEdge list-services
    list-services 命令的输出
    { "ServiceIds" : [ "greengrass", "fileinterface", "s3", "ec2", "s3-snow" ] }
  3. 对于通过 list-services 命令标识的每个服务 ID,运行 describe-service 命令来查看状态。使用此信息来识别要停止的服务。

    snowballEdge describe-service --service-id service-id
    describe-service 命令的输出
    { "ServiceId" : "s3", "Status" : { "State" : "ACTIVE" }, "Storage" : { "TotalSpaceBytes" : 99608745492480, "FreeSpaceBytes" : 99608744468480 }, "Endpoints" : [ { "Protocol" : "http", "Port" : 8080, "Host" : "192.0.2.0" }, { "Protocol" : "https", "Port" : 8443, "Host" : "192.0.2.0", "CertificateAssociation" : { "CertificateArn" : "arn:aws:snowball-device:::certificate/6d955EXAMPLEdb71798146EXAMPLE3f0" } } ] }

    此输出显示,s3 服务处于活动状态,必须使用 stop-service 命令停止。

  4. 使用 stop-service 命令停止在 list-services 命令的输出中 State 名称的值为 ACTIVE 的每项服务。如果有多个服务正在运行,请先停止每项服务,然后再继续。

    注意

    Amazon S3 适配器 EC2 AWS STS、亚马逊和 IAM 服务无法停止。如果 Snowball Edge 上与 Amazon S3 兼容的存储正在运行,请在安装更新之前将其停止。Snowball Edge 上与 Amazon S3 兼容的存储空间s3-snow是. serviceId

    snowballEdge stop-service --service-id service-id --device-ip-addresses snow-device-1-ip-address snow-device-device-2-ip-address snow-device-3-ip-address --manifest-file path/to/manifest/file.bin --unlock-code 29-character-unlock-code --endpoint https://snow-device-ip-address
    stop-service 命令的输出
    Stopping the AWS service on your Snowball Edge. You can determine the status of the AWS service using the describe-service command.
  5. 运行 snowballEdge install-updates 命令。

  6. 您可以使用 snowballEdge describe-device-software 命令检查此安装的状态。在安装更新时,您可以使用此命令显示其状态。

    示例输出

    Install State: Installing //Possible values[NA, Installing, Requires Reboot]

    您已成功安装 Snowball Edge 设备的软件更新。安装更新不会将更新自动应用于设备。要完成安装更新,必须重启设备。

    警告

    在不停止 Snowball Edge 设备上的所有活动的情况下重启设备可能会导致丢失数据。

  7. 当设备上的所有服务都停止后,重新启动设备,解锁设备,然后再次重新启动。已下载的软件更新的安装到此结束。有关重启设备的更多信息,请参阅重启 Snowball Edge 重新启动 Snowball

  8. 在第二次重启后设备开启时,解锁设备。

  9. 运行 check-for-updates 命令。此命令返回 Snowball Edge 软件的最新可用版本以及设备上安装的当前版本。

将已下载的软件更新安装到 Snowball Edge 设备的集群
  1. 对于集群中的每台设备,运行 describe-device 命令来确定设备是否已解锁。如果设备已锁定,请使用 unlock-cluster 命令来解锁。有关更多信息,请参阅解锁 Snowball Edge

  2. 对于集群中的每台设备,运行 list-services 命令来查看设备上可用的服务。该命令返回设备上每 IDs 项可用服务的服务。

    snowballEdge list-services
    list-services 命令的输出
    { "ServiceIds" : [ "greengrass", "fileinterface", "s3", "ec2", "s3-snow" ] }
  3. 对于通过 list-services 命令标识的每个服务 ID,运行 describe-service 命令来查看状态。使用此信息来识别要停止的服务。

    snowballEdge describe-service --service-id service-id
    describe-service 命令的输出
    { "ServiceId" : "s3", "Status" : { "State" : "ACTIVE" }, "Storage" : { "TotalSpaceBytes" : 99608745492480, "FreeSpaceBytes" : 99608744468480 }, "Endpoints" : [ { "Protocol" : "http", "Port" : 8080, "Host" : "192.0.2.0" }, { "Protocol" : "https", "Port" : 8443, "Host" : "192.0.2.0", "CertificateAssociation" : { "CertificateArn" : "arn:aws:snowball-device:::certificate/6d955EXAMPLEdb71798146EXAMPLE3f0" } } ] }

    此输出显示,s3 服务处于活动状态,必须使用 stop-service 命令停止。

  4. 对于集群中的每台设备,使用 stop-service 命令停止在 list-services 命令的输出中 State 名称的值为 ACTIVE 的每项服务。如果有多个服务正在运行,请先停止每项服务,然后再继续。

    注意

    Amazon S3 适配器 EC2 AWS STS、亚马逊和 IAM 服务无法停止。如果 Snowball Edge 上与 Amazon S3 兼容的存储正在运行,请在安装更新之前将其停止。Snowball Edge 上与 Amazon S3 兼容的存储空间s3-snow是. serviceId

    snowballEdge stop-service --service-id service-id --device-ip-addresses snow-device-1-ip-address snow-device-device-2-ip-address snow-device-3-ip-address --manifest-file path/to/manifest/file.bin --unlock-code 29-character-unlock-code --endpoint https://snow-device-ip-address
    stop-service 命令的输出
    Stopping the AWS service on your Snowball Edge. You can determine the status of the AWS service using the describe-service command.
  5. 对于集群中的每台设备,运行 install-updates 命令。

    snowballEdge install-updates
  6. 您可以使用 describe-device-software 命令检查此安装的状态。

    snowballEdge describe-device-software
    describe-device-service 命令的输出
    Install State: Installing //Possible values[NA, Installing, Requires Reboot]

    Install StateRequires Reboot 时,您已成功安装 Snowball Edge 设备的软件更新。安装更新不会将更新自动应用于设备。要完成安装更新,必须重启设备。

    警告

    在不停止 Snowball Edge 设备上的所有活动的情况下重启设备可能会导致丢失数据。

  7. 重启集群中的所有设备,解锁集群,然后再次重启集群中的所有设备。已下载的软件更新的安装到此结束。有关重启设备的更多信息,请参阅重启 Snowball Edge。有关解锁设备集群的更多信息,请参阅解锁 Snowball Edge

  8. 集群中的每台设备重启两次后,解锁集群,然后使用 check-for-updates 命令验证设备是否已更新。此命令返回 Snowball Edge 软件的最新可用版本以及设备上安装的当前版本。如果当前版本和最新可用版本相同,则设备已成功更新。

现在,您已成功更新了 Snowball Edge 或设备集群,并确认更新了最新的 Snowball Edge 软件。