Giter VIP home page Giter VIP logo

the_red_infra's Introduction

the_red_infra

the red infra

흔히 하는 질문

  • EC2 VPC Not Found 에러가 발생합니다.
    • 다음과 같은 경우에 발생합니다.
      • VPC가 기본적으로 AWS에서 생성하는 VPC가 아니라 임의로 생성한 경우
      • 이때는 VPC id 를 명시적으로 입력해주면 동작합니다.
      • 주석 "#"으로 처리된 부분으로 변경해보시길 바랍니다.

Q/A

  • Issue 에 질문을 생성해주세요.

setup

  • 기본적인 테스트는 ubuntu 20.04 에서 진행되었습니다.(18.04 도 동작합니다.)
  • apt 를 제대로 사용하기 위해서 apt update 를 진행합니다.
sudo apt update
  • python 설치에 필요한 패키지를 설치합니다.
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \
libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl
  • the_red_infra를 git clone 받고 ./install_pyenv.sh를 실행합니다. bash를 쓰시면 source ~/.bashrc, zsh를 쓰시면 source ~/.zshrc
	git clone https://github.com/charsyam/the_red_infra
	./install_pyenv.sh
	source ~/.bashrc
	./install_python.sh
    install_ansible_password.sh    
	install_terraform.sh	
  • terraform 실행
    cd terraform/ec2/ap-northeast-2
    terraform init
    terraform plan -out "output"
    terraform apply "output"
  • 다음은 ansible 의 실행 방법입니다. 작성전에 aws/hosts 파일에 대상 호스트 설정이 되어 있어야 합니다.

apply ansible: geoip

    ansible-playbook -i aws the_red_1_base.yml
    ansible-playbook -i aws the_red_2_geoip.yml
    ansible-playbook -i aws the_red_2_lb.yml

apply ansible: monitor(prometheus + grafana)

    ansible-playbook -i aws the_red_1_base.yml
    ansible-playbook -i aws the_red_2_monitor.yml

apply ansible: ngrinder

    ansible-playbook -i aws the_red_1_jvm.yml
    ansible-playbook -i aws the_red_2_ngrinder.yml

Ansile Reference

the_red_infra's People

Contributors

charsyam avatar daemyungkang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

the_red_infra's Issues

install_terraform.sh 수정이 필요할 것 같습니다.

강의를 보면서 따라하는데 자꾸 오류가 나서 파일 내용을 확인했습니다.

cd tmp
wget https://releases.hashicorp.com/terraform/1.0.1/terraform_1.0.1_${FILENAME}.zip tmp/

tmp 디렉토리로 들어간 후에 wget으로 tmp에 파일을 가져오도록 해서 오류가 발생하던데요.
뒤쪽에 tmp/ 를 빼고 현재 디렉토리에 파일 다운로드를 하는게 맞지 않을까 싶습니다.
그렇게 하니 정상실행되었고요.

terraform apply 오류

variables.tf에서 ami의 default를 발급받은 새 ami 값으로 수정 하고 난 후, terraform plan까지는 잘되나
terraform apply할 때 다음과 같은 오류가 발생합니다.

확인해주시면 감사하겟습니다.
캡쳐 2021-10-07 오전 11 02 22

terraform plan -out "output" 오류 발생

안녕하세요, 강대명 강사님 좋은 교육 감사합니다.

Chapter 0. 대규모 서비스의 특성 [실습] 강의에서, terraform plan -out "output" 오류 발생했습니다.

AWS 가입 및 user 생성해서 강의대로 권한을 부여했습니다.
terraform init 을 하였고 이후 plna -out 명령어에서 오류가 발생했습니다.
또한, 테라폼 버전은 install_terraform.sh를 이용하여 설치했습니다.
우분투 환경은 20.04 입니다.
확인부탁드립니다.

아래의 그림 참조부탁드립니다.
terraform_EC2 issue

ubuntu 22.04부터는 python3-openssl을 설치해야하는 점 반영

안녕하세요. 우선 좋은 강의 감사드립니다.

