Setting Up a New DaDesktop Server
Deploying a DD Node on a GTHost or Hetzner Server
The following notes are meant to assist in setting up a DaDesktop Node (Server) on a bare-metal Linux server, such as those from GTHost or Hetzner. Keep in mind that these guidelines may evolve along with the installation and deployment script.
The process assumes you've already acquired a server and plan to install Ubuntu Jammy 22.04. If you have two or more disks and ample space, you might consider RAID0 (striping) to accelerate disk I/O. On Hetzner, this must be configured via the 'installimage' procedure while in Rescue mode.
Preparing and Installing the OS on a GTHost or Hetzner Server
- Start by SSHing in with the provided root credentials. Run 'apt update' and 'apt upgrade' to bring all packages current, then clean up with 'apt autoremove' to remove any unnecessary ones before proceeding.
- When working with Hetzner, the system initially boots into rescue mode. You'll need to specify your distribution preferences, software RAID (mdadm), XFS, IPv4 configuration, and the like before rebooting and upgrading. It's typical to go with the default layout for the tiny /boot and /boot/esp partitions, sticking with ext4 rather than XFS, and skip a swap partition since it's unnecessary. Let the root (/) partition take XFS and consume the remaining disk space.
- For providers like LeaseWeb, you'll have to switch the root filesystem from ext4 or btrfs to XFS. The notes that follow offer general direction, but getting the root partition onto XFS is trickier than simply creating a separate /bigdisk with XFS, because filesystem changes for / must happen outside the running OS—it's not safe to modify the filesystem type while it's mounted.
- To create an XFS filesystem, it's far easier to use your provider's tool if one exists. Otherwise, from the rescue environment, you might run: mkfs.xfs -f /dev/mdx (the -f forces the overwrite). Note that we no longer set up /bigdisk as its own partition—it's now simply a directory under /.
- Mount it with 'mount -t xfs /dev/mdX /' from outside the OS, or via the system portal.
- If you're still using a /bigdisk partition (which is now uncommon), add 'defaults,nofail 0 0' in /etc/fstab so the system can still boot even if that separate partition fails to mount.
- Run 'systemctl daemon-reload' to let systemd pick up the changes in /etc/fstab.
- Use 'mount -a' to verify partitions are set up correctly, then double‑check with 'df -T'.
-
Reboot the system.
Running the DaDesktop Installation Script
- SSH into the server, e.g., svr@xxxxxxxxx.
- Proceed with the DaDesktop install script:
- Download the script by running 'curl https://www.dadesktop.com/d > d'.
- Now, upgrade the base OS from 22.04 to the newest Ubuntu release—at the time of writing, that's Ubuntu 23.10 (Mantic), soon to be superseded by 24.04 (Noble).
- The easiest way is to use the 'update-os' script found at /apps/dadesktop_npnode_deploy/modules/00-upgrade-os. This automates the process by swapping apt sources from 'jammy' to 'mantic' (or 'nautic'), letting you jump to the new release in a single step rather than hopping through intermediate versions. Even though skipping releases is generally frowned upon, it's safe here because only a handful of packages are installed.
- Should DNS stop working during the upgrade (we've seen this happen once), fix it with: rm /etc/resolv.conf ; echo "nameserver 8.8.8.8" > /etc/resolv.conf.
- Optionally, assign a hostname, like lo33uk.npg.io, if you're aiming for a particular DD node name—maybe to reuse a previously configured identity. A reboot may be required to apply the hostname change.
- Then, execute the main installation script. To protect against SSH disconnections during the process, you might run it inside tmux. From the directory where you downloaded the script, simply enter 'bash d'.
- Keep an eye on the on‑screen messages for any errors. The script automatically adds the server's IP to the NP access list, but the whitelist cron job might need a minute or two to update before you can proceed.
- Monitor the script's progress, and resolve or report any issues as they arise.
- Run the cleanup script at /apps/dadesktop_npnode_deploy/modules/00-cleanup. It strips out many unneeded packages and rolls back certain ones.
- Execute /apps/zabbix-agent/services/test-all.sh to catch any remaining problems.
- Purge any orphaned packages with 'apt purge xxx, yyy', and eliminate broken symlinks that are reported.
-
Finally, reboot the server and verify everything works.
Testing the DD Node After Installation
- In the DaDesktop GUI, verify the new DD server entry and run tests against TPAPI and the like.
- Set start and expiration dates for the server in DaDesktop, and attach it to a datacenter if needed.
- Check how the new server appears in Zabbix and fix any anomalies.
- Validate it by deploying a Standalone instance and running it.
- If necessary, add the server to the appropriate Datacenter.
- Optionally, set up billing rules for the new server.
- Copy any required OS templates to the server.
- If this server is destined for a specific course, inform the trainer or coordinator.
Enjoy !
