박민재 sprint8 - #132
Open
marcel615 wants to merge 16 commits into
Hidden character warning
The head ref may contain hidden characters: "\ubc15\ubbfc\uc7ac-sprint8"
Open
Conversation
- ErrorResponse에서 생성자함수를 직접 사용하는 게 아니라 Builder 패턴을 사용해서 ErrorResponse 객체 만들도록 개선 - 테스트 메서드들 이름 한글에서 영어로 개선 - admin 관련 코드 삭제 (모듈 삭제, Gradle에서 Unlink, admin 의존성 삭제)
- build.gradle에 version = '1.2-M8' 추가 - Dockerfile 작성 구현, .dockerignore 파일 추가 - 요구사항의 localhost:8081 포트 매핑을 시도했으나, 해당 포트가 Windows 제외 포트 범위에 포함되어 있어 바인딩 오류가 발생 -> 사용 가능한 포트(8281)로 대체하여 동일한 방식으로 애플리케이션 실행 검증 완료 - docker-compose.yml 파일 작성 (db, app 컨테이너 정의) - .env 파일 생성 및 환경 변수 작성, .gitignore에 .env 파일 추가
- application.yaml에 discodeit.storage 부분 기본값 및 환경변수 설정 - build.gradle에 AWS S3 SDK 의존성 추가 - AWSS3Test로 S3 API 간단하게 테스트(.env에 정의한 AWS 정보를 이용하여 업로드, 다운로드, PresignedUrl 생성)
- AWSS3Test 주석 정리 - Adobe S3Mock 의존성 추가 (테스트를 위한) - docker-compose.yml에서 BinaryContentStorage 관련 환경변수를 application.yaml에서와 같게 주입할 수 있도록 수정 - S3BinaryContentStorage 구현 (discodeit.storage.type 값이 s3인 경우에 Bean으로 등록되도록) - S3BinaryContentStorageTest 구현 (실제 S3 사용하는 것이 아닌 Mock을 활용하도록 구현)
- Windows 환경에서 ECR Public 로그인 시 credential 저장 오류가 발생해 로컬 push가 불가능 - GitHub Actions를 통해 ECR Public 로그인 및 멀티플랫폼 이미지 push 처리 - latest, 1.2-M8 태그로 이미지 배포
- 내 개인 브랜치에 push해서 action 실행되도록 개선
- discodeit.env파일 생성 및 환경변수 작성 - .gitignore에 해당 파일 추가 - s3에 해당 파일 업로드 완료 - S3BinaryContentStorage에서 기존에 AS3 Access Key, Secret Key 직접 주입하던 로직 제거, AWS 기본 Credential Provider Chain 사용하도록 개선
- S3BinaryContentStorage에서 미처 지우지 못한 access key, secret key 관련 변수 제거 - application.yaml에서도 관련 변수 제거
- Dockerfile에서 COPY src 전에 RUN ./gradlew dependencies --no-daemon 실행하도록 추가 - Dockerfile에서 run 스테이지에서는 jre를 써서 최종 이미지 크기 줄이도록 구현 - ecr-public.yml에서 태그를 local-slim으로 변경
- test.yml 파일 생성 및 CI를 위한 워크플로우 설정
- ecr-public.yml에서 수동으로만 실행되도록 수정
- CI 실패한 테스트들 수정
- README.md에 CodeCov 테스트 커버리지 뱃지 표시되게 추가
- test.yml에 main 브랜치에 push했을 시에도 CI 진행되도록 추가
- deploy.yml 제작 완료
- credential 저장 오류 때문에 임시로 Github Actions를 통해 ECR 이미지 push하는 용도로 사용했던 ecr-public.yml파일 삭제
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요구사항
기본
.dockerignore작성.env기반 환경 변수 관리 및 볼륨 구성S3BinaryContentStorage및 S3Mock 기반 테스트 구현discodeit.env를 S3에 업로드하여 환경 변수 주입심화
mainPush 시 테스트 자동 실행release브랜치 Push 시 자동 배포latest, Commit SHA 태그 이미지 Push주요 변경사항
ErrorResponse생성을 Builder 패턴으로 개선하고 테스트 메서드명을 영어로 정리했습니다.8081대신8281포트를 사용하여 실행을 검증했습니다.S3BinaryContentStorage를 구현하고 S3Mock 기반 테스트를 추가했습니다.0.5GB대신1GB로 설정했습니다.MaxMetaspaceSize를128m로 조정했습니다.release브랜치 Push 시 Public ECR 이미지 빌드/Push 및 ECS 배포가 자동으로 진행되도록 구성했습니다.ecr-public.yml은 최종 CD 워크플로우 구축 후 제거했습니다.첨부파일
env-review.txt.txt
스크린샷
RDS AWS 콘솔 인스턴스 상세 페이지
RDS SSH 터널링을 통해 연결한 DBeaver
ECR 푸시된 이미지가 보이는 AWS 콘솔 페이지
ECS 실행 중인 태스크 구성정보가 표시된 AWS 콘솔 페이지
ECS 배포 엔드포인트
13.209.87.194http://13.209.87.194VPC 보안 그룹의 인바운드 규칙을 확인할 수 있는 AWS 콘솔 페이지
IAM 사용자의 권한 정책이 표시된 AWS 콘솔 페이지
Codecov 커버리지 배지 화면