the red infra
sudo apt update
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
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