This makes make-disk-image.nix slightly more consistent with other image
builders we have. Unfortunately I duplicated some code in doing so, but
this is temporary duplication on the path to consolidating everything.
See https://github.com/NixOS/nixpkgs/issues/23052 for more details on that.
I'm also exposing the option in the amazon-image.nix maintainer module.
We now generate a qcow2 image to prevent hitting Hydra's output size
limit. Also updated /root/user-data -> /etc/ec2-metadata/user-data.
http://hydra.nixos.org/build/33843133
The EBS and S3 (instance-store) AMIs are now created from the same
image. HVM instance-store AMIs are also generated.
Disk image generation has been factored out into a function
(nixos/lib/make-disk-image.nix) that can be used to build other kinds
of images.
images. Root disks are now SSD backed and 20GB by default, both on hvm and pv-grub
(previously was 8GB for HVM). Added new eu-central region to the locations to copy images
to. Also the root disk for HVM instances was not deleted on termination with previous
images, this is fixed as well.
be used on HVM instances without needing nixops. Previously
the grub setup was incorrect, so a plain 'nixos-rebuild switch'
and a reboot would result in a broken system.
Also added growing of the partition of the root disk in the initrd,
so you can run resize2fs after initial boot, without needing an
extra reboot. This is useful especially for nixops'
deployment.ec2.ebsInitialRootDiskSize option.
(cherry picked from commit 044a24e58b)
* Use smaller instances to generate HVM images
* Use HVM base image that has 4 ephemeral disks in device mapping
* As grub is not on the base images anymore, install it first before copying parts of its contents