CI/CD Deployment with Gitlab
Overview
In this section, we will learn how to implement automated application deployment using Gitlab CI/CD pipeline in conjunction with AWS services such as ECR, ECS, and CodeDeploy.
Pipeline Process
Pipeline Initiation
- Developer creates tag and pushes code to Gitlab repository
- Gitlab CI/CD is automatically triggered when developer creates new tag
Build
- Code is built into Docker image
Push Image
- Image is pushed to Amazon ECR (Elastic Container Registry) or DockerHub
Update
- Update ECS Task Definition for both Frontend and Backend
Deployment
- Frontend service:
- Update new revision of frontend service
- Backend service:
- Update new code deploy of backend service
Content
Fork and Modify Code
Setup Gitlab and Runner
Modify and Add Role
Create Tag and View Pipeline
Check Results
After completing this module, you will be able to:
- Set up and manage CI/CD pipeline with Gitlab
- Automate application deployment process
- Handle issues that arise during deployment
- Apply DevOps best practices