You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: community/examples/gke-tpu-v6/README.md
+75-10Lines changed: 75 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,10 +92,11 @@ This section guides you through the cluster creation process, ensuring that your
92
92
93
93
## Advanced Blueprint: GKE TPU with GCS Integration
94
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:
95
+
This repository also includes an advanced blueprint, `gke-tpu-v6-advanced.yaml`, designed for production-ready workloads. It builds on the basic blueprint by adding several key features:
96
96
***Dedicated Service Accounts**for nodes and workloads, following security best practices.
97
97
***Automatic creation of two GCS buckets**for training data and checkpoints.
98
98
***Performance-tuned GCS FUSE mounts** pre-configured in the cluster as Persistent Volumes.
99
+
***Optional High-Performance Storage: [Managed Lustre](https://cloud.google.com/managed-lustre/docs/overview)**for high-performance, fully managed parallel file system optimized for heavy AI and HPC workloads. For details of configuring Managed Lustre, please refer to the [appendix](#understanding-managed-lustre-integration)
99
100
100
101
### Deploying the Advanced Blueprint
101
102
@@ -114,14 +115,6 @@ The process is nearly identical to the basic deployment.
114
115
115
116
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
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
-
125
118
## Run the sample job
126
119
127
120
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.
@@ -180,6 +173,78 @@ To avoid recurring charges for the resources used on this page, clean up the res
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:
185
+
* [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.
186
+
* [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.
187
+
* [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.
188
+
* [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.
189
+
190
+
### Understanding Managed Lustre integration
191
+
The advanced blueprint `gke-tpu-v6-advanced.yaml` can also be configured to deploy a Managed Lustre filesystem. Google Cloud **Managed Lustre** delivers a high-performance, fully managed parallel file system optimized for AI and HPC applications. With multi-petabyte-scale capacity and up to 1 TBps throughput, [Managed Lustre](https://cloud.google.com/architecture/optimize-ai-ml-workloads-managed-lustre) facilitates the migration of demanding workloads to the cloud.
192
+
193
+
#### Enabling Managed Lustre
194
+
To enable Managed Lustre, you must make these changes before deploying:
195
+
196
+
1. In the `gke-tpu-v6-advanced.yaml`:
197
+
Find the **vars:** section and **uncomment** the Managed Lustre variables. The defaults provide a high-performance **36000GiB** (~35.16TiB) filesystem with **18 GB/s** of throughput.
198
+
199
+
2. In the `gke-tpu-v6-advanced.yaml`:
200
+
Find the section commented # --- MANAGED LUSTRE ADDITIONS ---. **Uncomment** the entire block of four modules: `private_service_access`, `lustre_firewall_rule`, `managed-lustre`, and `lustre-pv`.
201
+
202
+
After making these changes, run the `gcluster deploy`command as usual.
203
+
204
+
#### Using Managed Lustre in a Pod
205
+
Once deployed, the `Lustre` filesystem is available to the cluster as a `Persistent Volume (PV)`. To use it in your workloads, you need to create a `Persistent Volume Claim (PVC)` and mount it in your pod.
206
+
207
+
#### Testing the Lustre Mount
208
+
209
+
1. Create a file named `lustre-claim-pod.yaml`:
210
+
211
+
```yaml
212
+
apiVersion: v1
213
+
kind: PersistentVolumeClaim
214
+
metadata:
215
+
name: my-lustre-claim
216
+
spec:
217
+
accessModes:
218
+
- ReadWriteMany
219
+
# storageClassName must be empty to bind to the manually created PV
220
+
storageClassName: ""
221
+
resources:
222
+
requests:
223
+
# This size must match lustre_size_gib from your variables
224
+
storage: 36000Gi
225
+
---
226
+
apiVersion: v1
227
+
kind: Pod
228
+
metadata:
229
+
name: lustre-test-pod
230
+
spec:
231
+
containers:
232
+
- name: test-container
233
+
image: ubuntu:22.04
234
+
command: ["/bin/sleep", "infinity"]
235
+
volumeMounts:
236
+
- name: lustre-storage
237
+
mountPath: /mnt/lustre
238
+
volumes:
239
+
- name: lustre-storage
240
+
persistentVolumeClaim:
241
+
claimName: my-lustre-claim
242
+
```
243
+
244
+
2. Apply the manifest to your cluster:
245
+
246
+
```yaml
247
+
kubectl apply -f lustre-claim-pod.yaml
248
+
```
249
+
250
+
The pod will start, and the Managed Lustre filesystem will be available inside the container at `/mnt/lustre`.
# Sycomp Intelligent Data Storage Platform Blueprint
2
+
3
+
This document provides instructions on how to use a blueprint to deploy or expand a `Sycomp Intelligent Data Storage Platform` cluster and enable a `SLURM` cluster to access the data via `NFS` on Google Cloud Platform (GCP)
4
+
using the Google Cluster Toolkit.
5
+
6
+
The directory contains four example blueprints that can be used to deploy or expand a `Sycomp Storage` cluster:
7
+
8
+
- sycomp-storage.yaml
9
+
10
+
Blueprint used to deploy a `Sycomp Storage` cluster consisting of 3 storage servers.
11
+
12
+
- sycomp-storage-expansion.yaml
13
+
14
+
Blueprint used to expand the `Sycomp Storage` cluster to 4 storage servers.
15
+
16
+
- sycomp-storage-ece.yaml
17
+
18
+
Blueprint used to deploy a `Sycomp Storage` cluster consisting of 7 storage servers using `ECE` (Erasure Code Edition) software RAID.
19
+
20
+
- sycomp-storage-slurm.yaml
21
+
22
+
Blueprint used to deploy a `SLURM` cluster and a `Sycomp Storage` cluster with three servers. The `SLURM` compute nodes are configured as `NFS` clients and have the ability to use the Sycomp Storage filesystem.
23
+
24
+
## Prerequisites
25
+
26
+
1. Google Cloud SDK is installed and configured.
27
+
2. The Google Cloud Cluster Toolkit is set up [Set up Cluster Toolkit](https://cloud.google.com/cluster-toolkit/docs/setup/configure-environment).
28
+
3. You have a Google Cloud project and the required permissions to create VPCs, and Compute Engine instances.
29
+
4. The following APIs must be enabled in your project:
30
+
- Compute Engine API (`compute.googleapis.com`)
31
+
5. You have an SSH key pair (`~/.ssh/id_rsa` and `~/.ssh/id_rsa.pub` or similar). If you don't have one, you can generate it using `ssh-keygen -t rsa`.
32
+
6. You have a valid **Customer Token** provided by Sycomp.
33
+
7. You have a valid **Project access token** provided by Sycomp.
34
+
35
+
> **_NOTE:_** To get a customer and project access token, contact Sycomp (sycompstorage@sycomp.com).
36
+
>
37
+
> **_NOTE:_** To avoid repeatedly entering passwords, you can set `credential.helper` in git.
38
+
39
+
```shell
40
+
git config credential.helper cache
41
+
```
42
+
43
+
## Configuration
44
+
45
+
Before deploying you need to edit the blueprint yaml files and replace the placeholder values.
46
+
47
+
Required parameter updates for each blueprint:
48
+
49
+
-**`vars` block:**
50
+
-`project_id`: Your Google Cloud project ID.
51
+
-`deployment_name`: A unique name for this deployment (e.g., `sycomp-storage`).
52
+
-`region`: The region where you want to deploy the cluster.
53
+
-`zone`: The zone where you want to deploy the cluster.
54
+
55
+
-**`network1` module settings:**
56
+
-`source`: `modules/network/vpc` is the default and deploys the cluster in a newly created network. To use an existing network, change `source` to `modules/network/pre-existing-vpc`.
57
+
-`network_name`: A name for the new VPC network (e.g., `sycomp-net`).
58
+
-`subnetwork_name`: A name for the new subnetwork (e.g., `sycomp-subnet`).
59
+
-`allowed_ssh_ip_ranges`: A list of IP address ranges in CIDR format that
60
+
are allowed to connect via SSH. **You must include the IP address of the
61
+
machine you are running the deployment from.** For example: `["1.2.3.0/24"]`.
62
+
63
+
-**`sycomp-scale-gcp` module settings:**
64
+
-`security.ssh.ssh_user_name`: The username for SSH access to the management node (e.g., `sycomp`).
65
+
-`security.ssh.private_key`: The file path to your SSH private key (e.g., `~/.ssh/id_rsa`).
66
+
-`security.ssh.public_key`: The file path to your SSH public key (e.g., `~/.ssh/id_rsa.pub`).
67
+
-`security.customer_token.token`: Your Sycomp Customer Token. To get a customer token, contact Sycomp (`sycompstorage@sycomp.com`).
68
+
-`name_prefix` (Optional): By default, `sycomp-scale-gcp` sets the value of `name_prefix` based on the `deployment_name`. Since `name_prefix` only accepts **alphanumeric** characters (letters and numbers), `sycomp-scale-gcp` automatically **removes any non-alphanumeric characters** (such as hyphens and underscores) before assigning the value. For example, a `deployment_name` of `sycomp-storage-1` would result in a `name_prefix` of `sycompstorage1`.
69
+
-**`scale_config`** (Optional):
70
+
-`scale_node_count`: The number of nodes in the Sycomp Storage cluster. Default is `3`.
71
+
-`scale_volumes`: Configuration for the data disks. Default is 4 disks of 250GiB each per storage node.
72
+
73
+
-**`sycomp-scale-expansion` module settings:**
74
+
-`name_prefix`: Must match the `name_prefix` of the cluster to be expanded. Note: if not set explicitly, `name_prefix` is derived from `deployment_name` by removing non-alphanumeric characters. You can find the correct value for an existing cluster by checking its Terraform outputs or by inspecting resource names in the Google Cloud Console.
75
+
-`add_scale_nodes`: The number of nodes to be added.
76
+
77
+
## Deployment
78
+
79
+
Once the blueprint file (e.g., `sycomp-storage.yaml`) is configured, you can deploy the cluster from the blueprint by following these steps from your terminal.
80
+
81
+
1.**Authenticate with Google Cloud:**
82
+
83
+
```bash
84
+
gcloud auth login
85
+
gcloud auth application-default login
86
+
```
87
+
88
+
2.**Create the deployment directory:**
89
+
90
+
```bash
91
+
# Replace <blueprint-filename> with the specific blueprint filename (e.g., sycomp-storage.yaml).
0 commit comments