Deploy DD Node on GTHost / Hetzner Server

The notes below are provided to help with deploying a DaDesktop Node (Server) on a GTHost or Hetzner or other similar bare metal Linux server. Note these notes are liable to change as the installation and deploy script changes.

This assumes that a server has already been purchased and will be setup with Ubuntu Jammy 22.04. Note the use of RAID0 ie, Striping, can be used to speed up disk access if you have plenty of space with two disks or more. This needs to be defined in Hetzner with 'installimage' process when in Rescue mode. 

Preparation, install of OS if using GTHost / Hetzner Server

Hetzner install

  1. Firstly ssh in using supplied root credentials, do 'apt update', 'apt upgrade' to ensure all packages are up to date. Then do a 'apt autoremove' to get rid of any obsolete packages before upgrading.
  2. If using Hetzner, you will be booted in rescue mode, so will need to define the distro requirements, software raid -  mdm, xfs, ipv4 etc before rebooting and upgrading. Generally accept the defaults for small /boot and /boot/esp partitions using ext4 and not using xfs, and do not use swap partition as it's not required. Allow / partition to use xfs and use the rest of the diskspace.
  3. If using LeaseWeb or other provider you will need to change the main / filesystem to use xfs instead of ext4 or btrfs. Notes below are just a guide, however, setting up to ensure / partition uses xfs is harder than just defining /bigdisk to use xfs, as any filesystem changes need to then be done outside of the OS, as changing the / filesystem type cannot easily/safely be done when / is mounted.
  4. To create xfs filesystem, use supplier tool if at all available as much easier to use. Otherwise something like the below from rescue system,
    mkfs.xfs -f /dev/mdx (this formats with xfs /, and -f is used to force the overwrite). 
    NB we no longer define /bigdisk as a separate partition, this is now just a dir 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 > 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" > /etc/resolv.conf
  7. Optionally, set the hostname, eg 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/ 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 !