Skip to content

Commit d0743e5

Browse files
authored
Merge pull request #4781 from GoogleCloudPlatform/release-candidate
Release candidate: v1.70.0
2 parents 18a9e07 + c6d8e2b commit d0743e5

79 files changed

Lines changed: 836 additions & 26464 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ HPC deployments on the Google Cloud Platform.`,
5353
logging.Fatal("cmd.Help function failed: %s", err)
5454
}
5555
},
56-
Version: "v1.69.0",
56+
Version: "v1.70.0",
5757
Annotations: annotation,
5858
}
5959
)

community/examples/gke-tpu-v6/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,38 @@ This section guides you through the cluster creation process, ensuring that your
9090
community/examples/gke-tpu-v6/gke-tpu-v6.yaml
9191
```
9292

93+
## Advanced Blueprint: GKE TPU with GCS Integration
94+
95+
This repository also includes an advanced blueprint, `gke-tpu-v6-gcs.yaml`, designed for production-ready workloads. It builds on the basic blueprint by adding several key features:
96+
* **Dedicated Service Accounts** for nodes and workloads, following security best practices.
97+
* **Automatic creation of two GCS buckets** for training data and checkpoints.
98+
* **Performance-tuned GCS FUSE mounts** pre-configured in the cluster as Persistent Volumes.
99+
100+
### Deploying the Advanced Blueprint
101+
102+
The process is nearly identical to the basic deployment.
103+
104+
1. Ensure you have completed steps 1-7 from the "Create a cluster" section above. The same `gke-tpu-v6-deployment.yaml` file can be used.
105+
106+
1. In the final deploy command, simply point to the `gke-tpu-v6-advanced.yaml` blueprint instead.
107+
108+
```sh
109+
cd ~/cluster-toolkit
110+
./gcluster deploy -d \
111+
community/examples/gke-tpu-v6/gke-tpu-v6-deployment.yaml \
112+
community/examples/gke-tpu-v6/gke-tpu-v6-advanced.yaml
113+
```
114+
115+
1. After deployment, the blueprint will output instructions for running a fio benchmark job. This job serves as a validation test to confirm that the GCS mounts are working correctly for both reading and writing. Follow the printed instructions to run the test.
116+
117+
### Understanding the GCS Integration
118+
119+
The advanced blueprint provisions several key technologies to create a robust data pipeline for your TPU workloads. Here are some resources to understand how they work together:
120+
* [Cloud Storage Overview](https://cloud.google.com/storage/docs/introduction#quickstarts): Start here to understand what Cloud Storage buckets are and their role in storing large-scale data.
121+
* [Cloud TPU Storage Options](https://cloud.google.com/tpu/docs/storage-options): Learn about the recommended storage patterns for Cloud TPUs, including why GCS FUSE is a best practice for providing training data.
122+
* [Access GCS Buckets with the GCS FUSE CSI Driver](https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/cloud-storage-fuse-csi-driver): This is the core technical guide explaining how GKE mounts GCS buckets into your pods, which this blueprint automates.
123+
* [Configure Workload Identity](https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity): Read this to understand the secure, recommended method for GKE applications to access Google Cloud services like GCS, which this blueprint configures for you.
124+
93125
## Run the sample job
94126

95127
The [tpu-available-chips.yaml](https://github.com/GoogleCloudPlatform/cluster-toolkit/blob/main/community/examples/gke-tpu-v6/tpu-available-chips.yaml) file creates a service and a job resource in kubernetes. It is based on https://cloud.google.com/kubernetes-engine/docs/how-to/tpus#tpu-chips-node-pool. The workload returns the number of TPU chips across all of the nodes in a multi-host TPU slice.
Lines changed: 287 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,287 @@
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+
blueprint_name: gke-tpu-v6
16+
17+
vars:
18+
# The following variables should be over-written in the deployment.yaml file.
19+
# Your GCP Project ID
20+
project_id:
21+
22+
# This should be unique across all of your Cluster
23+
# Toolkit Deployments.
24+
deployment_name: gke-tpu-v6
25+
26+
# The GCP Region used for this deployment.
27+
region:
28+
29+
# The GCP Zone used for this deployment.
30+
zone:
31+
32+
# The number of TPU slices to create
33+
num_slices:
34+
35+
# Machine type
36+
machine_type:
37+
38+
# The TPU placement topology for pod slice node pool.
39+
tpu_topology:
40+
41+
# The number of nodes to be created in each nodepool
42+
static_node_count:
43+
44+
# Cidr block containing the IP of the machine calling terraform.
45+
# To allow all (IAM restrictions still enforced), use 0.0.0.0/0
46+
# To allow only your IP address, use <YOUR-IP-ADDRESS>/32
47+
authorized_cidr:
48+
49+
# The name of the compute engine reservation of TPU v6 nodes
50+
reservation:
51+
52+
system_node_pool_disk_size_gb: 200
53+
v6e_node_pool_disk_size_gb: 100
54+
55+
56+
deployment_groups:
57+
- group: primary
58+
modules:
59+
- id: gke-tpu-v6-net
60+
source: modules/network/vpc
61+
settings:
62+
subnetworks:
63+
- subnet_name: $(vars.deployment_name)-sub-0
64+
subnet_region: $(vars.region)
65+
subnet_ip: 192.168.0.0/18
66+
secondary_ranges_list:
67+
- subnetwork_name: $(vars.deployment_name)-sub-0
68+
ranges:
69+
- range_name: pods
70+
ip_cidr_range: 10.4.0.0/14
71+
- range_name: services
72+
ip_cidr_range: 10.0.32.0/20
73+
firewall_rules:
74+
- name: $(vars.deployment_name)-internal-0
75+
ranges: [192.168.0.0/18]
76+
allow:
77+
- protocol: tcp
78+
ports: ["0-65535"]
79+
- protocol: udp
80+
ports: ["0-65535"]
81+
- protocol: icmp
82+
83+
- id: node_pool_service_account
84+
source: community/modules/project/service-account
85+
settings:
86+
name: gke-np-sa
87+
project_roles:
88+
- logging.logWriter
89+
- monitoring.metricWriter
90+
- monitoring.viewer
91+
- stackdriver.resourceMetadata.writer
92+
- storage.objectViewer
93+
- artifactregistry.reader
94+
95+
- id: workload_service_account
96+
source: community/modules/project/service-account
97+
settings:
98+
name: gke-wl-sa
99+
project_roles:
100+
- logging.logWriter
101+
- monitoring.metricWriter
102+
- monitoring.viewer
103+
- stackdriver.resourceMetadata.writer
104+
- storage.objectAdmin
105+
- artifactregistry.reader
106+
- container.admin
107+
108+
- id: training_bucket
109+
source: community/modules/file-system/cloud-storage-bucket
110+
settings:
111+
local_mount: /training-data
112+
name_prefix: training-data
113+
random_suffix: true
114+
force_destroy: false
115+
enable_hierarchical_namespace: true
116+
117+
- id: checkpoint_bucket
118+
source: community/modules/file-system/cloud-storage-bucket
119+
settings:
120+
local_mount: /checkpoint-data
121+
name_prefix: checkpoint-data
122+
random_suffix: true
123+
force_destroy: false
124+
enable_hierarchical_namespace: true
125+
126+
- id: gke-tpu-v6-cluster
127+
source: modules/scheduler/gke-cluster
128+
use: [gke-tpu-v6-net, workload_service_account]
129+
settings:
130+
system_node_pool_machine_type: "n2-standard-8"
131+
system_node_pool_disk_size_gb: $(vars.system_node_pool_disk_size_gb)
132+
system_node_pool_taints: []
133+
enable_private_endpoint: false # Allows access from authorized public IPs
134+
configure_workload_identity_sa: true
135+
enable_gcsfuse_csi: true
136+
master_authorized_networks:
137+
- cidr_block: $(vars.authorized_cidr) # Allows your machine to run the kubectl command. Required for multi network setup.
138+
display_name: "kubectl-access-network"
139+
# Cluster versions cannot be updated through the toolkit after creation
140+
# Please manage cluster version from the Google Cloud Console directly
141+
version_prefix: "1.32."
142+
release_channel: RAPID
143+
maintenance_exclusions:
144+
- name: no-minor-or-node-upgrades-indefinite
145+
start_time: "2024-12-01T00:00:00Z"
146+
end_time: "2025-12-22T00:00:00Z"
147+
exclusion_scope: NO_MINOR_OR_NODE_UPGRADES
148+
outputs: [instructions]
149+
150+
- id: gke-tpu-v6-pool
151+
source: modules/compute/gke-node-pool
152+
use: [gke-tpu-v6-cluster, node_pool_service_account]
153+
settings:
154+
num_slices: $(vars.num_slices)
155+
name: gke-tpu-v6-pool
156+
disk_type: hyperdisk-balanced
157+
machine_type: $(vars.machine_type)
158+
auto_upgrade: true
159+
zones: [$(vars.zone)]
160+
disk_size_gb: $(vars.v6e_node_pool_disk_size_gb)
161+
static_node_count: $(vars.static_node_count)
162+
reservation_affinity:
163+
consume_reservation_type: SPECIFIC_RESERVATION
164+
specific_reservations:
165+
- name: $(vars.reservation)
166+
placement_policy:
167+
type: COMPACT
168+
tpu_topology: $(vars.tpu_topology)
169+
outputs: [instructions]
170+
171+
- id: workload-manager-install
172+
source: modules/management/kubectl-apply
173+
use: [gke-tpu-v6-cluster]
174+
settings:
175+
jobset:
176+
install: true
177+
178+
- id: gcs-training
179+
source: modules/file-system/pre-existing-network-storage
180+
settings:
181+
remote_mount: $(training_bucket.gcs_bucket_name)
182+
local_mount: /training-data
183+
fs_type: gcsfuse
184+
mount_options: >-
185+
implicit-dirs,
186+
metadata-cache:ttl-secs:-1,
187+
metadata-cache:stat-cache-max-size-mb:-1,
188+
metadata-cache:type-cache-max-size-mb:-1,
189+
file-cache:max-size-mb:-1,
190+
file-cache:cache-file-for-range-read:true
191+
192+
- id: gcs-checkpointing
193+
source: modules/file-system/pre-existing-network-storage
194+
settings:
195+
remote_mount: $(checkpoint_bucket.gcs_bucket_name)
196+
local_mount: /checkpoint-data
197+
fs_type: gcsfuse
198+
mount_options: >-
199+
implicit-dirs,
200+
metadata-cache:ttl-secs:-1,
201+
metadata-cache:stat-cache-max-size-mb:-1,
202+
metadata-cache:type-cache-max-size-mb:-1,
203+
file-cache:max-size-mb:-1,
204+
file-cache:cache-file-for-range-read:true,
205+
file-cache:enable-parallel-downloads:true,
206+
rename-dir-limit=200000
207+
208+
# Persistent Volume for training data
209+
- id: training-pv
210+
source: modules/file-system/gke-persistent-volume
211+
use: [gcs-training, gke-tpu-v6-cluster]
212+
settings:
213+
gcs_bucket_name: $(training_bucket.gcs_bucket_name)
214+
capacity_gib: 1000000
215+
216+
# Persistent Volume for checkpoint data
217+
- id: checkpointing-pv
218+
source: modules/file-system/gke-persistent-volume
219+
use: [gcs-checkpointing, gke-tpu-v6-cluster]
220+
settings:
221+
gcs_bucket_name: $(checkpoint_bucket.gcs_bucket_name)
222+
capacity_gib: 1000000
223+
224+
# This is an example job that will install and run an `fio`
225+
# benchmark against the training and checkpointing buckets.
226+
- id: fio-bench-job-template
227+
source: modules/compute/gke-job-template
228+
use: [checkpointing-pv, training-pv, gke-tpu-v6-pool]
229+
settings:
230+
node_count: $(vars.static_node_count)
231+
security_context: # to make sure the job have enough access to install the fio packages
232+
- key: runAsUser
233+
value: 0
234+
- key: runAsGroup
235+
value: 100
236+
- key: fsGroup
237+
value: 100
238+
239+
k8s_service_account_name: workload-identity-k8s-sa
240+
requested_cpu_per_pod: 8
241+
image: ubuntu:latest
242+
243+
command:
244+
- bash
245+
- -c
246+
- |
247+
248+
set -eux
249+
export DEBIAN_FRONTEND=noninteractive
250+
251+
# Install fio
252+
apt update -y && apt install -y fio
253+
254+
# Use a tag to create a unique path for tests
255+
TAG=`date +%s`
256+
257+
# Verify mountpoints
258+
df -h
259+
mountpoint /checkpoint-data
260+
mountpoint /training-data
261+
262+
# Create temporary directory for fio benchmarks
263+
mkdir -p /{training,checkpoint}-data/fio-benchmarks-${TAG}
264+
265+
# The following will take roughly 5 minutes to complete
266+
267+
# Test reading from the training bucket
268+
fio --ioengine=libaio --filesize=1G --ramp_time=2s --runtime=30s \
269+
--numjobs=8 --create_serialize=0 --direct=1 --verify=0 \
270+
--randrepeat=0 --group_reporting --directory=/training-data/fio-benchmarks-${TAG} \
271+
--name=training-read --blocksize=1m --iodepth=16 --readwrite=randread
272+
273+
# Test writing to the checkpointing bucket
274+
fio --ioengine=libaio --filesize=1G --ramp_time=2s --runtime=30s \
275+
--numjobs=8 --create_serialize=0 --direct=1 --verify=0 \
276+
--randrepeat=0 --group_reporting --directory=/checkpoint-data/fio-benchmarks-${TAG} \
277+
--name=checkpoint-write --blocksize=10m --iodepth=16 --readwrite=write
278+
279+
# Perform checkpoint data reading performance test
280+
fio --ioengine=libaio --filesize=1G --ramp_time=2s --runtime=30s \
281+
--numjobs=8 --create_serialize=0 --direct=1 --verify=0 \
282+
--randrepeat=0 --group_reporting --directory=/checkpoint-data/fio-benchmarks-${TAG} \
283+
--name=checkpoint-read --blocksize=10m --iodepth=16 --readwrite=read
284+
285+
rm -rf /{training,checkpoint}-data/fio-benchmarks-${TAG}
286+
287+
outputs: [instructions]

community/examples/xpk-n2-filestore/xpk-n2-filestore.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ vars:
3232
slice_cpu_count: 64
3333
xpk_version: v0.8.0
3434
kueue_version: v0.11.1
35-
jobset_version: v0.7.2
35+
jobset_version: 0.10.1
3636
kjob_version: f775609365df47bdc3e7c10290d8efae7f512464
3737

3838
deployment_groups:

community/modules/compute/htcondor-execute-point/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ terraform {
2929
}
3030

3131
provider_meta "google" {
32-
module_name = "blueprints/terraform/hpc-toolkit:htcondor-execute-point/v1.69.0"
32+
module_name = "blueprints/terraform/hpc-toolkit:htcondor-execute-point/v1.70.0"
3333
}
3434
}

community/modules/compute/mig/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ terraform {
2222
}
2323
}
2424
provider_meta "google" {
25-
module_name = "blueprints/terraform/hpc-toolkit:mig/v1.69.0"
25+
module_name = "blueprints/terraform/hpc-toolkit:mig/v1.70.0"
2626
}
2727
}

