NixOS AWS | 64 Members | |
| 16 Servers |
| Sender | Message | Time |
|---|---|---|
| 29 Jul 2024 | ||
| EC2 instance must have an associated AMI and Root Block Device. You cant detach it | 19:49:00 | |
| 30 Jul 2024 | ||
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 | |
| You can set this as an option on the instance | 16:09:45 | |
| https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#delete_on_termination | 16:10:02 | |
| set | 16:10:23 | |
| Note that you can resize instances without destroying the instance | 16:10:33 | |
| resize just causes the machine to reboot. | 16:10:43 | |
| You can also take a snapshot of your volume and then turn that into an AMI again if you want | 16:11:10 | |
| the 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 possible | 16:15:17 | |
| so I’d advice taking a snapshot of your root volume and registering it as a new AMI if you really need to destroy an instance | 16:15:36 | |
| but for most operations the instance doesn’t need to be destroyed. Resizing the volume, resizing the instance etc can all happen without destroying the instance | 16:15:56 | |
| 31 Jul 2024 | ||
| Thanks. 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 | |
| So 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 | |
| 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 | ||
| Has 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 | |
| I think it should just work? The AMI is public | 10:20:33 | |
| I’m not a 100% sure | 10:24:01 | |
| You might need to clone the AMI into your own account first (e.g. using | 10:24:13 | |
| Our AMI seems to meet all the requirements here: https://docs.aws.amazon.com/marketplace/latest/userguide/best-practices-for-building-your-amis.html | 10:29:07 | |
| and this seems important: https://docs.aws.amazon.com/marketplace/latest/userguide/product-submission.html#paid-repackaged-software | 10:30:47 | |
| 27 Aug 2024 | ||
| 10:52:23 | ||
| 29 Aug 2024 | ||
| 21:58:38 | ||
| 1 Sep 2024 | ||
| 19:55:35 | ||
| 23:42:34 | ||
| 2 Sep 2024 | ||
| 18:23:21 | ||
| 18:24:01 | ||
| 5 Sep 2024 | ||
| 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 | ||
| * 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 | |
| hmm what kind of bootstrapping assumptions do you mean? | 07:54:25 | |
| 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 | |