DaDesktop

Installing a New DaDesktop Server

Deploying DD Node on GTHost / Hetzner Server

The notes below are provided to assist with deploying a DaDesktop Node (Server) on a GTHost, Hetzner, or other similar bare metal Linux server. Keep in mind that these notes may change as the installation and deployment script evolves.


This assumes that a server has already been purchased and will be set up with Ubuntu Jammy 22.04. Note that RAID0, i.e., striping, can be used to speed up disk access if you have ample space across two or more disks. This needs to be defined in Hetzner using the 'installimage' process while in Rescue mode. 
 

Preparing and Installing the OS on a GTHost / Hetzner Server
 

Hetzner install
  1. First, SSH in using the supplied root credentials. Run 'apt update' and 'apt upgrade' to make sure all packages are up to date, then do an 'apt autoremove' to clear out any obsolete packages before upgrading.
  2. If you’re using Hetzner, you’ll be booted into rescue mode, so you’ll need to specify the distribution requirements, software RAID (mdm, xfs, IPv4, etc.) before rebooting and upgrading. Generally, accept the defaults for the small /boot and /boot/esp partitions, which should use ext4 rather than xfs. There’s no need for a swap partition, so skip that. Let the / partition use xfs and take up the rest of the disk space.
  3. If you’re using LeaseWeb or another provider, you’ll need to change the main / filesystem to use xfs instead of ext4 or btrfs. The notes below are only a guide, but ensuring the / partition uses xfs is trickier than simply defining /bigdisk to use xfs, because any filesystem changes must be made outside of the OS. Changing the / filesystem type isn’t easy or safe while / is mounted.
  4. To create an xfs filesystem, use the supplier’s tool if available, as it’s much simpler. Otherwise, from the rescue system, run something like:
    mkfs.xfs -f /dev/mdx (this formats / with xfs, and -f forces the overwrite). 
    Note: we no longer define /bigdisk as a separate partition; it’s now just a directory under /.
  5. Mount -t xfs /dev/mdX / from outside the OS, or use the system portal to do the same.
  6. If you’re using a /bigdisk partition (which isn’t common anymore), use the defaults,nofail 0 0 option in /etc/fstab so the system can still boot if that separate partition doesn’t mount successfully.
  7. Run systemctl daemon-reload to let systemd reload /etc/fstab.
  8. Run mount -a to verify partitions are created as expected, then check with df -T.
  9. Reboot

     

Running the DaDesktop Installation Script

 

  1. SSH to the server, e.g., svr@xxxxxxxxx
  2. Install via the DaDesktop installation script, i.e.,
  3. curl https://www.dadesktop.com/d > d
  4. At this point, the underlying OS should be upgraded from 22.04 to the latest Ubuntu version, currently Ubuntu 23.10 Mantic and soon to be Ubuntu 24.04 Noble.
  5. The easiest way to do this is with the script named update-os, found in /apps/dadesktop_npnode_deploy/modules/00-upgrade-os. This is simpler than performing the distribution upgrades manually—it replaces the apt sources from jammy to mantic (nautic) so the upgrade happens in a single step, rather than several. Note: although it’s generally not a good idea to skip releases, it’s quite safe here because only a minimal set of packages is installed.
  6. If you run into a DNS problem during the distribution upgrade (we did on one install), you can fix it by running:
     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 want to create a DD node with a specific name—maybe one you’ve used before. Reboot to apply the hostname if needed.
  8. Next, we run the main script to install the DD Node. It’s a good idea to use tmux to guard against a broken SSH connection during the upgrade. Then, in the directory where you downloaded the script, run 'bash d'.
  9. Keep an eye on the messages logged to the screen for any errors. As the script runs, the server IP will be automatically added to the NP access list. You might need to wait a minute or two for the whitelist cron to update before you can continue.
  10. Review the script’s progress, and fix or report any issues that arise.
  11. Run the cleanup script at /apps/dadesktop_npnode_deploy/modules/00-cleanup. This script removes many 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 with apt purge xxx, yyy. Also remove any broken links that are reported.
  14. Then reboot, and test the operation.
     

Testing the DD Node after Installation

  1. Check the new DD server entry and test it using TPAPI, etc., in the DaDesktop GUI.
  2. Add start and expiry dates for the server in DaDesktop, and add it to the datacenter if required.
  3. Check the new server’s operation in Zabbix, and clean up any issues if needed.
  4. Test by adding a Standalone instance to the server and running it.
  5. Add the server to the Datacenter if required.
  6. Optionally, add billing rules for the new server if needed.
  7. Copy any necessary operating system templates to the server.
  8. If necessary, let the Trainer/Coordinator know to use this particular server if it’s meant for a specific course.

 Enjoy!