summaryrefslogtreecommitdiffstats
path: root/nixos/tests/cassandra.nix
diff options
context:
space:
mode:
authorDaniel Schaefer <git@danielschaefer.me>2019-04-23 05:03:41 +0200
committerDaniel Schaefer <git@danielschaefer.me>2019-06-13 04:36:41 +0200
commit2368345052adcf0076628ff7a732cc99c017a2c3 (patch)
treeb63ba14c6a1a06ca68b2d69280996e73ce476be1 /nixos/tests/cassandra.nix
parent545ac1820fcf556949f60f968e843759e5b1225b (diff)
nixos/cassandra: Set test VM IPs statically
Diffstat (limited to 'nixos/tests/cassandra.nix')
-rw-r--r--nixos/tests/cassandra.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/nixos/tests/cassandra.nix b/nixos/tests/cassandra.nix
index 6779a0172dbd..eab757b80a54 100644
--- a/nixos/tests/cassandra.nix
+++ b/nixos/tests/cassandra.nix
@@ -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;
};