Sample app showing how to configure rolling update in AWS Fargate.
There are introduced some of the tricks to increase deployment speed base on Nathan Peck's article - Speeding up Amazon ECS container deployments.
- .NET Core SDK 3.1
- Docker
- Powershell Core
- deployBucketName -> name of the Amazon S3 Bucket used to deploy AWS CloudFormation stacks.
- vpcId -> Id of the Amazon VPC where resources will be placed.
- subnetAId, subnetBId, subnetCId -> Ids of the Subnets where resources will be placed. Three subnets are used to achieve High Availability using three Availability Zones.
cd Deploy
deploy.ps1 $ImageVersion
ImageVersion is used in AWS ECR and needs to be incremented when you want to deploy new version of the image.
All AWS CloudFormation stacks are located in the Environment
folder.
File: Environment/network.yaml
Stack containing SecurityGroups for ALB and Fargate.
File: Environment/rolling-repo.yaml
Stack containing ECR Repository.
File: EcsFargateRollingUpdate/application.yaml
Stack containing all resources connected to ALB and AWS Fargate.
All deployment scripts are located in the Deploy
folder.
Project EcsFargateRollingUpdate contains ASP.NET core API and Docker container definition.