iT邦幫忙

第 12 屆 iThome 鐵人賽

DAY 12
1
DevOps

Hashicorp 0 到 0.003系列 第 12

Day 12. Hashicorp Nomad 介紹

Hashicorp Nomad是甚麼?

Kubernetes在官網的標題是Production-Grade Container Orchestration。那麼Nomad是一個flexible workload orchestrator, 因為Nomad除了可以統一管理部屬容器化的服務外,Nomad也提供非容器化的應用程序部屬,例如: jar, batch, Podman 等等,有支援的application可以參考Task Drivers。Nomad與Kubernetes的比較,官網幫大家整理好了一篇文章,我自己兩個都有維運,相較於Kubernetes, Nomad安裝設定門檻我覺得簡單非常多的,但是Kubernetes周邊支援的工具比較豐富,常常有很多現成的可以馬上用。

Nomad有以下幾個功能:

Deploy Containers and Legacy Applications: 除了可以部屬容器外,非容器化的部分應用程式也支援。
Simple & Reliable: 簡單高可靠性。
Device Plugins & GPU Support: 支援GPU, FPGAs, and TPUs的workload.
Federation for Multi-Region: 可跨region, 跨雲供應商。
Proven Scalability: 可擴展到10000+ nodes的clusters.
HashiCorp Ecosystem: 與Terraform,Consul,Vault完美整合。

架構

Nomad 是client-server的架構。Nomad Server是控制中心,通常會建置3或5台來確保高可用性,使用Consensus Protocol來確保一致性,Nomad Server之間會選出一個Leader, Follower會跟Leader做replication;Nomad Client會部屬在node上,client與server之間溝通用使用Gossip Protocol來管理;想更進一步瞭解這兩個protocol可以參考官方文件說明。

https://ithelp.ithome.com.tw/upload/images/20200912/20129223Q4gXcVgqId.png

硬體需求

Nomad Server

Size CPU Memory Disk Typical Cloud Instance Types
Small 2 core 8-16 GB RAM 50GB AWS: m5.large, m5.xlarge
Azure: Standard_D2_v3, Standard_D4_v3
GCP: n1-standard-8, n1-standard-16
Large 4-8 core 32-64 GB RAM 100GB AWS: m5.2xlarge, m5.4xlarge
Azure: Standard_D4_v3, Standard_D8_v3
GCP: n1-standard-16, n1-standard-32

Nomad Client

如同Kubernetes 的 worker node, 想要放更多的container, 資源越大越好。

Port 需求

Use Default Ports
HTTP API: This is used by clients and servers to serve the HTTP API. TCP only. 4646
RPC: This is used for internal RPC communication between client agents and servers, and for inter-server traffic. TCP only. 4647
Serf WAN: This is used by servers to gossip both over the LAN and WAN to other servers. It isn't required that Nomad clients can reach this address. TCP and UDP. 4648

上一篇
Day 11. Consul Monitor with Prometheus
下一篇
Day 13. Nomad 安裝與啟動DEV mode
系列文
Hashicorp 0 到 0.00330
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言