]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[cloud] Add utility for importing images to Google Compute Engine
authorMichael Brown <mcb30@ipxe.org>
Fri, 5 Jul 2024 22:54:50 +0000 (23:54 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 8 Jul 2024 12:31:43 +0000 (13:31 +0100)
commit5a9f476d4f1395e69cbb845d7379b0e3591028c0
tree593eaaa432e190b59244b79f20096fbf0ad25e43
parentb66e27d9b29a172a097c737ab4d378d60fe01b05
[cloud] Add utility for importing images to Google Compute Engine

Following the example of aws-import, add a utility that can be used to
upload an iPXE disk image to Google Compute Engine as a bootable
image.  For example:

  make CONFIG=cloud EMBED=config/cloud/gce.ipxe \
       bin-x86_64-pcbios/ipxe.usb bin-x86_64-efi/ipxe.usb

  make CONFIG=cloud EMBED=config/cloud/gce.ipxe \
       CROSS=aarch64-linux-gnu- bin-arm64-efi/ipxe.usb

  ../contrib/cloud/gce-import -p \
       bin-x86_64-pcbios/ipxe.usb \
       bin-x86_64-efi/ipxe.usb \
       bin-arm64-efi/ipxe.usb

The iPXE disk image is automatically wrapped into a tarball containing
a single file named "disk.raw", uploaded to a temporary bucket in
Google Cloud Storage, and used to create a bootable image.  The
temporary bucket is deleted after use.

An appropriate image family name is identified automatically: "ipxe"
for BIOS images, "ipxe-uefi-x86-64" for x86_64 UEFI images, and
"ipxe-uefi-arm64" for AArch64 UEFI images.  This allows the latest
image within each family to be launched within needing to know the
precise image name.

Google Compute Engine images are globally scoped and are available
(and cached upon first use) in all regions.  The initial placement of
the image may be controlled indirectly by using the "--location"
option to specify the Google Cloud Storage location used for the
temporary upload bucket: the image will then be created in the closest
multi-region to the storage location.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
contrib/cloud/gce-import [new file with mode: 0755]