Skip to content

Commit

Permalink
chore(infra): prod service-connect (#3411)
Browse files Browse the repository at this point in the history
  • Loading branch information
cesara authored Dec 18, 2024
1 parent a994f5b commit e4b8127
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions prod/templates/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ Resources:
ClusterSettings:
- Name: containerInsights
Value: enhanced

ServiceConnectDefaults:
Namespace: "zero-cache-prod"
# Security Group for internal service communication
InternalServicesSG:
Type: AWS::EC2::SecurityGroup
Expand Down Expand Up @@ -120,7 +121,9 @@ Resources:
- ContainerName: "view-syncer-container"
ContainerPort: 4848
TargetGroupArn: !GetAtt VPC.Outputs.PublicLBTargetGroup

ServiceConnectConfiguration:
Enabled: true
Namespace: "zero-cache-prod"
# First, create the secure parameters
ViewSyncerSecrets:
Type: AWS::SecretsManager::Secret
Expand Down Expand Up @@ -199,7 +202,7 @@ Resources:
Essential: true
Environment:
- Name: ZERO_CHANGE_STREAMER_URI
Value: ws://replication-manager.internal.local:4849
Value: ws://change-streamer.zero-cache-prod:4849
- Name: ZERO_LOG_FORMAT
Value: json
- Name: ZERO_REPLICA_FILE
Expand Down Expand Up @@ -289,8 +292,6 @@ Resources:

ServiceReplicationManager:
Type: AWS::ECS::Service
DependsOn:
- ServiceDiscoveryNamespace
Properties:
ServiceName: "replication-manager"
Cluster: !Ref Cluster
Expand All @@ -312,8 +313,15 @@ Resources:
MinimumHealthyPercent: 50
DesiredCount: 1
TaskDefinition: !Ref "TaskDefinitionReplicationManager"
ServiceRegistries:
- RegistryArn: !GetAtt ReplicationManagerRegistry.Arn
ServiceConnectConfiguration:
Enabled: true
Namespace: "zero-cache-prod"
Services:
- PortName: "change-streamer"
DiscoveryName: change-streamer
ClientAliases:
- Port: 4849
DnsName: "change-streamer.zero-cache-prod"

ReplicationManagerSecrets:
Type: AWS::SecretsManager::Secret
Expand Down

0 comments on commit e4b8127

Please sign in to comment.