AWSTemplateFormatVersion: "2010-09-09" Description: This template deploys an environment to run Parabricks software using AWS Batch. (qs-1oqea6246) Metadata: cfn-lint: config: ignore_checks: - W9006 # temporary to get rid of warnings - W9002 # temporary to get rid of warnings - W9003 # temporary to get rid of warnings - W9901 # Not passing all the default parameters to reduce verbosity QuickStartDocumentation: EntrypointName: "Parameters for deploying into a new VPC" Order: "1" AWS::CloudFormation::Interface: ParameterGroups: - Label: default: Network configuration Parameters: - AvailabilityZones - VPCCIDR - PrivateSubnetCIDR - PublicSubnetCIDR - Label: default: Parabricks Quick Start configuration Parameters: - ParabricksURI - KeyPairName - InstanceType - MinvCpus - MaxvCpus - DesiredvCpus - RetryNumber - Label: default: AWS Quick Start configuration Parameters: - QSS3BucketName - QSS3BucketRegion - QSS3KeyPrefix ParameterLabels: AvailabilityZones: default: Availability Zones ParabricksURI: default: The URI of the Parabricks Amazon ECR repository. KeyPairName: default: Key pair name PrivateSubnetCIDR: default: Private subnet CIDR PublicSubnetCIDR: default: Public subnet CIDR VPCCIDR: default: VPC CIDR QSS3BucketRegion: default: Quick Start S3 bucket Region QSS3KeyPrefix: default: Quick Start S3 key prefix QSS3BucketName: default: Quick Start S3 bucket name InstanceType: default: Instance type RetryNumber: default: AWS Batch retry number MinvCpus: default: Minimum vCPUs MaxvCpus: default: Maximum vCPUs DesiredvCpus: default: Desired vCPUs Parameters: AvailabilityZones: Description: The list of Availability Zones to use for the subnets in the VPC. The name of the Availability Zone. Type: List InstanceType: AllowedValues: - p3.8xlarge - p3.16xlarge - p3dn.24xlarge - g4dn.12xlarge - g4dn.metal Default: g4dn.12xlarge Description: Amazon EC2 instance type for Parabricks in the AWS Batch compute environment. Type: String KeyPairName: Description: The name of an existing public/private key pair, which allows you to securely connect to your instance after it launches. Type: AWS::EC2::KeyPair::KeyName ParabricksURI: Description: The URI of the ECR repository with the Parabricks Docker image. Type: String PrivateSubnet1ACIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.0.0/19 Description: CIDR block for private subnet 1A located in Availability Zone 1 Type: String PrivateSubnet2ACIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.32.0/19 Description: CIDR block for private subnet 2A located in Availability Zone 2 Type: String PublicSubnet1CIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.128.0/20 Description: CIDR block for the public DMZ subnet 1 located in Availability Zone 1 Type: String PublicSubnet2CIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.144.0/20 Description: CIDR block for the public DMZ subnet 2 located in Availability Zone 2 Type: String VPCCIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. Default: 10.0.0.0/16 Description: The CIDR block for the VPC. Type: String QSS3BucketName: AllowedPattern: ^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$ ConstraintDescription: Quick Start bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-). Default: aws-quickstart Description: S3 bucket name for the Quick Start assets. Quick Start bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-). Type: String QSS3BucketRegion: Default: 'us-east-1' Description: 'The AWS Region where the Quick Start S3 bucket (QSS3BucketName) is hosted. When using your own bucket, you must specify this value.' Type: String QSS3KeyPrefix: AllowedPattern: ^[0-9a-zA-Z-/]*$ ConstraintDescription: Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and a forward slash (/) at the end of the prefix. Description: S3 key prefix for the Quick Start assets. Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/). Default: quickstart-nvidia-parabricks/ Type: String RetryNumber: AllowedPattern: (?:\b|-)([1-9]|10)\b ConstraintDescription: AWS Batch job retry number should be between 1 and 10 Description: Retry number for an AWS Batch job. Default: 1 Type: String MinvCpus: AllowedPattern: ^(0|[1-9][0-9]{0,2}|1000)$ ConstraintDescription: Valid between 0 and 1000, inclusive. Description: Minimum vCPUs for your AWS Batch compute environment. Recommendation is 0. Default: 0 Type: String MaxvCpus: AllowedPattern: ^([1-9][0-9]{0,2}|1000)$ ConstraintDescription: Valid between 1 and 1000, inclusive. Description: Maximum vCPUs for your AWS Batch compute environment. Default: 256 Type: String DesiredvCpus: AllowedPattern: ^(0|[1-9][0-9]{0,2}|1000)$ ConstraintDescription: Valid between 1 and 1000, inclusive. Description: Desired vCPUs for your AWS Batch compute environment. Recommendation is the same number as minimum vCPUs for cost optimization. Default: 0 Type: String Conditions: UsingDefaultBucket: !Equals [!Ref QSS3BucketName, 'aws-quickstart'] Resources: VPCStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: Fn::Sub: - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}submodules/quickstart-aws-vpc/templates/aws-vpc.template.yaml - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: AvailabilityZones: Fn::Join: - ',' - !Ref AvailabilityZones NumberOfAZs: '2' PrivateSubnet1ACIDR: !Ref PrivateSubnet1ACIDR PrivateSubnet2ACIDR: !Ref PrivateSubnet2ACIDR PublicSubnet1CIDR: !Ref PublicSubnet1CIDR PublicSubnet2CIDR: !Ref PublicSubnet2CIDR VPCCIDR: !Ref VPCCIDR ParabricksStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: !Sub - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/parabricks.template.yaml - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: PrivateSubnetID: !GetAtt VPCStack.Outputs.PrivateSubnet1AID VPCID: !GetAtt VPCStack.Outputs.VPCID QSS3BucketName: !Ref QSS3BucketName QSS3BucketRegion: !Ref QSS3BucketRegion QSS3KeyPrefix: !Ref QSS3KeyPrefix KeyPairName: !Ref KeyPairName InstanceType: !Ref InstanceType MinvCpus: !Ref MinvCpus MaxvCpus: !Ref MaxvCpus DesiredvCpus: !Ref DesiredvCpus RetryNumber: !Ref RetryNumber ParabricksURI: !Ref ParabricksURI Outputs: ParabricksJobDefinition: Description: The AWS Batch job definition for Parabricks. Value: !GetAtt ParabricksStack.Outputs.ParabricksJobDefinition ParabricksJobQueue: Description: The job queue for submitting jobs. Value: !GetAtt ParabricksStack.Outputs.ParabricksJobQueue ParabricksComputeEnvironment: Value: !GetAtt ParabricksStack.Outputs.ParabricksComputeEnvironment