Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Updated Code to Handle few things #187

Merged
merged 2 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/templates/cromwell/cromwell-resources.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Parameters:
Description: >-
URL to a pre-built cromwell-*.jar file. Example: https://mycicdserver.com/build/cromwell-XX-SNAP.jar.
If this is specifed, CromwellVersion is ignored.
Default: "https://github.com/henriqueribeiro/cromwell/releases/download/78-AWS/cromwell-78-600df43-AWS.jar"
Default: "https://github.com/henriqueribeiro/cromwell/releases/download/78-AWS/cromwell-78-AWS.jar"

DBSubnetIDs:
Type: List<AWS::EC2::Subnet::Id>
Expand Down Expand Up @@ -265,7 +265,16 @@ Resources:
- "batch:ListJobs"
- "batch:DescribeComputeEnvironments"
- "ecs:DescribeContainerInstances"
- "imagebuilder:GetComponent"
- "imagebuilder:GetContainerRecipe"
- "ecr:GetAuthorizationToken"
- "ecr:BatchGetImage"
- "ecr:InitiateLayerUpload"
- "ecr:UploadLayerPart"
- "ecr:CompleteLayerUpload"
- "ecr:BatchCheckLayerAvailability"
- "ecr:GetDownloadUrlForLayer"
- "ecr:PutImage"

- PolicyName: !Sub CromwellServer-S3-Access-${AWS::Region}
PolicyDocument:
Expand Down Expand Up @@ -498,7 +507,7 @@ Resources:
url = "jdbc:mysql://${DBAddress}/cromwell?rewriteBatchedStatements=true&useSSL=false"
user = "${DBUsername}"
password = "${DBPassword}"
connectionTimeout = 5000
connectionTimeout = 30000
}
}

Expand Down Expand Up @@ -585,7 +594,7 @@ Resources:
url = "jdbc:mysql://${DBAddress}/cromwell?rewriteBatchedStatements=true&useSSL=false"
user = "${DBUsername}"
password = "${DBPassword}"
connectionTimeout = 5000
connectionTimeout = 30000
}
}

Expand Down Expand Up @@ -684,7 +693,7 @@ Resources:
user=ec2-user ; setuid to this UNIX account to run the program
redirect_stderr=true ; redirect proc stderr to stdout (default false)
stdout_logfile=/home/ec2-user/cromwell-server.log ; stdout log path, NONE for none; default AUTO

"/etc/nginx/nginx.conf":
mode: "000644"
content: |
Expand Down
72 changes: 9 additions & 63 deletions src/templates/gwfcore/gwfcore-batch.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Metadata:
- SpotFleetRoleArn
- FSxSubnetId
- BatchSpotBidPercentage
- BatchComputeInstanceTypes
ParameterLabels:
LaunchTemplateId:
default: Launch Template ID
Expand All @@ -49,6 +50,8 @@ Metadata:
default: The FSx subnet Id.
BatchSpotBidPercentage:
default: The % of the On-demand EC2 price the SPOT instances should be bid at.
BatchComputeInstanceTypes:
default: The list of instance types to be used for EC2 instances using Batch Compute Environments.

Parameters:
Namespace:
Expand Down Expand Up @@ -81,7 +84,7 @@ Parameters:
DefaultCEMaxvCpus:
Type: Number
Description: Maximum number of CPUs in the default compute environment. Should be >= than MinCpus
Default: 100
Default: 1000
MinValue: 0
BatchServiceRoleArn:
Type: String
Expand All @@ -100,6 +103,9 @@ Parameters:
Type: Number
Description: The maximum percentage that an EC2 Spot Instance price can be when compared with the On-Demand price for that instance type before instances are launched.
Default: 100
BatchComputeInstanceTypes:
Type: String
Description: The list of instance types to be used for EC2 instances using Batch Compute Environments.

