implement uncloudd daemon that starts a WireGuard network without peer probing

This commit is contained in:
Pavel Sviderski
2024-08-26 17:09:54 +10:00
parent 222edb7647
commit e074b6855f
13 changed files with 347 additions and 145 deletions
+7
View File
@@ -144,10 +144,17 @@ func (c *Cluster) AddMachine(ctx context.Context, name, user, host string, port
if err != nil {
return "", fmt.Errorf("write machine config to %q: %w", mcfgPath, err)
}
fmt.Println("Machine config written to", mcfgPath)
// TODO: download and install the latest uncloudd binary by running the install shell script from GitHub.
// For now upload the binary using scp manually.
out, err := exec.Run(ctx, cmdexec.QuoteCommand(sudoPrefix, "systemctl", "restart", "uncloudd"))
if err != nil {
return "", fmt.Errorf("start uncloudd: %w: %s", err, out)
}
fmt.Println("uncloudd started")
connConfig := config.MachineConnection{
User: user,
Host: host,