「Nomad」:修訂間差異
跳至導覽
跳至搜尋
第39行: | 第39行: | ||
http = 5656 | http = 5656 | ||
} | } | ||
</syntaxhighlight> | |||
設定完成後(無論是server或是client)都可以啟用: | |||
<syntaxhighlight lang="bash"> | |||
sudo service nomad restart | |||
sudo service nomad status | |||
</syntaxhighlight> | </syntaxhighlight> | ||
於 2020年1月3日 (五) 07:32 的修訂
Nomad是HashiCorp推出的資源管理軟體。
安裝
Nomad server與Nomad client的安裝都相同(透過設定扮演不同的角色),這邊是安裝0.10.2版,記得到官方網站上確認最新版的號碼後,修改對應的設定:
cd /tmp; wget https://releases.hashicorp.com/nomad/0.10.2/nomad_0.10.2_linux_amd64.zip; unzip nomad_0.10.2_linux_amd64.zip; sudo install -m 0755 nomad /usr/local/bin/; wget https://raw.githubusercontent.com/hashicorp/nomad/master/dist/systemd/nomad.service; sudo install nomad.service /lib/systemd/system/; sudo service daemon-reload; sudo systemctl enable nomad
設定
Nomad server的部份,依照官方的建議放到/etc/nomad.d/server.hcl
:
datacenter = "us-east-1a"
data_dir = "/srv/nomad"
log_level = "INFO"
region = "us-east-1"
server {
enabled = true
bootstrap_expect = 3
server_join {
retry_join = ["10.1.1.10:4648", "10.1.1.11:4648", "10.1.1.12:4648"]
}
}
Nomad client的部份,依照官方的建議放到/etc/nomad.d/client.hcl
:
data_dir = "/srv/nomad"
log_level = "INFO"
client {
enabled = true
servers = ["10.1.1.10:4648", "10.1.1.11:4648", "10.1.1.12:4648"]
}
ports {
http = 5656
}
設定完成後(無論是server或是client)都可以啟用:
sudo service nomad restart
sudo service nomad status
常用指令
nomad server members -address=http://nomad-server:4646
nomad node status -address=http://nomad-server:4646
外部連結
- 官方網站 (英文)