Installing a New DaDesktop Server

Deploying a DD Node on a GTHost / Hetzner Server

The notes below are meant to guide you through deploying a DaDesktop Node (Server) on a bare metal Linux server from providers like GTHost or Hetzner. Keep in mind, these steps might evolve as the installation and deployment scripts are updated.


This guide presumes you have already purchased a server and will be setting it up with Ubuntu Jammy 22.04. Note that using RAID0, also known as striping, can accelerate disk access if you have ample space across two or more disks. This configuration needs to be defined in Hetzner using the 'installimage' process while the server is in Rescue mode. 
 

Preparation and OS Installation for a GTHost / Hetzner Server
 

Hetzner install
  1. Start by SSHing in using the root credentials you were given. Run 'apt update' and 'apt upgrade' to bring all packages current. Afterwards, execute an 'apt autoremove' to clear out any packages that are no longer needed before you proceed further.
  2. If your server is from Hetzner, it will initially boot into rescue mode. You will need to specify the distribution requirements, software RAID – mdm, xfs, ipv4, and so on – before rebooting and upgrading. It is generally fine to accept the defaults for the small /boot and /boot/esp partitions, which should use ext4, not xfs. You can omit a swap partition, as it is not required. Allow the / partition to use xfs and consume the remaining disk space.
  3. When using a provider like LeaseWeb, you will need to change the primary / filesystem to xfs instead of ext4 or btrfs. The notes here are a guide, but configuring the / partition to use xfs is more complex than simply defining a separate /bigdisk with xfs. This is because any filesystem changes must then be performed from outside the operating system; you cannot easily or safely alter the / filesystem type while it is mounted.
  4. To create an xfs filesystem, use the supplier’s tool if one is available, as it is much simpler. Otherwise, from a rescue system, you might use a command like this:
    mkfs.xfs -f /dev/mdx (this formats the / partition with xfs, and the -f flag forces the overwrite). 
    Note that we no longer define /bigdisk as a distinct partition; it is now simply a directory under / instead.
  5. Mount the xfs partition using 'mount -t xfs /dev/mdX /' from outside the OS, or via the system portal.
  6. If you are using a /bigdisk partition (which is no longer typical practice), include defaults,nofail 0 0 in /etc/fstab. This allows the system to boot even if the separate /bigdisk partition fails to mount.
  7. Run systemctl daemon-reload so that systemd picks up the changes to /etc/fstab.
  8. Execute mount -a to verify the partitions are created as expected, and confirm with df -T.
  9. Reboot the system.

     

Running the DaDesktop Installation Script

 

  1. SSH to the server, using an address like svr@xxxxxxxxx.
  2. Initiate the installation using the DaDesktop install script.
  3. Use curl http://npg.io/d > d to download it.
  4. At this stage, the underlying OS should be upgraded from 22.04 to the latest Ubuntu version, which is currently Ubuntu 24.10 Noble, previously Ubuntu 23.10 Mantic.
  5. The most effective way to do this is by using the update-os script located in /apps/dadesktop_npnode_deploy/modules/00-upgrade-os. This is simpler than performing the distribution upgrades manually, as it swaps the apt sources from jammy to mantic (nautic), enabling the upgrade in one smooth procedure. Although upgrading across two releases at once is generally not recommended, it is quite safe here due to the very small number of installed packages.
  6. If you encounter a DNS problem during the distribution upgrade (we saw this on one install), the fix is to run:
     rm /etc/resolv.conf ; echo "nameserver 8.8.8.8" > /etc/resolv.conf
  7. Optionally, define the hostname, for example lo33uk.npg.io, if you want to create a DD node with a specific name. You might do this if a previous setup was using that name. Reboot to apply the hostname if needed.
  8. Next, run the main script to install the DD Node. Consider using tmux to protect against a potential SSH disconnection during the process. Then, in the directory where the script was downloaded, execute 'bash d'.
  9. Keep an eye on the on-screen logs for any errors. During the script's execution, 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 job to refresh before you can proceed.
  10. Monitor the script's progress, and fix or report any issues that appear.
  11. Execute the cleanup script found at /apps/dadesktop_npnode_deploy/modules/00-cleanup. This will remove many unnecessary packages and downgrade others.
  12. Run /apps/zabbix-agent/services/test-all.sh to check for any further issues.
  13. For any unmaintained packages, remove them using apt purge xxx, yyy. Also remove any broken links that are displayed.
  14. Finally, reboot and test the operation.
     

Testing the DD Node Post-Installation

  1. In the DaDesktop GUI, verify the new DD server entry and test it using tools like TPAPI.
  2. Within DaDesktop, set the start and expiry dates for the server and, if necessary, assign it to a datacenter.
  3. Confirm the new server's operation in Zabbix, and resolve any problems that surface.
  4. Validate by adding a Standalone instance to the server and running it.
  5. Allocate the server to a Datacenter if needed.
  6. Optionally, add Billing rules for the new server if they are required.
  7. If necessary, copy Operating System templates over to the server.
  8. Finally, if this server is intended for a specific course, inform the Trainer or Coordinator to use it.

 Enjoy!