From a0b2b0043e6872be69326b017f4363592d28164e Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Wed, 20 Nov 2024 22:53:37 -0600 Subject: [PATCH] Trim up Isaiah/Jeremiah Remove minio configurations for them Remove the semi-completed Ceph configuration from them Trim out the unused SAN VLan tag --- hosts/isaiah/ceph.nix | 34 ---------------------------------- hosts/isaiah/default.nix | 2 -- hosts/isaiah/minio.nix | 33 --------------------------------- hosts/jeremiah/ceph.nix | 34 ---------------------------------- hosts/jeremiah/default.nix | 32 ++++++++++---------------------- hosts/jeremiah/minio.nix | 33 --------------------------------- 6 files changed, 10 insertions(+), 158 deletions(-) delete mode 100644 hosts/isaiah/ceph.nix delete mode 100644 hosts/isaiah/minio.nix delete mode 100644 hosts/jeremiah/ceph.nix delete mode 100644 hosts/jeremiah/minio.nix diff --git a/hosts/isaiah/ceph.nix b/hosts/isaiah/ceph.nix deleted file mode 100644 index 695b109..0000000 --- a/hosts/isaiah/ceph.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, ... }: - -let - publicIp = (builtins.elemAt config.networking.interfaces.enp38s0.ipv4.addresses 0).address; - sanIp = (builtins.elemAt config.networking.interfaces.enp39s0.ipv4.addresses 0).address; - vip = (builtins.elemAt config.networking.interfaces.enp38s0.ipv4.addresses 1).address; - hostname = config.networking.hostName; - baseConfig = import ../../ceph/home.nix; -in -{ - services.ceph-benaco = baseConfig // { - enable = false; - monitor = { - enable = false; - initialKeyring = ../../secrets/home.mon.keyring; - nodeName = hostname; - bindAddr = publicIp; - advertisedPublicAddr = vip; - }; - osdBindAddr = publicIp; - osdAdvertisedPublicAddr = publicIp; - osds = { - osd1 = { - enable = false; - bootstrapKeyring = ../../secrets/home.osd-bootstrap.keyring; - id = 2; - uuid = "73424b68-210b-415f-800f-8767babea625"; - blockDevice = "/dev/disk/by-id/ata-ST12000NM0558_ZHZ5WM4L"; - blockDeviceUdevRuleMatcher = ''KERNEL=="sdb"''; - clusterAddress = sanIp; - }; - }; - }; -} diff --git a/hosts/isaiah/default.nix b/hosts/isaiah/default.nix index ae12d29..1083294 100644 --- a/hosts/isaiah/default.nix +++ b/hosts/isaiah/default.nix @@ -1,10 +1,8 @@ { lib, ... }: { imports = [ - ./ceph.nix ./hardware-configuration.nix ./git.nix - ./minio.nix ]; greg = { diff --git a/hosts/isaiah/minio.nix b/hosts/isaiah/minio.nix deleted file mode 100644 index 4ddd9b0..0000000 --- a/hosts/isaiah/minio.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ config, pkgs, ... }: - -let - minioPort = 9000; - minioConsolePort = 9001; -in -{ - environment.systemPackages = with pkgs; [ - minio-client - xfsprogs - ]; - - greg.proxies."minio-01.thehellings.lan".target = "http://localhost:9000"; - - fileSystems."/data/1" = { - device = "/dev/disk/by-id/wwn-0x5000c500c48728e9-part1"; - fsType = "xfs"; - }; - - networking.firewall.allowedTCPPorts = [ - minioPort - minioConsolePort - ]; - - age.secrets.minio.file = ../../secrets/minio.age; - - services.minio = { - enable = true; - dataDir = [ "/data/1/minio" ]; - rootCredentialsFile = config.age.secrets.minio.path; - browser = true; - }; -} diff --git a/hosts/jeremiah/ceph.nix b/hosts/jeremiah/ceph.nix deleted file mode 100644 index 185a03b..0000000 --- a/hosts/jeremiah/ceph.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, ... }: - -let - publicIp = (builtins.elemAt config.networking.interfaces.enp68s0.ipv4.addresses 0).address; - sanIp = (builtins.elemAt config.networking.interfaces.enp67s0.ipv4.addresses 0).address; - vip = (builtins.elemAt config.networking.interfaces.enp68s0.ipv4.addresses 1).address; - hostname = config.networking.hostName; - baseConfig = import ../../ceph/home.nix; -in -{ - services.ceph-benaco = baseConfig // { - enable = false; - monitor = { - enable = false; - initialKeyring = ../../secrets/home.mon.keyring; - nodeName = hostname; - bindAddr = publicIp; - advertisedPublicAddr = vip; - }; - osdBindAddr = publicIp; - osdAdvertisedPublicAddr = publicIp; - osds = { - osd1 = { - enable = false; - bootstrapKeyring = ../../secrets/home.osd-bootstrap.keyring; - id = 1; - uuid = "c13bd2b1-cfc7-4966-8da5-d92356e87e06"; - blockDevice = "/dev/sda"; - blockDeviceUdevRuleMatcher = ''KERNEL=="sda"''; - clusterAddress = sanIp; - }; - }; - }; -} diff --git a/hosts/jeremiah/default.nix b/hosts/jeremiah/default.nix index d21399c..889858c 100644 --- a/hosts/jeremiah/default.nix +++ b/hosts/jeremiah/default.nix @@ -12,14 +12,20 @@ { imports = [ # Include the results of the hardware scan. - ./ceph.nix ./hardware-configuration.nix - ./minio.nix ]; # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + virtualisation.libvirtd = { + enable = true; + allowedBridges = [ "virbr0" ]; + onBoot = "ignore"; # only restart VMs labeled 'autostart' + }; networking = { hostName = "jeremiah"; # Define your hostname. @@ -28,12 +34,6 @@ address = " 10.42.1.1"; interface = "enp68s0"; }; - vlans = { - san = { - id = 616; - interface = "enp67s0"; - }; - }; interfaces = { enp68s0 = { ipv4.addresses = [ @@ -41,18 +41,6 @@ address = "10.42.1.8"; prefixLength = 16; } - { - address = "10.42.100.1"; - prefixLength = 16; - } - ]; - }; - san = { - ipv4.addresses = [ - { - address = "10.201.1.2"; - prefixLength = 24; - } ]; }; }; diff --git a/hosts/jeremiah/minio.nix b/hosts/jeremiah/minio.nix deleted file mode 100644 index 4535021..0000000 --- a/hosts/jeremiah/minio.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ config, pkgs, ... }: - -let - minioPort = 9000; - minioConsolePort = 9001; -in -{ - environment.systemPackages = with pkgs; [ - minio-client - xfsprogs - ]; - - greg.proxies."minio-02.thehellings.lan".target = "http://localhost:9000"; - - fileSystems."/data/1" = { - device = "/dev/disk/by-id/ata-ST12000NM0558_ZHZ5YSXW-part1"; - fsType = "xfs"; - }; - - networking.firewall.allowedTCPPorts = [ - minioPort - minioConsolePort - ]; - - age.secrets.minio.file = ../../secrets/minio.age; - - services.minio = { - enable = true; - dataDir = [ "/data/1/minio" ]; - rootCredentialsFile = config.age.secrets.minio.path; - browser = true; - }; -}