inblog logo
|
jay0628
    AWS

    [AWS] 9. GitHub Actions CD

    김주희's avatar
    김주희
    Jun 19, 2025
    [AWS] 9. GitHub Actions CD
    버전별로 바라보는 주방이있고
    git checkout하듯 checkout하면
    주방이 설정되어있는 파일 = sources.list
    checkout=주방 변경하려고
     
     

    git 에 push 한 애를 테스트 서버에서 git clone부터 할거임
    test 서버 우분투로 만들어서
    sync = git clone
    notion image
    notion image
     
    notion image
    테스트 서버의 우분투에 내가 환경 변수를 어떻게 접근할 수 있을까?
     
    deploy.zip 파일을 s3에 던질거라서 access_key나 secret_key가 필요함
    외부에 있는 서비스가 요청하는거기때문에 사용자의 권한 부여해줘야 그 사용자 권한 가지고 접속가능함
     
    배포하면 elb가 무조건 압축을 해제한다.
    docker는 압축파일을 던지면 무조건 해제함
     
     
    notion image
    notion image
    notion image
     
     
    사용자 권한 부여 후 git hub에게 그 권한 줄 예정
    notion image

    사용자 생성

    notion image
    그룹 = 정책들의 모임
    notion image
    notion image
    사용자가 가진 권한 키를 만들어서 위임할 수 있다
    notion image
    notion image
    서드 파티 서비스 = 내부의 서드 파티 서비스를 의미
     
    액세스 키 화면은 보안이므로 다시 재접속이 안된다 불안하면 파일을 다운받아두자
    notion image
     
    notion image
    두개가 더 떴는지 확인 = bluegreen 배포할거니까
    application.jar 파일의 주인이 webapp이니까 owner와 group도 그렇게 적어둔 것
    bash 어떤 종류 쓸지 정하려고
    파일안에서 실행되니까 내가 터미널에서 실행하는게 아니므로 백그라운드에서 실행됨
     
    /sbin에 ls | grep appstart
    cat appstart
     
     
    그냥 홈페이지 화면(html+css)은 aws amplify에 앱 배포
    깃허브 잡고 연결해서 html css 올라간 repo 연결하면 https로 서버 만들어져서 올라감
    netlify = 프론트를 위한 배포 어쩌구
    Scale & Ship Faster with a Composable Web Architecture | Netlify
    Realize the speed, agility and performance of a scalable, composable web architecture with Netlify. Explore the composable web platform now!
    Scale & Ship Faster with a Composable Web Architecture | Netlify
    https://www.netlify.com/
    Scale & Ship Faster with a Composable Web Architecture | Netlify
     
    aws route 53 → dns 주소 만들기 가능 (다른 곳도 있지만 aws에 연결하고 어쩌구 귀찮기 때문에 걍 aws에서 하는거 쓰는게 편하다)
    리액트나 프론트 서버는 amplify에서 배포
    rest api = elb
    프론트 웹 = amplify
     
    cloudflare에서 reverse proxy 서버 만들고 여기에 dns 주소 걸어두는게 가장 좋다
    dns 주소를 알면 whois걸어서 알 수 잇는데 cloudflare에 rp 설정 req,resp 그대로 던지는 식으로 하면 aws의 r이 전달
    공격은 cloudflare 가 받는다.
     
     
    CD 코드 주석 해제하고 health check 코드 수정한 뒤 master에 push함
    notion image
    notion image
     
    notion image
     
    notion image
    notion image
    notion image
    notion image
    notion image
     
    Share article

    jay0628

    RSS·Powered by Inblog