Nomad 是 HashiCorp 出品的一個分散式工作排程器(Scheduler)和集群管理工具
https://developer.hashicorp.com/nomad/install
wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg –dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo “deb [arch=$(dpkg –print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(grep -oP ‘(?<=UBUNTU_CODENAME=).*’ /etc/os-release || lsb_release -cs) main” | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install nomad
hash -r
sudo netstat -tlnp | grep 4646
sudo systemctl restart nomad
nomad
nano /etc/nomad.d/nomad.hcl
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
# Full configuration options can be found at https://developer.hashicorp.com/nomad/docs/configuration
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
addresses {
http = "0.0.0.0"
}
server {
# license_path is required for Nomad Enterprise as of Nomad v1.1.1+
#license_path = "/etc/nomad.d/license.hclic"
enabled = true
bootstrap_expect = 1
}
client {
enabled = true
servers = ["127.0.0.1"]
}
plugin "docker" {
config {
volumes {
enabled = true
}
}
}
plugin "raw_exec" {
config {
enabled = true
}
}
nomad job run
nomad job plan