FastX is a platform for creating, managing, and connecting to Virtual Display Sessions (sessions) on remote Linux systems. Multiple systems can be run individually as standalone systems, but the real power comes from when those systems are linked together into a cluster. Clusters allow administrators to centrally manage multiple systems, create single entry points into the cluster event behind a firewall, Load Balance systems to allow even distribution of work, and many other features simplifying and improving the user experience.
Installation
FastX 5 separates the cluster into 2 main components. The Cluster Manager and the FastX Nodes. The Cluster Manager is the “brain” that enables the the FastX Nodes to interact with each other. It also stores shared data (like logins) that are needed across the cluser.
The Cluster Manager consists of several parts. These parts include
- FastX 5 Advanced package — the advanced services that connect FastX Nodes together
- RLM license manager
- NATS Transporter — Messaging Bus for all services to communicate
Each part can be separated into its own system, however in practice it makes sense to bundle them together.
The FastX Nodes run the FastX Web server and are used to launch sessions. Each FastX Node can be configured to run a subset of services (For example, separating a Gateway Node as an access point from a Compute Node which runs a session). Configuring these nodes are discussed in FastX 5 Cluster Installation Patterns
Requirements
- FastX activation key
- FastX Advanced activation key
- RHEL 9 or higher
- Each Node needs its own $FX_LOCAL_DIR, and $FX_TEMP_DIR
- $FX_LOCAL_DIR may be mounted
- $FX_TEMP_DIR must not be mounted
Set up the Cluster Manager
Download and run the FastX repository installation script
Install the Advanced Packages
RHEL Based Systems
sudo dnf install -y fastx5-advanced rlm fastx-nats
Debian Based Systems
sudo apt install -y fastx5-advanced rlm fastx-nats
Activate the FastX and the FastX Advanced activation keys and put the files in /etc/fastx/license
See FastX License Registration for more details
Copy /etc/fastx/transporter-secret.ini to your compute nodes
Set up the FastX Nodess
Download and run the FastX repository installation script
RHEL Based Systems
sudo dnf install -y fastx5-server
Debian Based Systems
sudo apt install -y fastx5-server
Copy the /etc/fastx/transporter-secret.ini from the cluster manager and restart the server
chown fastx.fastx /etc/fastx/transporter-secret.ini
chmod 600 /etc/fastx/transporter-secret.ini
systemctl restart fastx4.service
Setup
Each system on the cluster is a node. Nodes are divided into 2 categories: Cluster nodes and Transporter nodes. Cluster nodes will do the work of the FastX cluser (authentication, launching sessions, web server endpoint etc). Transporter nodes provide the communication channels between services in the cluster.
You can install both a cluster node and a transporter node on the same system.
On every system
- Download and run the FastX repository installation script
- Enable the FastX 4 preview repository
- Enter your FastX Advanced activation key
Restricted Networks (no internet access)
The following packages are required to be installed on your system
- perl, xorg-x11-auth, openssh, nodejs
- On RedHat 8, the required version of nodejs is only available via the DNF module system, the nodejs:20 module is recommended.
- You can download the FastX packages from the repository to transfer to the private network
- YUM/DNF
- dnf download fastx4-server
- dnf download fastx4-nats
- DEB
- apt download fastx4-server
- apt download fastx4-nats
- YUM/DNF
NATS Transporter
The transporter uses the NATS protocol for fast and efficient transport.
The /etc/fastx/nats-server.conf file configures the NATS transporter.
The authorization token in /etc/fastx/nats-server.conf MUST MATCH the token in /etc/fastx/transporter-secret.ini
/etc/fastx/nats-server.conf
Here is a typical setup of /etc/fastx/nats-server.conf
authorization {
token: "$2a$11$PWIFAL8RsWyGI3jVZtO9Nu8.6jOxzxfZo7c/W0eLk017hjgUKWrhy"
}
# Client port of 4222 on all interfaces
port: 4222
authorization {
token: thisisasecret
}
tls {
cert_file: /etc/pki/tls/certs/fedora-self.nats.crt
key_file: /etc/pki/tls/private/fedora-self-key.nats.txt
}
# This is for clustering multiple servers together.
cluster {
# Route connections to be received on any interface on port 6222
port: 6222
# Routes are protected, so need to use them with --routes flag
authorization {
user: ruser
password: T0pS3cr3t
timeout: 2
}
# Routes are actively solicited and connected to from this server.
routes = [
nats://10.211.55.9:6222,
nats://10.211.55.4:6222,
nats://10.211.55.8:6222
]
}
NATS supports clustering and high availability. Edit the /etc/fastx/nats-server.conf to enable clustering according to the configuration documentation.
https://docs.nats.io/running-a-nats-service/configuration/clustering/cluster_config
https://docs.nats.io/running-a-nats-service/configuration/clustering
Cluster nodes
High availability is built in by default. Simply add more cluster nodes that are configured according to the nodes in Cluster Installation Patterns. The services will distribute the load evenly across the HA nodes.
Load Balancing
Load balancing distributes FastX Sessions across multiple compute nodes according to administrator setup. Load balancing is done via custom configuration scripts enabling an admin to balance according to his use case.
Job Scheduling
Job scheduling is the process of launching a session to be scheduled at a later time by a special job scheduling script. Instead of calling the default start script, the FastX launcher will call a job scheduler template or admin supplied custom script that will use a custom job scheduler to launch the session. The session will show up in a pending state on the user’s UI.
Long Term Storage and Configuration
$FX_CONFIG_DIR: /etc/fastx
The FastX configuration directory is located in /etc/fastx (or set via environment variable $FX_CONFIG_DIR). All files are stored in human readable flat file format. See FastX 5 Configuration
Each cluster member (Cluster Manager or FastX Node) maintains its own configuration directory /etc/fastx. Configuration in this directory is NOT synchronized across the cluster. It is up to the system administrators to maintain configuration.
Typically system admins use configuration management systems like Puppet, Ansible, and Kubernetes ConfigMaps/Secrets to maintain /etc/fastx
$FX_VAR_DIR: /var/fastx
Data that will be made by the FastX Web Server is stored in /var/fastx (or set via environment variable $FX_VAR_DIR). This data include user configuration, logins, and server data.
In a cluster, a FastX Node will write data to both its local /var/fastx as well as upload it to the Cluster Manager to store it in /var/fastx. When reading data, a FastX Node will query the Cluster Manager for the information.
$FX_LOCAL_DIR: /var/fastx-local
Data local to a specific FastX Node is stored in /var/fastx-local This data is private to the system itself and does not need to be shared
$FX_TEMP_DIR: /tmp
Interprocess communication needs a local directory that is available to both the fastx user and the end linux user. Typically this is /tmp.
Syncing Data Across Cluster Managers
In a High Availability Cluster, multiple Cluster Managers need to synchronize their /var/fastx directories. One solution is to use a shared /var/fastx mount across the cluster. FastX also can use a synchronization utility called syncthing which avoids the need for a shared /var/fastx direcory
FastX Nodes do not need to share their /var/fastx direcories