Deploying a New DaDesktop Server
Setting Up a DD Node on GTHost or Hetzner
The following guidelines assist with installing a DaDesktop Node (Server) on a bare metal Linux server from GTHost, Hetzner, or comparable providers. Keep in mind that these instructions might evolve alongside updates to the installation and deployment scripts.
It is presumed a server has been acquired and will run Ubuntu Jammy 22.04. RAID0 (striping) can enhance disk performance if you have two or more disks and sufficient space. This configuration must be set up using the 'installimage' process while in Rescue mode on Hetzner.
Preparing and Installing the OS on GTHost / Hetzner
- Start by SSHing into the server with the provided root credentials, then run 'apt update' and 'apt upgrade' to bring all packages current. Afterwards, execute 'apt autoremove' to clean up any obsolete packages prior to upgrading.
- On Hetzner, the server boots into rescue mode, so you must specify the distribution settings, software RAID (mdm), XFS, IPv4, and so on before rebooting and upgrading. Typically, keep the default small /boot and /boot/esp partitions on ext4 (not XFS) and skip the swap partition since it's unnecessary. Allocate the / partition to XFS and assign the remaining disk space to it.
- For LeaseWeb or other providers, you may need to switch the main / filesystem to XFS instead of ext4 or btrfs. The following steps are a general reference; making sure the / partition uses XFS is more complex than simply defining a separate /bigdisk with XFS, because filesystem modifications must occur outside the OS—altering / while it's mounted is not straightforward or safe.
-
To create an XFS filesystem, leverage the provider’s tool if available—it's simpler. Otherwise, from the rescue system, run a command like:
mkfs.xfs -f /dev/mdx (this formats / as XFS, with -f forcing overwrite).
Note: we no longer set up /bigdisk as a separate partition; it’s now merely a directory under /. - Mount the XFS filesystem with: mount -t xfs /dev/mdX / from outside the OS, or use the provider’s portal for this.
- If employing a /bigdisk partition (now uncommon), add the 'defaults,nofail 0 0' options in /etc/fstab so the system boots even if that partition fails to mount.
- Execute systemctl daemon-reload so systemd re-reads /etc/fstab
- Run mount -a to verify partitions are set up correctly, then confirm with df -T
-
Reboot the server.
Executing the DaDesktop Installation Script
- SSH into the server, e.g., svr@xxxxxxxxx
- Install using the DaDesktop script:
- Run: curl https://www.dadesktop.com/d > d
- Now, upgrade the base OS from 22.04 to the latest Ubuntu release—presently Ubuntu 23.10 Mantic, soon to be 24.04 Noble.
- Preferably, use the update-os script found at /apps/dadesktop_npnode_deploy/modules/00-upgrade-os. This streamlines the process over manual distro upgrades by swapping the apt sources from jammy to mantic (nautic), enabling a single-step upgrade. Although leaping multiple releases at once is typically discouraged, it’s safe here because very few packages are installed.
-
Should DNS fail during the distro upgrade (as we experienced once), fix it with:
rm /etc/resolv.conf ; echo "nameserver 8.8.8.8" > /etc/resolv.conf - Optionally, assign a hostname (e.g., lo33uk.npg.io) if you want a specific identifier for the DD node, perhaps reusing a previously configured name. Reboot afterwards to apply the hostname if needed.
- Then execute the main installation script for the DD Node. Consider using tmux to avoid disruption if the SSH connection drops, and from the directory where the script was downloaded, run 'bash d'.
- Monitor the on-screen logs for errors. During 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 to refresh before proceeding.
- Examine the script’s output and address or report any issues that arise.
- Launch the cleanup script at /apps/dadesktop_npnode_deploy/modules/00-cleanup, which strips away many unused packages and downgrades a few others.
- Execute /apps/zabbix-agent/services/test-all.sh to detect any remaining problems.
- If there are unmaintained packages, remove them with apt purge xxx, yyy. Also delete any broken symbolic links that appear.
-
Finally, reboot and verify that everything works correctly.
Testing the DD Node Post‑Installation
- In the DaDesktop GUI, verify the new DD server entry and test using TPAPI or similar methods.
- Set the start and expiry dates for the server in DaDesktop, and assign it to a datacenter if necessary.
- Confirm the new server appears and operates correctly in Zabbix, resolving any problems if they crop up.
- Run a test by attaching a Standalone instance to the server and launching it.
- If needed, add the server to the appropriate datacenter.
- Optionally, configure billing rules for the new server.
- If needed, copy operating system templates to the server.
- When relevant, notify the trainer or coordinator to utilise this specific server for a designated course.
Enjoy !
