Bind consul on all interfaces to fix issues with nodes finding each other. Also expose traefik to make diagnostics of issues easier.
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
interface.bind = "${bind_interface}";
|
||||
interface.advertise = "${bind_interface}";
|
||||
extraConfig = {
|
||||
client_addr = "{{ GetPrivateInterfaces | exclude \"type\" \"ipv6\" | join \"address\" \" \" }} {{ GetAllInterfaces | include \"flags\" \"loopback\" | join \"address\" \" \" }}";
|
||||
%{if bootstrap ~}
|
||||
bootstrap_expect = 1;
|
||||
%{endif ~}
|
||||
@@ -98,14 +99,14 @@
|
||||
];
|
||||
|
||||
# Open ports in the firewall. 80/443 are for HTTP/HTTPS (terraform), 464X are the default ports for Nomad, 830X are the default ports for Consul.
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 4646 4647 4648 8300 8301 ];
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 8081 4646 4647 4648 8300 8301 ];
|
||||
networking.firewall.allowedUDPPorts = [ 8301 ];
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
system.copySystemConfiguration = true;
|
||||
|
||||
|
||||
# Defines the initial NixOS version for compatibility with older application data.
|
||||
# Do NOT change this value after installation without careful consideration.
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
Reference in New Issue
Block a user