Snowball Edge 客户端的命令 - Amazon Snowball Edge 开发人员指南
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

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

Snowball Edge 客户端的命令

在下面,您可以找到有关 Snowball Edge 客户端命令的信息,包括使用示例和示例输出。

为 Snowball Edge 客户端配置配置文件

每次为 Snowball Edge 客户端运行命令时,都需要提供清单文件、解锁代码和 IP 地址。你可以从这里得到前两个Amazon Snow 系列管理控制台或者任务管理 API。有关获取您的清单和解锁代码的更多信息,请参阅获取您的证书和工具

您可以选择使用 snowballEdge configure 命令将清单的路径、29 个字符组成的解锁代码和终端节点存储为一个配置文件。配置完成后,您可以使用其他 Snowball Edge 客户端命令,而不必为特定作业手动输入这些值。配置 Snowball Edge 客户端后,信息将以纯文本 JSON 格式保存到home directory/.aws/snowball/config/snowball-edge.config

终端节点为附加了 https:// 的 IP 地址。您可以找到 IP 地址Amazon Snowball Edge设备上的Amazon Snowball Edge设备液晶显示屏。当Amazon Snowball Edge设备首次连接到您的网络,如果 DHCP 服务器可用,它会自动获取 DHCP IP 地址。如果您要使用其他 IP 地址,可以从 LCD 显示屏上进行更改。有关更多信息,请参阅使用 Amazon Snowball Edge 设备

重要

任何可以访问配置文件的人都可以访问您的 Snowball Edge 设备或集群上的数据。管理此文件的本地访问控制是您的管理责任之一。

用量

您可以通过两种方式使用此命令:内联或在提示时。此使用示例显示的是提示方法。

snowballEdge configure
例 Output
Configuration will stored at home directory\.aws\snowball\config\snowball-edge.config Snowball Edge Manifest Path: /Path/to/manifest/file Unlock Code: 29 character unlock code Default Endpoint: https://192.0.2.0

如果您同时具有多个任务,或者希望选择从不同的终端节点管理集群,则可以具有多个配置文件。有关多项的更多信息Amazon CLI配置文件,请参见已命名的个人资料Amazon Command Line Interface用户指南

获取用于 NFC 验证的 QR 代码

您可以使用此命令生成特定于设备的 QR 代码,以便与 Amazon Snowball Edge Verification App 一起使用。有关 NFC 验证的更多信息,请参阅验证 NFC 标签

用量

snowballEdge get-app-qr-code --output-file ~/downloads/snowball-qr-code.png
例 Output
QR code is saved to ~/downloads/snowball-qr-code.png

雪球边缘客户端版

使用snowball version命令查看 Snowball Edge 命令行界面 (CLI) 客户端的版本。

用量

snowball version

输出示例

Snowball client version: 1.2.0 Build 254

解锁 Snowball Edge 设备

解锁独立版Amazon Snowball Edge设备,运行snowballEdge unlock-device命令。要解锁集群,请使用 snowballEdge unlock-cluster 命令。这些命令会验证您对的访问权限Amazon Snowball Edge设备。

注意

要解锁与您的工作相关的设备,必须将设备放在现场,接通电源和网络,然后开机。此外,正面的液晶显示屏Amazon Snowball Edge设备必须表明该设备已准备就绪,可供使用。

用量

snowballEdge unlock-device --endpoint https://192.0.2.0 --manifest-file Path/to/manifest/file --unlock-code 01234-abcde-ABCDE-01234
例 单个设备解锁输入
snowballEdge unlock-device --endpoint https://192.0.2.0 --manifest-file /usr/home/manifest.bin --unlock-code 01234-abcde-ABCDE-01234
例 单个设备解锁输出
Your Snowball Edge device is unlocking. You may determine the unlock state of your device using the describe-device command. Your Snowball Edge device will be available for use when it is in the UNLOCKED state.

集群用法

在解锁集群时,提供您的某个节点的终端节点,以及集群中其他设备的所有 IP 地址。

snowballEdge unlock-cluster --endpoint https://192.0.2.0 --manifest-file Path/to/manifest/file --unlock-code 01234-abcde-ABCDE-01234 --device-ip-addresses 192.0.2.0 192.0.2.1 192.0.2.2 192.0.2.3 192.0.2.4
例 集群解锁输出
Your Snowball Edge Cluster is unlocking. You may determine the unlock state of your cluster using the describe-device command. Your Snowball Edge Cluster will be available for use when your Snowball Edge devices are in the UNLOCKED state.

更新 Snowball Edge

