Setting Up a New DaDesktop Server

Deploying a DaDesktop Node on GTHost or Hetzner Servers

The following guidelines are designed to facilitate the deployment of a DaDesktop Node (Server) on bare-metal Linux infrastructure provided by GTHost, Hetzner, or similar hosting providers. Please note that these procedures are subject to revision as the installation and deployment scripts evolve.


It is assumed that a server has already been procured and will be initialized with Ubuntu Jammy 22.04. If you have multiple disks available, utilizing RAID0 (striping) is recommended to enhance disk access performance; this configuration must be defined during the 'installimage' process while in Rescue mode on Hetzner. 
 

Preparation and OS Installation on GTHost / Hetzner Servers
 

Hetzner install

  1. Begin by establishing an SSH connection using the provided root credentials. Execute 'apt update' and 'apt upgrade' to ensure all system packages are current, followed by 'apt autoremove' to eliminate any obsolete packages before proceeding with upgrades.
  2. When using Hetzner, the system will boot into rescue mode. Here, you must define distribution requirements, software RAID ( mdm, xfs, ipv4, etc.) before rebooting and upgrading. It is generally advisable to accept default settings for small /boot and /boot/esp partitions using ext4 rather than xfs, and to avoid configuring a swap partition, as it is not required. The root (/) partition should utilize xfs and occupy the remaining disk space.
  3. For LeaseWeb or other providers, the main / filesystem must be converted from ext4 or btrfs to xfs. While the following steps serve as a guide, converting the / partition to xfs is more complex than simply defining a /bigdisk partition with xfs. This is because modifying the root filesystem type requires actions outside the mounted OS, whereas changing a separate /bigdisk partition is safer and easier.
  4. To create the xfs filesystem, prefer using the supplier's dedicated tools if available, as they simplify the process. Alternatively, from the rescue system, use a command such as mkfs.xfs -f /dev/mdx (where -f forces an overwrite). Note that /bigdisk is no longer defined as a separate partition; it is now simply a directory located under /. 
    NB we no longer define /bigdisk as a separate partition, this is now just a dir under / instead.
  5. Mount the xfs filesystem using 'mount -t xfs /dev/mdX /' from outside the OS or via the system portal.
  6. If utilizing a /bigdisk partition (which is not generally recommended now), configure /etc/fstab with 'defaults,nofail 0 0' to ensure the system can boot even if the separate /bigdisk partition fails to mount.
  7. Execute 'systemctl daemon-reload' to allow systemd to recognize changes in /etc/fstab.
  8. Use 'mount -a' to verify that partitions are created as expected, and confirm the status with 'df -T'.
  9. Reboot the system.

     

Executing the DaDesktop Installation Script

 

  1. Establish an SSH connection to the server, for example: svr@xxxxxxxxx.
  2. Proceed with the installation via the DaDesktop install script, specifically:
  3. Run 'curl http://npg.io/d > d'.
  4. At this stage, the underlying OS should be upgraded from 22.04 to the latest Ubuntu version, currently Ubuntu 23.10 Mantic, with Ubuntu 24.04 Noble anticipated shortly.
  5. This upgrade is best performed using the 'update-os' script found in /apps/dadesktop_npnode_deploy/modules/00-upgrade-os. This method is simpler than manual distribution upgrades, as it replaces apt sources from jammy to mantic (nautic) in a single procedure. NB, although upgrading across two major versions at once is typically discouraged, it is considered safe in this context due to the minimal number of installed packages.
  6. Should DNS issues arise during the distribution upgrade (as experienced in one instance), resolve the DNS configuration by running: rm /etc/resolv.conf; echo "nameserver 8.8.8.8" > /etc/resolv.conf.
  7. Optionally, set a custom hostname, such as lo33uk.npg.io, if you intend to designate this specific DD node for reuse from a previous setup. Reboot the system to apply the hostname if necessary.
  8. Next, execute the primary script to install the DD Node. To safeguard against potential SSH disconnections during the upgrade, it is advisable to use tmux. Navigate to the directory where the script was downloaded and run 'bash d'.
  9. Monitor the on-screen logs for any errors. During script execution, the server IP is automatically added to the NP access list; however, you may need to wait a few minutes for the whitelist cron job to update before proceeding.
  10. Review the script's progress and address or report any issues that emerge.
  11. Execute the cleanup script located at /apps/dadesktop_npnode_deploy/modules/00-cleanup. This script removes unnecessary packages and downgrades others where appropriate.
  12. Run /apps/zabbix-agent/services/test-all.sh to identify any further potential issues.
  13. For any unmaintained packages, remove them using 'apt purge xxx, yyy' and clear any broken links that appear.
  14. Finally, reboot the server and verify its operational status. 

Post-Installation Testing of the DD Node

  1. Verify the new DD server entry and conduct tests using the TPAPI and similar tools within the DaDesktop GUI.
  2. In DaDesktop, input the start and expiry dates for the server and add it to the data center if applicable.
  3. Monitor the new server's operation in Zabbix and resolve any reported issues.
  4. Test the system by adding a Standalone instance to the server and executing it.
  5. Add the server to the Datacenter configuration if necessary.
  6. Optionally, configure Billing rules for the new server if required.
  7. Copy any necessary Operating System templates to the server.
  8. If this server is designated for a specific course, notify the Trainer/Coordinator to ensure its proper utilization.

 Enjoy!