debian-forge-composer/internal/cloud/gcp
Tomas Hozza 264e554971 cloud/gcp: introduce ComputeImageInsert() method
Introduce a new `ComputeImageInsert()` method for importing images into
GCP. It uses the `compute.Images.Insert()` API [1], which has many
advantages over the currently used way of importing images using the
CloudBuild API. The advantages are mainly that the image is imported as
is and no additional cache files or VMs are created as part of the
import process. Therefore there is no need to do additional cleanup of
cache files after importing the image.

In addition, the import itself is approximately 30% faster for RHEL
images when using the `Insert()` call.

Nevertheless the `Insert()` call accepts only gzip-ed tarball with a RAW
disk, unlike the `Import()` call, which accepts basically any virtual
disk format.

[1] https://cloud.google.com/compute/docs/reference/rest/v1/images/insert

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-04-14 19:07:31 +01:00
..
cloudbuild.go internal/cloud/gcp: use pkg.go.dev/cloud.google.com/go for Compute Engine 2022-02-03 15:35:28 +01:00
cloudbuild_test.go GCP: Fix panic while parsing a specific build job log 2021-04-29 14:48:50 +02:00
compute.go cloud/gcp: introduce ComputeImageInsert() method 2022-04-14 19:07:31 +01:00
gcp.go internal/cloud/gcp: use pkg.go.dev/cloud.google.com/go for Compute Engine 2022-02-03 15:35:28 +01:00
storage.go internal/cloud/gcp: use pkg.go.dev/cloud.google.com/go for Compute Engine 2022-02-03 15:35:28 +01:00