Installing 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. Kindly note that these notes are subject to change as the installation and deploy script evolves.
This assumes a server has already been purchased and will be set up with Ubuntu Jammy 22.04. Please note that using RAID0 (i.e., striping) can speed up disk access if you have sufficient space with two or more disks. This needs to be defined in Hetzner using the 'installimage' process while in Rescue mode.
Preparation and OS Installation if Using GTHost / Hetzner Server
- First, SSH in using the supplied root credentials. Run 'apt update' and then 'apt upgrade' to ensure all packages are up to date. Afterwards, run 'apt autoremove' to get rid of any obsolete packages before upgrading.
- If using Hetzner, you will be booted into rescue mode, so you will need to define the distribution requirements, software RAID (mdm), xfs, IPv4, etc., before rebooting and upgrading. Typically, accept the defaults for small /boot and /boot/esp partitions using ext4 (not xfs), and do not create a swap partition as it is not required. Allow the / partition to use xfs and utilise the remaining disk space.
- If using LeaseWeb or another provider, you will need to change the main / filesystem to xfs instead of ext4 or btrfs. The notes below serve as a guide; however, ensuring the / partition uses xfs is more involved than simply defining /bigdisk to use xfs, as any filesystem changes must be performed outside the OS. Changing the / filesystem type when / is mounted is not easily or safely done.
-
To create the xfs filesystem, use the supplier's tool if available, as it is much easier. Otherwise, from the rescue system, use something like:
mkfs.xfs -f /dev/mdx (this formats with xfs; the -f flag forces the overwrite).
N.B.: We no longer define /bigdisk as a separate partition; it is now simply a directory under /. - mount -t xfs /dev/mdX / from outside the OS, or use the system portal to do this.
- If using a /bigdisk partition (which is now generally not done), use the options defaults,nofail 0 0 in /etc/fstab to allow the system to boot even if the separate /bigdisk partition is not mounted successfully.
- Run systemctl daemon-reload to let systemd reload /etc/fstab.
- Execute mount -a to check that the partitions are created as required, and verify using df -T.
-
Reboot the system.
Running the DaDesktop Installation Script
- SSH to the server, i.e., svr@xxxxxxxxx
- Install via the DaDesktop install script.
- curl https://www.dadesktop.com/d > d
- 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.
- This is best done using the script called update-os, located in /apps/dadesktop_npnode_deploy/modules/00-upgrade-os. This method is easier than performing the distribution upgrades manually, and it replaces the apt sources from jammy to mantic (nautic), allowing the upgrade in a single procedure rather than several. N.B.: Although it is generally not recommended to upgrade through two releases at once, it is quite safe here due to the very small number of packages installed.
-
If you encounter a DNS issue during the distribution upgrade (we did for one install), you can resolve it as follows:
rm /etc/resolv.conf ; echo "nameserver 8.8.8.8" > /etc/resolv.conf - Optionally, set the hostname (e.g., lo33uk.npg.io) if you wish to create a DD node with a specific name, perhaps one that was previously set up and you want to reuse. Reboot if necessary to apply the hostname.
- Next, run the main script to install the DD Node. Optionally, use tmux to mitigate possible broken SSH connections during the upgrade. Then, within the current directory where the script has been downloaded, run 'bash d'.
- Monitor the on-screen messages for any errors. During the script execution, the server IP will be automatically added to the NP access list. You may need to wait for a couple of minutes for the whitelist cron to be updated before proceeding.
- Review the script's progress, and fix or report any issues that arise.
- Run the cleanup script: /apps/dadesktop_npnode_deploy/modules/00-cleanup. This script removes many unused packages and downgrades others.
- Run /apps/zabbix-agent/services/test-all.sh to check for any further issues.
- For any unmaintained packages, remove them using apt purge xxx, yyy. Also, remove any broken links shown.
-
Then reboot and test the operation.
Testing DD Node after Installation
- Check the new DD server entry and test it with TPAPI, etc., in the DaDesktop GUI.
- Add start and expiry dates for the server in DaDesktop, and add to the data centre if required.
- Verify the new server's operation in Zabbix and clean up any issues if required.
- Test by adding a Standalone session to the server and running it.
- Add the server to the data centre if needed.
- Optionally, add billing rules for the new server if required.
- Copy Operating System templates to the server if required.
- If necessary, alert the Trainer/Coordinator to use this particular server if it is meant for a specific course.
Enjoy!
