반응형
HashiCorp Nomad 서버를 설치하고 구성하는 방법(install nomad)
HashiCorp Nomad 서버를 설치하고 단일 노드(Server + Client)로 구성하는 방법입니다.
Nomad란 무엇인가?
Nomad는 클러스터 환경에서 다음과 같은 작업을 담당합니다.
- 애플리케이션 실행 위치 결정(스케줄링)
- 컨테이너 / 바이너리 / 배치 작업 실행
- 장애 발생 시 재시작 및 재배치
- 리소스(CPU, 메모리) 기반 작업 관리
Kubernetes와 비슷한 역할을 하지만 훨씬 가볍고 단순한 구조가 특징입니다.
우분투에서 Nomad 서버 설치
패키지 설치
sudo apt-get update && sudo apt-get install -y wget gpg coreutils
HashiCorp 공식 APT 저장소 등록
wget -q -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
Nomad 설치
sudo apt-get update && sudo apt-get install -y nomad
설치 확인
nomad --version
$ nomad --version
Nomad v1.4.3 (f464aca721d222ae9c1f3df643b3c3aaa20e2da7)
Nomad 설정 파일 구성
- nomad.hcl 예제 (단일 노드 구성)
vim /etc/nomad.d/nomad.hcl
# Full configuration options can be found at https://www.nomadproject.io/docs/configuration
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
server {
# license_path is required as of Nomad v1.1.1+
#license_path = "/opt/nomad/license.hclic"
enabled = true
bootstrap_expect = 1
}
client {
enabled = true
servers = ["127.0.0.1"]
}
Nomad 서비스 활성화 및 상태 확인
systemctl --now enable nomad.service
systemctl status nomad --no-pager
Nomad 포트 리스닝 확인
netstat -nlpt | grep nomad | sort -k 4
$ netstat -nlpt | grep nomad | sort -k 4
tcp6 0 0 :::4646 :::* LISTEN 5961/nomad
tcp6 0 0 :::4647 :::* LISTEN 5961/nomad
tcp6 0 0 :::4648 :::* LISTEN 5961/nomad
접속 확인
웹 UI 접속
http://<서버 IP>:4646
CLI 상태 확인
nomad status
nomad node status
728x90
CentOS에서 Nomad 서버 설치
HashiCorp YUM 저장소 등록
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
Nomad 설치
sudo yum install -y nomad
설치 확인
nomad --version
$ nomad --version
Nomad v1.4.3 (f464aca721d222ae9c1f3df643b3c3aaa20e2da7)
Nomad 설정 파일 구성
- nomad.hcl 예제 (단일 노드 구성)
vim /etc/nomad.d/nomad.hcl
# Full configuration options can be found at https://www.nomadproject.io/docs/configuration
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
server {
# license_path is required as of Nomad v1.1.1+
#license_path = "/opt/nomad/license.hclic"
enabled = true
bootstrap_expect = 1
}
client {
enabled = true
servers = ["127.0.0.1"]
}
Nomad 서비스 활성화 및 상태 확인
systemctl --now enable nomad.service
systemctl status nomad --no-pager
Nomad 포트 리스닝 확인
netstat -nlpt | grep nomad | sort -k 4
$ netstat -nlpt | grep nomad | sort -k 4
tcp6 0 0 :::4646 :::* LISTEN 17074/nomad
tcp6 0 0 :::4647 :::* LISTEN 17074/nomad
tcp6 0 0 :::4648 :::* LISTEN 17074/nomad
접속 확인
웹 UI 접속
http://<서버 IP>:4646
CLI 상태 확인
nomad status
nomad node status
참고URL
- Install nomad: https://developer.hashicorp.com/nomad/tutorials/get-started/get-started-install
728x90
반응형
'리눅스' 카테고리의 다른 글
| traefik을 사용하는 도커 컨테이너 리버스 프록시(docker container reverse proxy) (0) | 2023.01.27 |
|---|---|
| HashiCorp Nomad Cluster 구성 (0) | 2023.01.27 |
| consul 서비스 등록 (0) | 2023.01.27 |
| systemctl status 명령어 (0) | 2023.01.27 |
| Consul 클러스터를 구성하는 방법 (0) | 2023.01.27 |