Re: How are official EC2 images built?

From: Pat Maddox <pat_at_patmaddox.com>
Date: Mon, 06 Mar 2023 02:31:29 UTC
One thing I left out - with the second approach I shared, you have to make the AMI with UEFI mode. -Pat

On Sun, Mar 5, 2023, at 6:30 PM, Pat Maddox wrote:
> https://cgit.freebsd.org/src/tree/release/Makefile.ec2
>
> https://cgit.freebsd.org/src/tree/release/tools/ec2.conf
>
> I have opted to build images a bit differently, not using the stuff in 
> src/release. I’ve done two approaches.
>
> The first is to attach a second disk to an EC2 instance, install 
> FreeBSD onto it with customizations, and then image the disk 
> (https://gist.github.com/patmaddox/9f20edcb50ff15fa9edd1d4e38d07e50).
>
> The way I’m doing it now is to use poudriere to make an img file, and 
> then upload that image to S3, snapshot it (aws ec2 import-snapshot 
> –disk-container Format=raw,Url=s3://mybucket/myimage.img) and finally 
> make an AMI from that snapshot.
>
> The stuff in src/release is good for knowing what changes to make to 
> config files, or packages to install.
>
> Pat
>
> On Sun, Mar 5, 2023, at 6:15 PM, Koichiro Iwao wrote:
>> Hi, 
>>
>> Does anyone how offical EC2 images [1] are built?
>> I mean if the build script is public.  I would like to create private
>> custom images with some customization based on official image.
>>
>> [1] 
>> https://aws.amazon.com/marketplace/seller-profile?id=92bb514d-02bc-49fd-9727-c474863f63da&ref=dtl_prodview-ukzmy5dzc6nbq
>>
>> -- 
>> meta <meta@FreeBSD.org>