setup for peers
This commit is contained in:
1 parent
b53ab9c854
commit
53e272367e
8 files changed
+73
-29
No files matched your search
@@ -8,6 +8,7 @@ let
|
||||
hermesCache = 5001;
|
||||
ollama = 11434;
|
||||
ds4 = 8000;
|
||||
tracker = 1984;
|
||||
};
|
||||
in
|
||||
{
|
||||
@@ -30,6 +31,8 @@ in
|
||||
hostAccess = [
|
||||
{ port = ports.ollama; }
|
||||
{ port = ports.ds4; }
|
||||
# Primary skyg-linux-tracker on this host (it consolidates the lab).
|
||||
{ port = ports.tracker; }
|
||||
];
|
||||
lanAccess = [
|
||||
{ address = "10.0.12.1"; port = 80; }
|
||||
@@ -39,8 +42,7 @@ in
|
||||
{ address = "10.0.101.3"; port = 8080; }
|
||||
{ address = "10.0.101.3"; port = 9102; }
|
||||
{ address = "10.0.101.8"; port = 3000; }
|
||||
# skyg-linux-tracker (REST + MCP) on every lab host.
|
||||
{ address = "10.0.0.0/16"; port = 1984; }
|
||||
|
||||
];
|
||||
publish = [
|
||||
{ hostPort = ports.hermes; guestPort = 8642; }
|
||||
|
||||
@@ -1,12 +1,33 @@
|
||||
{ config, ... }:
|
||||
{ config, lib, skyg-secrets, ... }:
|
||||
let
|
||||
# Hosts this primary tracker consolidates.
|
||||
peers = [ "minipc1" "minipc2" "minipc3" "bigbox1" "bigbox2" "terra1" ];
|
||||
secretName = peer: "linux-tracker-peer-${peer}";
|
||||
in
|
||||
{
|
||||
age.secrets = lib.genAttrs (map secretName peers) (name: {
|
||||
file = skyg-secrets.${name};
|
||||
owner = "root";
|
||||
mode = "0400";
|
||||
});
|
||||
|
||||
services.skyg-linux-tracker = {
|
||||
enable = true;
|
||||
bind = "0.0.0.0";
|
||||
openFirewall = true;
|
||||
docker.enable = config.virtualisation.docker.enable;
|
||||
# Reachable only by its lab FQDN; the short name does not resolve.
|
||||
allowedHosts = [ "fwdesk.lab.internal" ];
|
||||
# The Hermes VM reaches this host at 10.77.0.1.
|
||||
allowedHosts = [ "fwdesk.lab.internal" "10.77.0.1" ];
|
||||
# Primary: one endpoint for the whole lab (Hermes only talks to this one).
|
||||
peers = {
|
||||
enable = true;
|
||||
peers = lib.genAttrs peers (peer: {
|
||||
url = "http://${peer}.lab.internal:1984";
|
||||
tokenFile = config.age.secrets.${secretName peer}.path;
|
||||
# Trackers have no TLS; token travels in the clear on the lab LAN.
|
||||
allowPlainHttp = true;
|
||||
});
|
||||
};
|
||||
# OTLP out to the collector on minipc1.
|
||||
settings.otel = {
|
||||
enabled = true;
|
||||
|
||||
Reference in new issue
Block a user