프로젝트 Requirement
Mid-Term - Presentation and Write Up
Deploy an SPA to AWS EC2 - Nightly builds (QA Testing) - 7 Mins Presentation Requirements (security best practices will be assessed):
- ● SPA app: frontend, backend, and MySQL. MySQL is in RDS (day 1 only / no IaC)
- ● Source repo vs infra repo (separation of concern)
- ● Source repo: Dockerfile, docker-compose for local testing. Local DB via docker compose
- ● Infra repo: Nightly deployment workflow (temporary / dynamic EC2 for verification - do some EC2 using image from ECR - this EC2 can be pre-allocated)
- smoke test. If tests are successful, create container image and push to ECR. Finally, deploy to QA
- ● Domain name (have to using Route53; GET domain at Name.com and migrate to Route53) and
- SSL enabled using letsencrypt.org(frontend level - no ELB nor API Gateway, etc...)
- ● Write a blog tutorial from the above steps!
Mid-Term - BONUS!!! - 25% Extra (all or nothing) - Part of Presentation
Simple RC Promotion
- ● Source repo setup for Semantic Release
- ● Semantic Release to kick off a release tag and deploy the application to EC2
- (EC2 can be pre-allocated): Tags: v1.0.0-rc1 (1.0.0 and 1 from rc are variables)
- ● Container image gets a new tag based on the RC label
- ● Infra repo workflow to deploy RC is kicked off and deploy to another EC2 for
- RC builds
- ● Build accessible via new domain: myapp-rc.domain.com (SSL too)
접근 방법
-Source Repo 작성 : 작년에 CS601 수업에서 썼던 FE,BE,DB 웹사이트 (Github)
-docker-compose 와 dockerfile 작성
-로컬 db로 테스트 잘 되는거 확인
-Infra repo (Github)
-nightly build
-wrote nightly build script
-AWS 로그인 관련 정보 (GitHub Secrets) : AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION
-EC2 인스턴스 만들고, <- credential 넣는 부분에서 에러가 나서 디버깅 했음 . EC2 켜지는 시간 30초도 넣어줘야 코드 복사하는 작업 에러 안남 / 거기에 fingerprint 무시하라고 처리해줘야 ssh 22번 포트 연결 가능
-RDS 만들어주고 <- rds 만들고 db 넣어줘야 했음 / ec2 IP 바뀐거때문에 rds 의 security group도 바꿔줘야 했음
-코드 갖고와서 도커 돌리고, <- 올바른 경로에서 돌려야됨 / docker socket 권한도 줘야됨
-스모크 테스트 하고
-wrote smoke test script
-added health check method at backend for smoke test
-ECR : ECR 먼저 AWS에 만들어주고 관련 환경변수 넣어서 nightly build 스크립트에 넣어주고
-BE, FE 도커 이미지 만들어서 ECR에 푸시 <- ECR 주소 설정 하는 데에 있어 혼선이 있어서 오래걸림
-deploy QA EC2
-github workflow 작성 (ECR에서 스크립트 가져와서 배포) <- 권한 넣어주는거랑 파일 이름 일치시키는게 오류 남
-add domain name by Route 53 / SSL enable
-name.com 에서 도메인 삼
-Route53에서 연동시켜줌
(... TBU)
'미국유학 > CS686 DevOps' 카테고리의 다른 글
Final Project 흐름 (0) | 2025.05.04 |
---|---|
Final Project 구상 (0) | 2025.04.21 |
Midterm Project - make CI pipeline with my Jake Project! (0) | 2025.02.27 |
C언어와 Java 언어 동작 방식 (0) | 2025.02.20 |
Assignment #7 (0) | 2025.02.16 |