-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix the code for "ECS on EC2" autoscaling group
Enable usage of Launch Template because AWS has deprecated Launch Configuration Add missing capacity provider settings Add stub resources for auto-scaling configuration re. #14, stanfordnmbl/opencap-api#174
- Loading branch information
1 parent
28ec52f
commit b9e8b5e
Showing
4 changed files
with
144 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
resource "aws_ecs_cluster" "ecs_cluster" { | ||
name = "${var.app_name}-processing-cluster${var.env}" | ||
} | ||
} | ||
|
||
resource "aws_ecs_service" "worker" { | ||
name = "worker" | ||
cluster = aws_ecs_cluster.ecs_cluster.id | ||
task_definition = aws_ecs_task_definition.task_definition.arn | ||
# desired_count = var.num_machines | ||
# Let auto-scaling manage the number of instances | ||
desired_count = 0 | ||
deployment_minimum_healthy_percent = 100 | ||
|
||
capacity_provider_strategy { | ||
capacity_provider = aws_ecs_capacity_provider.worker_lt_gpu_provider.name | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters