From ba5f1b8add4c85c08570a6b56718f991d5d7019c Mon Sep 17 00:00:00 2001 From: Jonas Juselius Date: Fri, 12 Sep 2025 12:53:56 +0200 Subject: [PATCH] wip: convert ekman to new cluster sturcture (not complete) --- cluster/hosts.nix | 83 ------------------- ekman.nix | 25 ++++++ {cluster => ekman}/bin/adduser.sh | 0 .../bin/copy-hardware-configuration.sh | 0 {cluster => ekman}/bin/deploy.sh | 0 {cluster => ekman}/bin/initca.sh | 0 {cluster => ekman}/bin/reboot.sh | 0 {cluster => ekman}/bin/ssh.sh | 0 {cluster => ekman}/bin/teardown.sh | 0 {cluster => ekman}/c0/connauthfile | 0 {cluster => ekman}/c0/default.nix | 2 +- .../c0/hardware-configuration.d}/c0-1.nix | 0 .../c0/hardware-configuration.d}/c0-10.nix | 0 .../c0/hardware-configuration.d}/c0-11.nix | 0 .../c0/hardware-configuration.d}/c0-12.nix | 0 .../c0/hardware-configuration.d}/c0-13.nix | 0 .../c0/hardware-configuration.d}/c0-14.nix | 0 .../c0/hardware-configuration.d}/c0-15.nix | 0 .../c0/hardware-configuration.d}/c0-16.nix | 0 .../c0/hardware-configuration.d}/c0-2.nix | 0 .../c0/hardware-configuration.d}/c0-3.nix | 0 .../c0/hardware-configuration.d}/c0-4.nix | 0 .../c0/hardware-configuration.d}/c0-5.nix | 0 .../c0/hardware-configuration.d}/c0-6.nix | 0 .../c0/hardware-configuration.d}/c0-7.nix | 0 .../c0/hardware-configuration.d}/c0-8.nix | 0 .../c0/hardware-configuration.d}/c0-9.nix | 0 {cluster => ekman}/c0/kernel.nix | 0 {cluster => ekman}/c0/nodes.nix | 2 +- .../c0/ssh_host_key.d}/c0-1.pub | 0 .../c0/ssh_host_key.d}/c0-10.pub | 0 .../c0/ssh_host_key.d}/c0-11.pub | 0 .../c0/ssh_host_key.d}/c0-12.pub | 0 .../c0/ssh_host_key.d}/c0-13.pub | 0 .../c0/ssh_host_key.d}/c0-14.pub | 0 .../c0/ssh_host_key.d}/c0-15.pub | 0 .../c0/ssh_host_key.d}/c0-16.pub | 0 .../c0/ssh_host_key.d}/c0-2.pub | 0 .../c0/ssh_host_key.d}/c0-3.pub | 0 .../c0/ssh_host_key.d}/c0-4.pub | 0 .../c0/ssh_host_key.d}/c0-5.pub | 0 .../c0/ssh_host_key.d}/c0-6.pub | 0 .../c0/ssh_host_key.d}/c0-7.pub | 0 .../c0/ssh_host_key.d}/c0-8.pub | 0 .../c0/ssh_host_key.d}/c0-9.pub | 0 {cluster => ekman}/c0x/connauthfile | 0 {cluster => ekman}/c0x/default.nix | 2 +- .../c0x/hardware-configuration.d}/c0-17.nix | 0 .../c0x/hardware-configuration.d}/c0-18.nix | 0 {cluster => ekman}/c0x/kernel.nix | 0 {cluster => ekman}/c0x/nodes.nix | 2 +- .../c0x/ssh_host_key.d}/c0-17.pub | 0 .../c0x/ssh_host_key.d}/c0-18.pub | 0 {cluster => ekman}/c1/connauthfile | 0 {cluster => ekman}/c1/default.nix | 2 +- .../c1/hardware-configuration.d}/c1-1.nix | 0 .../c1/hardware-configuration.d}/c1-2.nix | 0 .../c1/hardware-configuration.d}/c1-3.nix | 0 .../c1/hardware-configuration.d}/c1-4.nix | 0 .../c1/hardware-configuration.d}/c1-5.nix | 0 .../c1/hardware-configuration.d}/c1-6.nix | 0 .../c1/hardware-configuration.d}/c1-7.nix | 0 .../c1/hardware-configuration.d}/c1-8.nix | 0 {cluster => ekman}/c1/kernel.nix | 0 {cluster => ekman}/c1/nodes.nix | 2 +- .../c1/ssh_host_key.d}/c1-1.pub | 0 .../c1/ssh_host_key.d}/c1-2.pub | 0 .../c1/ssh_host_key.d}/c1-3.pub | 0 .../c1/ssh_host_key.d}/c1-4.pub | 0 .../c1/ssh_host_key.d}/c1-5.pub | 0 .../c1/ssh_host_key.d}/c1-6.pub | 0 .../c1/ssh_host_key.d}/c1-7.pub | 0 .../c1/ssh_host_key.d}/c1-8.pub | 0 cluster/cluster.nix => ekman/default.nix | 30 +++---- {cluster => ekman}/etcdCluster.nix | 0 {cluster => ekman}/fs-backup/default.nix | 0 .../fs-backup/hardware-configuration.nix | 0 .../fs-backup/ssh_host_key.pub | 0 {cluster => ekman}/fs-work/default.nix | 0 .../fs-work/hardware-configuration.nix | 0 .../fs-work/ssh_host_key.pub | 0 ekman/hosts.nix | 83 +++++++++++++++++++ {cluster/ekman => ekman/login}/default.nix | 8 +- .../login}/hardware-configuration.nix | 0 .../ekman.pub => ekman/login/ssh_host_key.pub | 0 configuration.nix => ekman/manage/default.nix | 24 +++--- .../manage/hardware-configuration.nix | 0 frontend.pub => ekman/manage/ssh_host_key.pub | 0 {cluster => ekman}/mounts.nix | 8 +- {cluster => ekman}/munge.key | 0 {cluster => ekman}/myvnc.nix | 0 {cluster => ekman}/overlays.nix | 0 {cluster => ekman}/users.nix | 0 hive.nix | 25 ------ nixos | 2 +- 95 files changed, 150 insertions(+), 150 deletions(-) delete mode 100644 cluster/hosts.nix create mode 100644 ekman.nix rename {cluster => ekman}/bin/adduser.sh (100%) rename {cluster => ekman}/bin/copy-hardware-configuration.sh (100%) rename {cluster => ekman}/bin/deploy.sh (100%) rename {cluster => ekman}/bin/initca.sh (100%) rename {cluster => ekman}/bin/reboot.sh (100%) rename {cluster => ekman}/bin/ssh.sh (100%) rename {cluster => ekman}/bin/teardown.sh (100%) rename {cluster => ekman}/c0/connauthfile (100%) rename {cluster => ekman}/c0/default.nix (97%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-1.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-10.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-11.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-12.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-13.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-14.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-15.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-16.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-2.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-3.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-4.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-5.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-6.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-7.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-8.nix (100%) rename {cluster/c0/hw => ekman/c0/hardware-configuration.d}/c0-9.nix (100%) rename {cluster => ekman}/c0/kernel.nix (100%) rename {cluster => ekman}/c0/nodes.nix (78%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-1.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-10.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-11.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-12.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-13.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-14.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-15.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-16.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-2.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-3.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-4.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-5.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-6.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-7.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-8.pub (100%) rename {cluster/c0/pubkeys => ekman/c0/ssh_host_key.d}/c0-9.pub (100%) rename {cluster => ekman}/c0x/connauthfile (100%) rename {cluster => ekman}/c0x/default.nix (97%) rename {cluster/c0x/hw => ekman/c0x/hardware-configuration.d}/c0-17.nix (100%) rename {cluster/c0x/hw => ekman/c0x/hardware-configuration.d}/c0-18.nix (100%) rename {cluster => ekman}/c0x/kernel.nix (100%) rename {cluster => ekman}/c0x/nodes.nix (78%) rename {cluster/c0x/pubkeys => ekman/c0x/ssh_host_key.d}/c0-17.pub (100%) rename {cluster/c0x/pubkeys => ekman/c0x/ssh_host_key.d}/c0-18.pub (100%) rename {cluster => ekman}/c1/connauthfile (100%) rename {cluster => ekman}/c1/default.nix (98%) rename {cluster/c1/hw => ekman/c1/hardware-configuration.d}/c1-1.nix (100%) rename {cluster/c1/hw => ekman/c1/hardware-configuration.d}/c1-2.nix (100%) rename {cluster/c1/hw => ekman/c1/hardware-configuration.d}/c1-3.nix (100%) rename {cluster/c1/hw => ekman/c1/hardware-configuration.d}/c1-4.nix (100%) rename {cluster/c1/hw => ekman/c1/hardware-configuration.d}/c1-5.nix (100%) rename {cluster/c1/hw => ekman/c1/hardware-configuration.d}/c1-6.nix (100%) rename {cluster/c1/hw => ekman/c1/hardware-configuration.d}/c1-7.nix (100%) rename {cluster/c1/hw => ekman/c1/hardware-configuration.d}/c1-8.nix (100%) rename {cluster => ekman}/c1/kernel.nix (100%) rename {cluster => ekman}/c1/nodes.nix (83%) rename {cluster/c1/pubkeys => ekman/c1/ssh_host_key.d}/c1-1.pub (100%) rename {cluster/c1/pubkeys => ekman/c1/ssh_host_key.d}/c1-2.pub (100%) rename {cluster/c1/pubkeys => ekman/c1/ssh_host_key.d}/c1-3.pub (100%) rename {cluster/c1/pubkeys => ekman/c1/ssh_host_key.d}/c1-4.pub (100%) rename {cluster/c1/pubkeys => ekman/c1/ssh_host_key.d}/c1-5.pub (100%) rename {cluster/c1/pubkeys => ekman/c1/ssh_host_key.d}/c1-6.pub (100%) rename {cluster/c1/pubkeys => ekman/c1/ssh_host_key.d}/c1-7.pub (100%) rename {cluster/c1/pubkeys => ekman/c1/ssh_host_key.d}/c1-8.pub (100%) rename cluster/cluster.nix => ekman/default.nix (91%) rename {cluster => ekman}/etcdCluster.nix (100%) rename {cluster => ekman}/fs-backup/default.nix (100%) rename {cluster => ekman}/fs-backup/hardware-configuration.nix (100%) rename cluster/fs-backup/fs-backup.pub => ekman/fs-backup/ssh_host_key.pub (100%) rename {cluster => ekman}/fs-work/default.nix (100%) rename {cluster => ekman}/fs-work/hardware-configuration.nix (100%) rename cluster/fs-work/fs-work.pub => ekman/fs-work/ssh_host_key.pub (100%) create mode 100644 ekman/hosts.nix rename {cluster/ekman => ekman/login}/default.nix (98%) rename {cluster/ekman => ekman/login}/hardware-configuration.nix (100%) rename cluster/ekman/ekman.pub => ekman/login/ssh_host_key.pub (100%) rename configuration.nix => ekman/manage/default.nix (95%) rename hardware-configuration.nix => ekman/manage/hardware-configuration.nix (100%) rename frontend.pub => ekman/manage/ssh_host_key.pub (100%) rename {cluster => ekman}/mounts.nix (96%) rename {cluster => ekman}/munge.key (100%) rename {cluster => ekman}/myvnc.nix (100%) rename {cluster => ekman}/overlays.nix (100%) rename {cluster => ekman}/users.nix (100%) delete mode 100644 hive.nix diff --git a/cluster/hosts.nix b/cluster/hosts.nix deleted file mode 100644 index 76f170d..0000000 --- a/cluster/hosts.nix +++ /dev/null @@ -1,83 +0,0 @@ -'' - 10.255.242.2 ekman-gw ekman-gw.compute.local ekman-gw.cluster.local - 10.255.242.3 front-gw front-gw.compute.local front-gw.cluster.local - - 10.255.241.90 fs-work fs-work.compute.local - 10.255.241.90 nfs1 nfs1.compute.local - 10.255.241.90 fs1 fs1.compute.local - 10.255.241.80 fs-backup fs-backup.compute.local - 10.255.241.80 fs2 fs2.compute.local - 10.255.241.100 ekman ekman.compute.local ekman.cluster.local - 10.255.241.100 etcd0 etcd0.compute.local - 10.255.241.80 etcd1 etcd1.compute.local - 10.255.241.90 etcd2 etcd2.compute.local - 10.255.241.99 frontend frontend.compute.local frontend.cluster.local - 10.255.243.99 ibfrontend ibfrontend.compute.local ibfrontend.cluster.local - - 10.255.241.101 c0-1 c0-1.compute.local - 10.255.241.102 c0-2 c0-2.compute.local - 10.255.241.103 c0-3 c0-3.compute.local - 10.255.241.104 c0-4 c0-4.compute.local - 10.255.241.105 c0-5 c0-5.compute.local - 10.255.241.106 c0-6 c0-6.compute.local - 10.255.241.107 c0-7 c0-7.compute.local - 10.255.241.108 c0-8 c0-8.compute.local - 10.255.241.109 c0-9 c0-9.compute.local - 10.255.241.110 c0-10 c0-10.compute.local - 10.255.241.111 c0-11 c0-11.compute.local - 10.255.241.112 c0-12 c0-12.compute.local - 10.255.241.113 c0-13 c0-13.compute.local - 10.255.241.114 c0-14 c0-14.compute.local - 10.255.241.115 c0-15 c0-15.compute.local - 10.255.241.116 c0-16 c0-16.compute.local - 10.255.241.117 c0-17 c0-17.compute.local - 10.255.241.118 c0-18 c0-18.compute.local - - 10.255.241.121 c1-1 c1-1.compute.local - 10.255.241.122 c1-2 c1-2.compute.local - 10.255.241.123 c1-3 c1-3.compute.local - 10.255.241.124 c1-4 c1-4.compute.local - 10.255.241.125 c1-5 c1-5.compute.local - 10.255.241.126 c1-6 c1-6.compute.local - 10.255.241.127 c1-7 c1-7.compute.local - 10.255.241.128 c1-8 c1-8.compute.local - - 10.255.243.90 ibfs-work ibfs-work.compute.local - 10.255.243.90 ibnfs1 ibnfs1.compute.local - 10.255.243.90 ibfs1 ibfs1.compute.local - 10.255.243.80 ibfs-backup ibfs-backup.compute.local - 10.255.243.80 ibfs2 ibfs2.compute.local - 10.255.243.100 ibekman ibekman.compute.local - 10.255.243.100 ibetcd0 ibetcd0.compute.local - 10.255.243.80 ibetcd1 ibetcd1.compute.local - 10.255.243.90 ibetcd2 ibetcd2.compute.local - - 10.255.243.101 ib0-1 ib0-1.compute.local - 10.255.243.102 ib0-2 ib0-2.compute.local - 10.255.243.103 ib0-3 ib0-3.compute.local - 10.255.243.104 ib0-4 ib0-4.compute.local - 10.255.243.105 ib0-5 ib0-5.compute.local - 10.255.243.106 ib0-6 ib0-6.compute.local - 10.255.243.107 ib0-7 ib0-7.compute.local - 10.255.243.108 ib0-8 ib0-8.compute.local - 10.255.243.109 ib0-9 ib0-9.compute.local - 10.255.243.110 ib0-10 ib0-10.compute.local - 10.255.243.111 ib0-11 ib0-1.compute.local - 10.255.243.112 ib0-12 ib0-12.compute.local - 10.255.243.113 ib0-13 ib0-13.compute.local - 10.255.243.114 ib0-14 ib0-14.compute.local - 10.255.243.115 ib0-15 ib0-15.compute.local - 10.255.243.116 ib0-16 ib0-16.compute.local - 10.255.243.117 ib0-17 ib0-17.compute.local - 10.255.243.118 ib0-18 ib0-18.compute.local - 10.255.243.118 ib0-18 ib0-19.compute.local - - 10.255.243.121 ib1-1 ib1-1.compute.local - 10.255.243.122 ib1-2 ib1-2.compute.local - 10.255.243.123 ib1-3 ib1-3.compute.local - 10.255.243.124 ib1-4 ib1-4.compute.local - 10.255.243.125 ib1-5 ib1-5.compute.local - 10.255.243.126 ib1-6 ib1-6.compute.local - 10.255.243.127 ib1-7 ib1-7.compute.local - 10.255.243.128 ib1-8 ib1-8.compute.local -'' diff --git a/ekman.nix b/ekman.nix new file mode 100644 index 0000000..4576084 --- /dev/null +++ b/ekman.nix @@ -0,0 +1,25 @@ +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 {}; + + ekman-manage = { + deployment = { + tags = [ "manage" "ekman" ]; + allowLocalDeployment = true; + targetHost = null; + }; + imports = [ ./ekman/manage ]; + }; + + ekman-login = import ./ekman/login { inherit pkgs; }; + c0 = import ./ekman/c0 { inherit pkgs; }; + c0x = import ./ekman/c0x { inherit pkgs; }; + c1 = import ./ekman/c1 { inherit pkgs; }; + fs-work = import ./ekman/fs-work { inherit pkgs; }; + fs-backup = import ./ekman/fs-backup { inherit pkgs; }; +in + { inherit ekman-manage; } // ekman-login // c0 // c0x // c1 // fs-work // fs-backup diff --git a/cluster/bin/adduser.sh b/ekman/bin/adduser.sh similarity index 100% rename from cluster/bin/adduser.sh rename to ekman/bin/adduser.sh diff --git a/cluster/bin/copy-hardware-configuration.sh b/ekman/bin/copy-hardware-configuration.sh similarity index 100% rename from cluster/bin/copy-hardware-configuration.sh rename to ekman/bin/copy-hardware-configuration.sh diff --git a/cluster/bin/deploy.sh b/ekman/bin/deploy.sh similarity index 100% rename from cluster/bin/deploy.sh rename to ekman/bin/deploy.sh diff --git a/cluster/bin/initca.sh b/ekman/bin/initca.sh similarity index 100% rename from cluster/bin/initca.sh rename to ekman/bin/initca.sh diff --git a/cluster/bin/reboot.sh b/ekman/bin/reboot.sh similarity index 100% rename from cluster/bin/reboot.sh rename to ekman/bin/reboot.sh diff --git a/cluster/bin/ssh.sh b/ekman/bin/ssh.sh similarity index 100% rename from cluster/bin/ssh.sh rename to ekman/bin/ssh.sh diff --git a/cluster/bin/teardown.sh b/ekman/bin/teardown.sh similarity index 100% rename from cluster/bin/teardown.sh rename to ekman/bin/teardown.sh diff --git a/cluster/c0/connauthfile b/ekman/c0/connauthfile similarity index 100% rename from cluster/c0/connauthfile rename to ekman/c0/connauthfile diff --git a/cluster/c0/default.nix b/ekman/c0/default.nix similarity index 97% rename from cluster/c0/default.nix rename to ekman/c0/default.nix index 0a103fb..69b3b0d 100644 --- a/cluster/c0/default.nix +++ b/ekman/c0/default.nix @@ -35,7 +35,7 @@ let mkCompute = host: let - hw = ./hw + "/${host.name}.nix"; + hw = ./hardware-configuration.d + "/${host.name}.nix"; in { "${host.name}" = { cluster = { diff --git a/cluster/c0/hw/c0-1.nix b/ekman/c0/hardware-configuration.d/c0-1.nix similarity index 100% rename from cluster/c0/hw/c0-1.nix rename to ekman/c0/hardware-configuration.d/c0-1.nix diff --git a/cluster/c0/hw/c0-10.nix b/ekman/c0/hardware-configuration.d/c0-10.nix similarity index 100% rename from cluster/c0/hw/c0-10.nix rename to ekman/c0/hardware-configuration.d/c0-10.nix diff --git a/cluster/c0/hw/c0-11.nix b/ekman/c0/hardware-configuration.d/c0-11.nix similarity index 100% rename from cluster/c0/hw/c0-11.nix rename to ekman/c0/hardware-configuration.d/c0-11.nix diff --git a/cluster/c0/hw/c0-12.nix b/ekman/c0/hardware-configuration.d/c0-12.nix similarity index 100% rename from cluster/c0/hw/c0-12.nix rename to ekman/c0/hardware-configuration.d/c0-12.nix diff --git a/cluster/c0/hw/c0-13.nix b/ekman/c0/hardware-configuration.d/c0-13.nix similarity index 100% rename from cluster/c0/hw/c0-13.nix rename to ekman/c0/hardware-configuration.d/c0-13.nix diff --git a/cluster/c0/hw/c0-14.nix b/ekman/c0/hardware-configuration.d/c0-14.nix similarity index 100% rename from cluster/c0/hw/c0-14.nix rename to ekman/c0/hardware-configuration.d/c0-14.nix diff --git a/cluster/c0/hw/c0-15.nix b/ekman/c0/hardware-configuration.d/c0-15.nix similarity index 100% rename from cluster/c0/hw/c0-15.nix rename to ekman/c0/hardware-configuration.d/c0-15.nix diff --git a/cluster/c0/hw/c0-16.nix b/ekman/c0/hardware-configuration.d/c0-16.nix similarity index 100% rename from cluster/c0/hw/c0-16.nix rename to ekman/c0/hardware-configuration.d/c0-16.nix diff --git a/cluster/c0/hw/c0-2.nix b/ekman/c0/hardware-configuration.d/c0-2.nix similarity index 100% rename from cluster/c0/hw/c0-2.nix rename to ekman/c0/hardware-configuration.d/c0-2.nix diff --git a/cluster/c0/hw/c0-3.nix b/ekman/c0/hardware-configuration.d/c0-3.nix similarity index 100% rename from cluster/c0/hw/c0-3.nix rename to ekman/c0/hardware-configuration.d/c0-3.nix diff --git a/cluster/c0/hw/c0-4.nix b/ekman/c0/hardware-configuration.d/c0-4.nix similarity index 100% rename from cluster/c0/hw/c0-4.nix rename to ekman/c0/hardware-configuration.d/c0-4.nix diff --git a/cluster/c0/hw/c0-5.nix b/ekman/c0/hardware-configuration.d/c0-5.nix similarity index 100% rename from cluster/c0/hw/c0-5.nix rename to ekman/c0/hardware-configuration.d/c0-5.nix diff --git a/cluster/c0/hw/c0-6.nix b/ekman/c0/hardware-configuration.d/c0-6.nix similarity index 100% rename from cluster/c0/hw/c0-6.nix rename to ekman/c0/hardware-configuration.d/c0-6.nix diff --git a/cluster/c0/hw/c0-7.nix b/ekman/c0/hardware-configuration.d/c0-7.nix similarity index 100% rename from cluster/c0/hw/c0-7.nix rename to ekman/c0/hardware-configuration.d/c0-7.nix diff --git a/cluster/c0/hw/c0-8.nix b/ekman/c0/hardware-configuration.d/c0-8.nix similarity index 100% rename from cluster/c0/hw/c0-8.nix rename to ekman/c0/hardware-configuration.d/c0-8.nix diff --git a/cluster/c0/hw/c0-9.nix b/ekman/c0/hardware-configuration.d/c0-9.nix similarity index 100% rename from cluster/c0/hw/c0-9.nix rename to ekman/c0/hardware-configuration.d/c0-9.nix diff --git a/cluster/c0/kernel.nix b/ekman/c0/kernel.nix similarity index 100% rename from cluster/c0/kernel.nix rename to ekman/c0/kernel.nix diff --git a/cluster/c0/nodes.nix b/ekman/c0/nodes.nix similarity index 78% rename from cluster/c0/nodes.nix rename to ekman/c0/nodes.nix index 752014b..44cc1bc 100644 --- a/cluster/c0/nodes.nix +++ b/ekman/c0/nodes.nix @@ -7,5 +7,5 @@ map (n: ( name = "c0-${toString n}"; address = "10.255.241.${toString idx}"; ipoib = "10.255.243.${toString idx}"; - pubkey = ./. + "/pubkeys/c0-${toString n}.pub"; + pubkey = ./. + "/ssh_host_key.d/c0-${toString n}.pub"; })) nodes diff --git a/cluster/c0/pubkeys/c0-1.pub b/ekman/c0/ssh_host_key.d/c0-1.pub similarity index 100% rename from cluster/c0/pubkeys/c0-1.pub rename to ekman/c0/ssh_host_key.d/c0-1.pub diff --git a/cluster/c0/pubkeys/c0-10.pub b/ekman/c0/ssh_host_key.d/c0-10.pub similarity index 100% rename from cluster/c0/pubkeys/c0-10.pub rename to ekman/c0/ssh_host_key.d/c0-10.pub diff --git a/cluster/c0/pubkeys/c0-11.pub b/ekman/c0/ssh_host_key.d/c0-11.pub similarity index 100% rename from cluster/c0/pubkeys/c0-11.pub rename to ekman/c0/ssh_host_key.d/c0-11.pub diff --git a/cluster/c0/pubkeys/c0-12.pub b/ekman/c0/ssh_host_key.d/c0-12.pub similarity index 100% rename from cluster/c0/pubkeys/c0-12.pub rename to ekman/c0/ssh_host_key.d/c0-12.pub diff --git a/cluster/c0/pubkeys/c0-13.pub b/ekman/c0/ssh_host_key.d/c0-13.pub similarity index 100% rename from cluster/c0/pubkeys/c0-13.pub rename to ekman/c0/ssh_host_key.d/c0-13.pub diff --git a/cluster/c0/pubkeys/c0-14.pub b/ekman/c0/ssh_host_key.d/c0-14.pub similarity index 100% rename from cluster/c0/pubkeys/c0-14.pub rename to ekman/c0/ssh_host_key.d/c0-14.pub diff --git a/cluster/c0/pubkeys/c0-15.pub b/ekman/c0/ssh_host_key.d/c0-15.pub similarity index 100% rename from cluster/c0/pubkeys/c0-15.pub rename to ekman/c0/ssh_host_key.d/c0-15.pub diff --git a/cluster/c0/pubkeys/c0-16.pub b/ekman/c0/ssh_host_key.d/c0-16.pub similarity index 100% rename from cluster/c0/pubkeys/c0-16.pub rename to ekman/c0/ssh_host_key.d/c0-16.pub diff --git a/cluster/c0/pubkeys/c0-2.pub b/ekman/c0/ssh_host_key.d/c0-2.pub similarity index 100% rename from cluster/c0/pubkeys/c0-2.pub rename to ekman/c0/ssh_host_key.d/c0-2.pub diff --git a/cluster/c0/pubkeys/c0-3.pub b/ekman/c0/ssh_host_key.d/c0-3.pub similarity index 100% rename from cluster/c0/pubkeys/c0-3.pub rename to ekman/c0/ssh_host_key.d/c0-3.pub diff --git a/cluster/c0/pubkeys/c0-4.pub b/ekman/c0/ssh_host_key.d/c0-4.pub similarity index 100% rename from cluster/c0/pubkeys/c0-4.pub rename to ekman/c0/ssh_host_key.d/c0-4.pub diff --git a/cluster/c0/pubkeys/c0-5.pub b/ekman/c0/ssh_host_key.d/c0-5.pub similarity index 100% rename from cluster/c0/pubkeys/c0-5.pub rename to ekman/c0/ssh_host_key.d/c0-5.pub diff --git a/cluster/c0/pubkeys/c0-6.pub b/ekman/c0/ssh_host_key.d/c0-6.pub similarity index 100% rename from cluster/c0/pubkeys/c0-6.pub rename to ekman/c0/ssh_host_key.d/c0-6.pub diff --git a/cluster/c0/pubkeys/c0-7.pub b/ekman/c0/ssh_host_key.d/c0-7.pub similarity index 100% rename from cluster/c0/pubkeys/c0-7.pub rename to ekman/c0/ssh_host_key.d/c0-7.pub diff --git a/cluster/c0/pubkeys/c0-8.pub b/ekman/c0/ssh_host_key.d/c0-8.pub similarity index 100% rename from cluster/c0/pubkeys/c0-8.pub rename to ekman/c0/ssh_host_key.d/c0-8.pub diff --git a/cluster/c0/pubkeys/c0-9.pub b/ekman/c0/ssh_host_key.d/c0-9.pub similarity index 100% rename from cluster/c0/pubkeys/c0-9.pub rename to ekman/c0/ssh_host_key.d/c0-9.pub diff --git a/cluster/c0x/connauthfile b/ekman/c0x/connauthfile similarity index 100% rename from cluster/c0x/connauthfile rename to ekman/c0x/connauthfile diff --git a/cluster/c0x/default.nix b/ekman/c0x/default.nix similarity index 97% rename from cluster/c0x/default.nix rename to ekman/c0x/default.nix index 5bd9cb1..c266fcb 100644 --- a/cluster/c0x/default.nix +++ b/ekman/c0x/default.nix @@ -35,7 +35,7 @@ let mkCompute = host: let - hw = ./hw + "/${host.name}.nix"; + hw = ./hardware-configuration.d + "/${host.name}.nix"; in { "${host.name}" = { cluster = { diff --git a/cluster/c0x/hw/c0-17.nix b/ekman/c0x/hardware-configuration.d/c0-17.nix similarity index 100% rename from cluster/c0x/hw/c0-17.nix rename to ekman/c0x/hardware-configuration.d/c0-17.nix diff --git a/cluster/c0x/hw/c0-18.nix b/ekman/c0x/hardware-configuration.d/c0-18.nix similarity index 100% rename from cluster/c0x/hw/c0-18.nix rename to ekman/c0x/hardware-configuration.d/c0-18.nix diff --git a/cluster/c0x/kernel.nix b/ekman/c0x/kernel.nix similarity index 100% rename from cluster/c0x/kernel.nix rename to ekman/c0x/kernel.nix diff --git a/cluster/c0x/nodes.nix b/ekman/c0x/nodes.nix similarity index 78% rename from cluster/c0x/nodes.nix rename to ekman/c0x/nodes.nix index 4c0e8b9..fc6f251 100644 --- a/cluster/c0x/nodes.nix +++ b/ekman/c0x/nodes.nix @@ -7,5 +7,5 @@ map (n: ( name = "c0-${toString n}"; address = "10.255.241.${toString idx}"; ipoib = "10.255.243.${toString idx}"; - pubkey = ./. + "/pubkeys/c0-${toString n}.pub"; + pubkey = ./. + "/ssh_host_key.d/c0-${toString n}.pub"; })) nodes diff --git a/cluster/c0x/pubkeys/c0-17.pub b/ekman/c0x/ssh_host_key.d/c0-17.pub similarity index 100% rename from cluster/c0x/pubkeys/c0-17.pub rename to ekman/c0x/ssh_host_key.d/c0-17.pub diff --git a/cluster/c0x/pubkeys/c0-18.pub b/ekman/c0x/ssh_host_key.d/c0-18.pub similarity index 100% rename from cluster/c0x/pubkeys/c0-18.pub rename to ekman/c0x/ssh_host_key.d/c0-18.pub diff --git a/cluster/c1/connauthfile b/ekman/c1/connauthfile similarity index 100% rename from cluster/c1/connauthfile rename to ekman/c1/connauthfile diff --git a/cluster/c1/default.nix b/ekman/c1/default.nix similarity index 98% rename from cluster/c1/default.nix rename to ekman/c1/default.nix index c5d1597..85891ea 100644 --- a/cluster/c1/default.nix +++ b/ekman/c1/default.nix @@ -21,7 +21,7 @@ let mkCompute = host: let - hw = ./hw + "/${host.name}.nix"; + hw = ./hardware-configuration.d + "/${host.name}.nix"; in { "${host.name}" = { cluster = { diff --git a/cluster/c1/hw/c1-1.nix b/ekman/c1/hardware-configuration.d/c1-1.nix similarity index 100% rename from cluster/c1/hw/c1-1.nix rename to ekman/c1/hardware-configuration.d/c1-1.nix diff --git a/cluster/c1/hw/c1-2.nix b/ekman/c1/hardware-configuration.d/c1-2.nix similarity index 100% rename from cluster/c1/hw/c1-2.nix rename to ekman/c1/hardware-configuration.d/c1-2.nix diff --git a/cluster/c1/hw/c1-3.nix b/ekman/c1/hardware-configuration.d/c1-3.nix similarity index 100% rename from cluster/c1/hw/c1-3.nix rename to ekman/c1/hardware-configuration.d/c1-3.nix diff --git a/cluster/c1/hw/c1-4.nix b/ekman/c1/hardware-configuration.d/c1-4.nix similarity index 100% rename from cluster/c1/hw/c1-4.nix rename to ekman/c1/hardware-configuration.d/c1-4.nix diff --git a/cluster/c1/hw/c1-5.nix b/ekman/c1/hardware-configuration.d/c1-5.nix similarity index 100% rename from cluster/c1/hw/c1-5.nix rename to ekman/c1/hardware-configuration.d/c1-5.nix diff --git a/cluster/c1/hw/c1-6.nix b/ekman/c1/hardware-configuration.d/c1-6.nix similarity index 100% rename from cluster/c1/hw/c1-6.nix rename to ekman/c1/hardware-configuration.d/c1-6.nix diff --git a/cluster/c1/hw/c1-7.nix b/ekman/c1/hardware-configuration.d/c1-7.nix similarity index 100% rename from cluster/c1/hw/c1-7.nix rename to ekman/c1/hardware-configuration.d/c1-7.nix diff --git a/cluster/c1/hw/c1-8.nix b/ekman/c1/hardware-configuration.d/c1-8.nix similarity index 100% rename from cluster/c1/hw/c1-8.nix rename to ekman/c1/hardware-configuration.d/c1-8.nix diff --git a/cluster/c1/kernel.nix b/ekman/c1/kernel.nix similarity index 100% rename from cluster/c1/kernel.nix rename to ekman/c1/kernel.nix diff --git a/cluster/c1/nodes.nix b/ekman/c1/nodes.nix similarity index 83% rename from cluster/c1/nodes.nix rename to ekman/c1/nodes.nix index 785806f..d499461 100644 --- a/cluster/c1/nodes.nix +++ b/ekman/c1/nodes.nix @@ -8,5 +8,5 @@ map (n: ( address = "10.255.241.${toString idx}"; ipoib = "10.255.243.${toString idx}"; gbe100 = "10.255.244.${toString idx}"; - pubkey = ./. + "/pubkeys/c1-${toString n}.pub"; + pubkey = ./. + "/ssh_host_key.d/c1-${toString n}.pub"; })) nodes diff --git a/cluster/c1/pubkeys/c1-1.pub b/ekman/c1/ssh_host_key.d/c1-1.pub similarity index 100% rename from cluster/c1/pubkeys/c1-1.pub rename to ekman/c1/ssh_host_key.d/c1-1.pub diff --git a/cluster/c1/pubkeys/c1-2.pub b/ekman/c1/ssh_host_key.d/c1-2.pub similarity index 100% rename from cluster/c1/pubkeys/c1-2.pub rename to ekman/c1/ssh_host_key.d/c1-2.pub diff --git a/cluster/c1/pubkeys/c1-3.pub b/ekman/c1/ssh_host_key.d/c1-3.pub similarity index 100% rename from cluster/c1/pubkeys/c1-3.pub rename to ekman/c1/ssh_host_key.d/c1-3.pub diff --git a/cluster/c1/pubkeys/c1-4.pub b/ekman/c1/ssh_host_key.d/c1-4.pub similarity index 100% rename from cluster/c1/pubkeys/c1-4.pub rename to ekman/c1/ssh_host_key.d/c1-4.pub diff --git a/cluster/c1/pubkeys/c1-5.pub b/ekman/c1/ssh_host_key.d/c1-5.pub similarity index 100% rename from cluster/c1/pubkeys/c1-5.pub rename to ekman/c1/ssh_host_key.d/c1-5.pub diff --git a/cluster/c1/pubkeys/c1-6.pub b/ekman/c1/ssh_host_key.d/c1-6.pub similarity index 100% rename from cluster/c1/pubkeys/c1-6.pub rename to ekman/c1/ssh_host_key.d/c1-6.pub diff --git a/cluster/c1/pubkeys/c1-7.pub b/ekman/c1/ssh_host_key.d/c1-7.pub similarity index 100% rename from cluster/c1/pubkeys/c1-7.pub rename to ekman/c1/ssh_host_key.d/c1-7.pub diff --git a/cluster/c1/pubkeys/c1-8.pub b/ekman/c1/ssh_host_key.d/c1-8.pub similarity index 100% rename from cluster/c1/pubkeys/c1-8.pub rename to ekman/c1/ssh_host_key.d/c1-8.pub diff --git a/cluster/cluster.nix b/ekman/default.nix similarity index 91% rename from cluster/cluster.nix rename to ekman/default.nix index 7f821d0..bf663c7 100644 --- a/cluster/cluster.nix +++ b/ekman/default.nix @@ -100,7 +100,7 @@ let }; networking = { - domain = mkDefault "compute.local"; + domain = mkDefault "cluster.local"; defaultGateway = mkDefault "10.255.241.1"; nameservers = mkDefault [ "8.8.8.8" ]; search = mkDefault []; @@ -146,13 +146,13 @@ let mungeKey = ./munge.key; mungeUid = mkDefault 996; # hack # pkey = "0x7666"; - controlMachine = "frontend"; + controlMachine = "ekman-manage"; mailDomain = "oceanbox.io"; nodeName = [ "c0-[1-18] Sockets=2 CoresPerSocket=64 ThreadsPerCore=1 RealMemory=256000 TmpDisk=500000 State=UNKNOWN" "c1-[1-8] Sockets=1 CoresPerSocket=64 ThreadsPerCore=1 RealMemory=256000 TmpDisk=100000 State=UNKNOWN" "ekman Sockets=2 CoresPerSocket=64 ThreadsPerCore=2 RealMemory=256000 TmpDisk=500000 State=UNKNOWN" - "frontend Sockets=2 CoresPerSocket=16 ThreadsPerCore=2 RealMemory=92000 TmpDisk=200000 State=UNKNOWN" + "ekman-manage Sockets=2 CoresPerSocket=16 ThreadsPerCore=2 RealMemory=92000 TmpDisk=200000 State=UNKNOWN" ]; partitionName = [ "batch Nodes=c0-[1-18] Default=YES MaxTime=INFINITE State=UP" @@ -200,7 +200,7 @@ let initca = ./ca; cidr = "10.100.0.0/16"; master = { - name = "frontend"; + name = "ekman-manage"; address = "10.255.241.99"; # extraSANs = [ # "frontend.oceanbox.io" @@ -240,29 +240,29 @@ let }; programs.ssh.knownHosts = { - frontend = { + ekman-manage = { hostNames = [ - "frontend" "frontend.compute.local" "frontend.oceanbox.io" "10.255.241.99" "10.255.243.99" + "ekman-manage" "ekman-manage.cluster.local" "frontend.oceanbox.io" "10.255.241.99" "10.255.243.99" ]; - publicKeyFile = ../frontend.pub; + publicKeyFile = ./manage/ssh_host_key.pub; }; ekman = { hostNames = [ - "ekman" "ekman.compute.local" "ekman.oceanbox.io" "10.255.241.100" "10.255.243.100" + "ekman" "ekman.cluster.local" "ekman.oceanbox.io" "10.255.241.100" "10.255.243.100" ]; - publicKeyFile = ./ekman/ekman.pub; + publicKeyFile = ./logon/ssh_host_key.pub; }; fs-work = { hostNames = [ - "fs-work" "fs-work.compute.local" "10.255.241.90" "10.255.243.90" + "fs-work" "fs-work.cluster.local" "10.255.241.90" "10.255.243.90" ]; - publicKeyFile = ./fs-work/fs-work.pub; + publicKeyFile = ./fs-work/ssh_host_key.pub; }; fs-backup = { hostNames = [ - "fs-backup" "fs-backup.compute.local" "10.255.241.80" "10.255.243.80" + "fs-backup" "fs-backup.cluster.local" "10.255.241.80" "10.255.243.80" ]; - publicKeyFile = ./fs-backup/fs-backup.pub; + publicKeyFile = ./fs-backup/ssh_host_key.pub; }; } // builtins.foldl' (a: x: let n = toString x.idx; @@ -270,7 +270,7 @@ let "${x.name}" = { hostNames = [ "${x.name}" - "${x.name}.compute.local" + "${x.name}.cluster.local" "10.255.241.${n}" "10.255.243.${n}" ]; @@ -324,7 +324,7 @@ in { imports = [ ../modules ../nixos - ./users.nix + ../users.nix ]; } diff --git a/cluster/etcdCluster.nix b/ekman/etcdCluster.nix similarity index 100% rename from cluster/etcdCluster.nix rename to ekman/etcdCluster.nix diff --git a/cluster/fs-backup/default.nix b/ekman/fs-backup/default.nix similarity index 100% rename from cluster/fs-backup/default.nix rename to ekman/fs-backup/default.nix diff --git a/cluster/fs-backup/hardware-configuration.nix b/ekman/fs-backup/hardware-configuration.nix similarity index 100% rename from cluster/fs-backup/hardware-configuration.nix rename to ekman/fs-backup/hardware-configuration.nix diff --git a/cluster/fs-backup/fs-backup.pub b/ekman/fs-backup/ssh_host_key.pub similarity index 100% rename from cluster/fs-backup/fs-backup.pub rename to ekman/fs-backup/ssh_host_key.pub diff --git a/cluster/fs-work/default.nix b/ekman/fs-work/default.nix similarity index 100% rename from cluster/fs-work/default.nix rename to ekman/fs-work/default.nix diff --git a/cluster/fs-work/hardware-configuration.nix b/ekman/fs-work/hardware-configuration.nix similarity index 100% rename from cluster/fs-work/hardware-configuration.nix rename to ekman/fs-work/hardware-configuration.nix diff --git a/cluster/fs-work/fs-work.pub b/ekman/fs-work/ssh_host_key.pub similarity index 100% rename from cluster/fs-work/fs-work.pub rename to ekman/fs-work/ssh_host_key.pub diff --git a/ekman/hosts.nix b/ekman/hosts.nix new file mode 100644 index 0000000..f800d32 --- /dev/null +++ b/ekman/hosts.nix @@ -0,0 +1,83 @@ +'' + 10.255.242.2 ekman-gw ekman-gw.cluster.local ekman-gw.cluster.local + 10.255.242.3 front-gw front-gw.cluster.local front-gw.cluster.local + + 10.255.241.90 fs-work fs-work.cluster.local + 10.255.241.90 nfs1 nfs1.cluster.local + 10.255.241.90 fs1 fs1.cluster.local + 10.255.241.80 fs-backup fs-backup.cluster.local + 10.255.241.80 fs2 fs2.cluster.local + 10.255.241.100 ekman ekman.cluster.local ekman.cluster.local + 10.255.241.100 etcd0 etcd0.cluster.local + 10.255.241.80 etcd1 etcd1.cluster.local + 10.255.241.90 etcd2 etcd2.cluster.local + 10.255.241.99 ekman-manage frontend frontend.cluster.local frontend.cluster.local + 10.255.243.99 ibfrontend ibfrontend.cluster.local ibfrontend.cluster.local + + 10.255.241.101 c0-1 c0-1.cluster.local + 10.255.241.102 c0-2 c0-2.cluster.local + 10.255.241.103 c0-3 c0-3.cluster.local + 10.255.241.104 c0-4 c0-4.cluster.local + 10.255.241.105 c0-5 c0-5.cluster.local + 10.255.241.106 c0-6 c0-6.cluster.local + 10.255.241.107 c0-7 c0-7.cluster.local + 10.255.241.108 c0-8 c0-8.cluster.local + 10.255.241.109 c0-9 c0-9.cluster.local + 10.255.241.110 c0-10 c0-10.cluster.local + 10.255.241.111 c0-11 c0-11.cluster.local + 10.255.241.112 c0-12 c0-12.cluster.local + 10.255.241.113 c0-13 c0-13.cluster.local + 10.255.241.114 c0-14 c0-14.cluster.local + 10.255.241.115 c0-15 c0-15.cluster.local + 10.255.241.116 c0-16 c0-16.cluster.local + 10.255.241.117 c0-17 c0-17.cluster.local + 10.255.241.118 c0-18 c0-18.cluster.local + + 10.255.241.121 c1-1 c1-1.cluster.local + 10.255.241.122 c1-2 c1-2.cluster.local + 10.255.241.123 c1-3 c1-3.cluster.local + 10.255.241.124 c1-4 c1-4.cluster.local + 10.255.241.125 c1-5 c1-5.cluster.local + 10.255.241.126 c1-6 c1-6.cluster.local + 10.255.241.127 c1-7 c1-7.cluster.local + 10.255.241.128 c1-8 c1-8.cluster.local + + 10.255.243.90 ibfs-work ibfs-work.cluster.local + 10.255.243.90 ibnfs1 ibnfs1.cluster.local + 10.255.243.90 ibfs1 ibfs1.cluster.local + 10.255.243.80 ibfs-backup ibfs-backup.cluster.local + 10.255.243.80 ibfs2 ibfs2.cluster.local + 10.255.243.100 ibekman ibekman.cluster.local + 10.255.243.100 ibetcd0 ibetcd0.cluster.local + 10.255.243.80 ibetcd1 ibetcd1.cluster.local + 10.255.243.90 ibetcd2 ibetcd2.cluster.local + + 10.255.243.101 ib0-1 ib0-1.cluster.local + 10.255.243.102 ib0-2 ib0-2.cluster.local + 10.255.243.103 ib0-3 ib0-3.cluster.local + 10.255.243.104 ib0-4 ib0-4.cluster.local + 10.255.243.105 ib0-5 ib0-5.cluster.local + 10.255.243.106 ib0-6 ib0-6.cluster.local + 10.255.243.107 ib0-7 ib0-7.cluster.local + 10.255.243.108 ib0-8 ib0-8.cluster.local + 10.255.243.109 ib0-9 ib0-9.cluster.local + 10.255.243.110 ib0-10 ib0-10.cluster.local + 10.255.243.111 ib0-11 ib0-1.cluster.local + 10.255.243.112 ib0-12 ib0-12.cluster.local + 10.255.243.113 ib0-13 ib0-13.cluster.local + 10.255.243.114 ib0-14 ib0-14.cluster.local + 10.255.243.115 ib0-15 ib0-15.cluster.local + 10.255.243.116 ib0-16 ib0-16.cluster.local + 10.255.243.117 ib0-17 ib0-17.cluster.local + 10.255.243.118 ib0-18 ib0-18.cluster.local + 10.255.243.118 ib0-18 ib0-19.cluster.local + + 10.255.243.121 ib1-1 ib1-1.cluster.local + 10.255.243.122 ib1-2 ib1-2.cluster.local + 10.255.243.123 ib1-3 ib1-3.cluster.local + 10.255.243.124 ib1-4 ib1-4.cluster.local + 10.255.243.125 ib1-5 ib1-5.cluster.local + 10.255.243.126 ib1-6 ib1-6.cluster.local + 10.255.243.127 ib1-7 ib1-7.cluster.local + 10.255.243.128 ib1-8 ib1-8.cluster.local +'' diff --git a/cluster/ekman/default.nix b/ekman/login/default.nix similarity index 98% rename from cluster/ekman/default.nix rename to ekman/login/default.nix index a938248..29ce4cc 100644 --- a/cluster/ekman/default.nix +++ b/ekman/login/default.nix @@ -33,8 +33,8 @@ in features = { host = { - name = "ekman"; - address = "10.255.241.100"; + inherit name; + inherit address; }; myvnc.enable = false; @@ -133,11 +133,11 @@ in networking = { useDHCP = false; - hostName = "ekman"; + hostName = name; interfaces.enp33s0f3np3 = { useDHCP = false; ipv4.addresses = [ { - address = "10.255.241.100"; + address = address; prefixLength = 24; } ]; # ipv4.routes = [ diff --git a/cluster/ekman/hardware-configuration.nix b/ekman/login/hardware-configuration.nix similarity index 100% rename from cluster/ekman/hardware-configuration.nix rename to ekman/login/hardware-configuration.nix diff --git a/cluster/ekman/ekman.pub b/ekman/login/ssh_host_key.pub similarity index 100% rename from cluster/ekman/ekman.pub rename to ekman/login/ssh_host_key.pub diff --git a/configuration.nix b/ekman/manage/default.nix similarity index 95% rename from configuration.nix rename to ekman/manage/default.nix index 8e24d15..af1da09 100644 --- a/configuration.nix +++ b/ekman/manage/default.nix @@ -1,33 +1,33 @@ { pkgs, ...}: let computeNodes = - import ./cluster/c0/nodes.nix ++ - import ./cluster/c1/nodes.nix ++ + import ../c0/nodes.nix ++ + import ../c1/nodes.nix ++ [ rec { idx = 100; name = "ekman"; address = "10.255.241.${toString idx}"; ipoib = "10.255.243.${toString idx}"; - pubkey = ./cluster/ekman/ekman.pub; + pubkey = ../login/ekman.pub; } rec { idx = 90; name = "fs-work"; address = "10.255.241.${toString idx}"; ipoib = "10.255.243.${toString idx}"; - pubkey = ./cluster/fs-work/fs-work.pub; + pubkey = ../fs-work/fs-work.pub; } rec { idx = 81; name = "fs-backup"; address = "10.255.241.${toString idx}"; ipoib = "10.255.243.${toString idx}"; - pubkey = ./cluster/fs-backup/fs-backup.pub; + pubkey = ../fs-backup/fs-backup.pub; } ]; - etcdCluster = import ./cluster/etcdCluster.nix; - name = "frontend"; + etcdCluster = import ../etcdCluster.nix; + name = "ekman-manage"; address = "10.255.241.99"; ipoib = "10.255.243.99"; in { @@ -102,7 +102,7 @@ in { server = { enable = false; scrapeHosts = [ - "frontend" + "ekman-manage" "ekman" "fs-work" "fs-backup" @@ -134,7 +134,7 @@ in { enable = true; nameMap = '' 0xe8ebd3030024a2c6 "ekman" - 0x0c42a10300ddc4bc "frontend" + 0x0c42a10300ddc4bc "ekman-manage" 0xe8ebd3030024a2ae "fs-work" 0x1c34da0300787798 "fs-backup" 0xe8ebd3030024981e "c0-1" @@ -341,9 +341,9 @@ in { imports = [ ./hardware-configuration.nix - ./cluster/cluster.nix - ./cluster/mounts.nix - ./cluster/myvnc.nix + ../default.nix + ../mounts.nix + ../myvnc.nix ]; } diff --git a/hardware-configuration.nix b/ekman/manage/hardware-configuration.nix similarity index 100% rename from hardware-configuration.nix rename to ekman/manage/hardware-configuration.nix diff --git a/frontend.pub b/ekman/manage/ssh_host_key.pub similarity index 100% rename from frontend.pub rename to ekman/manage/ssh_host_key.pub diff --git a/cluster/mounts.nix b/ekman/mounts.nix similarity index 96% rename from cluster/mounts.nix rename to ekman/mounts.nix index 180a1bd..fe38b06 100644 --- a/cluster/mounts.nix +++ b/ekman/mounts.nix @@ -12,8 +12,8 @@ let [ "soft" "defaults" "vers=4.2" ] ++ (if cfg.automount.enable then [ "noauto" "x-systemd.automount" ] else []); - home = - if cfg.home then { + users = + if cfg.users then { "/frontend" = { device = "10.255.241.100:/home"; fsType = "nfs4"; @@ -96,7 +96,7 @@ let }; } else {}; - fileSystems = home // opt // data // work // backup // ceph; + fileSystems = users // opt // data // work // backup // ceph; automount = mountpoint: if cfg.automount.enable && builtins.hasAttr mountpoint fileSystems then @@ -139,7 +139,7 @@ in rdma.enable = mkEnableOption "Enable NFS over RDMA"; gbe100.enable = mkEnableOption "Enable NFS over 100 GbE"; automount.enable = mkEnableOption "Enable NFS automounting"; - home = mkEnableOption "Enable /home"; + users = mkEnableOption "Enable /users"; opt = mkEnableOption "Enable /opt"; data = mkEnableOption "Enable /data"; work = mkEnableOption "Enable /work"; diff --git a/cluster/munge.key b/ekman/munge.key similarity index 100% rename from cluster/munge.key rename to ekman/munge.key diff --git a/cluster/myvnc.nix b/ekman/myvnc.nix similarity index 100% rename from cluster/myvnc.nix rename to ekman/myvnc.nix diff --git a/cluster/overlays.nix b/ekman/overlays.nix similarity index 100% rename from cluster/overlays.nix rename to ekman/overlays.nix diff --git a/cluster/users.nix b/ekman/users.nix similarity index 100% rename from cluster/users.nix rename to ekman/users.nix diff --git a/hive.nix b/hive.nix deleted file mode 100644 index 939df03..0000000 --- a/hive.nix +++ /dev/null @@ -1,25 +0,0 @@ -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 {}; - - frontend = { - deployment = { - tags = [ "manage" "frontend" ]; - allowLocalDeployment = true; - targetHost = null; - }; - imports = [ ./configuration.nix ]; - }; - - ekman = import ./cluster/ekman { inherit pkgs; }; - c0 = import ./cluster/c0 { inherit pkgs; }; - c0x = import ./cluster/c0x { inherit pkgs; }; - c1 = import ./cluster/c1 { inherit pkgs; }; - fs-work = import ./cluster/fs-work { inherit pkgs; }; - fs-backup = import ./cluster/fs-backup { inherit pkgs; }; -in - { inherit frontend; stokes = frontend; } // ekman // c0 // c0x // c1 // fs-work // fs-backup diff --git a/nixos b/nixos index 09bbbce..36d9c7e 160000 --- a/nixos +++ b/nixos @@ -1 +1 @@ -Subproject commit 09bbbceef61daa543c12173680f9a6e44facb4c0 +Subproject commit 36d9c7e052915f98403109b0cbe921ac1c8a06a0