Table of Contents
Nomad cluster with Terraform on AWS
제목대로,
노마드 클러스터를 Terraform 을 이용해 AWS 에서 배포하는 방법을 설명합니다.
리눅스는 Ubuntu 를 기준으로 설명하지만,
Amazon Linux 도 정상작동하리라 생각합니다.
Nomad cluster 구성
Terraform 인스턴스 준비
Consul cluster 구성
Nomad server cluster 구성
Nomad client cluster 구성
Nomad cluster 서비스 등록
haproxy job
prometheus job
hello world job
Nomad client with auto scaling 구성
ELB 설정 (도메인으로 Nomad client cluster 접속)
ASG 설정
Autoscaler job
테스트
sudo apt install hey
hey -z 10m -c 20 -q 40 https://nomad-client.skyer9.pe.kr:2020/:80 &
pkill hey
https://github.com/hashicorp/nomad/issues/3831
https://hub.docker.com/r/hashicorp/nomad-autoscaler