debian-forge-composer/internal
Tomas Hozza 27c5aafeca GCP: Specify and randomize GCE region used for image import
The GCP image import method currently use the Cloud Build API with
Google's Daisy workflow. This workflow creates multiple GCE resources
during its execution. Although the desired Region for the imported image
is specified as a workflow argument, this has no effect on the GCE
Zone used by the workflow for created resources. By default it seems
to default to "us-central1-a" Zone. As a result, there are common cases
of resources being exhausted in the default zone.

Add a method, which translates provided Google Storage Region to a GCE
Region, which is needed mainly for multi and dual Storage Regions.

Add a method, which returns a list of available GCE Zones for a given
GCE Region.

Modify the ComputeImageImport() method to translate the provided Google
Storage Region to list of corresponding GCE Regions. If the provided
Storage Region is not multi or dual Region, then the list contains only
a single item, the provided Region. Then pick a random Region from the
list. Subsequently get available GCE Zones within the Region and pick a
random one for use by the workflow. Specify the GCE Zone to use as a
build step argument.

This change should be completely transparent to the API user.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-04-29 09:53:29 +02:00
..
blueprint rhel84/grub2: set saved_entry 2021-02-20 20:01:15 +01:00
boot test: replace genisoimage with mkisofs 2021-04-02 14:21:29 +02:00
client test: Add tests for trying to override a system source repo 2021-01-29 08:25:23 -08:00
cloud/gcp GCP: Specify and randomize GCE region used for image import 2021-04-29 09:53:29 +02:00
cloudapi Rename all occurrences of "Compute Node" to "Compute Engine" 2021-04-01 20:12:39 +02:00
common weldr: move common.ComposeState to weldr 2020-11-09 14:17:19 +01:00
crypt crypt: add automatic darwin support 2020-07-17 07:48:22 +02:00
disk osbuild: rename package to osbuild1 2021-03-17 18:12:17 +00:00
distro distro: remove unused field from distribution struct 2021-04-10 19:53:07 +01:00
distroregistry distro/rhel90: add RHEL9 support 2021-03-26 14:05:20 +00:00
jobqueue jobqueue: Replace JobArgs() with Job() 2021-01-19 10:37:51 +01:00
jsondb jsondb: Allow passing nil as document to Read() 2020-05-13 16:45:09 +02:00
kojiapi osbuild: rename package to osbuild1 2021-03-17 18:12:17 +00:00
mocks distro: move Registry to its own distroregistry package 2021-03-12 08:29:30 +01:00
osbuild1 distro/rhel84: build qcow2 images with compat=0.10 2021-04-10 19:18:13 +01:00
osbuild2 osbuild1/result: fix conversion of success field from v2 2021-03-19 18:50:31 +01:00
rpmmd distro: introduce PackageSets 2021-03-10 11:52:05 +00:00
store tests: Use nicer test strings for json_test.go 2021-03-30 00:19:30 +01:00
target target/azure: document what it does 2021-03-06 15:40:48 +00:00
test test: add arch to the generate test artifact names 2020-12-01 08:27:44 +01:00
upload internal: Move GCP library to internal/cloud 2021-03-15 16:48:40 +00:00
weldr weldr: validate external ostree ref 2021-03-30 00:22:04 +01:00
worker osbuld-worker: call osbuild with --export flag 2021-03-17 18:12:17 +00:00
tools.go go: vendor the oapi-codegen cmd 2021-02-01 15:32:58 +01:00