!atvIbxHoEqNcAIxYpN:nixos.org

NixOS AWS

64 Members
14 Servers

Load older messages


SenderMessageTime
9 Aug 2024
@arianvp:matrix.orgArianand this seems important: https://docs.aws.amazon.com/marketplace/latest/userguide/product-submission.html#paid-repackaged-software10:30:47
27 Aug 2024
@oliver.falvai:oliverfalvai.xyzoliver.falvai joined the room.10:52:23
29 Aug 2024
@lytedev:matrix.orglytedev joined the room.21:58:38
1 Sep 2024
@robertgoltz:matrix.orgRobert Goltz joined the room.19:55:35
@accelbread:matrix.org@accelbread:matrix.org left the room.23:42:34
2 Sep 2024
@commiterate:matrix.orgcommiterate joined the room.18:23:21
@commiterate:matrix.orgcommiterate set a profile picture.18:24:01
5 Sep 2024
@commiterate:matrix.orgcommiterate

Hmm for the NixOS/amis repo, are the bootstrap assumptions listed anywhere? Also, are there any research notes on EBS snapshot + AMI lifecycle management (issue)?

I just pushed an experimental Nix container + NixOS AMI publishing repo to try out some related things.

Image builds work (have no GitHub-hosted larger runners to test AArch64 in workflows though. Local emulated native compile passes) but distribution infrastructure is pending some feature requests to AWS EC2 Image Builder (handles distribution and lifecycle policies).

20:00:47
6 Sep 2024
@commiterate:matrix.orgcommiterate *

Hmm for the NixOS/amis repo, are there any explicit bootstrap assumptions? Also, are there any research notes on EBS snapshot + AMI lifecycle management (issue)?

I just pushed an experimental Nix container + NixOS AMI publishing repo to try out some related things.

Image builds work (have no GitHub-hosted larger runners to test AArch64 in workflows though. Local emulated native compile passes) but distribution infrastructure is pending some feature requests to AWS EC2 Image Builder (handles distribution and lifecycle policies).

04:54:44
@arianvp:matrix.orgArianhmm what kind of bootstrapping assumptions do you mean?07:54:25
@arianvp:matrix.orgArian

the upload-ami script takes any NixOS disk image. How you build it is up to you. The current github action downloads the image from Hydra;

which builds the image similarly to:

https://github.com/NixOS/amis/pull/166/files

07:55:14
@arianvp:matrix.orgArianYou should be able to build the image on any machine07:55:28
@arianvp:matrix.orgArianthat has nix installed07:55:34
@arianvp:matrix.orgArianThe current iteration of the image builder works by spawning KVM inside a nix build for some config. Next iteration will use systemd-repart which will mean a completely VM-less build07:56:09
@arianvp:matrix.orgArianso one bootstrap problem is: Your CI needs to support KVM. Which is problematic as AWS doesn’t support KVM07:56:20
@arianvp:matrix.orgArianbut I’m working on it07:56:26
@arianvp:matrix.orgArian

Then plan is to move to https://nixos.org/manual/nixos/stable/#sec-image-repart

which doesn’t require KVM

07:56:50
@arianvp:matrix.orgArianACtually KVM is not needed. But the build will be a bit slower than without KVM07:57:21
@arianvp:matrix.orgArianthe build works fine on AWS. it will just use emulated qemu instead of KVM qemu for assembling the final image07:57:33
@arianvp:matrix.orgArianmakes the build a few seconds slower 07:57:40
@arianvp:matrix.orgArianah you’re calling make-disk-image too.08:00:21
@arianvp:matrix.orgArianso yeh. doing the same thing!08:00:26
@commiterate:matrix.orgcommiterateI guess some explicit requirements on the machines and software needed to get the image build pipeline working in the first place. e.g. I have this: https://github.com/commiterate/nix-images?tab=readme-ov-file#bootstrap17:28:39
@commiterate:matrix.orgcommiterate
In reply to @arianvp:matrix.org

Then plan is to move to https://nixos.org/manual/nixos/stable/#sec-image-repart

which doesn’t require KVM

Oh nice, time to try this out then to remove nested virtualization (via KVM) from the bootstrap requirements then
17:29:55
@commiterate:matrix.orgcommiterateThe reason I'm particularly sensitive to bootstrap is related to the GitLab runner fleet I mentioned in the AWSTOE issue. With GitHub, there's GitHub-hosted runners which provide some "fixed"/"stable" bootstrap machines (i.e. x86-64 and AArch64 Linux runners). With a private GitLab instance, you have no runners to start. For ease of deployability, I also can't assume too much of the initial system used to build up any IaC templates to deploy bootstrap infra to AWS or whatever.17:32:33
@commiterate:matrix.orgcommiterate * The reason I'm particularly sensitive to bootstrap is related to the GitLab runner fleet I mentioned in the AWSTOE issue. With GitHub, there's GitHub-hosted runners which provide some "fixed"/"stable" bootstrap machines (i.e. x86-64 and AArch64 Linux runners). With a private GitLab instance, you have no runners to start. For ease of deployability, I also can't expect too much from the initial system used to build up any IaC templates to deploy bootstrap infra to AWS or whatever (i.e. shouldn't expect cross-compile or emulated native compile capabilities since these may be Darwin or Windows machines).17:33:16
@commiterate:matrix.orgcommiterate
In reply to @arianvp:matrix.org
so one bootstrap problem is: Your CI needs to support KVM. Which is problematic as AWS doesn’t support KVM
I believe this is only true on virts (instances using the Nitro Hypervisor). Metals have direct hardware access so as long as the AMI used there support KVM, it's usable. Not that it's a hard requirement for make-disk-image like you said since QEMU can just swap the backend.
17:43:54
@commiterate:matrix.orgcommiterate
In reply to @arianvp:matrix.org
so one bootstrap problem is: Your CI needs to support KVM. Which is problematic as AWS doesn’t support KVM
* I believe this is only true on virts (instances using the Nitro Hypervisor). Metals have direct hardware access so as long as the AMI used there supports KVM, it's usable. Not that it's a hard requirement for make-disk-image like you said since QEMU can just swap the backend.
17:44:48
7 Sep 2024
@commiterate:matrix.orgcommiterate

Hmm playing around with nixos/modules/image/repart.nix and I'm not actually sure if this can be used in place of nixos/lib/make-disk-image.nix.

make-disk-image has 2 operating modes:

  1. Create a disk image with an EFI partition (ESP) and a root partition with the Nix store in it.
  2. Create a disk image with a full NixOS on it.

Only step 2 requires booting up a VM. Essentially, it takes the disk image from step 1 and then runs NixOS install steps.

Step 1 doesn't require a VM just like repart, though it's using coptfs which is from the Linux kernel source tree (docs).

repart basically operates the same as make-disk-image in mode 1.

00:56:55
@commiterate:matrix.orgcommiterate *

Hmm playing around with nixos/modules/image/repart.nix and I'm not actually sure if this can be used in place of nixos/lib/make-disk-image.nix.

make-disk-image has 2 operating modes:

  1. Create a disk image with an EFI partition (ESP) and a root partition with the Nix store in it.
  2. Create a disk image with a full NixOS on it.

Only step 2 requires booting up a VM. Essentially, it takes the disk image from step 1 and then runs NixOS install steps.

Step 1 doesn't require a VM just like repart, though it's using cptofs which is from the Linux kernel source tree (docs).

repart basically operates the same as make-disk-image in mode 1.

00:58:56

Show newer messages


Back to Room ListRoom Version: 10