AWS
-
CICD (GitHubActions + EC2 + RDS + S3 + Code Deploy) - Github Ation - deploy.yml 파일 작성 요령 및 appspec.yml 설정AWS 2023. 7. 30. 21:18
Github Actions를 사용하면 CICD를 구현함에 있어서 많은 편리한 기능이 제공된다. 먼저 우리가 코드를 수정하고 생성한 뒤, 해당 프로잭트를 github에 올리면, 우리가 만들어놓은 deploy.yml 파일의 설정에 따라 최신코드가 반영되고 이를 배포할 수 있게 된다. Github Actions을 사용하기 위해선, deploy.yml파일을 작성을 해야하는데 해당 경로를 .github/workflows 하위에 작성하여야 한다. 참고 링크 https://docs.github.com/ko/actions/learn-github-actions/understanding-github-actions GitHub Actions 이해 - GitHub Docs GitHub Actions is a continuou..
-
CICD (GitHubActions + EC2 + RDS + S3 + Code Deploy) - Code Deploy 설정AWS 2023. 7. 30. 20:42
Code Deploy를 설정해주기 위해서 먼저 iam 권한을 만들어준다. IAM 권한 생성을 만들고 나면, Code Deploy 설정을 한다. 어플리케이션 생성 배포 그룹을 생성한다. EC2 서버와 Code Deploy 를 mapping을 한다. 여기서 다양한 설정을 할 수 있다. 1. EC2 Auto Scaling 그룹을 선택하기 2. 로드 벨런서 활성화 필요에 따라 선택을 하면 된다!
-
CICD (GitHubActions + EC2 + RDS + S3 + Code Deploy) - S3 설정AWS 2023. 7. 30. 20:27
S3 기본이 글로벌 설정에서 시작. 버킷의 이름은 고유한 값을 세팅하고, AWS 리전 선택을 원하는 지역을 선택하면 된다. S3는 모든 지역에서 접근이 가능하다. 때문에 과금을 방지하기 위해서, "모든 퍼블릭 액세스 차단" 설정을 해주어야 한다. S3에 부여할 IAM 권한을 설정한다. 엑세스 키를 발급 받고 이를 저장한다. 해당 엑세스 키는 Code Deploy 실행파일에 작성할 때, 사용된다.
-
CICD (GitHubActions + EC2 + RDS + S3 + Code Deploy) - EC2 설정 정리AWS 2023. 7. 30. 19:29
EC2 설정 인스턴스 시작하기 1. 운영환경 : UBUNTU 로 인스턴스 생성하기. 유형 : 프리 티어로 사용 2. 키페어(로그인) : .pem key 만들기 : 나의 ec2서버에 접속하기 위한 키. 해당 .pem key파일은 잘 관리를 해야한다. 3. 네트워크 설정 : 기본 4. 스토리지 구성 : 프리티어를 사용하는 유저의 경우 최대 30gb까지 허용을 해주고 있다. 5. 요약: 인스턴스의 갯수를 설정할 수 있는데, 이 때 EC2 Auto Scaling 고려하여 인스턴스를 1개 이상 세팅이 가능 태그 지정 태그를 지정하는 이유는 나중에 code deploy와 연동을 할 때, 태그 그룹을 지정할 수 있다. 이 때, 우리의 ec2 서버의 정보를 알려주기 위해서 태그 값을 설정해주는 게 좋다.(기본은 나의 ..