Compare commits

...

3 commits

4 changed files with 4 additions and 2 deletions

View file

@ -25,7 +25,7 @@ in
bind_addr = hl.ipv4; bind_addr = hl.ipv4;
ports.serf_lan = hl.port; ports.serf_lan = hl.port;
retry_join = map (hostName: hostLinks.${hostName}.consul.tuple) (cfg.otherNodes.agent hostName); retry_join = map (hostName: hostLinks.${hostName}.consul.tuple) (cfg.otherNodes.agent hostName);
bootstrap_expect = builtins.length cfg.nodes.agent; bootstrap_expect = 3;
addresses.http = config.links.consulAgent.ipv4; addresses.http = config.links.consulAgent.ipv4;
ports.http = config.links.consulAgent.port; ports.http = config.links.consulAgent.port;
}; };

View file

@ -60,6 +60,7 @@ in
enable = true; enable = true;
deps = [ "consul" "acme-client" "patroni" ]; deps = [ "consul" "acme-client" "patroni" ];
settings = ./test.nix; settings = ./test.nix;
availableNodes = cfg.nodes.authoritative;
}; };
}; };

View file

@ -13,6 +13,7 @@
enable = true; enable = true;
deps = [ "nginx" "acme-client" "dns" "certificates" "consul" ]; deps = [ "nginx" "acme-client" "dns" "certificates" "consul" ];
settings = ./simulacrum/test.nix; settings = ./simulacrum/test.nix;
availableNodes = lib.take 3 config.services.ways.nodes.host;
}; };
}; };

View file

@ -20,7 +20,7 @@ in
}; };
}; };
} }
(lib.genAttrs cluster.config.services.ways.nodes.host (lib.const { (lib.genAttrs cluster.config.services.ways.simulacrum.availableNodes (lib.const {
services.nginx.upstreams.nowhere.servers = { services.nginx.upstreams.nowhere.servers = {
"${(builtins.head config.nodes.nowhere.networking.interfaces.eth1.ipv4.addresses).address}:8080" = {}; "${(builtins.head config.nodes.nowhere.networking.interfaces.eth1.ipv4.addresses).address}:8080" = {};
}; };