hackoregon / civic-devops

Master collection point for issues, procedures, and code to manage the HackOregon Civic platform
MIT License
11 stars 4 forks source link

Define templates to deploy new services on Fargate #86

Open MikeTheCanuck opened 6 years ago

MikeTheCanuck commented 6 years ago

Take advantage of as much of our 2017 infrastructure as possible. Mix and match if possible (documenting what came from where of course). Only deploy a new VPC if we have to, with all its extra configuration overhead.

Here’s one article I recently reviewed, that gives a reasonable idea what to do when you already have a CF infrastructure in place: https://medium.com/prodopsio/deploying-fargate-services-using-cloudformation-the-guide-i-wish-i-had-d89b6dc62303

DingoEatingFuzz commented 6 years ago

Blocked on #77

iant01 commented 6 years ago

We will need to review and determine the cpu and memory resources for each service as how they are used is different between ecs/ec2 and ecs/fargate. In ecs/ecs they are used as a means to set hard upper limits and make a resource reservation that is used to determine if over allocation will occur and prevents a container from being brought online if it would/could cause over allocation (regardless of how much cpu or memory the container actually uses or would use) currently several containers set the cpu value at zero and memory at 100meg (transportation sets memory at 2gb).

Ecs/fargate requires cpu and memort values to be set and thst is what will be allocated when the container runs and what will be charged for per second of cpu time so blindly setting these values high reduces the potential cost savings going with ecs/fargate and could actually cost more as usage of civic increases.