Skip to content

Commit

Permalink
Merge pull request #803 from PRX/service-capacity-providers
Browse files Browse the repository at this point in the history
Service capacity providers
  • Loading branch information
farski authored Jan 27, 2025
2 parents e7a5ecd + 1b11ea4 commit 7bd9942
Show file tree
Hide file tree
Showing 24 changed files with 168 additions and 3 deletions.
8 changes: 8 additions & 0 deletions spire/templates/apps-100A.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Parameters:
PorterJobExecutionSnsTopicArn: { Type: AWS::SSM::Parameter::Value<String> }
DovetailCdnLogsKinesisStreamArn: { Type: String }
DovetailCountedKinesisStreamArn: { Type: String }
X8664AsgCapacityProviderName: { Type: String }
Aarch64AsgCapacityProviderName: { Type: String }

CmsSharedAlbListenerRulePriorityPrefix: { Type: String }

Expand Down Expand Up @@ -103,6 +105,7 @@ Resources:
MetaHostname: !Ref MetaHostname
NewRelicApiKeyPrxLite: !Ref NewRelicApiKeyPrxLite
BetaHostname: !Ref BetaHostname
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down Expand Up @@ -294,6 +297,7 @@ Resources:
SharedAuroraMysqlEndpoint: !Ref SharedAuroraMysqlEndpoint
SharedAuroraMysqlPort: !Ref SharedAuroraMysqlPort
TurnstileID: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/ID/turnstile-id
Aarch64AsgCapacityProviderName: !Ref Aarch64AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down Expand Up @@ -322,6 +326,7 @@ Resources:
EnvironmentTypeAbbreviation: !Ref EnvironmentTypeAbbreviation
RootStackName: !Ref RootStackName
RootStackId: !Ref RootStackId
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down Expand Up @@ -352,6 +357,7 @@ Resources:
RootStackName: !Ref RootStackName
RootStackId: !Ref RootStackId
PlayHostname: !Ref PlayHostname
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down Expand Up @@ -409,6 +415,7 @@ Resources:
EnvironmentTypeAbbreviation: !Ref EnvironmentTypeAbbreviation
RootStackName: !Ref RootStackName
RootStackId: !Ref RootStackId
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down Expand Up @@ -437,6 +444,7 @@ Resources:
EnvironmentTypeAbbreviation: !Ref EnvironmentTypeAbbreviation
RootStackName: !Ref RootStackName
RootStackId: !Ref RootStackId
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down
8 changes: 8 additions & 0 deletions spire/templates/apps-200A.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ Parameters:
AnnounceResourcePrefix: { Type: String }
PorterJobExecutionSnsTopicArn: { Type: AWS::SSM::Parameter::Value<String> }
ClickhouseLegacyClientSecurityGroupId: { Type: AWS::EC2::SecurityGroup::Id }
X8664AsgCapacityProviderName: { Type: String }
Aarch64AsgCapacityProviderName: { Type: String }

CastleSharedAlbListenerRulePriorityPrefix: { Type: String }

Expand Down Expand Up @@ -156,6 +158,7 @@ Resources:
FeederHostname: !Ref FeederHostname
IdHostname: !Ref IdHostname
ClickhouseLegacyClientSecurityGroupId: !Ref ClickhouseLegacyClientSecurityGroupId
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down Expand Up @@ -221,6 +224,7 @@ Resources:
BetaHostname: !Ref BetaHostname
TheCountHostname: !Ref TheCountHostname
TheCastleHostname: !Ref TheCastleHostname
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down Expand Up @@ -283,6 +287,7 @@ Resources:
DovetailAppleApiBridgeEndpointUrl: !Ref DovetailAppleApiBridgeEndpointUrl
EchoServiceToken: !Ref EchoServiceToken
SlackMessageRelaySnsTopicArn: !Ref SlackMessageRelaySnsTopicArn
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down Expand Up @@ -316,6 +321,7 @@ Resources:
RootStackName: !Ref RootStackName
RootStackId: !Ref RootStackId
IdHostname: !Ref IdHostname
Aarch64AsgCapacityProviderName: !Ref Aarch64AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down Expand Up @@ -370,6 +376,7 @@ Resources:
ExchangeHostname: !Ref ExchangeHostname
ExchangeApiHostname: !Ref ExchangeApiHostname
IdHostname: !Ref IdHostname
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down Expand Up @@ -409,6 +416,7 @@ Resources:
TransferS3BucketArn: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/Exchange/${AWS::Region}/ftp/s3-bucket-arn
RemixHostname: !Ref RemixHostname
ExchangeHostname: !Ref ExchangeHostname
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down
4 changes: 4 additions & 0 deletions spire/templates/apps-300A.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Parameters:
DovetailCountedKinesisStreamName: { Type: String }
DovetailVerifiedMetricsKinesisStreamArn: { Type: String }
DovetailVerifiedMetricsKinesisStreamName: { Type: String }
X8664AsgCapacityProviderName: { Type: String }

AugurySharedAlbListenerRulePriorityPrefix: { Type: String }

Expand Down Expand Up @@ -120,6 +121,7 @@ Resources:
AdFilesS3BucketArn: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/Dovetail-Augury/${AWS::Region}/ad-files-s3-bucket-arn
SlackMessageRelaySnsTopicArn: !Ref SlackMessageRelaySnsTopicArn
ClickhouseLegacyClientSecurityGroupId: !Ref ClickhouseLegacyClientSecurityGroupId
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down Expand Up @@ -199,6 +201,7 @@ Resources:
DovetailCdnRedirectPrefix: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/Dovetail-Router/${AWS::Region}/redirect-prefix
FrequencyDynamodbTableName: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/Dovetail-Analytics/FREQUENCY_DDB_TABLE
FrequencyDynamodbAccessRoleArn: !Sub /prx/${EnvironmentTypeAbbreviation}/Spire/Dovetail-Analytics/FREQUENCY_DDB_ACCESS_ROLE
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down Expand Up @@ -231,6 +234,7 @@ Resources:
CastleHostname: !Ref CastleHostname
IdHostname: !Ref IdHostname
MetricsHostname: !Ref MetricsHostname
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down
3 changes: 3 additions & 0 deletions spire/templates/apps-400A.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Parameters:
S3SigningEndpointUrl: { Type: String }
S3SigningAccessKeyId: { Type: String }
AmazonSesSmtpCredentialsGeneratorServiceToken: { Type: String }
X8664AsgCapacityProviderName: { Type: String }

ExchangeHostname: { Type: String }

Expand Down Expand Up @@ -72,6 +73,7 @@ Resources:
SharedAuroraMysqlEndpoint: !Ref SharedAuroraMysqlEndpoint
SharedAuroraMysqlPort: !Ref SharedAuroraMysqlPort
ExchangeHostname: !Ref ExchangeHostname
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down Expand Up @@ -181,6 +183,7 @@ Resources:
AnnounceResourcePrefix: !Ref AnnounceResourcePrefix
PorterJobExecutionSnsTopicArn: !Ref PorterJobExecutionSnsTopicArn
ExchangeHostname: !Ref ExchangeHostname
X8664AsgCapacityProviderName: !Ref X8664AsgCapacityProviderName
Tags:
- { Key: prx:meta:tagging-version, Value: "2021-04-07" }
- { Key: prx:cloudformation:stack-name, Value: !Ref AWS::StackName }
Expand Down
10 changes: 10 additions & 0 deletions spire/templates/apps/augury.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Parameters:
DovetailRouterHostname: { Type: String }
AdFilesS3BucketArn: { Type: AWS::SSM::Parameter::Value<String> }
SlackMessageRelaySnsTopicArn: { Type: String }
X8664AsgCapacityProviderName: { Type: String }

