Public repo to distribute scripts and config's
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 

32 lignes
1.3 KiB

  1. #/bin/bash
  2. apt update
  3. # install ops tools
  4. apt install sudo nmon tmux tcpdump nano iputils-ping net-tools -y
  5. # install Docker + docker-compose
  6. apt install apt-transport-https ca-certificates curl gnupg software-properties-common lsb-release -y
  7. curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  8. echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
  9. apt update
  10. apt install docker-ce docker-ce-cli containerd.io -y
  11. systemctl start docker
  12. # set TF users
  13. wget https://docs.grid.tf/threefold_public/public/raw/branch/master/add-tf-users.sh
  14. sh add-tf-users.sh
  15. # set propper sshd config
  16. wget https://docs.grid.tf/threefold_public/public/raw/branch/master/sshd_config
  17. cp sshd_config /etc/ssh/
  18. # Install k8s stuff
  19. apt update && apt install -y apt-transport-https curl
  20. curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
  21. cat <<EOF | tee /etc/apt/sources.list.d/kubernetes.list
  22. deb https://apt.kubernetes.io/ kubernetes-xenial main
  23. EOF
  24. apt update
  25. apt install -y kubelet kubeadm kubectl
  26. apt-mark hold kubelet kubeadm kubectl
  27. swapoff -a