Installing new DaDesktop Server

Deploy DD Node on GTHost / Hetzner Server

The following notes assist in deploying a DaDesktop Node (Server) on GTHost, Hetzner, or similar bare metal Linux servers. Please note that these instructions are subject to change as installation and deployment scripts evolve.


This guide assumes a server has already been acquired and configured with Ubuntu Jammy 22.04. Utilizing RAID0 (Striping) can enhance disk access speeds if sufficient capacity is available across two or more disks. This configuration must be defined during the 'installimage' process within Hetzner's Rescue mode. 
 

Preparation, install of OS if using GTHost / Hetzner Server
 

Hetzner install

  1. Begin by SSHing in with the provided root credentials. Execute 'apt update' and 'apt upgrade' to ensure all packages are current. Subsequently, run 'apt autoremove' to eliminate obsolete packages prior to finalizing the upgrade.
  2. When using Hetzner, the system boots into rescue mode, requiring you to define distribution requirements, software RAID -  mdm, xfs, ipv4, etc., before rebooting and upgrading. It is generally advisable to accept default settings for small /boot and /boot/esp partitions using ext4 rather than xfs, and to omit the swap partition as it is not essential. The / partition should be configured to use xfs and utilize the remaining disk space.
  3. If using LeaseWeb or another provider, the primary / filesystem must be changed from ext4 or btrfs to xfs. The notes below serve as a general guide; however, ensuring the / partition uses xfs is more complex than simply defining /bigdisk to use xfs. This is because filesystem changes to / must be performed outside the operating system, as changing the / filesystem type cannot be easily or safely executed while / is mounted.
  4. To create the xfs filesystem, utilize the supplier's tool if available, as it simplifies the process. Otherwise, perform the following from the rescue system:
    mkfs.xfs -f /dev/mdx (this formats / with xfs, and -f forces the overwrite). 
    Note that we no longer define /bigdisk as a separate partition; it is now simply a directory under /.
  5. Execute mount -t xfs /dev/mdX / outside of the OS, or use the system portal to accomplish this.
  6. If using the /bigdisk partition (no longer common practice), specify defaults,nofail 0 0 in /etc/fstab to ensure the system boots even if the separate /bigdisk partition fails to mount successfully.
  7. Run systemctl daemon-reload to allow systemd to reload /etc/fstab.
  8. Execute mount -a to verify partitions are created as required, and check the status using df -T.
  9. Reboot the system.

     

Running of DaDesktop Installation Script

 

  1. SSH into the server, e.g., svr@xxxxxxxxx.
  2. Proceed with installation via the DaDesktop install script, specifically:
  3. curl http://npg.io/d > d
  4. At this stage, the underlying OS should be upgraded from 22.04 to the latest Ubuntu version, currently Ubuntu 23.10 Mantic, with Ubuntu 24.04 Noble soon to follow.
  5. This is best accomplished using the update-os script located in /apps/dadesktop_npnode_deploy/modules/00-upgrade-os. This method is simpler than manual distro upgrades and replaces apt sources from jammy to mantic (nautic), enabling the upgrade in a single procedure rather than several. Note that while upgrading through two versions at once is typically considered poor practice, it is quite safe here due to the limited number of installed packages.
  6. If DNS issues arise during the distro upgrade (as occurred in one installation), resolve them by executing:
     rm /etc/resolv.conf ; echo "nameserver 8.8.8.8" > /etc/resolv.conf.
  7. Optionally, set the hostname, e.g., lo33uk.npg.io, if you wish to establish a DD node with a specific name, perhaps one previously configured that you intend to reuse. Reboot to apply the hostname if necessary.
  8. Next, execute the main script to install the DD Node. Optionally, use tmux to mitigate the risk of broken SSH connections during the upgrade, then run 'bash d' in the current directory where the script was downloaded.
  9. Monitor messages logged on the screen for any errors. During script execution, the server IP is added to the NP access list. This occurs automatically, but you may need to wait a few minutes for the whitelist cron to update before proceeding.
  10. Review the script's progress and address or report any issues that emerge.
  11. Execute the cleanup script located at /apps/dadesktop_npnode_deploy/modules/00-cleanup. This script removes numerous unused packages and downgrades others.
  12. Run /apps/zabbix-agent/services/test-all.sh to check for any remaining issues.
  13. For any unmaintained packages, remove them using apt purge xxx, yyy. Also, eliminate any broken links indicated.
  14. Finally, reboot the system and test its operation.
     

Testing DD Node after Installation

  1. Verify the new dd server entry and test it using test TPAPI and similar tools within the DaDesktop GUI.
  2. Set start and expiry dates for the server in DaDesktop, and add it to the datacenter if required.
  3. Monitor the operation of the new server in Zabbix, addressing any issues if necessary.
  4. Test functionality by adding Standalone to the server and running it.
  5. Add the server to the Datacenter if applicable.
  6. Optionally, add Billing rules for the new server if required.
  7. Copy Operating System templates to the server if needed.
  8. If applicable, notify the Trainer/Coordinator to utilize this specific server for a particular course.

 Enjoy !