3 Answers
- Newest
- Most votes
- Most comments
0
I think we need to create two pipelines.
One for ECS + Fargate resources, the other for container code.
0
Hi, yes.
One code pipeline will be responsible for infrastructure as code. I personally used this guide for provisioning a Fargate cluster fronted by an application load balancer: https://docs.aws.amazon.com/cdk/v2/guide/ecs_example.html
In particular, the ApplicationLoadBalancedFargateService allows you to specify an image coming from an ECR repository.
You could have another pipeline that push docker images on ECR via code build and code deploy.
A partial example of above can be found here: https://github.com/aws-samples/amazon-ecs-fargate-cdk-v2-cicd
Hope it inspires ;)
0
You can do this by creating two separate pipelines:
- The application code pipeline. This pipeline will reference a repository (Github, CodeCommit, etc) that will host your application code. Upon pushing a change to the main branch, the pipeline will be triggered. You can then run through linting, formatting, unit tests etc. Once that is completed, you can build your docker container and push that to a registry.
- The infrastructure pipeline. This pipeline will reference a repository that contains the CDK code. Upon pushing a change, you can run through similar building/testing stages as in the first pipeline and change the architecture in pre-prod environments to ensure it works as expected, then promote to production when ready.
answered a year ago
Relevant content
- asked 10 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 months ago