Skip to content

Commit ab5d87b

Browse files
Adding GKE a2high onspot build and tests file (GoogleCloudPlatform#5045)
1 parent 212a136 commit ab5d87b

2 files changed

Lines changed: 111 additions & 0 deletions

File tree

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
---
16+
tags:
17+
- m.gke-cluster
18+
- m.gke-node-pool
19+
- m.service-account
20+
- m.vpc
21+
- m.multivpc
22+
- m.kubectl-apply
23+
- gke
24+
25+
timeout: 14400s # 4hr
26+
steps:
27+
# While using static network names we are guarding against more than 1 instance running at a time (for multi-group tests)
28+
- id: check_for_running_build
29+
name: gcr.io/cloud-builders/gcloud
30+
script: "tools/cloud-build/check_running_build.sh tools/cloud-build/daily-tests/builds/gke-a2-highgpu-kueue-onspot.yaml"
31+
32+
- id: gke-a2-highgpu-kueue-onspot-test
33+
name: us-central1-docker.pkg.dev/$PROJECT_ID/hpc-toolkit-repo/test-runner
34+
entrypoint: /bin/bash
35+
env:
36+
- "ANSIBLE_HOST_KEY_CHECKING=false"
37+
- "ANSIBLE_CONFIG=/workspace/tools/cloud-build/ansible.cfg"
38+
- "PROJECT_ID=$PROJECT_ID"
39+
- "NUM_NODES=12"
40+
- "MIN_NODES=6"
41+
- "MACHINE_TYPE=a2-highgpu-2g"
42+
- "INSTANCE_PREFIX=a2hspgke"
43+
- "BUILD_ID=$BUILD_ID"
44+
- "OPTIONS_GCS_PATH=gs://hpc-ctk1357/a2hoptions.txt"
45+
args:
46+
- -c
47+
- |
48+
set -e -u -o pipefail
49+
echo "Sourcing find_available_zone.sh to determine zone."
50+
source /workspace/tools/cloud-build/find_available_zone.sh
51+
if [ -z "$${ZONE:-}" ]; then
52+
echo "ERROR: ZONE not found" >&2
53+
exit 1
54+
fi
55+
set -x
56+
cd /workspace && make
57+
REGION="$${ZONE%-*}"
58+
BUILD_ID_SHORT=$${BUILD_ID:0:6}
59+
EXAMPLE_BP=tools/cloud-build/daily-tests/blueprints/gke-a2-highgpu.yaml
60+
61+
# Adding vm to act as remote node
62+
echo ' - id: remote-node' >> $${EXAMPLE_BP}
63+
echo ' source: modules/compute/vm-instance' >> $${EXAMPLE_BP}
64+
echo ' use: [network1]' >> $${EXAMPLE_BP}
65+
echo ' settings:' >> $${EXAMPLE_BP}
66+
echo ' machine_type: e2-standard-2' >> $${EXAMPLE_BP}
67+
echo ' name_prefix: remote-node' >> $${EXAMPLE_BP}
68+
echo ' add_deployment_name_before_prefix: true' >> $${EXAMPLE_BP}
69+
# Setting spot variable as true.
70+
sed -i '
71+
/id: a2_highgpu_pool/,/outputs: \[instructions\]/ {
72+
/^[ ]*settings:$/a \ spot: true
73+
}' $${EXAMPLE_BP}
74+
ansible-playbook tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml \
75+
--user=sa_106486320838376751393 --extra-vars="project=${PROJECT_ID} build=$${BUILD_ID_SHORT}" \
76+
--extra-vars="region=$${REGION} zone=$${ZONE}" \
77+
--extra-vars="@tools/cloud-build/daily-tests/tests/gke-a2-highgpu-kueue-onspot.yml"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
---
16+
17+
test_name: gke-a2high-kueue-onspot
18+
deployment_name: gke-a2h-spot-{{ build }}
19+
workspace: /workspace
20+
blueprint_yaml: "{{ workspace }}/tools/cloud-build/daily-tests/blueprints/gke-a2-highgpu.yaml"
21+
network: "gke-a2h-spot-net-{{ build }}"
22+
remote_node: "{{ deployment_name }}-remote-node-0"
23+
cli_deployment_vars:
24+
region: "{{ region }}"
25+
zone: "{{ zone }}"
26+
network_name: "{{ network }}"
27+
local_ssd_count_nvme_block: 2
28+
custom_vars:
29+
project: "{{ project }}"
30+
instance_labels:
31+
a2high_onspot: true
32+
enable_spot: true
33+
post_deploy_tests:
34+
- test-validation/test-gke-kueue.yml

0 commit comments

Comments
 (0)