Mappings:
TagMap:
Expand Down Expand Up @@ -168,43 +174,7 @@ Resources:
LaunchTemplateId: !Ref LaunchTemplateId
Version: $Latest
InstanceRole: !Ref Ec2InstanceProfileArn
InstanceTypes:
- c4.large
- m4.large
- r4.large
- c4.xlarge
- m4.xlarge
- r4.xlarge
- c4.2xlarge
- m4.2xlarge
- r4.2xlarge
- c4.4xlarge
- m4.4xlarge
- r4.4xlarge
- c5.large
- m5.large
- r5.large
- c5.xlarge
- m5.xlarge
- r5.xlarge
- c5.2xlarge
- m5.2xlarge
- r5.2xlarge
- c5.4xlarge
- m5.4xlarge
- r5.4xlarge
- c5n.large
- m5n.large
- r5n.large
- c5n.xlarge
- m5n.xlarge
- r5n.xlarge
- c5n.2xlarge
- m5n.2xlarge
- r5n.2xlarge
- c5n.4xlarge
- m5n.4xlarge
- r5n.4xlarge
InstanceTypes: !Split [",", !Ref BatchComputeInstanceTypes ]
MinvCpus: !Ref DefaultCEMinvCpus
MaxvCpus: !Ref DefaultCEMaxvCpus
SecurityGroupIds:
Expand All @@ -231,31 +201,7 @@ Resources:
LaunchTemplateId: !Ref LaunchTemplateId
Version: $Latest
InstanceRole: !Ref Ec2InstanceProfileArn
InstanceTypes:
- c5.large
- m5.large
- r5.large
- c5.xlarge
- m5.xlarge
- r5.xlarge
- c5.2xlarge
- m5.2xlarge
- r5.2xlarge
- c5.4xlarge
- m5.4xlarge
- r5.4xlarge
- c5n.large
- m5n.large
- r5n.large
- c5n.xlarge
- m5n.xlarge
- r5n.xlarge
- c5n.2xlarge
- m5n.2xlarge
- r5n.2xlarge
- c5n.4xlarge
- m5n.4xlarge
- r5n.4xlarge
InstanceTypes: !Split [",", !Ref BatchComputeInstanceTypes ]
MinvCpus: !Ref PriorityCEMinvCpus
MaxvCpus: !Ref PriorityCEMaxvCpus
SecurityGroupIds:
Expand Down
9 changes: 9 additions & 0 deletions src/templates/gwfcore/gwfcore-root.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Metadata:
- FSxPerUnitStorageThroughput
- FSxStorageType
- BatchSpotBidPercentage
- BatchComputeInstanceTypes
- Label:
default: Distribution Configuration
Parameters:
Expand Down Expand Up @@ -78,6 +79,8 @@ Metadata:
default: The type of FS needed i.e. SSD or HDD or SCRATCH
BatchSpotBidPercentage:
default: The maximum percentage that an EC2 Spot Instance price can be when compared with the On-Demand price for that instance type before instances are launched.
BatchComputeInstanceTypes:
default: The list of instance types to be used for EC2 instances using Batch Compute Environments.

Parameters:
Namespace:
Expand Down Expand Up @@ -193,6 +196,11 @@ Parameters:
Description: The maximum percentage that an EC2 Spot Instance price can be when compared with the On-Demand price for that instance type before instances are launched.
Default: 100

BatchComputeInstanceTypes:
Type: String
Description: The list of instance types to be used for EC2 instances using Batch Compute Environments.
Default: "c4.large,m4.large,r4.large,c4.xlarge,m4.xlarge,r4.xlarge,c4.2xlarge,m4.2xlarge,r4.2xlarge,c4.4xlarge,m4.4xlarge,r4.4xlarge,c5.large,m5.large,r5.large,c5.xlarge,m5.xlarge,r5.xlarge,c5.2xlarge,m5.2xlarge,r5.2xlarge,c5.4xlarge,m5.4xlarge,r5.4xlarge,c5n.large,m5n.large,r5n.large,c5n.xlarge,m5n.xlarge,r5n.xlarge,c5n.2xlarge,m5n.2xlarge,r5n.2xlarge,c5n.4xlarge,m5n.4xlarge,r5n.4xlarge"

Conditions:
NoNamespace: !Equals [ !Ref Namespace, "" ]
EfsCondition: !Equals [ !Ref CreateEFS, "Yes"]
Expand Down Expand Up @@ -306,6 +314,7 @@ Resources:
SpotFleetRoleArn: !Sub ${IamStack.Outputs.BatchSpotFleetRoleArn}
FSxSubnetId: !Ref FSxSubnetId
BatchSpotBidPercentage: !Ref BatchSpotBidPercentage
BatchComputeInstanceTypes: !Ref BatchComputeInstanceTypes

FSxSGIngressTCP:
Condition: FsxCondition
Expand Down