Ops (295) 썸네일형 리스트형 AWS Gamelift - cloudwatch agent 설치 AWS Gamelift - cloudwatch agent 설치 Gamelift도 EC2처럼 동작하는 서버이기 때문에 cloudwatch를 설치하여 모니터링이 가능합니다. agent는 EC2에 설치하는 것과 동일한 방식으로 설치가 가능합니다. 그렇기 때문에 간략하게 config 위치 및 agent의 기동 방법 등만 기록합니다. config 파일 /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/amazon-cloudwatch-agent.json 기동 명령어 systemctl restart amazon-cloudwatch-agent.service; tail -f /opt/aws/amazon-cloudwatch-agent/logs/amazon-cl.. AWS Gamelift - Cloudwatch metric 정보 AWS Gamelift - Cloudwatch metric 정보 Fleet은 EC2 인스턴스에서 기동되고, 그 안에서 멀티 프로세스 형태로 기동된다. ■ 주요 metric 참고용 지표 의미 기타 (필요없는 값) 수치 ActiveInstances 프로세스가 실행 중인 것을 의미하는 Active 상태의 인스턴스 수 instance count max IdleInstances 현재 0개의 게임 세션을 호스팅하고 있는 활성 인스턴스 수 ActiveServerProcesses 현재 실행 중이며, 게임 세션을 호스팅할 수 있다는 것을 의미하는 ACTIVE 상태의 서버 프로세스 수 min HealthyServerProcesses 정상 상태를 보고하고 있는 활성 서버 프로세스 수 ServerProcessActivatio.. AWS Fargate - how to shorten Fargate startup time AWS Fargate - how to shorten Fargate startup time AWS Fargate를 사용하면서 좀 더 빠르게 사용하기 위한 여러 포인트를 고민하실텐데요, 해당 내용에 대하여 case open 했던 내용입니다. 단순한 이렇게 해봐라라는 정도의 가이드라는 점 참고하시면 좋을 것 같습니다. 질문 I am using eks fargate as a Gitlab-runner excuter. The startup time of the pod takes about 1 minute 30 seconds to 2 minutes. Is there any way to shorten this startup time? ----- Gitlab-runner excuter로 eks fargate를 사용하고 .. AWS ELB - path redirect 설정 AWS ELB - path redirect 설정 ■ 개요 도메인 이름 + path 모두 변경 - as-is : mit.chandler.com - to-be : mit.example.com/club ■ IF - route53 → cloudfront → ALB 구성일 경우 caching 참조 - route53 → ALB 구성일 경우 크게 신경쓰지 않아도 된다. ■ Route53 as-is 도메인을 alb 로 전달하는 cname 레코드를 등록합니다. ■ ALB 해당 ALB로 이동하여, listener를 클릭합니다. 리스너를 클릭하면 detail, rules, tags 등의 메뉴를 확인할 수 있는데, 그 중에서 rules (규칙) 를 선택하고 Manage rules (규칙 관리) 를 선택합니다. Manage r.. AWS ELB - www redirect 설정 AWS ELB - www redirect 설정 리스너 추가 혹은 편집을 선택합니다. 호스트 헤더에 www 가 붙지 않은 도메인에 대한 설정을 다음과 같이 진행합니다. - 해당 설정은 www 가 붙지 않은 도메인은 www를 붙여서 전달하라는 세팅입니다. then 설정을 다음과 같이 진행합니다. - 리디렉션 www.#{host} 301-영구 이동됨 조건 설정을 하나 추가하고, 호스트 헤더에 www 가 붙은 도메인에 대한 설정을 다음과 같이 진행합니다. 최종 적으로 www 가 붙은 도메인과 붙지 않은 도메인을 생성하고 www가 붙은 도메인은 정상적으로 target 그룹으로 전달하고 www가 붙지 않은 도메인은 www 도메인으로 redirect 설정을 걸어두면 됩니다. by mkdir-chandler AWS ELB - https redirect 설정 AWS ELB - https redirect 설정 'AWS → EC2 → 로드밸런싱 → 로드밸런서'로 이동합니다. 해당 위치에서 http 리스너를 다음과 같이 선택합니다. - 아직 설정이 안되어 있을 경우 → http 리스너 추가 - 이미 설정이 되어 있을 경우 → http 리스너 편집 다음과 같이 세팅합니다. IF - 요청 시에만 라우팅 Then - 리디렉션 - https 443 - 301 - 영구 이동됨 위와 같은 형태로 나오면 제대로 설정했다는 의미입니다. https 리스너 설정은 특별한 것 없이 target group으로 전달하면 됩니다. by mkdir-chandler AWS ELB - health check (nginx_proxy 설정) AWS ELB - health check (nginx_proxy 설정) index 파일 생성 cat > /etc/nginx/html/healthcheck hello world nginx config 설정 location ^~ /healthcheck.html { root /etc/nginx/html; } 구성 예시 server { listen 80; server_name example.com; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $remote_addr; proxy_redirect off; keepalive_timeout 0; proxy_read_.. AWS ELB - health check (nginx 설정) AWS ELB - health check (nginx 설정) LB 설정 (상태체크 URL) /elb-status nginx 설정 server { location /elb-status { access_log off; return 200 'A-OK!'; add_header Content-Type text/plain; } } nginx 설정 (전체 예시) server { listen 80; server_name example.com; access_log off; error_log /home/search/log/nginx.error.log; server_tokens off; root /home/chandler/html; error_page 403 /403.html; location = /403.html { ro.. AWS ELB - alb 규칙 추가 AWS ELB - alb 규칙 추가 AWS ELB 메뉴에서 작업을 하려는 ALB를 선택하면 하단에 상세 정보가 나오는데요, 리스터 부분에서 '규칙 보기/편집'을 선택합니다. 상단의 + 아이콘을 누르면 규칙 추가가 가능합니다. 조건에서 '호스트 헤더'를 선택합니다. 동작은 전달대상으로 선택하고, 미리 만들어 놓은 target 그룹을 선택합니다. 가중치는 필요한 경우 입력하고 default로 설정을 완료해도 됩니다. by mkdir-chandler AWS EKS - client.authentication.k8s.io/v1alpah1 AWS EKS - client.authentication.k8s.io/v1alpah1 CI / CD 과정에서 다음과 같은 에러 발생 client.authentication.k8s.io/v1alpah1 조치 방법 1 - gitlab-runner 버전 downgrade 조치 방법 2 - AWSCLI를 2버전으로 설치 - 기존 kubeconfig 정보 중 alpha 부분을 beta로 치환 ■ Reference 내용 URL EKS-ISTIO install error https://tom-hong.notion.site/EKS-ISTIO-install-error-8db28551acab4059b41b644990c2eff1 - - by mkdir-chandler 이전 1 ··· 12 13 14 15 16 17 18 ··· 30 다음