Skip to content

Commit

Permalink
Sidekiq staging improvements (thewca#10453)
Browse files Browse the repository at this point in the history
* align ram values of sidekiq staging and production

* give sidekiq staging its own redis
  • Loading branch information
FinnIckler authored Dec 21, 2024
1 parent 80d4020 commit 1d736dc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions infra/wca_on_rails/production/auxiliary_services.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ resource "aws_ecs_task_definition" "auxiliary" {
task_role_arn = aws_iam_role.task_role.arn

cpu = "1536"
memory = "6325"
memory = "3910"

container_definitions = jsonencode([

{
name = "sidekiq-main"
image = "${var.shared.ecr_repository.repository_url}:sidekiq-production"
cpu = 1024
memory = 5813
memory = 3398
portMappings = []
logConfiguration = {
logDriver = "awslogs"
Expand Down
10 changes: 5 additions & 5 deletions infra/wca_on_rails/staging/auxiliary_services.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ resource "aws_ecs_task_definition" "auxiliary" {
execution_role_arn = aws_iam_role.task_execution_role.arn
task_role_arn = aws_iam_role.task_role.arn

cpu = "512"
memory = "1536"
cpu = "1536"
memory = "3910"

container_definitions = jsonencode([

{
name = "sidekiq-staging"
image = "${var.shared.ecr_repository.repository_url}:sidekiq-staging"
cpu = 256
memory = 1024
cpu = 1024
memory = 3398
portMappings = [{
# Mailcatcher
containerPort = 1080
Expand All @@ -48,7 +48,7 @@ resource "aws_ecs_task_definition" "auxiliary" {
{
name = "pma-staging"
image = "${var.shared.ecr_repository.repository_url}:pma"
cpu = 256
cpu = 512
memory = 512
portMappings = [{
# The hostPort is automatically set for awsvpc network mode,
Expand Down
2 changes: 1 addition & 1 deletion infra/wca_on_rails/staging/rails.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ locals {
},
{
name = "SIDEKIQ_REDIS_URL"
value = "redis://redis-main-staging-001.iebvzt.0001.usw2.cache.amazonaws.com:6379"
value = "redis://wca-staging-sidekiq-001.iebvzt.0001.usw2.cache.amazonaws.com:6379"
},
{
name = "STAGING_OAUTH_URL"
Expand Down

0 comments on commit 1d736dc

Please sign in to comment.