|
| 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-h4d |
| 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-h4d |
| 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 nodes to be created. |
| 33 | + static_node_count: |
| 34 | + |
| 35 | + # Cidr block containing the IP of the machine calling terraform. |
| 36 | + # The following line must be updated for this example to work. |
| 37 | + authorized_cidr: |
| 38 | + |
| 39 | + system_node_pool_disk_size_gb: 100 |
| 40 | + h4d_node_pool_disk_size_gb: 100 |
| 41 | + |
| 42 | + |
| 43 | +deployment_groups: |
| 44 | +- group: primary |
| 45 | + modules: |
| 46 | + - id: gke-h4d-net |
| 47 | + source: modules/network/vpc |
| 48 | + settings: |
| 49 | + network_name: $(vars.deployment_name)-net |
| 50 | + subnetworks: |
| 51 | + - subnet_name: $(vars.deployment_name)-sub |
| 52 | + subnet_region: $(vars.region) |
| 53 | + subnet_ip: 192.168.0.0/24 |
| 54 | + secondary_ranges_list: |
| 55 | + - subnetwork_name: $(vars.deployment_name)-sub |
| 56 | + ranges: |
| 57 | + - range_name: pods |
| 58 | + ip_cidr_range: 10.64.0.0/19 |
| 59 | + - range_name: services |
| 60 | + ip_cidr_range: 10.65.0.0/19 |
| 61 | + firewall_rules: |
| 62 | + - name: $(vars.deployment_name)-internal |
| 63 | + ranges: [192.168.0.0/24] |
| 64 | + allow: |
| 65 | + - protocol: tcp |
| 66 | + ports: ["0-65535"] |
| 67 | + - protocol: udp |
| 68 | + ports: ["0-65535"] |
| 69 | + - protocol: icmp |
| 70 | + |
| 71 | + - id: gke-h4d-rdma-net |
| 72 | + source: modules/network/vpc |
| 73 | + settings: |
| 74 | + network_name: $(vars.deployment_name)-rdma-net |
| 75 | + network_profile: https://www.googleapis.com/compute/beta/projects/$(vars.project_id)/global/networkProfiles/$(vars.zone)-vpc-falcon |
| 76 | + network_routing_mode: REGIONAL |
| 77 | + enable_cloud_router: false |
| 78 | + enable_cloud_nat: false |
| 79 | + subnetworks: |
| 80 | + - subnet_name: $(vars.deployment_name)-rdma-sub |
| 81 | + subnet_region: $(vars.region) |
| 82 | + subnet_ip: 192.168.1.0/24 |
| 83 | + region: $(vars.region) |
| 84 | + |
| 85 | + - id: node_pool_service_account |
| 86 | + source: community/modules/project/service-account |
| 87 | + settings: |
| 88 | + name: gke-np-sa |
| 89 | + project_roles: |
| 90 | + - logging.logWriter |
| 91 | + - monitoring.metricWriter |
| 92 | + - monitoring.viewer |
| 93 | + - stackdriver.resourceMetadata.writer |
| 94 | + - storage.objectViewer |
| 95 | + - artifactregistry.reader |
| 96 | + |
| 97 | + - id: workload_service_account |
| 98 | + source: community/modules/project/service-account |
| 99 | + settings: |
| 100 | + name: gke-wl-sa |
| 101 | + project_roles: |
| 102 | + - logging.logWriter |
| 103 | + - monitoring.metricWriter |
| 104 | + - monitoring.viewer |
| 105 | + - stackdriver.resourceMetadata.writer |
| 106 | + - storage.objectAdmin |
| 107 | + - artifactregistry.reader |
| 108 | + |
| 109 | + - id: h4d-cluster |
| 110 | + source: modules/scheduler/gke-cluster |
| 111 | + use: [gke-h4d-net, workload_service_account] |
| 112 | + settings: |
| 113 | + system_node_pool_machine_type: "e2-standard-16" |
| 114 | + system_node_pool_disk_size_gb: $(vars.system_node_pool_disk_size_gb) |
| 115 | + system_node_pool_taints: [] |
| 116 | + enable_multi_networking: true |
| 117 | + enable_dcgm_monitoring: true |
| 118 | + gcp_public_cidrs_access_enabled: false |
| 119 | + enable_private_endpoint: false # Allows access from authorized public IPs |
| 120 | + configure_workload_identity_sa: true |
| 121 | + master_authorized_networks: |
| 122 | + - cidr_block: $(vars.authorized_cidr) # Allows your machine to run the kubectl command. Required for multi network setup. |
| 123 | + display_name: "kubectl-access-network" |
| 124 | + additional_networks: |
| 125 | + $(concat( |
| 126 | + [{ |
| 127 | + network=gke-h4d-rdma-net.network_name, |
| 128 | + subnetwork=gke-h4d-rdma-net.subnetwork_name, |
| 129 | + subnetwork_project=vars.project_id, |
| 130 | + nic_type="IRDMA", |
| 131 | + queue_count=null, |
| 132 | + network_ip=null, |
| 133 | + stack_type=null, |
| 134 | + access_config=[{nat_ip=null, public_ptr_domain_name=null, network_tier=null}], |
| 135 | + ipv6_access_config=[], |
| 136 | + alias_ip_range=[] |
| 137 | + }] |
| 138 | + )) |
| 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: h4d-pool |
| 151 | + source: modules/compute/gke-node-pool |
| 152 | + use: [h4d-cluster, node_pool_service_account] |
| 153 | + settings: |
| 154 | + machine_type: h4d-highmem-192-lssd |
| 155 | + auto_upgrade: true |
| 156 | + zones: [$(vars.zone)] |
| 157 | + disk_size_gb: $(vars.h4d_node_pool_disk_size_gb) |
| 158 | + static_node_count: $(vars.static_node_count) |
| 159 | + additional_networks: |
| 160 | + $(concat( |
| 161 | + [{ |
| 162 | + network=gke-h4d-rdma-net.network_name, |
| 163 | + subnetwork=gke-h4d-rdma-net.subnetwork_name, |
| 164 | + subnetwork_project=vars.project_id, |
| 165 | + nic_type="IRDMA", |
| 166 | + queue_count=null, |
| 167 | + network_ip=null, |
| 168 | + stack_type=null, |
| 169 | + access_config=[{nat_ip=null, public_ptr_domain_name=null, network_tier=null}], |
| 170 | + ipv6_access_config=[], |
| 171 | + alias_ip_range=[] |
| 172 | + }] |
| 173 | + )) |
| 174 | + outputs: [instructions] |
| 175 | + |
| 176 | + # Install Kueue and Jobset |
| 177 | + - id: workload-manager-install |
| 178 | + source: modules/management/kubectl-apply |
| 179 | + use: [h4d-cluster] |
| 180 | + settings: |
| 181 | + kueue: |
| 182 | + install: true |
| 183 | + jobset: |
| 184 | + install: true |
0 commit comments