Giter Site home page Giter Site logo

uniglot / fastcampus-incident-scenarios Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 39 KB

패스트캠퍼스 - 실전 장애 케이스 8가지 실습과 보고서 작성

HCL 27.67% Python 68.96% Dockerfile 3.36%
fastcampus fastcampus-incident fastcampus-incident-management fastcampus-incident-scenarios

fastcampus-incident-scenarios's Introduction

Fast Campus - 실전 장애 케이스 8가지 실습과 보고서 작성

Caution

본 프로젝트의 시스템 구성에는 교육 목적을 위한 의도적인 결함이 존재합니다. This project presents a system with deliberate flaws for educational purposes.

준비 사항

  1. AWS 액세스 키와 시크릿 키를 발급받아 안전하게 보관하세요.
  2. secrets.tfvars 라는 이름의 파일을 infrastructure 디렉토리 안에 생성하세요.
  3. 해당 파일에 아래와 같이 채워 주세요.
    aws_access_key = "YOURAWSACCESSKEY"
    aws_secret_key = "YOURAWSSECRETACCESSKEY"
    
  4. 터미널에서 infrastructure 디렉토리로 이동한 뒤 terraform init을 입력하세요.

테라폼 플래닝 및 인프라 적용

  • 테라폼 코드를 플래닝하여 인프라가 어떻게 생성될지 보려면, terraform plan -var-file=secrets.tfvars 커맨드를 infrastructure 디렉토리에서 실행하세요.
  • 실제로 테라폼 코드를 적용하여 인프라를 생성 또는 수정하고자 한다면, terraform apply -var-file=secrets.tfvars 커맨드를 infrastructure 디렉토리에서 실행하세요.
    • 약 20분 내외 소요됩니다.

EKS 클러스터 접속

  1. AWS CLI, kubectl, helm을 설치하세요.
  2. aws configure --profile fastcampus 커맨드를 실행하여 AWS 액세스 키와 시크릿 키를 AWS CLI에서 사용하도록 설정하세요.
  3. 터미널에서 aws eks --region ap-northeast-2 update-kubeconfig --name fastcampus-infra-cluster --profile fastcampus를 실행하여 kubectl을 통해 생성한 클러스터에 접근할 수 있도록 합니다.
  4. 터미널에서 kubectl config use-context arn:aws:eks:ap-northeast-2:1234567890:cluster/fastcampus-infra-cluster을 실행해서 현재 쿠버네티스 컨텍스트를 생성한 클러스터를 바라보게 합니다. (1234567890을 본인의 계정 ID로 바꿔주세요.)
  5. kubectl get pods -n kube-system 커맨드를 실행해 파드들이 정상적으로 출력되는지 확인해 주세요.

인프라 제거

  1. 프로비저닝된 모든 인프라를 제거하기 위해서, 터미널에서 terraform destroy -var-file=secrets.tfvars 커맨드를 입력해 주세요.
  • 약 10분 내외 소요됩니다.
  1. 로컬 kubectl 설정 파일을 정리하기 위해서, 아래의 커맨드를 입력해 주세요.
  • kubectl config delete-context arn:aws:eks:ap-northeast-2:1234567890:cluster/fastcampus-infra-cluster (1234567890을 본인의 계정 ID로 바꿔주세요.)
  • kubectl config delete-cluster arn:aws:eks:ap-northeast-2:1234567890:cluster/fastcampus-infra-cluster
  • kubectl config delete-user arn:aws:eks:ap-northeast-2:1234567890:cluster/fastcampus-infra-cluster

fastcampus-incident-scenarios's People

Contributors

uniglot avatar

Stargazers

pino avatar JoonHyeok Yang avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.