DaDesktop

Deploying a New DaDesktop Server

Deploy a DD Node on a GTHost or Hetzner Server

The following notes are intended to assist with deploying a DaDesktop Node (Server) on a GTHost, Hetzner, or other similar bare metal Linux server in Greece. These notes are likely to evolve as the installation and deployment script changes.


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

Preparation, OS installation for GTHost / Hetzner Server
 

Hetzner install
  1. First, log in via SSH with the supplied root credentials. Run 'apt update' and 'apt upgrade' to bring all packages up to date. Then do 'apt autoremove' to clean out any obsolete packages before proceeding.
  2. If you're on Hetzner, you'll boot into rescue mode, so you'll need to specify the distribution requirements, software RAID – mdm, xfs, ipv4, etc. – before rebooting and upgrading. Typically, accept the defaults for the small /boot and /boot/esp partitions (using ext4 rather than xfs), and skip the swap partition as it's unnecessary. Allow the / partition to use xfs and consume the remainder of the disk.
  3. For LeaseWeb or another provider, you'll need to change the main / filesystem to xfs instead of ext4 or btrfs. The steps below are only a guide; however, getting the / partition to use xfs is tougher than simply defining /bigdisk with xfs, because filesystem changes must be done outside the OS – you can't easily or safely change the / type while it's mounted.
  4. To create an xfs filesystem, use the supplier's tool if at all possible – it's far simpler. Otherwise, from the rescue system you might do something like:
    mkfs.xfs -f /dev/mdx (this formats / with xfs; -f forces the overwrite). 
    NB we no longer define /bigdisk as a separate partition; it's now just a directory under /.
  5. Mount the filesystem with 'mount -t xfs /dev/mdX /' from outside the OS, or use the system portal to achieve this.
  6. If using a /bigdisk partition (now largely deprecated), use 'defaults,nofail 0 0' in /etc/fstab so the system can boot even if the separate /bigdisk partition fails to mount.
  7. Run 'systemctl daemon-reload' to let systemd re-read /etc/fstab.
  8. Execute 'mount -a' to mount all filesystems, then verify with 'df -T'.
  9. Reboot

     

Running the DaDesktop Installation Script

 

  1. SSH into the server, e.g., svr@xxxxxxxxx
  2. Install via the DaDesktop installation script:
  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 release – currently Ubuntu 23.10 Mantic, soon to be Ubuntu 24.04 Noble.
  5. The best way to do this is with the script called update-os located at /apps/dadesktop_npnode_deploy/modules/00-upgrade-os. This is easier than performing dist upgrades manually, as it replaces the apt sources from jammy to mantic (nautic) in one shot. Note: Although skipping releases is usually bad practice, it's quite safe here because of the very small number of installed packages.
  6. If you encounter DNS issues during the dist upgrade (we saw this once), fix them like this:
     rm /etc/resolv.conf ; echo "nameserver 8.8.8.8" > /etc/resolv.conf
  7. Optionally, set the hostname – for example, lo33uk.npg.io – if you want a specific name for the DD node, perhaps reusing a previously configured one. Reboot if necessary to apply the hostname.
  8. Next, run the main script to install the DD Node. You may want to use tmux to guard against a broken SSH connection during the upgrade. Then, in the directory where you downloaded the script, execute 'bash d'.
  9. Watch the on-screen log for any errors. During the script, the server's IP is automatically added to the NP access list, but you might need to wait a minute or two for the whitelist cron to refresh before you can continue.
  10. Keep an eye on the script's progress and address or report any issues that come up.
  11. Run the cleanup script at /apps/dadesktop_npnode_deploy/modules/00-cleanup. It removes a lot of unused packages and downgrades some.
  12. Execute /apps/zabbix-agent/services/test-all.sh to check for any remaining problems.
  13. For any unmaintained packages, remove them with 'apt purge xxx yyy'. Also delete any broken links that are shown.
  14. Then reboot and test the operation.
     

Testing the DD Node After Installation

  1. Check the new DD server entry and test it with TPAPI etc. in the DaDesktop GUI.
  2. Add start and expiry dates for the server in DaDesktop, and assign it to a datacenter if needed.
  3. Verify the new server's functionality in Zabbix and clean up any issues.
  4. Test by adding a Standalone to the server and running it.
  5. Add the server to a datacenter if required.
  6. Optionally, set up billing rules for the new server.
  7. Copy OS templates to the server as necessary.
  8. If the server is destined for a specific course, notify the trainer/coordinator to use this particular server.

 Enjoy!