Skip to content

Latest commit

 

History

History
130 lines (85 loc) · 1.89 KB

requirements.md

File metadata and controls

130 lines (85 loc) · 1.89 KB

VMs OS and Workstation requirements

Requirements for all Docker Swarm cluster servers and administrator workstation.


TOC:


1. On VMs

1.1 Firewall

❗ It is recommended to disable the firewall on your VMs, to avoid various unwanted problems during installation!

Debian/Ubuntu

sudo ufw disable

RedHat/Rocky

sudo systemctl disable --now firewalld

1.2 OS user

Create new OS user for a ansible tasks on all cluster VMs:

Debian/Ubuntu

sudo adduser hladmin

RedHat/Rocky

sudo useradd hladmin
sudo passwd hladmin

1.3 Sudoers file

Add newly created user to sudoers file (for passwordless sudo):

sudo su -
echo -e "\n# Allow without a password\nhladmin        ALL=(ALL)       NOPASSWD: ALL" >> /etc/sudoers
exit

2. On ansible workstation (admin node)

2.1 Generate SSH keys

Create required directory

mkdir -p ~/.ssh/

Generate new SSH key:

ssh-keygen -f ~/.ssh/id_rsa -N ""

2.2 SSH folder and file permissions

chmod 700 ~/.ssh
chmod 644 ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/id_rsa
chmod 600 ~/.ssh/authorized_keys

2.3 Setup passwordless SSH

Distribute the SSH public key to all servers:

  • use newly created user for ansible tasks:
ssh-copy-id [email protected]

SSH without password