Deckhouse Virtualization Platform for bare metal
Prepare cluster nodes: configure the NFS server and worker node before platform installation.
Configure the NFS server
To configure NFS, complete the following steps:
-
Set up the NFS server for VM disk storage. Run the following commands on the NFS server:
- For Ubuntu-based OS
- For CentOS, Rocky Linux, ALT Linux, ROSA Server, RED OS, MOS OS
sudo apt update sudo apt install nfs-kernel-server sudo mkdir -p <NFS_SHARE> sudo chown -R nobody:nogroup <NFS_SHARE> echo "<NFS_SHARE> <INTERNAL_NETWORK_CIDRS>(rw,sync,no_subtree_check,no_root_squash)" | sudo tee -a /etc/exports sudo exportfs -ra sudo systemctl restart nfs-kernel-serversudo dnf install -y nfs-utils sudo mkdir -p <NFS_SHARE> sudo chown -R nobody:nobody <NFS_SHARE> echo "<NFS_SHARE> <INTERNAL_NETWORK_CIDRS>(rw,sync,no_subtree_check,no_root_squash)" | sudo tee -a /etc/exports sudo exportfs -ra sudo systemctl enable --now nfs-server sudo systemctl restart nfs-server -
Verify NFS access from the master node. Run the following commands on the master node:
- For Ubuntu-based OS
- For CentOS, Rocky Linux, ALT Linux, ROSA Server, RED OS, MOS OS
sudo apt update sudo apt install nfs-common sudo mkdir -p /mnt/dvp-nfs-test sudo mount -t nfs4 <NFS_HOST>:<NFS_SHARE> /mnt/dvp-nfs-test sudo touch /mnt/dvp-nfs-test/probe && echo "OK: mount and write work" sudo rm -f /mnt/dvp-nfs-test/probe sudo umount /mnt/dvp-nfs-test sudo rmdir /mnt/dvp-nfs-testsudo dnf install -y nfs-utils sudo mkdir -p /mnt/dvp-nfs-test sudo mount -t nfs4 <NFS_HOST>:<NFS_SHARE> /mnt/dvp-nfs-test sudo touch /mnt/dvp-nfs-test/probe && echo "OK: mount and write work" sudo rm -f /mnt/dvp-nfs-test/probe sudo umount /mnt/dvp-nfs-test sudo rmdir /mnt/dvp-nfs-testThe
OK: mount and write workline means the node mounted the directory and wrote to it as root, so both networking and theno_root_squashoption are in place. If the line is missing, use the error message:mount.nfs4: Connection timed out— the NFS server is unreachable. Check the firewall and make sure its IP differs from the master and worker IPs.mount.nfs4: access denied by server— the node is outside the subnet listed in/etc/exportson the NFS server.touch: cannot touch ...: Permission denied— the directory is exported without theno_root_squashoption.
Prepare the worker node
An SSH key pair for the caps user, required for further cluster setup, was generated automatically in your browser. Save the keys: you may need them if you want to add more worker nodes.
Public key:
<CAPS_SSH_PUBLIC_KEY>
Private key:
<CAPS_SSH_PRIVATE_KEY>
If you deploy the lab on virtual machines, enable nested virtualization on the hypervisor for the worker node. See installation requirements.
To continue setup, create the caps user by running the following commands on the worker node:
- For Ubuntu-based OS
- For CentOS, Rocky Linux, ALT Linux, ROSA Server, RED OS, MOS OS
export KEY='<CAPS_SSH_PUBLIC_KEY>'
sudo useradd -m -s /bin/bash caps
sudo usermod -aG sudo caps
echo 'caps ALL=(ALL) NOPASSWD: ALL' | sudo EDITOR='tee -a' visudo
sudo mkdir -p /home/caps/.ssh
echo "$KEY" | sudo tee -a /home/caps/.ssh/authorized_keys
sudo chown -R caps:caps /home/caps
sudo chmod 700 /home/caps/.ssh
sudo chmod 600 /home/caps/.ssh/authorized_keys
export KEY='<CAPS_SSH_PUBLIC_KEY>'
sudo useradd -m -s /bin/bash caps
sudo usermod -aG wheel caps
echo 'caps ALL=(ALL) NOPASSWD: ALL' | sudo EDITOR='tee -a' visudo
sudo mkdir -p /home/caps/.ssh
echo "$KEY" | sudo tee -a /home/caps/.ssh/authorized_keys
sudo chown -R caps:caps /home/caps
sudo chmod 700 /home/caps/.ssh
sudo chmod 600 /home/caps/.ssh/authorized_keys
On Astra Linux with Parsec enabled, set the maximum integrity level for caps:
sudo pdpl-user -i 63 caps
The cluster nodes are ready for Deckhouse Virtualization Platform installation.