使用以下命令为您的 Snowball Edge 设备下载和安装更新。有关使用这些命令的过程,请参阅更新 Snowball Edge 设备上的软件

snowballEdge check-for-updates— 返回有关云中可用的 Snowball Edge 软件的版本信息,以及设备上安装的当前版本。

使用情况(已配置 Snowball Edge 客户端

snowballEdge check-for-updates
例 Output
Latest version: 102 Installed version: 101

snowballEdge describe-device-software— 返回设备的 SSL 证书的当前软件版本和到期日期。此外,如果正在下载或安装软件更新,还会显示状态。下面是可能的输出的列表:

  • NA— 目前没有正在进行任何软件更新。

  • Downloading— 正在下载新软件。

  • Installing— 正在安装新软件。

  • Requires Reboot— 已安装新软件,需要重新启动设备。

    警告

    我们强烈建议您先暂停设备上的所有活动,然后再重启设备。重启设备会停止运行实例,中断对设备上 Amazon S3 存储段的任何写入,并在不清除缓存的情况下停止从文件接口执行的任何写入操作。所有这些过程都可能会导致丢失数据。

使用情况(已配置 Snowball Edge 客户端

snowballEdge describe-device-software
例 Output
Installed version: 101 Installing version: 102 Install State: Downloading CertificateExpiry: Thur Jan 01 00:00:00 UTC 1970

snowballEdge download-updates— 开始为您的 Snowball Edge 下载最新的软件更新。

使用情况(已配置 Snowball Edge 客户端

snowballEdge download-updates
例 Output
Download started. Run describe-device-software API for additional information.

snowballEdge install-updates— 开始为您的 Snowball Edge 安装已下载的最新软件更新。

使用情况(已配置 Snowball Edge 客户端

snowballEdge install-updates
例 Output
Installation started.

snowballEdge reboot-device— 重启设备。

警告

我们强烈建议您先暂停设备上的所有活动,然后再重启设备。重启设备会停止运行实例,中断对设备上 Amazon S3 存储段的任何写入,并在不清除缓存的情况下停止从文件接口执行的任何写入操作。所有这些过程都可能会导致丢失数据。

使用情况(已配置 Snowball Edge 客户端

snowballEdge reboot-device
例 Output
Rebooting device now.

snowballEdge configure-auto-update-strategies— 配置自动更新策略。

使用情况(已配置 Snowball Edge 客户端

snowballEdge configure-auto-update-strategy --auto-check autoCheck [--auto-check-frequency autoCheckFreq] --auto-download autoDownload [--auto-download-frequency autoDownloadFreq] --auto-install autoInstall [--auto-install-frequency autoInstallFreq] --auto-reboot autoReboot [--endpoint endpoint]
例 Output
Successfully configured auto update strategy. Run describe-auto-update-strategies for additional information.

snowballEdge describe-auto-update-strategies— 返回任何当前配置的自动更新策略。

使用情况(已配置 Snowball Edge 客户端

snowballEdge describe-auto-update-strategies
例 Output
auto-update-strategy {[ auto-check:true, auto-check-frequency: "0 0 * * FRI", // CRON Expression String, Every Friday at midnight auto-download:true, auto-download-frequency: "0 0 * * SAT", // CRON Expression String, Every Saturday at midnight auto-install:true, auto-install-frequency: "0 13 * * Sun", // CRON Expression String, Every Saturday at midnight auto-reboot: false; ]}

获取凭证

使用snowballEdge list-access-keyssnowballEdge get-secret-access-key命令,你可以获取你的管理员用户的证书Amazon Web Services 账户在雪球边缘。您可以使用这些证书来创建Amazon Identity and Access Management(IAM 用户)和角色,并在使用时对您的请求进行身份验证Amazon CLI或者用AmazonSDK。这些凭证仅与 Snowball Edge 的单个任务相关联,您只能在设备或设备集群上使用它们。一个或多个设备在 IAM 中没有任何 IAM 权限Amazon Web Services 云。

注意

如果您将 Amazon CLI 与 Snowball Edge 结合使用,则必须在配置 CLI 时使用这些凭证。有关为其配置凭证的信息Amazon CLI,参见正在配置Amazon CLIAmazon Command Line Interface用户指南

使用情况(已配置 Snowball Edge 客户端

snowballEdge list-access-keys
例 Output
{ "AccessKeyIds" : [ "AKIAIOSFODNN7EXAMPLE" ] }

使用情况(已配置 Snowball Edge 客户端

snowballEdge get-secret-access-key --access-key-id Access Key
例 Output
[snowballEdge] aws_access_key_id = AKIAIOSFODNN7EXAMPLE aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

在你的 Snowball Edge 上启动服务

除亚马逊 S3 外,Snowball Edge 设备还支持多种服务。其中包括计算实例、文件接口和Amazon IoT Greengrass。默认情况下,亚马逊 S3 和亚马逊 EC2 始终处于开启状态,无法使用 Snowball Edge 客户端停止或重启。但是,文件接口和Amazon IoT Greengrass可以从snowballEdge start-service命令。要获取每个服务的服务 ID,您可以使用 snowballEdge list-services 命令。

运行此命令之前,请创建一个虚拟网络接口以绑定到您要启动的服务。有关更多信息,请参阅创建虚拟网络接口

使用情况(已配置 Snowball Edge 客户端

snowballEdge start-service --service-id service_id --virtual-network-interface-arns virtual-network-interface-arn
例 Output
Starting the Amazon service on your Snowball Edge. You can determine the status of the Amazon service using the describe-service command.

在 Snowball Edge 上停止服务

要停止在 Snowball Edge 上运行的服务,您可以使用snowballEdge stop-service命令。

亚马逊 S3 适配器,亚马逊 EC2Amazon STS,并且 IAM 服务无法停止。

警告

如果文件接口在剩余的缓冲数据写入设备之前停止,则可能会发生数据丢失。有关使用文件接口的更多信息,请参阅 使用文件接口将文件传输到 Snowball Edge 设备

注意

在 Snow Family 设备上停止 Amazon S3 兼容存储服务会禁用对存储在设备或集群上 S3 存储桶中的数据的访问。在 Snow Family 设备上重新启动兼容 Amazon S3 的存储时,访问权限将恢复。对于在 Snow Family 设备上启用 Amazon S3 兼容存储的设备,建议在 Snowball Edge 设备启动后启动该服务。见设置 Snowball Edge在本指南中。

使用情况(已配置 Snowball Edge 客户端

snowballEdge stop-service --service-id service_id
例 Output
Stopping the Amazon service on your Snowball Edge. You can determine the status of the Amazon service using the describe-service command.

获取您的证书以传输数据

要将数据传输到 Snowball Edge,请使用亚马逊 S3 适配器。要通过 HTTPS 协议使用 S3 接口,必须提供证书。证书由每台 Snowball Edge 设备生成。如果您使用不同的 IP 地址解锁 Snowball Edge 设备,则会生成一个新证书,并且旧证书不再适用于终端节点。你可以使用 Snowball Edge 再次从 Snowball Edge 获取更新后的新证书get-certificate命令。

您可以列出这些证书,然后使用以下命令从 Snowball Edge 设备下载它们:

  • list-certificates – 列出可供使用的证书的 Amazon 资源名称 (ARN)。

    使用情况(已配置 Snowball Edge 客户端

    snowballEdge list-certificates
    例 Output
    { "Certificates" : [ { "CertificateArn" : "arn:aws:snowball-device:::certificate/78EXAMPLE516EXAMPLEf538EXAMPLEa7", "SubjectAlternativeNames" : [ "192.0.2.0" ] } ] }
  • get-certificate – 根据提供的 ARN 获取特定证书。

    使用情况(已配置 Snowball Edge 客户端

    snowballEdge get-certificate --certificate-arn arn:aws:snowball-device:::certificate/78EXAMPLE516EXAMPLEf538EXAMPLEa7
    例 Output
    -----BEGIN CERTIFICATE----- Certificate -----END CERTIFICATE-----

    有关配置证书的信息,请参阅将 S3 适配器指定为Amazon CLI端点

启动 NFS 并限制访问

重要

如果您打算使用亚马逊弹性区块存储 (Amazon EBS),请勿启动 NFS 服务。首次启动 NFS 时,所有存储空间都分配给 NFS。即使 NFS 服务已停止,也无法将 NFS 存储重新分配给 Amazon EBS。

注意

您可以为允许装载设备公开的 NFS 共享的 IP 范围提供 CIDR 块。例如,10.0.0.0/16。如果您没有提供允许的 CIDR 块,则所有装载请求都将遭到拒绝。

请注意,通过 NFS 传输的数据未进行传输中加密。

除了 CIDR 区块允许的主机外,Snowcone 没有为 NFS 共享提供身份验证或授权机制。

使用 NFS 启动snowballEdge start-service命令。要获取 NFS 服务的服务 ID,可以使用snowballEdge list-services命令。

运行此命令之前,请创建一个虚拟网络接口以绑定到您要启动的服务。有关更多信息,请参见创建虚拟网络接口。您可以限制对 Amazon S3 存储桶中的文件共享和数据的访问权限,并查看当前存在哪些限制。为此,您可以为启动 NFS 服务时允许的主机分配 CIDR 块,这些主机可以访问您的文件共享和 S3 存储桶。

使用情况(已配置 Snowball Edge 客户端

snowballEdge start-service --service-id nfs --virtual-network-interface-arns arn:aws:snowball-device:::interface/s.ni-12345fgh45678j --service-configuration AllowedHosts=ip address-1/32,ip address-2/24
例 示例输出
Starting the service on your Snowball Edge. You can determine the status of the service using the describe-service command.

在 NFS 运行时限制对 NFS 共享的访问

启动 NFS 后,您可以限制访问 Amazon S3 存储桶中的文件共享和数据。您可以查看当前存在哪些限制,并为每个存储分区提供不同的访问限制。为此,您可以在启动 NFS 服务时为可以访问您的文件共享和 S3 存储桶的主机分配 CIDR 块。示例命令如下。

使用情况(已配置 Snowball Edge 客户端

snowballEdge start-service \ --service-id nfs \ --virtual-network-interface-arns virtual-network-interface-arn --service-configuration AllowedHosts=ip-address-1/32,ip-address-1/24

要查看当前的限制,请使用describe-service命令。

snowballEdge describe-service --service-id nfs

Amazon Snowball Edge 日志

当您在本地数据中心和 Snowball Edge 之间传输数据时,会自动生成日志。如果您在将数据传输到设备的过程中遇到意外错误,则可以使用以下命令将日志副本保存到本地服务器。

有三个与日志相关的命令:

  • list-logs— 返回 JSON 格式的日志列表。此列表报告日志的大小 (以字节为单位)、日志的 ARN、日志的服务 ID 和日志的类型。

    使用情况(已配置 Snowball Edge 客户端

    snowballEdge list-logs
    例 Output
    { "Logs" : [ { "LogArn" : "arn:aws:snowball-device:::log/s3-storage-JIEXAMPLE2f-1234-4953-a7c4-dfEXAMPLE709", "LogType" : "SUPPORT", "ServiceId" : "s3", "EstimatedSizeBytes" : 53132614 }, { "LogArn" : "arn:aws:snowball-device:::log/fileinterface-JIDEXAMPLEf-1234-4953-a7c4-dfEXAMPLE709", "LogType" : "CUSTOMER", "ServiceId" : "fileinterface", "EstimatedSizeBytes" : 4446 }] }
  • get-log— 将特定日志的副本从 Snowball Edge 下载到指定路径上的服务器。CUSTOMER日志保存在.zip格式,你可以提取这种类型的日志来查看其内容。SUPPORT日志已加密,只能由读取Amazon Web Services Support工程师。您可以选择为日志指定名称和路径。

    使用情况(已配置 Snowball Edge 客户端

    snowballEdge get-log --log-arn arn:aws:snowball-device:::log/fileinterface-JIDEXAMPLEf-1234-4953-a7c4-dfEXAMPLE709
    例 Output
    Logs are being saved to download/path/snowball-edge-logs-1515EXAMPLE88.bin
  • get-support-logs— 下载所有内容的副本SUPPORT在指定路径下从 Snowball Edge 到您的服务的日志类型。

    使用情况(已配置 Snowball Edge 客户端

    雪球边缘客户端

    snowballEdge get-support-logs
    例 Output
    Logs are being saved to download/path/snowball-edge-logs-1515716135711.bin
重要

CUSTOMER 类型可能包含有关您自己的数据的敏感信息。为了保护此潜在敏感信息,我们强烈建议您在用完这些日志之后将其删除。

获取设备状态

您可以使用以下 Snowball Edge 客户端命令来确定 Snowball Edge 设备的状态和总体运行状况:

  • describe-device

    使用情况(已配置 Snowball Edge 客户端

    snowballEdge describe-device
    例 Output
    { "DeviceId" : "JID-EXAMPLE12345-123-456-7-890", "UnlockStatus" : { "State" : "UNLOCKED" }, "ActiveNetworkInterface" : { "IpAddress" : "192.0.2.0" }, "PhysicalNetworkInterfaces" : [ { "PhysicalNetworkInterfaceId" : "s.ni-EXAMPLEd9ecbf03e3", "PhysicalConnectorType" : "RJ45", "IpAddressAssignment" : "STATIC", "IpAddress" : "0.0.0.0", "Netmask" : "0.0.0.0", "DefaultGateway" : "192.0.2.1", "MacAddress" : "EX:AM:PL:E0:12:34" }, { "PhysicalNetworkInterfaceId" : "s.ni-EXAMPLE4c3840068f", "PhysicalConnectorType" : "QSFP", "IpAddressAssignment" : "STATIC", "IpAddress" : "0.0.0.0", "Netmask" : "0.0.0.0", "DefaultGateway" : "192.0.2.2", "MacAddress" : "EX:AM:PL:E0:56:78" }, { "PhysicalNetworkInterfaceId" : "s.ni-EXAMPLE0a3a6499fd", "PhysicalConnectorType" : "SFP_PLUS", "IpAddressAssignment" : "DHCP", "IpAddress" : "192.168.1.231", "Netmask" : "255.255.255.0", "DefaultGateway" : "192.0.2.3", "MacAddress" : "EX:AM:PL:E0:90:12" } ] }
  • describe-cluster

    使用情况(已配置 Snowball Edge 客户端

    snowballEdge describe-cluster
    例 Output
    { "ClusterId" : "CIDEXAMPLE7-5402-4c19-9feb-7c9EXAMPLEd5", "Devices" : [ { "DeviceId" : "JIDEXAMPLE2-bc53-4618-a538-917EXAMPLE94", "UnlockStatus" : { "State" : "UNLOCKED" }, "ActiveNetworkInterface" : { "IpAddress" : "192.0.2.0" }, "ClusterAssociation" : { "State" : "ASSOCIATED", "ClusterId" : "CIDEXAMPLE7-5402-4c19-9feb-7c9EXAMPLEd5" }, "NetworkReachability" : { "State" : "REACHABLE" } }, { "DeviceId" : "JIDEXAMPLE2-bc53-4618-a538-917EXAMPLE94", "UnlockStatus" : { "State" : "UNLOCKED" }, "ActiveNetworkInterface" : { "IpAddress" : "192.0.2.1" }, "ClusterAssociation" : { "State" : "ASSOCIATED", "ClusterId" : "CIDEXAMPLE7-5402-4c19-9feb-7c9EXAMPLEd5" }, "NetworkReachability" : { "State" : "REACHABLE" } }, { "DeviceId" : "JIDEXAMPLE2-bc53-4618-a538-917EXAMPLE94", "UnlockStatus" : { "State" : "UNLOCKED" }, "ActiveNetworkInterface" : { "IpAddress" : "192.0.2.2" }, "ClusterAssociation" : { "State" : "ASSOCIATED", "ClusterId" : "CIDEXAMPLE7-5402-4c19-9feb-7c9EXAMPLEd5" }, "NetworkReachability" : { "State" : "REACHABLE" } }, { "DeviceId" : "JIDEXAMPLE2-bc53-4618-a538-917EXAMPLE94", "UnlockStatus" : { "State" : "UNLOCKED" }, "ActiveNetworkInterface" : { "IpAddress" : "192.0.2.3" }, "ClusterAssociation" : { "State" : "ASSOCIATED", "ClusterId" : "CIDEXAMPLE7-5402-4c19-9feb-7c9EXAMPLEd5" }, "NetworkReachability" : { "State" : "REACHABLE" } }, { "DeviceId" : "JIDEXAMPLE2-bc53-4618-a538-917EXAMPLE94", "UnlockStatus" : { "State" : "UNLOCKED" }, "ActiveNetworkInterface" : { "IpAddress" : "192.0.2.4" }, "ClusterAssociation" : { "State" : "ASSOCIATED", "ClusterId" : "CIDEXAMPLE7-5402-4c19-9feb-7c9EXAMPLEd5" }, "NetworkReachability" : { "State" : "REACHABLE" } } ] }

获取服务状态

您可以使用以下方法确定在 Snowball Edge 设备上运行的服务的状态和总体运行状况describe-service命令。可以首先运行 list-services 命令来查看哪些服务正在运行。

  • list-services

    使用情况(已配置 Snowball Edge 客户端

    snowballEdge list-services
    例 Output
    { "ServiceIds" : [ "greengrass", "fileinterface", "s3", "ec2", "s3-snow" ] }
  • describe-service

    此命令返回服务的状态值。它还包括状态信息,这些信息有助于解决您使用服务时可能遇到的问题。这些状态如下所示。

    • ACTIVE – 服务正在运行且可供使用。

    • ACTIVATING – 服务正在启动,但是还不能使用。

    • DEACTIVATING – 服务正处于关闭过程中。

    • DEGRADED— 对于 Snow Family 设备上兼容 Amazon S3 的存储,此状态表示集群中的一个或多个磁盘或设备已关闭。与 Amazon S3 兼容的 Snow Family 设备存储服务不间断运行,但您应在集群法定人数丢失之前恢复或更换受影响的设备,以最大限度地降低数据丢失的风险。见群集概述在本指南中。

    • INACTIVE – 服务未运行,无法使用。

    使用情况(已配置 Snowball Edge 客户端

    snowballEdge describe-service --service-id service-id
    例 Output
    { "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" } } ] }
    例 Snow Family 设备上的 Amazon S3 存储服务输出

    这个describe-service命令为以下输出提供以下输出s3-snow的价值service-id参数。

    { "ServiceId" : "s3-snow", "Autostart" : false, "Status" : { "State" : "ACTIVE" }, "ServiceCapacities" : [ { "Name" : "S3 Storage", "Unit" : "Byte", "Used" : 640303104, "Available" : 219571981512 } ], "Endpoints" : [ { "Protocol" : "https", "Port" : 443, "Host" : "10.0.2.123", "CertificateAssociation" : { "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456" }, "Description" : "s3-snow bucket API endpoint", "DeviceId" : "JID6ebd4c50-c3a1-4b16-b32c-b254f9b7f2dc", "Status" : { "State" : "ACTIVE" } }, { "Protocol" : "https", "Port" : 443, "Host" : "10.0.3.202", "CertificateAssociation" : { "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456" }, "Description" : "s3-snow object API endpoint", "DeviceId" : "JID6ebd4c50-c3a1-4b16-b32c-b254f9b7f2dc", "Status" : { "State" : "ACTIVE" } }, { "Protocol" : "https", "Port" : 443, "Host" : "10.0.3.63", "CertificateAssociation" : { "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456" }, "Description" : "s3-snow bucket API endpoint", "DeviceId" : "JID2a1e0deb-38b1-41f8-b904-a396c62da70d", "Status" : { "State" : "ACTIVE" } }, { "Protocol" : "https", "Port" : 443, "Host" : "10.0.2.243", "CertificateAssociation" : { "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456" }, "Description" : "s3-snow object API endpoint", "DeviceId" : "JID2a1e0deb-38b1-41f8-b904-a396c62da70d", "Status" : { "State" : "ACTIVE" } }, { "Protocol" : "https", "Port" : 443, "Host" : "10.0.2.220", "CertificateAssociation" : { "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456" }, "Description" : "s3-snow bucket API endpoint", "DeviceId" : "JIDcc45fa8f-b994-4ada-a821-581bc35d8645", "Status" : { "State" : "ACTIVE" } }, { "Protocol" : "https", "Port" : 443, "Host" : "10.0.2.55", "CertificateAssociation" : { "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456" }, "Description" : "s3-snow object API endpoint", "DeviceId" : "JIDcc45fa8f-b994-4ada-a821-581bc35d8645", "Status" : { "State" : "ACTIVE" } }, { "Protocol" : "https", "Port" : 443, "Host" : "10.0.3.213", "CertificateAssociation" : { "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456" }, "Description" : "s3-snow bucket API endpoint", "DeviceId" : "JID4ec68543-d974-465f-b81d-89832dd502db", "Status" : { "State" : "ACTIVE" } }, { "Protocol" : "https", "Port" : 443, "Host" : "10.0.3.144", "CertificateAssociation" : { "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456" }, "Description" : "s3-snow object API endpoint", "DeviceId" : "JID4ec68543-d974-465f-b81d-89832dd502db", "Status" : { "State" : "ACTIVE" } }, { "Protocol" : "https", "Port" : 443, "Host" : "10.0.2.143", "CertificateAssociation" : { "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456" }, "Description" : "s3-snow bucket API endpoint", "DeviceId" : "JID6331b8b5-6c63-4e01-b3ca-eab48b5628d2", "Status" : { "State" : "ACTIVE" } }, { "Protocol" : "https", "Port" : 443, "Host" : "10.0.3.224", "CertificateAssociation" : { "CertificateArn" : "arn:aws:snowball-device:::certificate/a65ba817f2c5ac9683fc3bc1ae123456" }, "Description" : "s3-snow object API endpoint", "DeviceId" : "JID6331b8b5-6c63-4e01-b3ca-eab48b5628d2", "Status" : { "State" : "ACTIVE" } } ] }

从集群中删除节点

这个disassociate-device命令从 Snowball Edge 集群中移除一个节点。如果要替换运行状况不佳的节点,请使用此命令。有关集群的更多信息,请参阅聚类概述在本指南中。

重要

仅在您要删除运行状况不佳的节点时才应使用 disassociate-device 命令。如果您尝试删除正常节点,此命令将失败并返回错误。

如果节点意外关闭或断开网络连接,从而临时对集群的其余部分不可用,不要使用此命令删除该节点。使用此命令移除的节点无法添加到任何集群,必须将其返回到Amazon。

如果节点意外断电或与网络断开连接,请将该节点重新接入电源和网络,然后使用associate-device命令。您不能使用 disassociate-device 命令来取消关联已启动并正常运行的节点。

使用情况(已配置 Snowball Edge 客户端

snowballEdge disassociate-device --device-id Job ID for the Device
例 Output
Disassociating your Snowball Edge device from the cluster. Your Snowball Edge device will be disassociated from the cluster when it is in the "DISASSOCIATED" state. You can use the describe-cluster command to determine the state of your cluster.

向集群添加节点

这个associate-device命令将节点添加到 Snowball Edge 设备集群。如果您关闭某个节点的电源,它将从解锁状态恢复为已锁定状态。要解锁该节点,您可以使用此命令。使用此命令将不可用的节点替换为您订购的新节点作为替换节点。有关集群的更多信息,请参阅群集概述在本指南中。

使用情况(已配置 Snowball Edge 客户端

snowballEdge associate-device --device-ip-address IP Address
例 Output
Associating your Snowball Edge device with the cluster. Your Snowball Edge device will be associated with the cluster when it is in the ASSOCIATED state. You can use the describe-cluster command to determine the state of your cluster.

为您的设备创建标签

在设备上添加或覆盖指定标签。您最多可以创建 50 个标签。每个标签由一个键值对组成。 值是可选的。

注意

不要在标签中放置敏感数据。

使用情况(已配置 Snowball Edge 客户端

snowballEdge create-tags --tag Key=Name,Value=user-test --tag Key=Stage,Value=beta

有关更多信息,请运行 describe-tags 命令。

例 Output
Tag(s) [Key=Name,Value=test, Key=Stage,Value=beta] created.

从您的设备删除标签

这个delete-tags命令会从您的 Snowball Edge 设备中删除指定的标签。

使用情况(已配置 Snowball Edge 客户端

snowballEdge delete-tags --tag Key=Stage,Value=beta Tag(s) [Key=Stage,Value=beta] deleted.

有关更多信息,请运行 describe-tags 命令。

注意

如果要同时删除多个标签,可以指定多个键值对,如下所示:

delete-tags --tag Key=Name,Value=test --tag Key=Stage,Value=Beta

如果您指定了标签键而没有指定标签值,则将删除任何具有此键的标签,而不管其值如何。如果您指定了标签键并将空字符串作为标签值,则仅删除将空字符串作为值的标签。

描述设备上的标签

这个describe-tags命令描述了您的 Snowball Edge 设备上的标签。

使用情况(已配置 Snowball Edge 客户端

snowballEdge describe-tags

有关更多信息,请运行 describe-tags 命令。

例 Output
{ "Tags" : [ { "Key" : "Name", "Value" : "user-test" }, { "Key" : "Stage", "Value" : "beta" } ] }

创建直接网络接口

  • create-direct-network-interface — 创建直接网络接口 (DNI)。创建直接网络接口,用于设备上与 Amazon EC2 兼容的计算实例。您可以使用以下方法找到设备上可用的直接网络接口describe-direct-network-interfaces命令。

使用情况(已配置 Snowball Edge 客户端

snowballEdge create-direct-network-interface [--endpoint endpoint] [--instance-id instanceId] [--mac macAddress] [--manifest-file manifestFile] [--physical-network-interface-id physicalNetworkInterfaceId] [--profile profile] [--unlock-code unlockCode] [--vlan vlanId]

获取有关直接网络接口的信息

  • describe-direct-network-interface — 获取设备上的直接网络接口。直接网络接口可用于在您的设备上为兼容 Amazon EC2 的计算实例和服务配置网络。您可以使用创建新的直接网络接口create-direct-network-interface命令。

使用情况(已配置 Snowball Edge 客户端

snowballEdge describe-direct-network-interfaces [--endpoint endpoint] [--manifest-file manifestFile] [--profile profile] [--unlock-code unlockCode]

更新直接网络接口

  • update-direct-network-interface — 更新直接网络接口。使用此命令更新直接网络接口,该接口将用于设备上与 Amazon EC2 兼容的计算实例。您可以使用以下方法找到设备上可用的直接网络接口describe-direct-network-interfaces 命令。当您修改连接到 Amazon EC2 兼容实例的网络接口时,将首先断开该接口。

使用情况(已配置 Snowball Edge 客户端

snowballEdge update-direct-network-interface [--direct-network-interface-arn directNetworkInterfaceArn] [--endpoint endpoint] [--mac macAddress] [--manifest-file manifestFile] [--profile profile] [--unlock-code unlockCode] [--vlan vlanId] [--attach-instance-id instanceId | --detach]

删除直接网络接口

  • delete-direct-network-interface— 删除不再使用的直接网络接口。要删除与您的 Amazon EC2 兼容计算实例关联的直接网络接口,您必须先取消该直接网络接口与您的实例的关联。

使用情况(已配置 Snowball Edge 客户端

snowballEdge delete-direct-network-interface [--direct-network-interface-arn directNetworkInterfaceArn] [--endpoint endpoint] [--manifest-file manifestFile] [--profile profile] [--unlock-code unlockCode]

设置时间服务器

您可以设置外部网络时间协议 (NTP) 服务器。当设备同时处于锁定和解锁状态时,可以使用 NTP CLI 命令。清单和解锁代码是必需的。您可以使用以下任一方式设置这些snowballEdge configure命令或使用--manifest-file--unlock-code选项。请注意,你可以使用snowballEdge两者都有 CLIAmazon SnowconeEdge 和Amazon Snowcone。

您有责任提供安全的 NTP 时间服务器。要设置设备连接到哪个 NTP 时间服务器,请使用update-time-serversCLI 命令。

注意

这个update-time-servers命令将覆盖先前的 NTP 时间服务器设置。

支持的 NTP 设备类型和软件版本

NTP 不适用于任何版本 2 的存储和计算设备类型。但是,软件版本 77 或更高版本的 Snowball Edge 第 3 版存储和计算设备类型支持 NTP。要检查 NTP 是否已启用,请使用 Snowball Edge CLI 命令describe-time-sources

用量

snowballEdge update-time-servers time.google.com
例 示例输出
Updating time servers now.

检查时间源

要查看设备当前连接到哪个 NTP 时间源,请使用describe-time-sources雪球边缘 CLI 命令。

用量

snowballEdge describe-time-sources
例 示例输出
{ "Sources" : [ { "Address" : "172.31.2.71", "State" : "LOST", "Type" : "PEER", "Stratum" : 10 }, { "Address" : "172.31.3.203", "State" : "LOST", "Type" : "PEER", "Stratum" : 10 }, { "Address" : "172.31.0.178", "State" : "LOST", "Type" : "PEER", "Stratum" : 10 }, { "Address" : "172.31.3.178", "State" : "LOST", "Type" : "PEER", "Stratum" : 10 }, { "Address" : "216.239.35.12", "State" : "CURRENT", "Type" : "SERVER", "Stratum" : 1 } ] }

这个describe-time-sources命令返回时间源状态列表。每个时间源状态都包含AddressStateType,以及Stratum字段。以下是这些字段的含义。

  • Address— 时间源的 DNS 名称/IP 地址。

  • State— 设备与该时间源之间的当前连接状态。有五种可能的状态:.

    • CURRENT— 时间源当前正用于同步时间。

    • COMBINED— 时间源与当前源相结合。

    • EXCLUDED— 合并算法排除了时间源。

    • LOST— 与时间源的连接已中断。

    • UNACCEPTABLE— 无效的时间源,其中组合算法认为要么是虚假的,要么是可变性太大。

  • Type— NTP 时间源可以是服务器或对等体。服务器可以通过以下方式设置update-time-servers命令。对等方只能是群集中的其他 Snowball Edge 设备,并且会在群集关联时自动设置。

  • Stratum— 此字段显示源层的分层。第 1 层表示具有本地连接参考时钟的源。与第 1 层源同步的源位于第 2 层。与第 2 层源同步的源位于第 3 层,依此类推...

NTP 时间源可以是服务器,也可以是对等方。服务器可以由用户通过以下方式设置update-time-servers命令,而对等设备只能是集群中的其他 Snowball Edge 设备。在示例输出中,describe-time-sources在 5 个集群中的 Snowball Edge 上调用。输出包含 4 个对等体和 1 个服务器。对等体的层次为 10,而服务器的层次为 1;因此,服务器被选为当前时间源。