Upgrade CI worker pools to C3D and reserve ~50% capacity (#2959) #### Issue description Previously, #2862 and #2864 upgraded x86 CI worker pools from `c2-standard-30` to `c3d-standard-30` and expanded the untrusted Linux fleet, but had to be reverted in #2868 due to `c3d-standard-30` capacity exhaustion in `us-central1`. Since then: - Regional MIGs now distribute across all 4 zones in `us-central1` (`a`, `b`, `c`, `f`) - On-demand GCE capacity reservations are managed in `buildkite/reservations.yml` #### How this PR solves it - Re-applies the C3D migration and Linux pool increase - Reserves some C3D fleet in advance in`buildkite/reservations.yml` TODO: - Increase the reservation once we have machines running | Reservation | Project | Zone | Machine type | Count | |---|---|---|---|---:| | `bk-c3d-us-central1-a` | `bazel-untrusted` | `us-central1-a` | `c3d-standard-30` | `50` | | `bk-c3d-us-central1-b` | `bazel-untrusted` | `us-central1-b` | `c3d-standard-30` | `50` | | `bk-c3d-us-central1-c` | `bazel-untrusted` | `us-central1-c` | `c3d-standard-30` | `50` | | `bk-c3d-us-central1-f` | `bazel-untrusted` | `us-central1-f` | `c3d-standard-30` | `50` | | `bk-trusted-c3d-us-central1-a` | `bazel-public` | `us-central1-a` | `c3d-standard-30` | `10` | | `bk-trusted-c3d-us-central1-b` | `bazel-public` | `us-central1-b` | `c3d-standard-30` | `10` |
diff --git a/buildkite/create_images.py b/buildkite/create_images.py index efc327e..705bbca 100755 --- a/buildkite/create_images.py +++ b/buildkite/create_images.py
@@ -23,7 +23,7 @@ import gcloud_utils DEBUG = False -DEFAULT_MACHINE_TYPE = "c2-standard-8" +DEFAULT_MACHINE_TYPE = "c3d-standard-8" DEFAULT_BOOT_DISK_TYPE = "pd-ssd" IMAGE_CREATION_VMS = { @@ -33,7 +33,7 @@ "source_image_project": "ubuntu-os-cloud", "source_image_family": "ubuntu-2204-lts", "setup_script": "setup-docker.sh", - "guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE"], + "guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE", "GVNIC"], "licenses": [ "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx" ], @@ -44,7 +44,7 @@ "source_image_project": "ubuntu-os-cloud", "source_image_family": "ubuntu-2204-lts-arm64", "setup_script": "setup-docker.sh", - "guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE"], + "guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE", "GVNIC"], "licenses": [ "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx" ], @@ -57,7 +57,7 @@ "source_image_project": "windows-cloud", "source_image_family": "windows-2022", # vs build tools failed to install on windows-2022-core "setup_script": "setup-windows.ps1", - "guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE"], + "guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE", "GVNIC"], }, "windows-playground": { "project": "di-cloud-exp", @@ -66,7 +66,7 @@ "source_image_project": "windows-cloud", "source_image_family": "windows-2022", "setup_script": "setup-windows.ps1", - "guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE"], + "guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE", "GVNIC"], }, }
diff --git a/buildkite/instances.yml b/buildkite/instances.yml index ae94a8c..8462622 100644 --- a/buildkite/instances.yml +++ b/buildkite/instances.yml
@@ -14,7 +14,7 @@ default_vm: boot_disk_size: 500GB boot_disk_type: pd-ssd - machine_type: c2-standard-30 + machine_type: c3d-standard-30 network: default region: us-central1 zones: us-central1-a,us-central1-b,us-central1-c,us-central1-f @@ -29,13 +29,13 @@ initial_delay: 60 instance_groups: - name: bk-docker - count: 120 + count: 170 project: bazel-untrusted service_account: buildkite@bazel-untrusted.iam.gserviceaccount.com image_family: bk-docker metadata_from_file: startup-script=startup-docker-pdssd.sh - name: bk-testing-docker - count: 10 + count: 20 project: bazel-untrusted service_account: buildkite-testing@bazel-untrusted.iam.gserviceaccount.com image_family: bk-testing-docker @@ -71,7 +71,7 @@ machine_type: c4a-standard-8 boot_disk_type: hyperdisk-balanced - name: bk-windows - count: 100 + count: 110 project: bazel-untrusted service_account: buildkite@bazel-untrusted.iam.gserviceaccount.com image_family: bk-windows
diff --git a/buildkite/promote_images.py b/buildkite/promote_images.py index 25187ef..61fb8ff 100755 --- a/buildkite/promote_images.py +++ b/buildkite/promote_images.py
@@ -27,7 +27,7 @@ "project": "bazel-public", "source_image_project": "bazel-public", "source_image_family": "bk-testing-docker", - "guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE"], + "guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE", "GVNIC"], "licenses": [ "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx" ], @@ -36,7 +36,7 @@ "project": "bazel-public", "source_image_project": "bazel-public", "source_image_family": "bk-testing-docker-arm64", - "guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE"], + "guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE", "GVNIC"], "licenses": [ "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx" ], @@ -45,7 +45,7 @@ "project": "bazel-public", "source_image_project": "bazel-public", "source_image_family": "bk-testing-windows", - "guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE"], + "guest_os_features": ["VIRTIO_SCSI_MULTIQUEUE", "GVNIC"], }, }
diff --git a/buildkite/reservations.yml b/buildkite/reservations.yml index cb4d1f1..77ed5d5 100644 --- a/buildkite/reservations.yml +++ b/buildkite/reservations.yml
@@ -21,6 +21,43 @@ # requires manually deleting the old reservation and creating a new one. --- reservations: + # C3D migration test: reserve ~half of the total capacity needed for each pool. + - name: bk-c3d-us-central1-a + project: bazel-untrusted + zone: us-central1-a + machine_type: c3d-standard-30 + count: 50 + 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: 50 + 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: 50 + 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: 50 + 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: 10 + 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: 10 + description: "trusted x86 c3d-standard-30 reservation (us-central1-b)" - name: bk-pilot-c4a-us-central1-b project: bazel-untrusted zone: us-central1-b