Skip to content

Commit 1474320

Browse files
authored
Merge pull request GoogleCloudPlatform#4761 from kadupoornima/int
Add daily PR integration tests for G4 machines
2 parents f4bef28 + a6206dd commit 1474320

2 files changed

Lines changed: 101 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Copyright 2025 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+
- gke
18+
- m.gke-cluster
19+
- m.gke-node-pool
20+
- m.gke-job-template
21+
- m.service-account
22+
- m.vpc
23+
- m.kubectl-apply
24+
25+
timeout: 14400s # 4hr
26+
steps:
27+
- id: gke-g4
28+
name: us-central1-docker.pkg.dev/$PROJECT_ID/hpc-toolkit-repo/test-runner
29+
entrypoint: /bin/bash
30+
env:
31+
- "ANSIBLE_HOST_KEY_CHECKING=false"
32+
- "ANSIBLE_CONFIG=/workspace/tools/cloud-build/ansible.cfg"
33+
args:
34+
- -c
35+
- |
36+
set -x -e
37+
cd /workspace && make
38+
BUILD_ID_FULL=$BUILD_ID
39+
BUILD_ID_SHORT=$${BUILD_ID_FULL:0:6}
40+
EXAMPLE_BP=examples/gke-g4/gke-g4.yaml
41+
# adding vm to act as remote node
42+
echo ' - id: remote-node' >> $${EXAMPLE_BP}
43+
echo ' source: modules/compute/vm-instance' >> $${EXAMPLE_BP}
44+
echo ' use: [gke-g4-net-0]' >> $${EXAMPLE_BP}
45+
echo ' settings:' >> $${EXAMPLE_BP}
46+
echo ' machine_type: e2-standard-2' >> $${EXAMPLE_BP}
47+
echo ' name_prefix: remote-node' >> $${EXAMPLE_BP}
48+
echo ' add_deployment_name_before_prefix: true' >> $${EXAMPLE_BP}
49+
echo ''
50+
echo ' - id: job_template_hostname' >> $${EXAMPLE_BP}
51+
echo ' source: modules/compute/gke-job-template' >> $${EXAMPLE_BP}
52+
echo ' use: [g4-pool]' >> $${EXAMPLE_BP}
53+
echo ' settings:' >> $${EXAMPLE_BP}
54+
echo ' image: nvidia/cuda:13.0.0-base-ubuntu24.04' >> $${EXAMPLE_BP}
55+
echo ' command:' >> $${EXAMPLE_BP}
56+
echo ' - nvidia-smi' >> $${EXAMPLE_BP}
57+
echo ' node_count: 1' >> $${EXAMPLE_BP}
58+
echo ' outputs: [instructions]' >> $${EXAMPLE_BP}
59+
ansible-playbook tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml \
60+
--user=sa_106486320838376751393 --extra-vars="project=${PROJECT_ID} build=$${BUILD_ID_SHORT}" \
61+
--extra-vars="@tools/cloud-build/daily-tests/tests/gke-g4.yml"
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Copyright 2025 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+
# region, zone must be defined
18+
# in build file with --extra-vars flag!
19+
test_name: gke-g4
20+
deployment_name: gke-g4-{{ build }}
21+
workspace: /workspace
22+
blueprint_yaml: "{{ workspace }}/examples/gke-g4/gke-g4.yaml"
23+
network: "{{ deployment_name }}-net-0"
24+
region: us-central1
25+
zone: us-central1-b
26+
remote_node: "{{ deployment_name }}-remote-node-0"
27+
machine_type: g4-standard-48
28+
num_gpus: 1
29+
static_node_count: 2
30+
cli_deployment_vars:
31+
region: "{{ region }}"
32+
zone: "{{ zone }}"
33+
machine_type: "{{ machine_type }}"
34+
num_gpus: "{{ num_gpus }}"
35+
static_node_count: "{{ static_node_count }}"
36+
authorized_cidr: "{{ build_ip.stdout }}/32"
37+
custom_vars:
38+
project: "{{ project }}"
39+
post_deploy_tests:
40+
- test-validation/test-gke-job.yml

0 commit comments

Comments
 (0)