Skip to content

Commit

Permalink
feat(infra): downsizing review db & redis instances, enabling contain…
Browse files Browse the repository at this point in the history
…er insights to prod (#408)
  • Loading branch information
nutrina authored Sep 27, 2023
1 parent 21c1ed1 commit e77ca09
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion infra/prod/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ export const redisCacheOpsConnectionUrl = pulumi.interpolate`redis://${redisPrim
// Set up ALB and ECS cluster
//////////////////////////////////////////////////////////////

const cluster = new aws.ecs.Cluster("scorer");
const cluster = new aws.ecs.Cluster("scorer", {
settings: [{ name: "containerInsights", value: "enabled" }],
});

// export const clusterInstance = cluster;
export const clusterId = cluster.id;

Expand Down
2 changes: 1 addition & 1 deletion infra/review/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const secgrp_redis = new aws.ec2.SecurityGroup("scorer-redis-secgrp", {
const redis = new aws.elasticache.Cluster("scorer-redis", {
engine: "redis",
engineVersion: "4.0.10",
nodeType: "cache.m5.large",
nodeType: "cache.t3.micro",
numCacheNodes: 1,
port: 6379,
subnetGroupName: redisSubnetGroup.name,
Expand Down
6 changes: 4 additions & 2 deletions infra/staging/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ const postgresql = new aws.rds.Instance(
maxAllocatedStorage: 100,
engine: "postgres",
// engineVersion: "5.7",
instanceClass: "db.t3.2xlarge",
// instanceClass: "db.t3.2xlarge",
instanceClass: "db.t3.small",
dbName: dbName,
password: dbPassword,
username: dbUsername,
Expand Down Expand Up @@ -185,7 +186,8 @@ const secgrp_redis = new aws.ec2.SecurityGroup("scorer-redis-secgrp", {
const redis = new aws.elasticache.Cluster("scorer-redis", {
engine: "redis",
engineVersion: "4.0.10",
nodeType: "cache.m5.large",
// nodeType: "cache.m5.large",
nodeType: "cache.t3.small",
numCacheNodes: 1,
port: 6379,
subnetGroupName: redisSubnetGroup.name,
Expand Down

0 comments on commit e77ca09

Please sign in to comment.