ECS Blue/Green CodeDeploy 배포 시 unhealthy임에도 배포 성공

0

ECS Blue/Green 서비스를 CodePipeline을 통해 배포하고 있습니다. 그런데 대상 그룹이 unhealthy 상태임에도 CodeDeploy에서 배포가 실패하지 않고 성공합니다. 그리고 ECS 서비스에서는 아래처럼 대상 Register/Deregister가 계속 반복되고 있습니다.

service test-service deregistered 1 targets in target-group localhost-localhost-default

service test-service has begun draining connections on 1 tasks.

service test-service deregistered 1 targets in target-group localhost-localhost-default

service test-service has started 2 tasks: task 4e1569b3-a15c-4bac-85f7-396b530113a5 task d5651035-8e3d-48df-b457-d05e5b7be8db.

CodeDeploy에서 상태 검사가 실패한다면 배포를 중단하고 롤백할 수 있는 방법이 있을까요? 감사합니다.

1개 답변
1
수락된 답변

Lambda 등을 사용하여 CodeDeploy가 실행되어 일정 기간 동안 ALB 상태 검사를 확인하고 건강하지 않은 경우 롤백하는 이벤트에 트리거되는 스크립트를 만드는 것은 어떨까요?

다른 문서를 보면 롤백하는 방법은 여러 가지가 있는 것 같습니다.
https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-groups-configure-advanced-options.html

profile picture
전문가
답변함 10달 전
  • 감사합니다. Cloudwatch와 Lambda를 사용해 봐야겠네요

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