community/modules/compute/schedmd-slurm-gcp-v6-nodeset-dynamic/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
terraform {
1818
required_version = ">= 1.3"
1919
provider_meta "google" {
20-
module_name = "blueprints/terraform/hpc-toolkit:schedmd-slurm-gcp-v6-nodeset-dynamic/v1.69.0"
20+
module_name = "blueprints/terraform/hpc-toolkit:schedmd-slurm-gcp-v6-nodeset-dynamic/v1.70.0"
2121
}
2222
}

community/modules/compute/schedmd-slurm-gcp-v6-nodeset-tpu/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ terraform {
1818
required_version = ">= 1.3"
1919

2020
provider_meta "google" {
21-
module_name = "blueprints/terraform/hpc-toolkit:schedmd-slurm-gcp-v6-nodeset-tpu/v1.69.0"
21+
module_name = "blueprints/terraform/hpc-toolkit:schedmd-slurm-gcp-v6-nodeset-tpu/v1.70.0"
2222
}
2323
}

community/modules/compute/schedmd-slurm-gcp-v6-nodeset/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ terraform {
2424
}
2525
}
2626
provider_meta "google" {
27-
module_name = "blueprints/terraform/hpc-toolkit:schedmd-slurm-gcp-v6-nodeset/v1.69.0"
27+
module_name = "blueprints/terraform/hpc-toolkit:schedmd-slurm-gcp-v6-nodeset/v1.70.0"
2828
}
2929
}

community/modules/compute/schedmd-slurm-gcp-v6-partition/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ terraform {
1818
required_version = ">= 1.3"
1919

2020
provider_meta "google" {
21-
module_name = "blueprints/terraform/hpc-toolkit:schedmd-slurm-gcp-v6-partition/v1.69.0"
21+
module_name = "blueprints/terraform/hpc-toolkit:schedmd-slurm-gcp-v6-partition/v1.70.0"
2222
}
2323
}

0 commit comments

Comments
 (0)