Updating and Preparing the System

Updating and Preparing the System

The following steps describe how to update and prepare each system. Perform the steps for each system intended for the cluster.
  1. Update the system packages.
    For Ubuntu:
    sudo apt-get update && sudo apt-get upgrade -y
    For Red Hat:
    sudo dnf update -y
  2. Set up locales.
    The system should use UTF-8 locales to avoid locale-related issues with MicroK8s.
    sudo localectl set-locale en_US.UTF-8 export LANG=en_US.UTF-8
  3. Configure huge pages for performance.
    Resonate
    databases take advantage of huge pages for better performance. Set the number of huge pages to at least 2048.
    echo "vm.nr_hugepages = 2048" | sudo tee -a /etc/sysctl.d/20-microk8s-hugepages.conf sudo sysctl -w vm.nr_hugepages=2048
  4. Check if system restart is needed.
    You might need to restart the system if there are kernel updates or other critical updates applied. Check for the presence of the /var/run/reboot-required file.
    For Ubuntu:
    if [ -f /var/run/reboot-required ]; then echo "System restart required" sudo reboot fi
    For Red Hat:
    needs-restarting -r && echo "System restart required" && sudo reboot