Installing new DaDesktop Server

Deploy DD Node on GTHost / Hetzner Server

The following notes are meant to assist with the deployment of a DaDesktop Node (Server) on a bare metal Linux server from providers such as GTHost, Hetzner, or similar services. Please be aware that these instructions may be updated as the installation and deployment script evolves.


This guide starts from the point where a server has already been acquired and will be configured with Ubuntu Jammy 22.04. To speed up disk access when you have ample space with two or more disks, you can opt for RAID0, also known as Striping. This configuration must be specified at Hetzner using the 'installimage' process while in Rescue mode. 
 

Preparation, install of OS if using GTHost / Hetzner Server
 

Hetzner install
  1. Begin by establishing an SSH connection with the provided root credentials. Run 'apt update' and 'apt upgrade' to bring all packages to their latest versions. Afterward, execute 'apt autoremove' to clear out any unnecessary packages before upgrading.
  2. For Hetzner users, the system will start in rescue mode, so you must define the distribution requirements, software RAID (like mdm), the xfs filesystem, and IPv4 settings before rebooting and upgrading. It is usually fine to accept the defaults for small /boot and /boot/esp partitions using ext4, not xfs, and to skip the swap partition as it is not needed. Allow the / partition to use xfs and consume the remaining disk space.
  3. If you are using LeaseWeb or another provider, you will need to change the primary / filesystem to use xfs instead of ext4 or btrfs. The guidance below serves as a general reference. However, configuring the / partition to use xfs is more complex than simply defining a /bigdisk with xfs, because filesystem changes must occur outside the OS; altering the / filesystem type while / is mounted cannot be performed easily or safely.
  4. To generate an xfs filesystem, use the provider's tool if available, as it is significantly easier. Otherwise, you can use a command like the following from a rescue system:
    mkfs.xfs -f /dev/mdx (this formats the / with xfs, and -f forces the overwrite). 
    Note we no longer define /bigdisk as a separate partition; this is now just a directory under / instead.
  5. mount -t xfs /dev/mdX / outside of os, or using system portal to do this.
  6. If using /bigdisk partition (now not generally done) use defaults,nofail 0 0 in /etc/fstab to allow system to boot even if separate /bigdisk partition isn't mounted successfully.
  7. systemctl daemon-reload to allow systemd to reload /etc/fstab
  8. mount -a, to check partitions are created as required, check with df -T
  9. Reboot

     

Running of DaDesktop Installation Script

 

  1. ssh to the server ie  svr@xxxxxxxxx
  2. Install via DaDesktop install script, ie
  3. curl http://npg.io/d > d
  4. At this point, the underlying os should be upgraded from 22.04 to latest Ubuntu version, ie currently Ubuntu 23.10 Mantic, soon to be Ubuntu 24.04 Noble.
  5. This is best done using the script called update-os located in /apps/dadesktop_npnode_deploy/modules/00-upgrade-os . This is easier than doing the dist upgrades by hand, and replaces the apt sources from jammy to mantic (nautic), to allow the upgrade in one procedure, not several. NB, although it's usually bad practice to upgrade through two upgrades at once; it's quite safe due to the very small number of packages installed.
  6. If you encounter a problem with DNS not working during distro upgrade (we did for one install), to fix dns issue:
     rm /etc/resolv.conf ; echo "nameserver 8.8.8.8" > /etc/resolv.conf
  7. Optionally, set the hostname, eg lo33uk.npg.io if you want to create a DD node with a specific name, perhaps one had been previously set-up that you wish to use. Reboot to set hostname if necessary.
  8. Next, we run the main script to install the DD Node. Optionally use tmux to mitigate possible broken ssh connection during upgrade, then within the current dir where the script has been downloaded run 'bash d'
  9. Check messages being logged on screen for any errors, during the script the server IP will be added to the NP access list; this happens automatically but you may need to wait a couple of minutes for the whitelist cron to get updated before being able to continue.
  10. Review script progress, fix/report any issues that come up.
  11. Run cleanup script /apps/dadesktop_npnode_deploy/modules/00-cleanup. This script removes a lot of unused packages and downgrades others.
  12. Run /apps/zabbix-agent/services/test-all.sh to check for any further issues.
  13. For any unmaintained packages, remove using apt purge xxx, yyy. Remove any broken links shown.
  14. Then reboot, and test operation.
     

Testing DD Node after Installation

  1. Check new dd server entry and test with test TPAPI etc, in DaDesktop GUI.
  2. Add start and expiry dates for server in DaDesktop, add to datacenter if reqd
  3. Check operation for new server in Zabbix, clean up any issues if reqd.
  4. Test by adding Standalone to server and running
  5. Add server to Datacenter if required
  6. Optional, if reqd add Billing rules for new server
  7. Copy Operating System templates to server if required.
  8. If necessary, alert Trainer/Coordinator to use this particular server if this is to be used for a particular course

 Enjoy !