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

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

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 区域使用。必须使用指定区域AWS_DEFAULT_REGION环境变量region设置[default]Lin部分~/.aws/config文件,或--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" }, "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