!atvIbxHoEqNcAIxYpN:nixos.org

NixOS AWS

64 Members
16 Servers

Load older messages


SenderMessageTime
29 Jul 2024
@arianvp:matrix.orgArian

EC2 instance must have an associated AMI and Root Block Device. You cant detach it

19:49:00
30 Jul 2024
@philip4g:matrix.orgPhilip

What exactly are you trying ot do?

I want to install NixOS on an EBS volume that's decoupled from the instance. For example, if I delete the EC2 instance with the NixOS AMI, then the default 4 GB EBS volume gets deleted. I want to be able to replace the instance with something larger or smaller without losing my OS install.

16:03:41
@arianvp:matrix.orgArianYou can set this as an option on the instance16:09:45
@arianvp:matrix.orgArianhttps://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#delete_on_termination16:10:02
@arianvp:matrix.orgArian

set delete_on_termination to false. it will keep the volume around

16:10:23
@arianvp:matrix.orgArianNote that you can resize instances without destroying the instance16:10:33
@arianvp:matrix.orgArianresize just causes the machine to reboot. 16:10:43
@arianvp:matrix.orgArianYou can also take a snapshot of your volume and then turn that into an AMI again if you want16:11:10
@arianvp:matrix.orgArianthe problem is that even if you have the OS on separate instance; it’s not gonna help you. Pretty sure AWS’s EFI Firmware will boot from the root block device first. And creating an instance without an associated AMI is not possible16:15:17
@arianvp:matrix.orgArianso I’d advice taking a snapshot of your root volume and registering it as a new AMI if you really need to destroy an instance16:15:36
@arianvp:matrix.orgArianbut for most operations the instance doesn’t need to be destroyed. Resizing the volume, resizing the instance etc can all happen without destroying the instance16:15:56
31 Jul 2024
@philip4g:matrix.orgPhilipThanks. This is interesting. I guess I see EC2 and AMIs as the relationship between PCs and CD drives. I insert a CD with the OS installation data. I boot up the PC, then install the OS onto the hard drive. Then I can unplug the CD drive and boot with just the hard drive.07:08:43
@philip4g:matrix.orgPhilipSo for me, the NixOS AMI is the installation media only, removable. Whereas the attached EBS volume is what boots. Now that I have NixOS installed on my EBS volume and attached, I don't know anymore what value the AMI brings.07:09:35
@arianvp:matrix.orgArian

AMIs are not installation media. They’re fully working operating system snapshots. I would not suggest installing the OS on a secondary EBS volume.

If you want to boot a new instance with the old volume you can take a snapshot of the volume and use that as the AMI for the new instance

17:20:19
9 Aug 2024
@AleXoundOS:matrix.org@AleXoundOS:matrix.orgHas anybody used NixOS AMI as part of a CloudFormation product in Marketplace? So, not as SAS, but a consumer gets deployment (including NixOS AMI) in its own AWS Cloud? Are there any special requirements for AMIs which NixOS AMI does not meet in case of Marketplace?09:17:16
@arianvp:matrix.orgArianI think it should just work? The AMI is public10:20:33
@arianvp:matrix.orgArianI’m not a 100% sure10:24:01
@arianvp:matrix.orgArian

You might need to clone the AMI into your own account first (e.g. using CloneImage)

10:24:13
@arianvp:matrix.orgArianOur AMI seems to meet all the requirements here: https://docs.aws.amazon.com/marketplace/latest/userguide/best-practices-for-building-your-amis.html10:29:07
@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

Show newer messages


Back to Room ListRoom Version: 10