nixos/cassandra: Set test VM IPs statically

This commit is contained in:
Daniel Schaefer 2019-04-23 05:03:41 +02:00
parent 545ac1820f
commit 2368345052

View file

@ -14,7 +14,13 @@ let
};
nodeCfg = ipAddress: extra: {pkgs, config, ...}:
{ environment.systemPackages = [ testPackage ];
networking.firewall.enable = false;
networking = {
firewall.allowedTCPPorts = [ 7000 7199 9042 ];
useDHCP = false;
interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [
{ address = ipAddress; prefixLength = 24; }
];
};
services.cassandra = cassandraCfg ipAddress // extra;
virtualisation.memorySize = 1024;
};