|
| 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" |
0 commit comments