pcluster describe-cluster - Amazon ParallelCluster
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

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

pcluster describe-cluster

获取有关集群的详细信息

pcluster describe-cluster [-h] --cluster-name CLUSTER_NAME [--debug] [--query QUERY] [--region REGION]

命名的参数

-h, --help

显示 pcluster describe-cluster 的帮助文本。

--cluster-name, -n CLUSTER_NAME

指定集群的名称。

--debug

启用调试日志记录。

--query QUERY

指定要对输出执行的 JMESPath 查询。

--region, -r REGION

指定 Amazon Web Services 区域 要使用的。 Amazon Web Services 区域 必须使用AWS_DEFAULT_REGION环境变量、~/.aws/config文件[default]部分中的region设置或--region参数来指定。

使用 Amazon ParallelCluster 版本 3.1.4 的示例:

描述集群详细信息:

$ pcluster describe-cluster -n cluster-v3 { "creationTime": "2022-07-12T17:19:16.101Z", "headNode": { "launchTime": "2022-07-12T17:22:21.000Z", "instanceId": "i-1234567890abcdef0", "publicIpAddress": "198.51.100.44", "instanceType": "t2.micro", "state": "running", "privateIpAddress": "192.0.2.0.196" }, "loginNodes": { "status": "active", "address": "8af2145440569xyz.us-east-1.amazonaws.com", "scheme": "internet-facing|internal", "healthyNodes": 3, "unhealthyNodes": 0 }, "version": "3.1.4", "clusterConfiguration": { "url": "https://parallelcluster-e5ca74255d6c3886-v1-do-not-delete..." }, "tags": [ { "value": "3.1.4", "key": "parallelcluster:version" } ], "cloudFormationStackStatus": "CREATE_COMPLETE", "clusterName": "cluster-v3", "computeFleetStatus": "RUNNING", "cloudformationStackArn": "arn:aws:cloudformation:us-east-1:123456789012:stack/cluster-v3/1234abcd-56ef-78gh-90ij-abcd1234efgh", "lastUpdatedTime": "2022-07-12T17:19:16.101Z", "region": "us-east-1", "clusterStatus": "CREATE_COMPLETE" }

使用 describe-cluster 检索集群配置:

$ curl -o - $(pcluster describe-cluster -n cluster-v3 --query clusterConfiguration.url | xargs echo) Region: us-east-1 Image: Os: alinux2 HeadNode: InstanceType: t2.micro Networking: SubnetId: subnet-abcdef01234567890 Ssh: KeyName: adpc Iam: S3Access: - BucketName: cluster-v3-bucket KeyName: logs EnableWriteAccess: true Scheduling: Scheduler: slurm SlurmQueues: - Name: queue1 ComputeResources: - Name: t2micro InstanceType: t2.micro MinCount: 0 MaxCount: 10 Networking: SubnetIds: - subnet-021345abcdef6789