Installing a new DaDesktop Server
Deploy DD Node on GTHost / Hetzner Server
These notes are provided to assist with deploying a DaDesktop Node (Server) on a GTHost, Hetzner, or other similar bare metal Linux server. Please note these notes may change as the installation and deployment script evolves.
We assume you have already purchased a server and are setting it up with Ubuntu Jammy 22.04. Note that RAID0 (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's 'installimage' process when in Rescue mode.
Preparation: install the OS if using a GTHost / Hetzner Server
- First, SSH in using the supplied root credentials, run 'apt update' and 'apt upgrade' to ensure all packages are up to date. Then run 'apt autoremove' to remove any obsolete packages before upgrading.
- If using Hetzner, you'll be booted into rescue mode, so you'll 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 (not xfs), and don't use a swap partition as it's not required. Allow the / partition to use xfs and the rest of the disk space.
- If using LeaseWeb or another provider, you'll need to change the main / filesystem to use xfs instead of ext4 or btrfs. The notes below are just a guide; however, ensuring that / uses xfs is harder than simply defining /bigdisk to use xfs, as any filesystem changes must then be done outside the OS – changing the / filesystem type cannot easily or safely be done when / is mounted.
-
To create an xfs filesystem, use a supplier tool if available, as it's much easier. Otherwise, from the rescue system you could use something like:
mkfs.xfs -f /dev/mdx (this formats / with xfs, and -f forces the overwrite).
NB: we no longer define /bigdisk as a separate partition; it's now just a directory under / instead. - mount -t xfs /dev/mdX / outside the OS, or use the system portal to do this.
- If using a /bigdisk partition (which is not generally done now), add defaults,nofail 0 0 in /etc/fstab to allow the system to boot even if the separate /bigdisk partition isn't mounted successfully.
- Run systemctl daemon-reload to let systemd reload /etc/fstab.
- Run mount -a, then check the partitions are created as required; verify with df -T.
-
Reboot
Running the DaDesktop Installation Script
- SSH into the server, i.e., svr@xxxxxxxxx
- Install via the DaDesktop install script, i.e.,
- 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 is easier than performing the dist upgrades by hand and replaces the apt sources from jammy to mantic (nautic), allowing the upgrade in a single procedure rather than several. Note: although it's usually bad practice to upgrade through two releases at once, it's quite safe here because only a very small number of packages are installed.
-
If you encounter a problem with DNS not working during the distro upgrade (we did for one install), to fix the DNS issue:
rm /etc/resolv.conf ; echo "nameserver 8.8.8.8" > /etc/resolv.conf - Optionally, set the hostname, e.g., lo33uk.npg.io, if you want to create a DD node with a specific name, perhaps one that had been previously set up and you wish to reuse. Reboot to set the hostname if necessary.
- Next, run the main script to install the DD Node. Optionally, use tmux to guard against a possible broken SSH connection during the upgrade. Then, in the current directory where the script was downloaded, run 'bash d'.
- 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 update before you can continue.
- 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 a lot of 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. Remove any broken links shown.
-
Then reboot, and test operation.
Testing DD Node after Installation
- Check the new dd server entry and test with test TPAPI etc., in the DaDesktop GUI.
- Add start and expiry dates for the server in DaDesktop, and add to a data centre if required.
- Check the operation of the new server in Zabbix, and clean up any issues if required.
- Test by adding a Standalone to the server and running it.
- Add the server to a Data Centre if required.
- Optionally, if required, add billing rules for the new server.
- Copy Operating System templates to the server if required.
- If necessary, alert the Trainer/Coordinator to use this particular server, if it's intended for a particular course.
Enjoy!