강의 실습을 따라하던 도중 AWS에서 ubuntu EC2하나를 만들었는데 22.04버전이 디폴트로 되어있어서 그 디폴트값을 그냥 다 사용하는 바람에

강의의 버전 20.04가 아닌 22.04를 사용하게 됬습니다. 그러다가 아래와 같은 오류를 만나게 됬습니다.

Unable to locate package python-openssl

찾아보니 [Unable to locate package python-openssl](https://stackoverflow.com/questions/73566474/unable-to-locate-package-python-openssl/73566675)에서 ubuntu 22.04에서는 python3-openssl을 설치해야한다고 합니다.

README에 제공해주신 python-openssl은 파이썬의 버전이 기본적으로 3인 ubuntu 22.04에서는 설치하면 위와같은 오류가 뜨고 python3-openssl을 사용해야한다고 합니다 이점을 리드미에 반영하면 어떨지 제안드려봅니다

제안이 승락되면 PR을 요청하려합니다!

ubuntu 20.04 에서 install_python이 실패합니다.

질문

  • apt-get install 이 제대로 되지 않고 그로 인해서 컴파일러가 설치되지 않아서 install_python이 실패합니다.
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \
libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl
configure: error: in `/tmp/python-build.20210901130134.2277/Python-3.8.6':
configure: error: no acceptable C compiler found in $PATH

답변

  • apt update 를 수행하지 않으면 제대로 패키지의 정보를 가져오지 못합니다. apt update를 수행해주시기 바랍니다.
sudo apt update

ubuntu 20.04에서 install_python.sh 실행시 에러 발생 문의드립니다.

패키지 설치 후 해결되었습니다.


아래와 같이 에러가 발생하는데 원인 알 수 있을까요?

ubuntu@ip-10-0-0-19:~/the_red_infra$ ./install_python.sh
1-1) INSTALLING PYTHON 3.8.6
Downloading Python-3.8.6.tar.xz...
-> https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tar.xz
Installing Python-3.8.6...
patching file Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
patching file configure
patching file configure.ac

BUILD FAILED (Ubuntu 20.04 using python-build 2.3.12-16-gc8daaa39)

Inspect or clean up the working tree at /tmp/python-build.20230213134750.3003
Results logged to /tmp/python-build.20230213134750.3003.log

Last 10 log lines:
checking for python3.8... python3.8
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "linux"
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in /tmp/python-build.20230213134750.3003/Python-3.8.6': configure: error: no acceptable C compiler found in $PATH See config.log' for more details
pyenv: shell integration not enabled. Run pyenv init' for instructions. 1-2) INSTALLING VIRTUALENV the-red-dev pyenv-virtualenv: 3.8.6' is not installed in pyenv.
2) use the-red-dev
pyenv: version `the-red-dev' not installed
./install_python.sh: line 32: pip: command not found
ubuntu@ip-10-0-0-19:~/the_red_infra$

terraform plan 오류 문의

안녕하세요.

readme 에 나와있는 대로 진행했는데

terraform plan -out "output" 에서 에러가 발생했는데요. 인터넷을 찾아봐도 무슨 에러인지 해결을 못해서 질문 드립니다.

에러 로그는 아래와 같습니다. 환경은 M1 mac 에서 진행했습니다.

답변 부탁드립니다. 감사합니다.

Error: no matching EC2 VPC found
│ 
│   with data.aws_vpc.default,
│   on vpc.tf line 1, in data "aws_vpc" "default":
│    1: data "aws_vpc" "default" {

SSH 설정 문의

cloudinit을 통해 프로비저닝 한 키를 설정하라고 적혀있는데, 이 부분 강의에서도 자세한 설명이 없어서 수강에 어려움이 있습니다.
ssh 설정에 사용되는 하기 설정에 대한 자세한 설명 부탁드립니다.

// TODO: Maybe use a list instead and provision keys through cloudinit
variable "key_name" {
description = "The SSH key to use for these instances."
default = "charsyam"
}
WAPL_20210919_43489

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.