forked from GoogleCloudPlatform/cluster-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hpc-enterprise-slurm-v5-legacy.yaml
324 lines (295 loc) · 11.3 KB
/
hpc-enterprise-slurm-v5-legacy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
blueprint_name: hpc-enterprise-slurm
vars:
project_id: ## Set GCP Project ID Here ##
deployment_name: hpc01
region: us-central1
zone: us-central1-a
gpu_zones: [us-central1-a, us-central1-b, us-central1-c, us-central1-f]
slurm_image:
# Visit https://github.com/GoogleCloudPlatform/slurm-gcp/blob/master/docs/images.md#published-image-family
# for a list of valid family options with Slurm
family: slurm-gcp-5-12-hpc-centos-7
project: schedmd-slurm-public
# If image above is changed to use custom image, then setting below must be set to true
instance_image_custom: false
# Set to true for active cluster reconfiguration.
# Note that setting this option requires additional dependencies to be installed locally.
# https://github.com/GoogleCloudPlatform/hpc-toolkit/tree/main/community/modules/scheduler/schedmd-slurm-gcp-v5-controller#description
enable_reconfigure: true
# When set, active compute nodes will be cleaned up on destroy.
# Note that setting this option requires additional dependencies to be installed locally.
enable_cleanup_compute: true
# Recommended to use GCS backend for Terraform state
# See https://github.com/GoogleCloudPlatform/hpc-toolkit/tree/main/examples#optional-setting-up-a-remote-terraform-state
#
# terraform_backend_defaults:
# type: gcs
# configuration:
# bucket: <<BUCKET_NAME>>
# Documentation for each of the modules used below can be found at
# https://github.com/GoogleCloudPlatform/hpc-toolkit/blob/main/modules/README.md
deployment_groups:
- group: primary
modules:
# Source is an embedded module, denoted by "modules/*" without ./, ../, /
# as a prefix. To refer to a local or community module, prefix with ./, ../ or /
- id: network1
source: modules/network/pre-existing-vpc
- id: controller_sa
source: community/modules/project/service-account
settings:
name: controller
project_roles:
- compute.instanceAdmin.v1
- iam.serviceAccountUser
- logging.logWriter
- monitoring.metricWriter
- pubsub.admin
- storage.objectViewer
- id: login_sa
source: community/modules/project/service-account
settings:
name: login
project_roles:
- logging.logWriter
- monitoring.metricWriter
- storage.objectViewer
- id: compute_sa
source: community/modules/project/service-account
settings:
name: compute
project_roles:
- logging.logWriter
- monitoring.metricWriter
- storage.objectCreator
- id: homefs
source: modules/file-system/filestore
use: [network1]
settings:
local_mount: /home
- id: projectsfs
source: modules/file-system/filestore
use: [network1]
settings:
local_mount: /projects
# This file system has an associated license cost.
# https://console.developers.google.com/marketplace/product/ddnstorage/exascaler-cloud
- id: scratchfs
source: community/modules/file-system/DDN-EXAScaler
use: [network1]
settings:
local_mount: /scratch
- id: n2_node_group
source: community/modules/compute/schedmd-slurm-gcp-v5-node-group
settings:
node_count_dynamic_max: 4
machine_type: n2-standard-2
instance_image: $(vars.slurm_image)
service_account:
email: $(compute_sa.service_account_email)
scopes:
- https://www.googleapis.com/auth/cloud-platform
- id: n2_partition
source: community/modules/compute/schedmd-slurm-gcp-v5-partition
use: [n2_node_group, network1, homefs, projectsfs, scratchfs]
settings:
partition_name: n2
exclusive: false # allows nodes to stay up after jobs are done
enable_placement: false # the default is: true
is_default: true
partition_conf:
SuspendTime: 300 # time (in secs) the nodes in this partition stay active after their tasks have completed
- id: c2_node_group
source: community/modules/compute/schedmd-slurm-gcp-v5-node-group
settings:
node_count_dynamic_max: 20
machine_type: c2-standard-60 # this is the default
instance_image: $(vars.slurm_image)
bandwidth_tier: tier_1_enabled
disk_type: pd-ssd
disk_size_gb: 100
service_account:
email: $(compute_sa.service_account_email)
scopes:
- https://www.googleapis.com/auth/cloud-platform
# use `-p c2` to submit jobs to this partition:
# ex: `srun -p c2 -N 1 hostname`
- id: c2_partition
source: community/modules/compute/schedmd-slurm-gcp-v5-partition
use: [c2_node_group, network1, homefs, projectsfs, scratchfs]
settings:
partition_name: c2
# the following two are true by default
exclusive: true # this must be true if enable_placement is true
enable_placement: true
- id: c2d_node_group
source: community/modules/compute/schedmd-slurm-gcp-v5-node-group
settings:
node_count_dynamic_max: 20
machine_type: c2d-standard-112
instance_image: $(vars.slurm_image)
bandwidth_tier: tier_1_enabled
disk_type: pd-ssd
disk_size_gb: 100
service_account:
email: $(compute_sa.service_account_email)
scopes:
- https://www.googleapis.com/auth/cloud-platform
- id: c2d_partition
source: community/modules/compute/schedmd-slurm-gcp-v5-partition
use: [c2d_node_group, network1, homefs, projectsfs, scratchfs]
settings:
partition_name: c2d
- id: c3_node_group
source: community/modules/compute/schedmd-slurm-gcp-v5-node-group
settings:
node_count_dynamic_max: 20
machine_type: c3-highcpu-176
instance_image: $(vars.slurm_image)
bandwidth_tier: tier_1_enabled
disk_type: pd-ssd
disk_size_gb: 100
service_account:
email: $(compute_sa.service_account_email)
scopes:
- https://www.googleapis.com/auth/cloud-platform
- id: c3_partition
source: community/modules/compute/schedmd-slurm-gcp-v5-partition
use: [c3_node_group, network1, homefs, projectsfs, scratchfs]
settings:
partition_name: c3
- id: a2_8_node_group
source: community/modules/compute/schedmd-slurm-gcp-v5-node-group
settings:
node_count_dynamic_max: 16
machine_type: a2-ultragpu-8g
bandwidth_tier: gvnic_enabled
instance_image: $(vars.slurm_image)
disk_type: pd-ssd
disk_size_gb: 100
node_conf:
Sockets: 2
CoresPerSocket: 24
service_account:
email: $(compute_sa.service_account_email)
scopes:
- https://www.googleapis.com/auth/cloud-platform
# use `-p a208` to submit jobs to this partition:
# ex: `srun -p a208 --gpus-per-node=8 -N 1 nvidia-smi`
- id: a2_8_partition
source: community/modules/compute/schedmd-slurm-gcp-v5-partition
use: [a2_8_node_group, network1, homefs, projectsfs, scratchfs]
settings:
partition_name: a208
# This makes this partition look for machines in any of the following zones
# https://github.com/GoogleCloudPlatform/hpc-toolkit/tree/develop/community/modules/compute/schedmd-slurm-gcp-v5-partition#compute-vm-zone-policies
zones: $(vars.gpu_zones)
# The following allows users to use more host memory without specifying cpus on a job
partition_conf:
DefMemPerGPU: 160000
DefMemPerCPU: null
- id: a2_16_node_group
source: community/modules/compute/schedmd-slurm-gcp-v5-node-group
settings:
node_count_dynamic_max: 16
machine_type: a2-megagpu-16g
bandwidth_tier: gvnic_enabled
instance_image: $(vars.slurm_image)
disk_type: pd-ssd
disk_size_gb: 100
node_conf:
Sockets: 2
CoresPerSocket: 24
service_account:
email: $(compute_sa.service_account_email)
scopes:
- https://www.googleapis.com/auth/cloud-platform
# use `-p a216` to submit jobs to this partition:
# ex: `srun -p a216 --gpus-per-node=16 -N 1 nvidia-smi`
- id: a2_16_partition
source: community/modules/compute/schedmd-slurm-gcp-v5-partition
use: [a2_16_node_group, network1, homefs, projectsfs, scratchfs]
settings:
partition_name: a216
# This makes this partition look for machines in any of the following zones
# https://github.com/GoogleCloudPlatform/hpc-toolkit/tree/develop/community/modules/compute/schedmd-slurm-gcp-v5-partition#compute-vm-zone-policies
zones: $(vars.gpu_zones)
# The following allows users to use more host memory without specifying cpus on a job
partition_conf:
DefMemPerGPU: 160000
DefMemPerCPU: null
- id: h3_node_group
source: community/modules/compute/schedmd-slurm-gcp-v5-node-group
settings:
node_count_dynamic_max: 16
machine_type: h3-standard-88
bandwidth_tier: gvnic_enabled # https://cloud.google.com/compute/docs/compute-optimized-machines#h3_network
instance_image: $(vars.slurm_image)
service_account:
email: $(compute_sa.service_account_email)
scopes:
- https://www.googleapis.com/auth/cloud-platform
# H3 does not support pd-ssd and pd-standard
# https://cloud.google.com/compute/docs/compute-optimized-machines#h3_disks
disk_type: pd-balanced
disk_size_gb: 100
# use `-p h3` to submit jobs to this partition:
# ex: `srun -p h3 -N 1 hostname`
- id: h3_partition
source: community/modules/compute/schedmd-slurm-gcp-v5-partition
use: [h3_node_group, network1, homefs, projectsfs, scratchfs]
settings:
partition_name: h3
- id: slurm_controller
source: community/modules/scheduler/schedmd-slurm-gcp-v5-controller
use: [network1, homefs, projectsfs, scratchfs, n2_partition,
c2_partition, c2d_partition, c3_partition, a2_8_partition, a2_16_partition,
h3_partition]
settings:
instance_image: $(vars.slurm_image)
# the following allow for longer boot time
# which is useful for large GPU nodes
cloud_parameters:
no_comma_params: false
resume_rate: 0
resume_timeout: 600
suspend_rate: 0
suspend_timeout: 600
# we recommend disabling public IPs if possible
# but that requires your network to have a NAT or
# private access configured
disable_controller_public_ips: false
service_account:
email: $(controller_sa.service_account_email)
scopes:
- https://www.googleapis.com/auth/cloud-platform
- id: slurm_login
source: community/modules/scheduler/schedmd-slurm-gcp-v5-login
use:
- network1
- slurm_controller
settings:
instance_image: $(vars.slurm_image)
machine_type: n2-standard-4
disable_login_public_ips: false
service_account:
email: $(login_sa.service_account_email)
scopes:
- https://www.googleapis.com/auth/cloud-platform
- id: hpc_dashboard
source: modules/monitoring/dashboard
outputs: [instructions]