fix: unify ekman c0 and c0x

This commit is contained in:
Jonas Juselius
2025-09-27 15:57:11 +02:00
parent e6cf1f6232
commit 680330d569
11 changed files with 6 additions and 155 deletions

View File

@@ -11,7 +11,6 @@ let
compute = {
deployment.tags = [ "compute" "c0" ];
};
mkCompute = host:
@@ -39,8 +38,8 @@ let
name = host.name;
address = host.address;
};
os.externalInterface = "enp33s0f0np0";
hpc.compute = true;
os.externalInterface = host.iface;
hpc.computeNode = true;
hpc.knem = true;
# k8s = { inherit etcdCluster; };
};
@@ -54,7 +53,7 @@ let
networking = {
hostName = host.name;
useDHCP = false;
interfaces.enp33s0f0np0 = {
interfaces."${host.iface}" = {
useDHCP = false;
ipv4.addresses = [ {
address = host.address;

View File

@@ -1,9 +1,10 @@
with builtins;
let
nodes = genList (n: n + 1) 16; in
nodes = genList (n: n + 1) 18; in
map (n: (
rec {
idx = 100 + n;
iface = if n > 16 then "enp33s0f3np3" else "enp33s0f0np0";
name = "c0-${toString n}";
address = "10.255.241.${toString idx}";
ipoib = "10.255.243.${toString idx}";

View File

@@ -1 +0,0 @@
q丘

View File

@@ -1,88 +0,0 @@
{ pkgs ? import <nixpkgs> {} }:
let
# Pin the deployment package-set to a specific version of nixpkgs
# pkgs = import (builtins.fetchTarball {
# url = "https://github.com/NixOS/nixpkgs/archive/e6377ff35544226392b49fa2cf05590f9f0c4b43.tar.gz";
# sha256 = "1fra9wwy5gvj5ibayqkzqpwdf715bggc0qbmrfch4fghwvl5m70l";
# }) {};
# pkgs = import <nixpkgs> {};
nodes = import ./nodes.nix;
compute = {
deployment.tags = [ "compute" "c0" ];
};
mkCompute = host:
let
hw = ./hardware-configuration.d + "/${host.name}.nix";
in {
"${host.name}" = {
cluster = {
compute = true;
k8sNode = true;
mounts = {
rdma.enable = true;
automount.enable = true;
users = true;
opt = true;
work = true;
data = false;
backup = false;
ceph = false;
};
};
features = {
host = {
name = host.name;
address = host.address;
};
os.externalInterface = "enp33s0f0np0";
hpc.compute = true;
hpc.knem = true;
# k8s = { inherit etcdCluster; };
};
deployment.targetHost = host.address;
# services.udev.extraRules = ''
# KERNEL=="ibp1s0", SUBSYSTEM=="net", ATTR{create_child}:="0x7666"
# '';
networking = {
hostName = host.name;
useDHCP = false;
interfaces.enp33s0f3np3 = {
useDHCP = false;
ipv4.addresses = [ {
address = host.address;
prefixLength = 24;
} ];
ipv4.routes = [ {
address = "10.255.242.0";
prefixLength = 24;
via = "10.255.241.100";
} ];
};
# interfaces."ibp1s0.7666" = {
interfaces."ibp1s0" = {
useDHCP = false;
ipv4.addresses = [ {
address = host.ipoib;
prefixLength = 24;
} ];
};
};
imports = [
hw
../default.nix
../mounts.nix
# ./kernel.nix
];
}
// compute;
};
in builtins.foldl' (a: n: a // mkCompute n) {} nodes

View File

@@ -1,48 +0,0 @@
{pkgs, lib, ...}:
let
kernel = pkgs.linuxPackages.kernel;
i40e =
pkgs.stdenv.mkDerivation rec {
name = "i40e-${version}-${kernel.version}";
version = "2.13.10";
src = pkgs.fetchFromGitHub {
owner = "dmarion";
repo = "i40e";
rev = "7228a7c3b362c3170baa2f9a9c6870a900e78dbd";
sha256 = "087kvq9wrc1iw6vig8cqcx7cb6346wx8qxzb85c3n8638vq1vrxr";
};
hardeningDisable = [ "pic" ];
configurePhase = ''
cd src
kernel_version=${kernel.modDirVersion}
sed -i -e 's|/lib/modules|${kernel.dev}/lib/modules|' Makefile
sed -i -e 's|/lib/modules|${kernel.dev}/lib/modules|' common.mk
export makeFlags="BUILD_KERNEL=$kernel_version"
'';
installPhase = ''
install -v -D -m 644 i40e.ko "$out/lib/modules/$kernel_version/kernel/drivers/net/i40e/i40e2.ko"
'';
dontStrip = true;
enableParallelBuilding = true;
meta = {
description = "Linux kernel drivers for Intel Ethernet adapters and LOMs (LAN On Motherboard)";
homepage = https://github.com/dmarion/i40e;
license = lib.licenses.gpl2;
};
};
in
{
# i40e2 = i40e;
boot.kernelPackages = pkgs.linuxKernel.packages.linux_5_10;
# overlay = self: super: {
# linuxPackages_5_4 = super.linuxPackages_5_4 // { inherit i40e; };
# };
}

View File

@@ -1,11 +0,0 @@
with builtins;
let
nodes = genList (n: n + 17) 2; in
map (n: (
rec {
idx = 100 + n;
name = "c0-${toString n}";
address = "10.255.241.${toString idx}";
ipoib = "10.255.243.${toString idx}";
pubkey = ./. + "/ssh_host_key.d/c0-${toString n}.pub";
})) nodes

View File

@@ -17,9 +17,8 @@ let
login = import ./login { inherit pkgs; };
c0 = import ./c0 { inherit pkgs; };
c0x = import ./c0x { inherit pkgs; };
c1 = import ./c1 { inherit pkgs; };
fs-work = import ./fs-work { inherit pkgs; };
fs-backup = import ./fs-backup { inherit pkgs; };
in
{ inherit ekman-manage; frontend = ekman-manage; } // login // c0 // c0x // c1 // fs-work // fs-backup
{ inherit ekman-manage; frontend = ekman-manage; } // login // c0 // c1 // fs-work // fs-backup