Installing new DaDesktop Server
Deploy DD Node on GTHost / Hetzner Server
The guidance below covers deploying a DaDesktop Node (Server) onto a bare metal Linux server, such as one from GTHost or Hetzner. Bear in mind these instructions may shift as the installation and deployment script evolves.
This presumes you’ve already purchased a server and intend to set it up with Ubuntu Jammy 22.04. If you’ve got the space with two or more disks, RAID0—striping—can be employed to accelerate disk access. With Hetzner, you’ll need to specify this via the 'installimage' process while booted in Rescue mode.
Preparation, installing the OS on a GTHost / Hetzner Server
- Begin by SSHing in with the supplied root credentials. Run 'apt update' followed by 'apt upgrade' to freshen all packages. Then perform an 'apt autoremove' to clear out any obsolete packages before the upgrade.
- For Hetzner, you’ll initially be in rescue mode. You’ll therefore need to define the distribution, software RAID (mdm), XFS, IPv4, and so on before rebooting and upgrading. As a rule, stick with the defaults for the small /boot and /boot/esp partitions using ext4 instead of XFS, and skip the swap partition—it’s not needed. Let the / partition use XFS and claim whatever disk space remains.
- With LeaseWeb or another provider, you’ll need to switch the main / filesystem from ext4 or btrfs to XFS. The notes here are just a rough guide; getting the / partition onto XFS is trickier than simply designating /bigdisk as XFS, because any filesystem alterations must be performed outside the operating system. Changing the / filesystem type whilst / is mounted isn’t straightforward or safe.
-
To create an XFS filesystem, lean on your supplier’s tool if one’s available—it’s far simpler. Otherwise, something like this from a rescue system will do:
mkfs.xfs -f /dev/mdx (this formats / with XFS, and -f forces the overwrite).
Note that we no longer carve out /bigdisk as a separate partition; it’s simply a directory under / these days. - Mount / as XFS outside the OS, either manually with mount -t xfs /dev/mdX / or via the hosting portal.
- If you’re 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 so systemd picks up changes to /etc/fstab.
- Execute mount -a to verify the partitions are created as expected, and check with df -T.
-
Reboot the machine.
Executing the DaDesktop Installation Script
- SSH into the server, e.g., svr@xxxxxxxxx.
- Install using the DaDesktop install script:
- curl http://npg.io/d > d
- At this stage, the base OS should be upgraded from 22.04 to the newest Ubuntu release—presently Ubuntu 23.10 Mantic, with Noble 24.04 on the horizon.
- The cleanest way to do this is by running the update-os script found in /apps/dadesktop_npnode_deploy/modules/00-upgrade-os. It’s far simpler than tackling the distribution upgrades manually, as it swaps the apt sources from jammy to mantic (or nautic) to handle the upgrade in a single pass. Even though skipping intermediate upgrades is normally frowned upon, it’s quite safe here because so few packages are installed.
-
If DNS stops working during the distro upgrade (we saw this once), fix it by running:
rm /etc/resolv.conf ; echo "nameserver 8.8.8.8" > /etc/resolv.conf - Optionally, set the hostname—for example, lo33uk.npg.io—if you fancy a specific DD node name, perhaps to reuse one previously set up. Reboot afterwards if a hostname change is needed.
- Next, we fire up the main script to install the DD node. To guard against a dropped SSH connection during the upgrade, consider using tmux. Then, from the directory where the script was downloaded, run 'bash d'.
- Keep an eye on the on‑screen log messages for any errors. During the script, the server’s IP will be automatically added to the NP access list, though you might need to wait a minute or two for the whitelist cron to refresh before you can carry on.
- Review the script’s progress, and sort out or flag any issues that crop up.
- Run the cleanup script at /apps/dadesktop_npnode_deploy/modules/00-cleanup. It strips out many unused packages and downgrades others.
- Execute /apps/zabbix-agent/services/test-all.sh to look for any further snags.
- For any unmaintained packages, remove them with apt purge xxx, yyy, and clear out any broken links that appear.
-
Then reboot and test that everything works as it should.
Verifying the DD Node Post-Installation
- Check the new DD server entry and test it—using something like test TPAPI—within the DaDesktop GUI.
- Set the start and expiry dates for the server inside DaDesktop, and assign it to a datacenter if needed.
- Verify the new server’s behaviour in Zabbix, and tidy up any issues that arise.
- Test it by adding a Standalone instance to the server and running it.
- Place the server into a Datacenter if that’s required.
- Optionally, set up billing rules for the new server if they’re needed.
- Copy over any Operating System templates to the server if necessary.
- If it’s meant for a specific course, make sure to inform the Trainer or Coordinator to use this particular server.
Cheers !