Gitlab-runner
-
한 ec2 인스턴스로 여러 서비스 배포하기 - 1 (ec2 인스턴스에 gitlab-runner 설정하기까지)Infra/devOps 2024. 5. 5. 17:09
내가 다니고 있는 회사는 B2B 비즈니스를 하는 곳으로일반적인 사이트보다 트래픽이 적은 편이다. 위의 사진은 기존 우리가 사용하던 아키텍처이다. 간단히 설명을 하자면백엔드는 gitlab-ci를 통해 빌드된 도커 이미지를 ecr 에 올린 후 그 이미지를 우리의 elastic beanstalk 가 지정하고 있는 s3 버킷에 올려,ec2 인스턴스에 컨테이너로 동작시키고, 로드밸런서와 acm 과 도메인 설정을 해준다. 프론트는 빌드된 정적 파일을 s3 버킷에 올려 그 버킷을 원본으로 지정하는 클라우드 프론트를 동작시키는 것이다. 백엔드인지 프론트엔드인지 구분하는 것은 gitlab-ci.yml 의 rules 를 사용하였다. 이 배포 구조를 변경하려 했던 이유는ec2의 요금 정책과 관련이 있다. 위와 같이 인..