blob: 62c200b251095b9d298cf8bb080f38e3f80edbb0 [file] [edit]
# GCE capacity reservations for Bazel CI worker pools.
#
# Usage:
# ./create_reservations.py --plan # Preview changes for all reservations
# ./create_reservations.py # Create or resize all reservations
# ./create_reservations.py <name> [<name> ...] # Reconcile specific reservation(s)
#
# Notes:
# - Bazel CI worker VMs power off after each job and are recreated by their MIG.
# Without a reservation, stopping a VM releases its capacity back to the zone,
# and recreating it can fail with ZONE_RESOURCE_POOL_EXHAUSTED. A reservation
# holds the capacity when a VM stops or dies so the replacement VM can always
# start immediately.
# - Reservations use automatic consumption, so any matching VM (same project,
# zone, and machine_type) in the project consumes them automatically without
# instance template changes.
# - A reservation is billed 24/7 at the VM rate whether used or not. Keep total
# reserved counts equal to the running MIG pool sizes, and shrink or delete
# reservations whenever pools shrink or change machine types.
# - GCE does not allow changing machine_type in place; switching machine types
# requires manually deleting the old reservation and creating a new one.
---
reservations:
- name: bk-c3d-us-central1-a
project: bazel-untrusted
zone: us-central1-a
machine_type: c3d-standard-30
count: 80
description: "untrusted x86 c3d-standard-30 reservation (us-central1-a)"
- name: bk-c3d-us-central1-b
project: bazel-untrusted
zone: us-central1-b
machine_type: c3d-standard-30
count: 80
description: "untrusted x86 c3d-standard-30 reservation (us-central1-b)"
- name: bk-c3d-us-central1-c
project: bazel-untrusted
zone: us-central1-c
machine_type: c3d-standard-30
count: 75
description: "untrusted x86 c3d-standard-30 reservation (us-central1-c)"
- name: bk-c3d-us-central1-f
project: bazel-untrusted
zone: us-central1-f
machine_type: c3d-standard-30
count: 75
description: "untrusted x86 c3d-standard-30 reservation (us-central1-f)"
- name: bk-trusted-c3d-us-central1-a
project: bazel-public
zone: us-central1-a
machine_type: c3d-standard-30
count: 15
description: "trusted x86 c3d-standard-30 reservation (us-central1-a)"
- name: bk-trusted-c3d-us-central1-b
project: bazel-public
zone: us-central1-b
machine_type: c3d-standard-30
count: 15
description: "trusted x86 c3d-standard-30 reservation (us-central1-b)"
#These are the only reservation divisions that are available for arm64 for now
- name: bk-c4a-us-central1-b
project: bazel-untrusted
zone: us-central1-b
machine_type: c4a-standard-8
count: 15
description: "untrusted arm64 c4a-standard-8 reservation (us-central1-b)"
- name: bk-c4a-us-central1-f
project: bazel-untrusted
zone: us-central1-f
machine_type: c4a-standard-8
count: 50
description: "untrusted arm64 c4a-standard-8 reservation (us-central1-f)"
- name: bk-trusted-c4a-us-central1-b
project: bazel-public
zone: us-central1-b
machine_type: c4a-standard-8
count: 20
description: "trusted arm64 c4a-standard-8 reservation (us-central1-b)"