Nodes

A node is a machine that runs the work of a workspace. Midair reaches it over SSH. Open Nodes to see the list.

Add a node

The node wizard asks for three things: an address, a login, and an authentication method. It then opens a connection and reports what the node answers, so you see a wrong value before you leave the wizard.

The password that you type in the wizard does not go into the node record. It becomes an entry in the secret store, and the node holds a reference to it. See Credentials.

Roles

A role says what work the node accepts:

Analysis

The node runs analysis runs. Midair deploys the analyser there.

Testing

The node runs test suites.

Monitoring relay

The node forwards the reports of monitored devices.

Configuration

Name

The name that every list and picker shows.

Tags

Space-separated labels for filtering and grouping.

FQDN

The host name or the address of the node.

Port

The SSH port. Midair uses 22 when the field is empty.

Analyzer port

The port that the analyser listens on. Midair uses 5700 when the field is empty. Change it when another program on that machine already holds the port.

Credential

The password or the SSH key that opens the node.

Proxy jump

An optional bastion host, in the form user@bastion[:port] or an SSH alias. It maps to ssh -J. The bastion must accept key-based authentication.

SSH variables

One KEY=value pair per line. Midair sets them in the environment of the commands that it runs on the node.

Notes

Free text.

Analyser build

A node with the analysis role needs an analyser build. Midair selects it from the registry by architecture and operating system, and it takes the newest upload. An explicit distribution path in the node configuration replaces that choice. See Distributions.

Test connection

Each row in the node list has a Test connection button. It opens an SSH connection and reports the answer of the node.

Two switches change what the probe does:

SSH keyless (jump-only)

The node is reachable, but it accepts no login for this user. Midair uses it only as a proxy jump target. It skips the probe and the key upload.

Skip Test connection probe

The probe always reports success without contacting the host. Use it when the host blocks probes of this kind.

Engine integration

The switch Add to Engine host list makes Midair manage an SSH configuration entry for the node.

With the switch on, Midair does three things:

  1. It generates an SSH key pair for the node.

  2. It copies the public half to the host, with the stored login and password.

  3. It writes a block for the host into the SSH configuration file. The default path is ~/.ssh/config.

With the switch off, and on deletion of the node, Midair removes the remote line and the local key pair.

Local nodes

A node whose address is this machine is a local node. The addresses that count as local are localhost, 127.0.0.1, ::1 and host.docker.internal.

A local node gets a working copy for each run. Midair makes a detached git worktree of the cached clone under $HOME/.cache/midair/runs/<kind>-<id>, and it pins the copy to the commit that the run was prepared on. Two runs of one workspace, or a run and an analysis, or two branches, no longer build and log over each other. Midair keeps the eight newest copies and removes the rest before the next run.

The analyser follows the same rule. On a local node each analysis starts an analyser of its own, and stops it when the analysis ends. On a remote node the analyses share one analyser.

A workspace that names a source path but no repository cannot be copied this way. It runs in place.

Locks

A lock tells Midair and other people that a node is in use. The panel Nodes at the bottom of the sidebar shows each node and its lock: who holds it, why, and for how long.

A test run or an analysis locks its node when it starts and releases the lock when it stops. The lock names the run and the user that started it. A run that Midair starts itself, from a schedule or from a webhook, holds the lock in the name of Midair.

If a different holder already locks the node, the run does not start. The run fails with the name of the holder.

The switch Lock the node while running is on a test run, an analysis and their templates. It is on by default. Turn it off for runs that can share the node.

To lock a node by hand, click the open lock in its row. To release a lock, click the closed lock. Any user can release any lock, so Midair asks for a confirmation first. If a run holds the lock, the run continues without it.

Midair keeps the locks in the database of item, the lab inventory tool that is installed on the portal. A person who locks a node with item on the portal also stops the runs. Each node has a record md-n<id>-<name> there, and Midair adds, renames and removes these records when the nodes change. When item is not installed, the panel says that locking is off and the runs start without locks.