Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 25 additions & 6 deletions tests/none-backend.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ let
boot.loader.grub.enable = false;
# Should NixOps fill in extraHosts for the "none" backend?
networking.extraHosts = "192.168.1.3 target2\n";
virtualisation.writableStore = true;
networking.firewall.enable = false;
};

target2 = target1;
Expand All @@ -35,8 +37,12 @@ let
target1 =
{ config, pkgs, ... }:
{ services.openssh.enable = true;
networking.firewall.enable = false;
users.extraUsers.root.openssh.authorizedKeys.keyFiles = [ ./id_test.pub ];
# Ugly again: Replicates assignIPAddresses from build-vms.nix.
networking.interfaces.eth1.ip4 = [ {
address = "192.168.1.2";
prefixLength = 24;
} ];
${optionalString (n == 1) ''
environment.systemPackages = [ pkgs.vim ];
''}
Expand All @@ -45,7 +51,10 @@ let
services.httpd.adminAddr = "e.dolstra@tudelft.nl";
''}
${optionalString (n == 3) ''
services.httpd.extraModules = ["proxy_balancer"];
services.httpd.extraModules = [
"proxy_balancer"
"lbmethod_byrequests"
];
services.httpd.extraConfig =
"
<Proxy balancer://cluster>
Expand All @@ -61,8 +70,12 @@ let
target2 =
{ config, pkgs, ... }:
{ services.openssh.enable = true;
networking.firewall.enable = false;
users.extraUsers.root.openssh.authorizedKeys.keyFiles = [ ./id_test.pub ];
# Ugly again: Replicates assignIPAddresses from build-vms.nix.
networking.interfaces.eth1.ip4 = [ {
address = "192.168.1.3";
prefixLength = 24;
} ];
${optionalString (n == 3) ''
services.httpd.enable = true;
services.httpd.adminAddr = "e.dolstra@tudelft.nl";
Expand All @@ -80,9 +93,15 @@ makeTest {
nodes =
{ coordinator =
{ config, pkgs, ... }:
{ environment.systemPackages =
[ nixops pkgs.stdenv pkgs.vim pkgs.apacheHttpd pkgs.busybox
pkgs.module_init_tools pkgs.perlPackages.ArchiveCpio ];
{ environment.systemPackages = [ nixops ];
# This is needed to make sure the coordinator can build the
# deployment without network availability.
environment.etc.nix-references.source = let

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use system.extraDependencies for this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good to know, going to fix this for #348 as well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be sure to also cherry-pick 370e928, which does the same for the Hetzner tests.

refs = [
pkgs.stdenv pkgs.vim pkgs.apacheHttpd pkgs.busybox
pkgs.module_init_tools pkgs.perlPackages.ArchiveCpio
];
in pkgs.writeText "refs" (concatStringsSep "\n" refs);
networking.firewall.enable = false;
virtualisation.writableStore = true;
};
Expand Down