Create a CI/CD pipeline using AWS CodeCommit, AWS CodeBuild, AWS CodePipeline and Amazon ECS to automate the process of building, testing and deploying a Dockerized web application.
In this project based in a real-world scenario, I acted as the Cloud DevOps engineer to create a streamlined process that automates builds, tests, and deployments, allowing the developer to focus more on development and less on operational tasks by making deployment process efficient and automated.
Below are few screenshots:
AWS Cloud 9
Created freshproduce Cloud 9 environment
Amazon Elastic Container Service
Created ECS
AWS CodeCommit
Created the CodeCommit repository
Amazon Elastic Container Registry
Created the ECR
Check aws, git and docker
Clone the CodeCommit
git push
CodeCommit has the necessary files
Push commands
Doker build
Image is available in ECR
Create service in ECR cluster
Create task definition
Check the DNS in the browser.
AWS CodePipeline
Add stage and build a CodePipeline
Code Pipeline is created and start to build immediately.
Add the necessary permissions to fix the above error.
The Code Pipeline starts to build automatically
The DNS is refreshed to check if the page is displayed as expected.
Now going to simulate a developer code change by making a change in the text from InnovateTech to “freshproduce LIVE” and push the code to CodeCommit
The CodePipeline build automatically starts.
Check the DNS in the browser if the code change is reflected and we can see that the text changed to “freshproduce LIVE”
We can see above how automating the deployment of a Dockerized web application through setting up a CI/CD pipeline using AWS CodeCommit, AWS CodeBuild, and Amazon ECS can be achieved.