DaDesktop

Installing a New DaDesktop Server

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 set up with Ubuntu Jammy 22.04. Note the use of RAID0 i.e., Striping, can be used to speed up disk access if you have plenty of space with two or more disks. This needs to be defined in Hetzner with the 'installimage' process when in Rescue mode. 
 

Preparation and OS installation if using a GTHost / Hetzner server
 

Hetzner install
  1. Firstly ssh in using supplied root credentials, run 'apt update' and 'apt upgrade' to ensure all packages are up to date. Then run '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 the OS, as changing the / filesystem type cannot easily/safely be done when / is mounted.
  4. To create an xfs filesystem, use the supplier's tool if available, as it's much easier. Otherwise, something like the following from the 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 directory under / instead.
  5. mount -t xfs /dev/mdX / outside the OS, or use the 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 that the partitions are created as required, then check with df -T
  9. Reboot

     

Running of DaDesktop Installation Script

 

  1. ssh to the server i.e., svr@xxxxxxxxx
  2. Install via DaDesktop install 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, i.e., currently Ubuntu 23.10 Mantic, soon to be Ubuntu 24.04 Noble.
  5. This is best done using the update-os script located in /apps/dadesktop_npnode_deploy/modules/00-upgrade-os . This is easier than performing the distribution upgrades manually, and replaces the apt sources from jammy to mantic (nautic), to allow the upgrade in a single procedure, not several. NB, although it's usually bad practice to upgrade through two versions 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 a distribution upgrade (we did for one installation), to fix the DNS issue:
     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, 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 a possible broken SSH connection during the upgrade; then, within the current directory where the script has been downloaded, run 'bash d'
  9. Check the 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 be updated before you can continue.
  10. Review the script's progress, and fix or report any issues that arise.
  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/test-all.sh to check for any further issues.
  13. For any unmaintained packages, remove them using apt purge xxx, yyy. Remove any broken links shown.
  14. Then reboot, and test operation.
     

Testing DD Node after Installation

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

 Enjoy!