Filip: Porovnání verzí

Z Poznámkový blok
Přejít na: navigace, hledání
Řádka 1: Řádka 1:
 +
==Linux==
 
Basic setting pro server
 
Basic setting pro server
  sudo apt install htop mc ssh sudo wget curl net-tools
+
  sudo apt install htop mc ssh sudo wget curl net-tools open-vm-tools
  
 
Zabezpečení server
 
Zabezpečení server
Řádka 7: Řádka 8:
  
 
Cli užitečný příkazy
 
Cli užitečný příkazy
  sudo apt install fzf ncdu
+
  sudo apt install fzf ncdu dos2unix
 +
 
 +
sudo swapoff -a; sudo swapon -a
 +
 
 +
sudo apt install python3-pip
 +
 
 +
 
 +
==Docker==
 +
 +
 
 +
==Nomad==
 +
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
 +
 
 +
Cli pluginy
 +
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
 +
sudo tar -C /opt/cni/bin -xzf cni-plugins.tgz
 +
 
 +
Config
 +
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 = "test"
 +
 +
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 = [ "test7.server", "test5.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
 +
      }
 +
    }
 +
  }
 +
}

Verze z 10. 5. 2023, 09:32

Linux

Basic setting pro server

sudo apt install htop mc ssh sudo wget curl net-tools open-vm-tools

Zabezpečení server https://wiki.mikrotik.com/wiki/Use_Mikrotik_as_Fail2ban_firewall

sudo apt install clamav clamav-freshclam clamav-daemon ufw

Cli užitečný příkazy

sudo apt install fzf ncdu dos2unix
sudo swapoff -a; sudo swapon -a
sudo apt install python3-pip


Docker

Nomad

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

Cli pluginy

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
sudo tar -C /opt/cni/bin -xzf cni-plugins.tgz

Config

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 = "test" 

enable_syslog = true
log_level = "INFO"
log_file = "/var/log/nomad/"

advertise {
  http = "Šablona:GetInterfaceIP \"ens192\""
  rpc  = "Šablona:GetInterfaceIP \"ens192\""
  serf = "Šablona:GetInterfaceIP \"ens192\""
}

server {
  enabled = true
  bootstrap_expect = 2
  server_join {
    retry_join = [ "test7.server", "test5.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
      }
    }
  }
}