Conditions:
IsProduction: !Equals [!Ref EnvironmentType, Production]
Expand Down Expand Up @@ -260,6 +261,10 @@ Resources:
Type: AWS::ECS::Service
Condition: HasAuroraEndpoint # See README
Properties:
CapacityProviderStrategy:
- Base: 0
CapacityProvider: !Ref X8664AsgCapacityProviderName
Weight: 1
Cluster: !Ref EcsClusterArn
DeploymentConfiguration:
MaximumPercent: 200
Expand Down Expand Up @@ -291,6 +296,10 @@ Resources:
Type: AWS::ECS::Service
Condition: EnableWorkers # See README
Properties:
CapacityProviderStrategy:
- Base: 0
CapacityProvider: !Ref X8664AsgCapacityProviderName
Weight: 1
Cluster: !Ref EcsClusterArn
DeploymentConfiguration:
MaximumPercent: 200
Expand Down Expand Up @@ -1144,6 +1153,7 @@ Resources:
ROOT_STACK_NAME: !Ref RootStackName
STACK_ID: !Ref AWS::StackName
STACK_NAME: !Ref AWS::StackId
X86_64_ASG_CAPACITY_PROVIDER_NAME: !Ref X8664AsgCapacityProviderName
Events:
SqsMessages:
Type: SQS
Expand Down
5 changes: 5 additions & 0 deletions spire/templates/apps/castle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Parameters:
SharedEcsAsgInstanceSecurityGroupId: { Type: AWS::EC2::SecurityGroup::Id }
FeederHostname: { Type: String }
IdHostname: { Type: String }
X8664AsgCapacityProviderName: { Type: String }
ClickhouseLegacyClientSecurityGroupId: { Type: AWS::EC2::SecurityGroup::Id }

Conditions:
Expand Down Expand Up @@ -120,6 +121,10 @@ Resources:
EcsService:
Type: AWS::ECS::Service
Properties:
CapacityProviderStrategy:
- Base: 0
CapacityProvider: !Ref X8664AsgCapacityProviderName
Weight: 1
Cluster: !Ref EcsClusterArn
DeploymentConfiguration:
MaximumPercent: 200
Expand Down
9 changes: 9 additions & 0 deletions spire/templates/apps/cms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Parameters:
MetaHostname: { Type: String }
NewRelicApiKeyPrxLite: { Type: String }
BetaHostname: { Type: String }
X8664AsgCapacityProviderName: { Type: String }

Conditions:
IsProduction: !Equals [!Ref EnvironmentType, Production]
Expand Down Expand Up @@ -333,6 +334,10 @@ Resources:
Type: AWS::ECS::Service
Condition: HasAuroraEndpoint # See README
Properties:
CapacityProviderStrategy:
- Base: 0
CapacityProvider: !Ref X8664AsgCapacityProviderName
Weight: 1
Cluster: !Ref EcsClusterArn
DeploymentConfiguration:
MaximumPercent: 200
Expand Down Expand Up @@ -360,6 +365,10 @@ Resources:
Type: AWS::ECS::Service
Condition: EnableWorkers # See README
Properties:
CapacityProviderStrategy:
- Base: 0
CapacityProvider: !Ref X8664AsgCapacityProviderName
Weight: 1
Cluster: !Ref EcsClusterArn
DeploymentConfiguration:
MaximumPercent: 200
Expand Down
5 changes: 5 additions & 0 deletions spire/templates/apps/dovetail-insights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Parameters:
EcrImageTag: { Type: AWS::SSM::Parameter::Value<String> }
AlbListenerRulePriorityPrefix: { Type: String }
IdHostname: { Type: String }
Aarch64AsgCapacityProviderName: { Type: String }

Conditions:
IsProduction: !Equals [!Ref EnvironmentType, Production]
Expand Down Expand Up @@ -177,6 +178,10 @@ Resources:
Type: AWS::ECS::Service
# Condition: HasAuroraEndpoint # See README
Properties:
CapacityProviderStrategy:
- Base: 0
CapacityProvider: !Ref Aarch64AsgCapacityProviderName
Weight: 1
Cluster: !Ref EcsClusterArn
DeploymentConfiguration:
MaximumPercent: 200
Expand Down
5 changes: 5 additions & 0 deletions spire/templates/apps/dovetail-router.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Parameters:
FeederHostname: { Type: String }
DovetailCdnHostname: { Type: String }
DovetailRouterHostname: { Type: String }
X8664AsgCapacityProviderName: { Type: String }
DovetailCdnRedirectPrefix: { Type: AWS::SSM::Parameter::Value<String> }
FrequencyDynamodbTableName: { Type: AWS::SSM::Parameter::Value<String> }
FrequencyDynamodbAccessRoleArn: { Type: AWS::SSM::Parameter::Value<String> }
Expand Down Expand Up @@ -661,6 +662,10 @@ Resources:
- HttpListener
- HttpsListener
Properties:
CapacityProviderStrategy:
- Base: 0
CapacityProvider: !Ref X8664AsgCapacityProviderName
Weight: 1
Cluster: !Ref EcsClusterArn
DeploymentConfiguration:
MaximumPercent: 200
Expand Down
13 changes: 13 additions & 0 deletions spire/templates/apps/exchange.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Parameters:
BetaHostname: { Type: String }
TheCountHostname: { Type: String }
TheCastleHostname: { Type: String }
X8664AsgCapacityProviderName: { Type: String }

