You can provision a Ubuntu (all major Linux distros should work with the container method) host using i3.metal instance type – this instance type is the cheapest with hardware virtualisation support. The presence of hardware virtualisation speeds up the image creation process, but it is not essential.
Ensure the root device has enough disk space (e.g., 100 GB) – this is needed to hold all files the image creation process requires
You can also use an existing host, provided it has docker installed and has enough disk space.
Once the host is ready, go through the following steps as a reference.
Get ovftool onto the host (need to download from VMware first). Below is an example of getting it via curl.
Once all the permissions and the role are ready, run the build process as below.
build-image -c config.yaml
The process will generate the image, upload it to the s3 bucket, convert it to a snapshot and print out an AWS AMI ID.
To generate the image for Azure, the process is that the image generator creates the image, uploads it to an existing storage container, it will then convert that image to an Azure image and place it within the same Azure resource group where the existing storage container is.
A service principal is required with ‘Contributor’ role assignment.
Hope the processes described in this article make it easier for people getting the image up and running in AWS and Azure. GCP should be very similar, please leave a comment if you are having issues with GCP and I will take a look as well.