인프라
-
AWS CLI를 통하여 Code Deploy 실행인프라 2024. 1. 12. 22:52
상황 기존 배포 프로세스는, 크게 AWS Code piepeline을 통한 CI/CD로 구축되어 있었다. 즉, Github 등 원격 저장소와 연결하여 소스코드가 푸시되면 자동으로 배포되도록 구성되어 있다. 잠시 워크플로우를 살펴보자. 1. Github 등 원격 저장소에 푸쉬하면 연결되어 있는 브랜치에 의하여 Code piepline에서 트리거로 작동한다. 2. 소스 코드를 Code Build에서 빌드하고 아티팩트를 S3에 저장한다. 3. Code Deploy에서 빌드에 성공한 S3에 저장되어 있는 아티팩트를 기반으로 배포를 준비한다. 4. EC2에 배포한다. 그러나, 로컬에서 빌드에 성공하여 테스트를 한 이후에도 AWS Code Build에서 빌드를 해야하는 번거로움이 있다. 이 때, 시간이 꽤나 걸리게..