Nomad: Porovnání verzí
Z Poznámkový blok
(Založena nová stránka s textem „Instalace nomada sudo apt-get update && \ sudo apt-get install wget gpg coreutils wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o…“) |
|||
(Nejsou zobrazeny 4 mezilehlé verze od stejného uživatele.) | |||
Řádka 1: | Řádka 1: | ||
− | Instalace | + | == Instalace == |
sudo apt-get update && \ sudo apt-get install wget gpg coreutils | sudo apt-get update && \ sudo apt-get install wget gpg coreutils | ||
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg | wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg | ||
sudo apt-get update && sudo apt-get install nomad | sudo apt-get update && sudo apt-get install nomad | ||
− | + | ||
− | + | * https://developer.hashicorp.com/nomad/docs/install | |
− | curl -L -o cni-plugins.tgz https://github.com/containernetworking/plugins/releases/download/v1.2.0/cni-plugins-linux-arm64-v1.2.0.tgz | + | |
− | sudo mkdir -p /opt/cni/bin | + | == CNI Pluginy == |
+ | curl -L -o cni-plugins.tgz "https://github.com/containernetworking/plugins/releases/download/v1.2.0/cni-plugins-linux-$( [ $(uname -m) = aarch64 ] && echo arm64 || echo amd64)"-v1.2.0.tgz && \ | ||
+ | sudo mkdir -p /opt/cni/bin && \ | ||
sudo tar -C /opt/cni/bin -xzf cni-plugins.tgz | sudo tar -C /opt/cni/bin -xzf cni-plugins.tgz | ||
− | -- | + | |
− | + | * https://developer.hashicorp.com/nomad/docs/install#post-installation-steps | |
+ | |||
+ | == Konfigurační hcl soubor == | ||
mkdir /var/log/nomad | mkdir /var/log/nomad | ||
Řádka 58: | Řádka 62: | ||
} | } | ||
} | } | ||
− | ---- | + | |
− | Restartování | + | * https://blog.pavelsklenar.com/two-node-nomad-cluster/ |
+ | * https://thekevinwang.com/2022/11/20/nomad-cluster/ | ||
+ | |||
+ | == Restartování == | ||
systemctl enable nomad | systemctl enable nomad | ||
systemctl restart nomad | systemctl restart nomad | ||
+ | |||
+ | == Odkazy == | ||
+ | * https://traefik.io/blog/traefik-proxy-fully-integrates-with-hashicorp-nomad/ | ||
+ | * https://developer.hashicorp.com/nomad/tutorials/load-balancing/load-balancing-traefik | ||
+ | * https://www.larrymyers.com/posts/nomad-and-traefik/ | ||
+ | * https://developer.hashicorp.com/nomad/docs/job-specification |
Aktuální verze z 25. 7. 2023, 22:41
Instalace
sudo apt-get update && \ sudo apt-get install wget gpg coreutils wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg sudo apt-get update && sudo apt-get install nomad
CNI Pluginy
curl -L -o cni-plugins.tgz "https://github.com/containernetworking/plugins/releases/download/v1.2.0/cni-plugins-linux-$( [ $(uname -m) = aarch64 ] && echo arm64 || echo amd64)"-v1.2.0.tgz && \ sudo mkdir -p /opt/cni/bin && \ sudo tar -C /opt/cni/bin -xzf cni-plugins.tgz
Konfigurační hcl soubor
mkdir /var/log/nomad
# Full configuration options can be found at https://www.nomadproject.io/docs/configuration bind_addr = "0.0.0.0" data_dir = "/opt/nomad/data" datacenter = "NAZEV_TOHO_SERVER" enable_syslog = true log_level = "INFO" log_file = "/var/log/nomad/" advertise { http = "{{GetInterfaceIP \"ens192\"}}" rpc = "{{GetInterfaceIP \"ens192\"}}" serf = "{{GetInterfaceIP \"ens192\"}}" } server { enabled = true bootstrap_expect = 2 server_join { retry_join = [ "IP_ADDRESA_JEDNOHO_SERVER", "IP_ADDRESA_DRUHEHO_SERVER" ] retry_interval = "15s" } } client { enabled = true servers = [ "localhost" ] cni_path = "/opt/cni/bin" } plugin "raw_exec" { config { enabled = true } } plugin "docker" { config { gc { dangling_containers { enabled = false } } } }
- https://blog.pavelsklenar.com/two-node-nomad-cluster/
- https://thekevinwang.com/2022/11/20/nomad-cluster/
Restartování
systemctl enable nomad systemctl restart nomad