Day: April 21, 2021

Ubuntu 20.04 desktop for 24/7 Operation

Category : Uncategorized

Most computer systems are used as desktop devices that have a user at the keyboard, mouse and monitor. They are used for intermittent jobs which do not require continuous availability. We can call this office mode. The typical office use is to prepare documents, get information, keep track of operations, etc. Unavailability of the computer for a Windows 10 update or a three minute reboot is an annoying required trip to the coffee machine, but no disaster.

Radio Stations use computers the office mode to write copy, do billing, prepare proposals, record programs and spots, and maintain social media.

Other computers are used to “serve” applications, websites, streams, and other public facing interfaces. These are critical real time business processes. These servers often in the “cloud” – Server farms of thousands of computers configured with redundant, shared workspaces with each of the individual client services separated into individual virtual machines that exist in servers that have error correcting memory, redundant hard drives, duplicated power supplies, multiple independent Universal Power Supplies and multiple independent Heating Ventilating and Air Conditioning systems. If an individual piece of hardware fails, the server application can be re-spawned on another or several other physical computers in the cloud.

Sometimes a company will use a local server computer to provide centralized file storage for collaboration and organized storage. They may also have an application server to allow 10 copies of a program to be used by 30 employees (but only by 10 at a time The served applications can all be set up with identical default configurations so users all work with the same interface. Monthly software costs are limited if it only license as many “seats” as are likely to be used at the same time.

Radio Stations also use computers in ways that require 24/7 availability because they produce or deliver the product. Whether it is for program automation, audio store, program database, Studio Transmitter Links, program acquisition audio processing or Transmitter, antenna monitoring, these things are the lifeblood of the business. Any stoppage means a loss of listeners, revenue and reputation. A Uninterruptable Power System is needed, especially on a server or STL computers to be sure that any power failure will ride out any short power failures, ride out the period from a power failure until the generator stabilizes or produce an orderly shutdown with files properly closed.

One big difference between Windows systems and Linux systems is that while Windows supports multiple users and properly segregates their workspaces, it is designed to be used by a single user at a time. Linux systems can support a multiplicity of users with different roles. This allows a single computer to provide functionality to different aspects of an operation.

The use of Snaps or Flatpacks allows an application to be isolated from the libraries and drivers for other applications to avoid the common problems that occur when a system is upgraded and the version of the support libraries conflict, or between several applications that run on the computer one of which going awry could cause a failure that might take a station off air until the applications are rolled back to a previous state. Snaps and Flatpacks limit the resources available to their applications so there will be no conflicts in accessing databases system resources or devices on the computer.

Another strategy to separate functions is to establish virtual machines within one physical machine, (host() or even within several. Each virtual machine has its own operating system, libraries, and programs within a single physical computer. There are several designs to accomplish this. With a Ubuntu host I use KVM, Oracle Virtualbox works for nearly all Linux distributions and Windows. You can have a Ubuntu host which hosts several virtual machines, with one, for example running Centos, another Running Windows 10 and a third with Ubuntu Server, all performing different functions. These virtual machines can be started and stopped at will without disrupting the host. A good example of this is a server called a Certificate Authority

It is important, however to not put too many eggs in a single basket. One hardware failure can cause multiple systems to fail. It is wise to separate the machines that have servers connected to the internet from the machines on the station Local Area Network that run the automation or serve files, or databases..

That reliability requires much more than can be provided with desktop windows operating system. The Linux family of operating systems provides a much better solution than anything on a Windows or Mac platform. Standard Ubuntu desktop provides a very user friendly interface and “just keeps running” It is possible to set up a Ubuntu machine so that it will not upgrade files unless actively commanded by a physically present operator, and most upgrades do not require a reboot. (Kernel and other upgrades need rebooting to take advantage of the upgrade) Programs get the benefit of upgrades after all instances of the program have exited and the program is restarted. We have had computers running for a year or more without reboot that run Ubuntu or Centos.

It is a little tricky to set up an automatic 24/7 user for a linux box. A single user should runs the automation, the audio processor, the virtual console or the dozen other things needed full time operation in a radio station, it is important that user:

  • Automatically logs in at boot
  • Is immune from sleep and (probably) screen lock
  • Owns the 24/7 programs and daemons
  • Appears as an appliance instead of a computer, but has full access to GUI based programs needed for operations
  • Should not log out of its GUI Session , which can stop programs that must keep running.
  • Permit switch user, without actually logging out
  • Have a way to unlock a frozen X11 session

Modern Ubuntu and other Linux systems have a powerful tool for processes that must be running 24/7, called daemons. Systemd loads (in modern systems) and runs all the important daemons in the computer, like the printer daemon, the various hardware daemons, databases, etc. The various daemons can also be started, stopped and monitored using the systemctl command. You can start up your audio processor, your virtual console or anything else that should be started and kept running for a long time.

One very strong caveat: Try to get all the systems on your server machines running properly (without clunky workarounds) before you put it into production. You want to tune the system so it doesn’t need to be worked on after it has been fielded. It is good to have a development computer to test new versions of software, configurations or new systems so you don’t disrupt critical station systems.

It is also wise to keep one computer of each type in reserve to load and drop into service in the case of failure. Do not find yourself having to set up a server from scratch after a motherboard dies in a server computer. Just basic setup of a server from my “RadioSetupScripts.sh” program takes several hours of downloading and installing programs.