From 65308a90cf76caa8842db378fa22106e6368ecf1 Mon Sep 17 00:00:00 2001 From: Astro Date: Fri, 19 May 2023 21:48:48 +0200 Subject: [PATCH] modules/cluster: switch to skyflake microvm / on rbd --- modules/cluster/customization/default.nix | 12 ++++++++++++ modules/cluster/default.nix | 3 +++ 2 files changed, 15 insertions(+) diff --git a/modules/cluster/customization/default.nix b/modules/cluster/customization/default.nix index 5bae7c7b..e03f9444 100644 --- a/modules/cluster/customization/default.nix +++ b/modules/cluster/customization/default.nix @@ -62,6 +62,12 @@ in inherit mountPoint source; }) config.deployment.extraShares; volumes = [ { + image = config.skyflake.deploy.rbds.root.path; + mountPoint = "/"; + # don't let microvm.nix create an image file + autoCreate = false; + size = 0; + } { image = writableStoreOverlayImage; mountPoint = config.microvm.writableStoreOverlay; size = 8 * 1024; @@ -84,6 +90,12 @@ in weight = 10 + i; }) 10); }; + deploy.rbds.root = { + pool = "microvms"; + namespace = "${user}-${repo}"; + name = "${vmName}-root"; + size = config.deployment.rootSize; + }; }; networking = { diff --git a/modules/cluster/default.nix b/modules/cluster/default.nix index d1797901..93eca954 100644 --- a/modules/cluster/default.nix +++ b/modules/cluster/default.nix @@ -87,6 +87,9 @@ in { mons = [ "server8" "server9" "server10" ]; mgrs = mons; mdss = mons; + rbdPools.microvms = { + params = { size = 2; class = "ssd"; }; + }; monKeyring = config.sops.secrets."ceph/monKeyring".path; adminKeyring = config.sops.secrets."ceph/adminKeyring".path;