アクションと引数を定義するための構成設定 - AWS ParallelCluster

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

アクションと引数を定義するための構成設定

次の設定は、HeadNode/CustomActions/OnNodeStart & OnNodeConfigured & OnNodeUpdated および Scheduling/CustomActions/OnNodeStart & OnNodeConfigured アクションと引数を定義するために使用されます。

HeadNode: [...] CustomActions: OnNodeStart: # Script URL. This is run before any of the bootstrap scripts are run Script: s3://amzn-s3-demo-bucket/on-node-start.sh Args: - arg1 OnNodeConfigured: # Script URL. This is run after all the bootstrap scripts are run Script: s3://amzn-s3-demo-bucket/on-node-configured.sh Args: - arg1 OnNodeUpdated: # Script URL. This is run after the head node update is completed. Script: s3://amzn-s3-demo-bucket/on-node-updated.sh Args: - arg1 # Bucket permissions Iam: S3Access: - BucketName: bucket_name EnableWriteAccess: false Scheduling: Scheduler: slurm [...] SlurmQueues: - Name: queue1 [...] CustomActions: OnNodeStart: Script: s3://amzn-s3-demo-bucket/on-node-start.sh Args: - arg1 OnNodeConfigured: Script: s3://amzn-s3-demo-bucket/on-node-configured.sh Args: - arg1 Iam: S3Access: - BucketName: bucket_name EnableWriteAccess: false

Sequence 設定 (AWS ParallelCluster バージョン 3.6.0 で追加) を使用する。

HeadNode: [...] CustomActions: OnNodeStart: # Script URLs. The scripts are run in the same order as listed in the configuration, before any of the bootstrap scripts are run. Sequence: - Script: s3://amzn-s3-demo-bucket/on-node-start1.sh Args: - arg1 - Script: s3://amzn-s3-demo-bucket/on-node-start2.sh Args: - arg1 [...] OnNodeConfigured: # Script URLs. The scripts are run in the same order as listed in the configuration, after all the bootstrap scripts are run. Sequence: - Script: s3://amzn-s3-demo-bucket/on-node-configured1.sh Args: - arg1 - Script: s3://amzn-s3-demo-bucket/on-node-configured2.sh Args: - arg1 [...] OnNodeUpdated: # Script URLs. The scripts are run in the same order as listed in the configuration, after the head node update is completed. Sequence: - Script: s3://amzn-s3-demo-bucket/on-node-updated1.sh Args: - arg1 - Script: s3://amzn-s3-demo-bucket/on-node-updated2.sh Args: - arg1 [...] # Bucket permissions Iam: S3Access: - BucketName: bucket_name EnableWriteAccess: false Scheduling: Scheduler: slurm [...] SlurmQueues: - Name: queue1 [...] CustomActions: OnNodeStart: # Script URLs. The scripts are run in the same order as listed in the configuration, before any of the bootstrap scripts are run Sequence: - Script: s3://amzn-s3-demo-bucket/on-node-start1.sh Args: - arg1 - Script: s3://amzn-s3-demo-bucket/on-node-start2.sh Args: - arg1 [...] OnNodeConfigured: # Script URLs. The scripts are run in the same order as listed in the configuration, after all the bootstrap scripts are run Sequence: - Script: s3://amzn-s3-demo-bucket/on-node-configured1.sh Args: - arg1 - Script: s3://amzn-s3-demo-bucket/on-node-configured2.sh Args: - arg1 [...] Iam: S3Access: - BucketName: bucket_name EnableWriteAccess: false

Sequence の設定は AWS ParallelCluster バージョン 3.6.0 以降で追加されました。Sequence を指定すると、カスタムアクション用の複数のスクリプトを一覧表示できます。Sequence を追加しなくても、AWS ParallelCluster は 1 つのスクリプトによるカスタムアクションの設定を引き続きサポートします。

AWS ParallelCluster では、同じカスタムアクションで、単一のスクリプトと Sequence の両方を含めることはサポートされていません。例えば、次の設定を指定する場合、AWS ParallelCluster は失敗します。

[...] CustomActions: OnNodeStart: # Script URL. This is run before any of the bootstrap scripts are run Script: s3://amzn-s3-demo-bucket/on-node-start.sh Args: - arg1 # Script URLs. The scripts are run in the same order as listed in the configuration, before any of the bootstrap scripts are run. Sequence: - Script: s3://amzn-s3-demo-bucket/on-node-start1.sh Args: - arg1 - Script: s3://amzn-s3-demo-bucket/on-node-start2.sh Args: - arg1 [...]