Pair hosts when they start instead of in the installer

The installer only writes the controller URL and host name. Running the
host requests to join the cluster if it has not been approved yet, or if
the controller no longer accepts its token, and waits until an admin
approves it. Once approved it saves its id and token and starts as
normal. A rejected host exits with code 8.

clusteriohost run --user-token approves the host right away with the
token of a user allowed to approve hosts. The token is not saved.

This moves the pairing client into the host package, where it uses the
same certificate setup as the host's connection to the controller, and
removes --no-pair and the rerun handling from the installer.
This commit is contained in:
Danielv123 committed 2026-10-30 21:13:14 +01:00
1 parent 37e79d9c41
commit 4a49a198f0
25 files changed
+948 -1131

No files matched your search

@@ -114,7 +114,7 @@ function RevokeHostButton({ host, instances }: RevokeHostButtonProps) {
title={`Revoke access for ${host.name}?`}
description={<>
The host is removed from the cluster and disconnected.<br />
To add it back, run the installer again in its directory.
To add it back, start the host again and approve it.
</>}
placement="bottomRight"
okText="Revoke"
+5 -5
View File
@@ -116,8 +116,8 @@ function AddHostModal(props: { open: boolean, onClose: () => void }) {
width="800px"
>
<Typography.Paragraph>
Run the installer in an empty directory on the machine the host will run on.
It asks for a name for the host, then shows a code and waits for the request to be approved here.
Run the installer in an empty directory on the machine the host will run on, then start the host
with the run-host script. It shows a code and waits for the request to be approved here.
</Typography.Paragraph>
<div className="codeblock">
<CopyButton
@@ -132,12 +132,12 @@ function AddHostModal(props: { open: boolean, onClose: () => void }) {
</p>
</div>
<Typography.Paragraph>
Once approved the installer saves the connection details of the host and exits.
The host can then be started with the run-host script in that directory.
Once approved the host saves its connection details and starts up.
Later starts connect to the cluster straight away.
</Typography.Paragraph>
<Typography.Title level={5}>Waiting for approval</Typography.Title>
<Typography.Paragraph type="secondary">
Only approve a request if its code matches the code shown by the installer.
Only approve a request if its code matches the code shown by the host.
An approved host has full access to the cluster.
</Typography.Paragraph>
<Table