hypervisors: init #269

Merged
raito merged 7 commits from hypervisors into main 2025-08-22 01:50:27 +00:00
Owner

This initialize the code for hypervisors, this doesn't contain VM workloads on purpose because they still contain stuff to redo. Another stacked PR will be open to that end.


3 hypervisors gets introduced.

2 in EU (France & Germany), 1 in the US (SEA01 location).

Planned usecases:

  • Migration of fragile Lix services to the hypervisor.
  • Migration of Digital Ocean (expensive) services to the hypervisor (lix.systems being the last one to move).
  • Increased redundancy.
  • Services that can afford to be high latency to EU and are lacking capacity in the EU continent.
  • Services that need to be low latency on the American continent (e.g. Lix's Gerrit or Lix's S3).
This initialize the code for hypervisors, this doesn't contain VM workloads on purpose because they still contain stuff to redo. Another stacked PR will be open to that end. --- 3 hypervisors gets introduced. 2 in EU (France & Germany), 1 in the US (SEA01 location). Planned usecases: - Migration of fragile Lix services to the hypervisor. - Migration of Digital Ocean (expensive) services to the hypervisor (lix.systems being the last one to move). - Increased redundancy. - Services that can afford to be high latency to EU and are lacking capacity in the EU continent. - Services that need to be low latency on the American continent (e.g. Lix's Gerrit or Lix's S3).
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Now we have more than one host platform, let's generalize the hardware
logic to support the split and factorize things.

The networking configuration could be improved but that's a work for
later.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This is in preparation to receive the R440.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
We are starting to have too many regions.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
A very simple support for OVH Limburg and OVH Strasbourg.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Co-authored-by: emilylange <git@emilylange.de>
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
@ -0,0 +17,4 @@
};
};
mkAdditionalRoutes = int: dsts: {
Author
Owner

this should probably go away

this should probably go away
raito marked this conversation as resolved
@ -0,0 +31,4 @@
{
options.bagel.baremetal.ovh = {
publicNetwork = mkNetworkOption "public";
additionalRoutes = mkOption {
Author
Owner

deadcode

deadcode
raito marked this conversation as resolved
@ -0,0 +72,4 @@
address = cfg.publicNetwork.address;
routes = cfg.publicNetwork.routes;
};
} // mapAttrs' mkAdditionalRoutes cfg.additionalRoutes;
Author
Owner

deadcode

deadcode
raito marked this conversation as resolved
@ -0,0 +3,4 @@
inherit (lib) mkOption types hasPrefix mkIf mapAttrs';
cfgParent = config.bagel.baremetal;
cfg = config.bagel.baremetal.ovh;
mkNetworkOption = typology: {
Author
Owner

docs would be relevant here

docs would be relevant here
raito marked this conversation as resolved
raito force-pushed hypervisors from c6aa4414a1 to 557e80076d 2025-08-22 00:08:05 +00:00 Compare
raito force-pushed hypervisors from 557e80076d to b3e8420c23 2025-08-22 00:10:38 +00:00 Compare
@ -21,2 +17,2 @@
config = mkIf cfg.enable {
config = mkIf cfg.enable (mkMerge [
(import "${modulesPath}/profiles/qemu-guest.nix" args)
Owner

This seems very prone to breaking. Can we just vendor the (probably tiny) parts of the profile that we need? Profiles are kind of a bad and unmaintained abstraction in nixos anyway.

This seems very prone to breaking. Can we just vendor the (probably tiny) parts of the profile that we need? Profiles are kind of a bad and unmaintained abstraction in nixos anyway.
Author
Owner

yes we can

yes we can
raito marked this conversation as resolved
@ -0,0 +4,4 @@
bagel.baremetal.num = 14;
networking.hostName = "hv01-lix";
networking.hostId = "4df8f1b4";
networking.domain = "infra.forkos.org";
Owner

Can we avoid deploying new stuff as forkos.org?

Can we avoid deploying new stuff as forkos.org?
Author
Owner

indeed

indeed
Author
Owner

this is now fixed as much as reasonably I can for now

this is now fixed as much as reasonably I can for now
raito marked this conversation as resolved
@ -0,0 +32,4 @@
};
};
bagel.baremetal.ovh = {
Owner

This doesn't exist until the next commit.

This doesn't exist until the next commit.
Author
Owner

thanks

thanks
raito marked this conversation as resolved
@ -0,0 +5,4 @@
{
config = lib.mkIf (cfg.enable && cfg.az == "sea01" && cfg.hostPlatform == "aarch64") {
nixpkgs.hostPlatform = "aarch64-linux";
networking.domain = "sea01-aarch64.infra.forkos.org";
Owner

(Not to fix now, but I'm still very very unconvinced by putting hostPlatform in the hostname...)

(Not to fix now, but I'm still very very unconvinced by putting hostPlatform in the hostname...)
Author
Owner

To be processed in #270.

To be processed in #270.
raito marked this conversation as resolved
raito force-pushed hypervisors from b3e8420c23 to 69c78c045e 2025-08-22 01:04:21 +00:00 Compare
raito force-pushed hypervisors from 69c78c045e to d393d8a56e 2025-08-22 01:16:54 +00:00 Compare
requested review from delroth 2025-08-22 01:18:40 +00:00
delroth approved these changes 2025-08-22 01:19:29 +00:00
@ -22,6 +22,11 @@ D("afnix.fr", REG_NONE, DnsProvider(DNS_DNSIMPLE),
AAAA("vpn-gw.wob01.infra", "2a01:584:11::2"),
// FIXME: hv01.sea01-x86_64.infra.forkos.org is kept for legacy reasons.
Owner

x86-64

x86-64
raito marked this conversation as resolved
raito force-pushed hypervisors from d393d8a56e to cbf5b148d1 2025-08-22 01:50:17 +00:00 Compare
raito merged commit cbf5b148d1 into main 2025-08-22 01:50:27 +00:00
raito deleted branch hypervisors 2025-08-22 01:50:27 +00:00
Author
Owner

Follow up in #271.

Follow up in https://git.lix.systems/the-distro/infra/pulls/271.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: the-distro/infra#269
No description provided.