Conditions:
IsProduction: !Equals [!Ref EnvironmentType, Production]
Expand Down Expand Up @@ -345,6 +346,10 @@ Resources:
Type: AWS::ECS::Service
Condition: HasAuroraEndpoint # See README
Properties:
CapacityProviderStrategy:
- Base: 0
CapacityProvider: !Ref X8664AsgCapacityProviderName
Weight: 1
Cluster: !Ref EcsClusterArn
DeploymentConfiguration:
MaximumPercent: 200
Expand Down Expand Up @@ -586,6 +591,10 @@ Resources:
Type: AWS::ECS::Service
Condition: EnableWorkers # See README
Properties:
CapacityProviderStrategy:
- Base: 0
CapacityProvider: !Ref X8664AsgCapacityProviderName
Weight: 1
Cluster: !Ref EcsClusterArn
DeploymentConfiguration:
MaximumPercent: 200
Expand Down Expand Up @@ -962,6 +971,10 @@ Resources:
Targets:
- Arn: !Ref EcsClusterArn
EcsParameters:
CapacityProviderStrategy:
- Base: 0
CapacityProvider: !Ref X8664AsgCapacityProviderName
Weight: 1
TaskCount: 1
TaskDefinitionArn: !Ref WorkerTaskDefinition
Id: SayWhenRuleTarget
Expand Down
9 changes: 9 additions & 0 deletions spire/templates/apps/feeder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Parameters:
PublicFeedsHostname: { Type: String }
DovetailAppleApiBridgeEndpointUrl: { Type: String }
SlackMessageRelaySnsTopicArn: { Type: String }
X8664AsgCapacityProviderName: { Type: String }

Conditions:
IsProduction: !Equals [!Ref EnvironmentType, Production]
Expand Down Expand Up @@ -736,6 +737,10 @@ Resources:
Type: AWS::ECS::Service
Condition: HasAuroraEndpoint # See README
Properties:
CapacityProviderStrategy:
- Base: 0
CapacityProvider: !Ref X8664AsgCapacityProviderName
Weight: 1
Cluster: !Ref EcsClusterArn
DeploymentConfiguration:
MaximumPercent: 200
Expand Down Expand Up @@ -910,6 +915,10 @@ Resources:
Type: AWS::ECS::Service
Condition: EnableWorkers # See README
Properties:
CapacityProviderStrategy:
- Base: 0
CapacityProvider: !Ref X8664AsgCapacityProviderName
Weight: 1
Cluster: !Ref EcsClusterArn
DeploymentConfiguration:
MaximumPercent: 200
Expand Down
5 changes: 5 additions & 0 deletions spire/templates/apps/id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Parameters:
PorterJobExecutionSnsTopicArn: { Type: String }
SharedAuroraMysqlEndpoint: { Type: String }
SharedAuroraMysqlPort: { Type: String }
Aarch64AsgCapacityProviderName: { Type: String }
TurnstileID: { Type: AWS::SSM::Parameter::Value<String> }

Conditions:
Expand Down Expand Up @@ -122,6 +123,10 @@ Resources:
Type: AWS::ECS::Service
Condition: HasAuroraEndpoint # See README
Properties:
CapacityProviderStrategy:
- Base: 0
CapacityProvider: !Ref Aarch64AsgCapacityProviderName
Weight: 1
Cluster: !Ref EcsClusterArn
DeploymentConfiguration:
MaximumPercent: 200
Expand Down
Loading

0 comments on commit 7bd9942

Please sign in to comment.