-
Notifications
You must be signed in to change notification settings - Fork 24
[강호] sprint8 #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kangho1870
wants to merge
66
commits into
codeit-bootcamp-spring:강호
Choose a base branch
from
kangho1870:main
base: 강호
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[강호] sprint8 #223
Conversation
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
Timezone UTC
chore: messageTest UTC Timezone gradle 수정
test: test.yml Github Action 테스트
test: test.yml Github Action 테스트
test: test.yml Github Action 테스트
add: Deploy.yml desird-count
chore: DockerFile curl 추가
chore: deploy.yml AWS_Access_KEY 변수 이름 수정
chore: deploy.yml AWS_REGION 변수 이름 수정
chore: deploy.yml AWS_REGION 변수 이름 수정
chore: Dockerfile ENTRYPOINT 수정
chore: Dockerfile ENTRYPOINT 수정
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.
요구사항
애플리케이션 컨테이너화
Dockerfile 작성
이미지 빌드 및 실행 테스트
Docker Compose 구성
BinaryContentStorage 고도화 (AWS S3)
AWS S3 버킷 구성
AWS S3 접근을 위한 IAM 구성
발급받은 키를 포함해서 AWS 관련 정보는
.env
파일에 추가합니다:.env
파일은 리뷰를 위해 PR에 별도로 첨부해주세요.단, 엑세스 키와 시크릿 키는 제외하세요.
AWS S3 테스트
AWS S3를 활용한 BinaryContentStroage 고도화
앞서 작성한 테스트 메소드를 참고해 S3BinaryContentStorage를 구현하세요.
discodeit.storage.type 값이 s3인 경우에만 Bean으로 등록되어야 합니다.
S3BinaryContentStorageTest를 함께 작성하면서 구현하세요.
BinaryContentStorage 설정을 유연하게 제어할 수 있도록 application.yaml을 수정하세요.
download 메소드는 PresignedUrl을 활용해 리다이렉트하는 방식으로 구현하세요.
AWS를 활용한 배포 (AWS RDS, ECR, ECS)
AWS RDS 구성
AWS RDS PostgreSQL 인스턴스를 생성하세요.
이외 설정은 기본값을 유지하세요.
과금이 발생할 수 있으니 다음 항목은 한번 더 확인해주세요.
EC2 인스턴스를 생성하세요.
.pem
파일 저장 위치를 기억하세요보안 그룹에서 인바운드 규칙을 편집하세요.
유형: SSH
소스: 내 IP
DataGrip을 통해 연결 후 데이터베이스와 사용자, 테이블을 초기화하세요.
데이터 소스 추가 시 SSH/SSL > Use SSH tunnel 설정을 활성화하세요. 이때 이전에 다운로드한 .pem 파일을 활용하세요.
연결이 성공하면 데이터베이스와 사용자, 테이블을 초기화하세요.
구성이 완료되면 rds-ssh 인스턴스는 완전히 삭제하여 과금에 유의하세요.
AWS ECR 구성
이미지를 배포할 퍼블릭 레포지토리(discodeit)를 생성하세요.
AWS CLI를 설치하세요.
aws configure 실행 후 앞서 생성한 discodeit IAM 사용자 정보를 입력하세요.
discodeit IAM 사용자가 ECR에 접근할 수 있도록 다음 권한을 부여하세요.
AmazonElasticContainerRegistryPublicFullAccess
Docker 클라이언트를 배포할 레지스트리에 대해 인증합니다.
멀티플랫폼을 지원하도록 애플리케이션 이미지를 빌드하고, discodeit 레포지토리에 push 하세요.
AWS 콘솔에서 푸시된 이미지를 확인하세요.
AWS ECS 구성
배포 환경에서 컨테이너 실행 간 사용할 환경 변수를 정의하고, S3에 업로드하세요.
discodeit.env 파일을 만들어 다음의 내용을 작성하세요.
이 파일을 S3에 업로드하세요.
이 파일은 형상관리되지 않도록 주의하세요.
AWS ECS 콘솔에서 클러스터를 생성하세요.
태스크를 정의하세요.
discodeit 클러스터 상세 화면에서 서비스를 생성하세요.
태스크의 EC2 보안 그룹의 인바운드 규칙을 설정하여 어디서든 접근할 수 있도록 하세요.
태스크 실행이 완료되면 해당 EC2의 퍼블릭 IP에 접속해보세요.
심화 요구사항
이미지 최적화하기
GitHub Actions를 활용한 CI/CD 파이프라인 구축
CI(지속적 통합)를 위한 워크플로우를 설정하세요.
CD(지속적 배포)를 위한 워크플로우를 설정하세요.
Docker 이미지 빌드 및 푸시
ECS 서비스 업데이트
AWS 콘솔을 통해 새로 등록된 태스크 정의로 배포되었는지 확인하세요.
리뷰를 위해 PR에 포함해야할 정보
.env 파일 (AWS 키는 제외)
RDS
AWS 콘솔 인스턴스 상세 페이지 스크린샷 이미지

SSH 터널링을 통해 연결한 DataGrip 스크린샷 이미지
ECR
ECS
실행 중인 태스크 구성정보가 표시된 AWS 콘솔 페이지 스크린샷 이미지

배포된 EC2 엔드포인트
3.38.151.241
VPC
IAM
멘토에게