-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates for javabuilder-demo to go live #393
Changes from 14 commits
0796b9e
635e9d3
d2ac1f8
5274aaf
1a8f5b1
2fce118
afbef71
be0803b
00f8514
1a61534
c02c2b4
b831183
8f27db7
ecc280b
d1f6bec
90215f0
a514164
a7be0d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.7.7 | ||
2.7.8 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ | |
"BaseDomainName": "code.org", | ||
"SubdomainName": "javabuilder-demo", | ||
"BaseDomainNameHostedZonedID": "Z2LCOI49SCXUGU", | ||
"ProvisionedConcurrentExecutions": "1", | ||
"ReservedConcurrentExecutions": "5", | ||
"ProvisionedConcurrentExecutions": "5", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I went with 5 here somewhat arbitrarily, lmk if we have another number we want to go with. |
||
"ReservedConcurrentExecutions": "50", | ||
"LimitPerHour": "-1", | ||
"LimitPerDay": "50", | ||
"SilenceAlerts": "false" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ Globals: | |
Tracing: Active | ||
Conditions: | ||
IsDevCondition: !Equals [!Ref BaseDomainName, "dev-code.org"] | ||
IsDemoCondition: !Equals [!Ref SubdomainName, "javabuilder-demo"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see you continued the existing pattern here, but we should try to keep this template environment-agnostic, and I would much rather refactor the design to allow us to eliminate the You're using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PR to start eliminating |
||
SilenceAlertsCondition: !Or [Condition: IsDevCondition, !Equals [!Ref SilenceAlerts, "true"]] | ||
Resources: | ||
# Note: We can't update the name of a DomainName resource once it has been created because the | ||
|
@@ -857,18 +858,19 @@ Resources: | |
Properties: | ||
AlarmName: !Sub "${SubdomainName}_<%=name.downcase%>_high_concurrent_executions" | ||
AlarmDescription: !Sub | | ||
Alarm if javabuilder usage exceeds 400 concurrent | ||
executions for 10 minutes. Occasional spikes are expected, but | ||
long-running high usage is an indication of an attack. Page the student learning | ||
team for further investigation. See this doc for investigation steps | ||
Alarm if javabuilder usage has high concurrent executions for 10 minutes. | ||
Occasional spikes are expected, but long-running high usage is an indication | ||
of an attack. If this is occuring on the demo environment, this is a non-urgent | ||
issue as we expect occasional periods of high usage. If it is on production, | ||
page the student learning team for further investigation. See this doc for investigation steps | ||
https://docs.google.com/document/d/1bHvV6pvUcwxgZpw0YWBmxFggQL5KqYx9zwolwkZhjU8/edit#bookmark=id.xs1gcuxrw6ze | ||
ActionsEnabled: true | ||
AlarmActions: | ||
- !If [SilenceAlertsCondition, !Ref AWS::NoValue, !Sub "arn:aws:sns:${AWS::Region}:${AWS::AccountId}:CDO-Urgent"] | ||
- !If [SilenceAlertsCondition, !Ref AWS::NoValue, !If [IsDemoCondition, !Sub "arn:aws:sns:${AWS::Region}:${AWS::AccountId}:javabuilder-demo-high-concurrency", !Sub "arn:aws:sns:${AWS::Region}:${AWS::AccountId}:CDO-Urgent"]] | ||
cat5inthecradle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
EvaluationPeriods: 10 | ||
DatapointsToAlarm: 10 | ||
Period: 60 | ||
Threshold: 400 | ||
Threshold: !If [IsDemoCondition, 45, 400] | ||
cat5inthecradle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ComparisonOperator: GreaterThanThreshold | ||
TreatMissingData: notBreaching | ||
MetricName: ConcurrentExecutions | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was needed for the ci/cd pipeline to build correctly for a dev instance, so I think it will be needed for prod as well. We've done similar changes in the past to keep up the the AWS version of ruby.