Skip to content

Commit

Permalink
Additional Template Knobs (#411)
Browse files Browse the repository at this point in the history
* added ASGHealthCheckGracePeriod

* InstanceCreationPolicyResourceSignalTimeout is a good name right

* ASGCreationPolicyResourceSignalTimeout

* ASGUpdatePolicyAutoScalingRollingUpdatePauseTime
  • Loading branch information
milt authored Jun 6, 2024
1 parent c39ddb7 commit 2affd32
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions dev-resources/template/2_lrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ Parameters:
Description: Port on which the server runs HTTP
Type: String
Default: 8080
InstanceCreationPolicyResourceSignalTimeout:
Description: How long to wait for a resource signal on the deployment of an instance.
Type: String
Default: PT15M

DefaultAdminUser:
Description: Username of seed lrs admin
Type: String
Expand Down Expand Up @@ -98,6 +103,18 @@ Parameters:
Type: String # according to docs a Double
Description: Target requests per instance. Leave blank to disable request count autoscaling.
Default: "" # "10000.0"
ASGHealthCheckGracePeriod:
Type: Number
Default: 120
Description: Time (in seconds) to wait before deciding a new instance is unhealthy.
ASGCreationPolicyResourceSignalTimeout:
Type: String
Description: How long to wait for instances before declaring failed creation.
Default: PT15M
ASGUpdatePolicyAutoScalingRollingUpdatePauseTime:
Type: String
Description: The amount of time that CloudFormation should wait for the Auto Scaling group to receive the required number of valid signals from added or replaced instances.
Default: PT15M

# Front-end (ALB) specific settings
ALBHostName:
Expand Down Expand Up @@ -401,7 +418,7 @@ Resources:
- GenerateJWTSecretResource
CreationPolicy:
ResourceSignal:
Timeout: PT15M
Timeout: !Ref InstanceCreationPolicyResourceSignalTimeout
Metadata:
AWS::CloudFormation::Init:
configSets:
Expand Down Expand Up @@ -683,18 +700,18 @@ Resources:
TargetGroupARNs:
- !Ref TargetGroup
HealthCheckType: ELB
HealthCheckGracePeriod: 120
HealthCheckGracePeriod: !Ref ASGHealthCheckGracePeriod
# Enable Group Metrics Collection
MetricsCollection:
- Granularity: "1Minute"
CreationPolicy:
ResourceSignal:
Timeout: PT15M
Timeout: !Ref ASGCreationPolicyResourceSignalTimeout
UpdatePolicy:
AutoScalingRollingUpdate:
MinInstancesInService: "1"
MaxBatchSize: "1"
PauseTime: PT15M
PauseTime: !Ref ASGUpdatePolicyAutoScalingRollingUpdatePauseTime
WaitOnResourceSignals: "true"
SuspendProcesses:
- HealthCheck
Expand Down

0 comments on commit 2affd32

Please sign in to comment.