add ekman
This commit is contained in:
@@ -7,20 +7,21 @@ let
|
||||
pkgs = import <nixpkgs> {};
|
||||
|
||||
etcdNodes = {
|
||||
c0-0 = "10.255.240.200";
|
||||
c0-1 = "10.255.240.201";
|
||||
ekman = "10.255.241.8";
|
||||
nsf0-0 = "10.255.241.9";
|
||||
bee0-0 = "10.255.241.10";
|
||||
};
|
||||
|
||||
etcdCluster = {
|
||||
enable = true;
|
||||
existing = false;
|
||||
existing = true;
|
||||
nodes = etcdNodes;
|
||||
};
|
||||
|
||||
nodes =
|
||||
with builtins;
|
||||
let nodes = genList (n: n + 1) 1; in
|
||||
map (n: ({ name = "c0-${toString n}"; address = "10.255.240.20${toString n}"; })) nodes;
|
||||
map (n: ({ name = "c0-${toString n}"; address = "10.255.241.${toString (n + 10)}"; })) nodes;
|
||||
|
||||
ekman = {
|
||||
# deployment.tags = [ "frontend" ];
|
||||
@@ -35,16 +36,16 @@ let
|
||||
|
||||
features = {
|
||||
host = {
|
||||
address = "10.255.240.200";
|
||||
name = "c0-0";
|
||||
address = "10.255.241.8";
|
||||
name = "ekman";
|
||||
};
|
||||
|
||||
os = {
|
||||
externalInterface = "eno1";
|
||||
externalInterface = "enp33s0f0np0";
|
||||
nfs.enable = true;
|
||||
nfs.exports = ''
|
||||
/exports 10.255.240.0/24(insecure,rw,sync,no_subtree_check,crossmnt,fsid=0,no_root_squash)
|
||||
/exports 10.255.241.0/24(insecure,rw,sync,no_subtree_check,crossmnt,fsid=0,no_root_squash)
|
||||
/exports 10.255.243.0/24(insecure,rw,sync,no_subtree_check,crossmnt,fsid=0,no_root_squash)
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -106,28 +107,28 @@ let
|
||||
interfaces.enp33s0f0np0 = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [ {
|
||||
address = "10.255.240.200";
|
||||
address = "10.255.241.8";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
};
|
||||
# interfaces.enp33s0f0np1 = {
|
||||
# useDHCP = false;
|
||||
# ipv4.addresses = [ {
|
||||
# address = "10.1.61.100";
|
||||
# prefixLength = 24;
|
||||
# } ];
|
||||
# };
|
||||
# interfaces.ibp59s0 = {
|
||||
# useDHCP = false;
|
||||
# ipv4.addresses = [ {
|
||||
# address = "10.255.241.200";
|
||||
# prefixLength = 24;
|
||||
# } ];
|
||||
interfaces.enp33s0f0np1 = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [ {
|
||||
address = "10.255.242.2";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
};
|
||||
defaultGateway = "10.255.240.1";
|
||||
interfaces."ibp1s0.3666" = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [ {
|
||||
address = "10.255.243.8";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
};
|
||||
defaultGateway = "10.255.241.1";
|
||||
firewall.extraCommands = ''
|
||||
iptables -I INPUT -s 10.255.241.0/24 -j ACCEPT
|
||||
iptables -t nat -A POSTROUTING -s 10.255.241.0/24 -j MASQUERADE
|
||||
iptables -I INPUT -s 10.255.243.0/24 -j ACCEPT
|
||||
iptables -t nat -A POSTROUTING -s 10.255.243.0/24 -j MASQUERADE
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -161,7 +162,7 @@ let
|
||||
};
|
||||
|
||||
nix.extraOptions = ''
|
||||
secret-key-files = /etc/nix/ekman.private
|
||||
secret-key-files = /etc/nix/ekman.key
|
||||
'';
|
||||
|
||||
services.xserver = {
|
||||
@@ -255,7 +256,7 @@ let
|
||||
|
||||
fileSystems = {
|
||||
"/frontend" = {
|
||||
device = "10.255.240.200:/home";
|
||||
device = "10.255.241.8:/home";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"soft"
|
||||
@@ -286,7 +287,7 @@ let
|
||||
|
||||
mkCompute = host:
|
||||
let
|
||||
ipoib = builtins.replaceStrings [".240."] [".241."] host.address;
|
||||
ipoib = builtins.replaceStrings [".241."] [".243."] host.address;
|
||||
hw = ./hw + "/${host.name}.nix";
|
||||
in {
|
||||
"${host.name}" = {
|
||||
@@ -298,7 +299,6 @@ let
|
||||
};
|
||||
|
||||
node = {
|
||||
i40efix = true;
|
||||
};
|
||||
|
||||
networking = {
|
||||
@@ -309,20 +309,20 @@ let
|
||||
address = host.address;
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
# ipv4.routes = [ {
|
||||
# address = "10.1.62.2";
|
||||
# prefixLength = 32;
|
||||
# via = "10.1.61.100";
|
||||
# } ];
|
||||
ipv4.routes = [ {
|
||||
address = "10.255.242.2";
|
||||
prefixLength = 32;
|
||||
via = "10.1.241.8";
|
||||
} ];
|
||||
|
||||
};
|
||||
# interfaces.ibp65s0 = {
|
||||
# useDHCP = false;
|
||||
# ipv4.addresses = [ {
|
||||
# address = ipoib;
|
||||
# prefixLength = 24;
|
||||
# } ];
|
||||
# };
|
||||
interfaces."ibp1s0.3666" = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [ {
|
||||
address = ipoib;
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
};
|
||||
};
|
||||
imports = [ ./cluster.nix hw ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user