- NAME
-
- gcloud alpha cluster-director clusters create - creates a Cluster Director resource
- SYNOPSIS
-
-
gcloud alpha cluster-director clusters create
(CLUSTER
:--location
=LOCATION
) (--config
=[compute
=COMPUTE
],[description
=DESCRIPTION
],[labels
=LABELS
],[name
=NAME
],[networks
=NETWORKS
],[orchestrator
=ORCHESTRATOR
],[storages
=STORAGES
] | [--compute-resource-disks
=[boot
=BOOT
],[computeId
=COMPUTEID
],[sizeGb
=SIZEGB
],[sourceImage
=SOURCEIMAGE
],[type
=TYPE
]--compute-resources
=[guestAcceleratorCount
=GUESTACCELERATORCOUNT
],[guestAcceleratorType
=GUESTACCELERATORTYPE
],[machineType
=MACHINETYPE
],[maxRunDuration
=MAXRUNDURATION
],[name
=NAME
],[provisioningModel
=PROVISIONINGMODEL
],[terminationAction
=TERMINATIONACTION
],[zone
=ZONE
]--slurm-login-node
=[count
=COUNT
],[enableOSLogin
=ENABLEOSLOGIN
],[enablePublicIPs
=ENABLEPUBLICIPS
],[labels
=LABELS
],[machineType
=MACHINETYPE
],[serviceAccountEmail
=SERVICEACCOUNTEMAIL
],[serviceAccountScopes
=SERVICEACCOUNTSCOPES
],[startupScript
=STARTUPSCRIPT
],[zone
=ZONE
]--slurm-login-node-disks
=[boot
=BOOT
],[sizeGb
=SIZEGB
],[sourceImage
=SOURCEIMAGE
],[type
=TYPE
]--slurm-node-sets
=[computeId
=COMPUTEID
],[enableIPForward
=ENABLEIPFORWARD
],[enableOSLogin
=ENABLEOSLOGIN
],[enablePublicIPs
=ENABLEPUBLICIPS
],[labels
=LABELS
],[maxDynamicNodeCount
=MAXDYNAMICNODECOUNT
],[name
=NAME
],[serviceAccountEmail
=SERVICEACCOUNTEMAIL
],[serviceAccountScopes
=SERVICEACCOUNTSCOPES
],[startupScript
=STARTUPSCRIPT
],[staticNodeCount
=STATICNODECOUNT
]--slurm-partitions
=[exclusive
=EXCLUSIVE
],[name
=NAME
],[nodesetIds
=NODESETIDS
] (--create-network
=CREATE_NETWORK
|--network
=NETWORK
--subnet
=SUBNET
) :--compute-resource-reservations
=[computeId
=COMPUTEID
],[key
=KEY
],[type
=TYPE
],[values
=VALUES
]--create-filestores
=[description
=DESCRIPTION
],[fileshare
=FILESHARE
],[name
=NAME
],[protocol
=PROTOCOL
],[sizeGb
=SIZEGB
],[tier
=TIER
]--create-gcs-buckets
=[enableAutoclass
=ENABLEAUTOCLASS
],[enableHNS
=ENABLEHNS
],[name
=NAME
],[storageClass
=STORAGECLASS
]--create-lustres
=[description
=DESCRIPTION
],[filesystem
=FILESYSTEM
],[name
=NAME
],[sizeGb
=SIZEGB
]--description
=DESCRIPTION
--filestores
=[FILESTORES
,…]--gcs-buckets
=[GCS_BUCKETS
,…]--labels
=[LABELS
,…]--lustres
=[LUSTRES
,…]--slurm-config
=[jobEpilogBashScripts
=JOBEPILOGBASHSCRIPTS
],[jobPrologBashScripts
=JOBPROLOGBASHSCRIPTS
],[prologEpilogTimeout
=PROLOGEPILOGTIMEOUT
],[prologFlags
=PROLOGFLAGS
],[requeueExitCodes
=REQUEUEEXITCODES
],[requeueHoldExitCodes
=REQUEUEHOLDEXITCODES
],[taskEpilogBashScripts
=TASKEPILOGBASHSCRIPTS
],[taskPrologBashScripts
=TASKPROLOGBASHSCRIPTS
]--slurm-default-partition
=SLURM_DEFAULT_PARTITION
]) [--async
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
(ALPHA)
gcloud alpha cluster-director clusters create
facilitates the creation of a cluster resource.There are following ways to create a cluster:
- Using granular flags to define cluster specs.
- Using --config flag with cluster specs in JSON format.
Please refer to the examples below for more details.
- EXAMPLES
-
To create a cluster
my-cluster
in locationus-central1-a
with granular flags, run the following example:gcloud alpha cluster-director clusters create my-cluster --location us-central1-a --description "My cluster description" --labels env=prod,client=gcloud-cli --create-network network0 --create-filestores name=locations/us-central1-a/instances/filestore0,tier=TIER_BASIC_HDD,sizeGb={filestoreSize},fileshare={fileshare} --filestores locations/us-central1-a/instances/filestore1 --create-gcs-buckets name=bucket0 --gcs-buckets bucket1 --create-lustres name=locations/us-central1-a/instances/lustre0,sizeGb={lustreSize},filesystem={filesystem} --lustres locations/us-central1-a/instances/lustre1 --compute-resources name=compute0,zone=us-central1-a,machineType={machineType} --compute-resource-disks computeId=compute0,type={diskType},sizeGb={diskSize},boot=true,sourceImage={family/image} --compute-resource-reservations computeId=compute0,type=RESERVATION_TYPE_SPECIFIC_RESERVATION,values=zones/us-central1-a/reservations/{reservation} --slurm-login-node machineType={machineType},zone=us-central1-a --slurm-login-node-disks type={diskType},sizeGb={diskSize},boot=true,sourceImage={family/image} --slurm-node-sets name=nodeset0,computeId=compute0 --slurm-partitions name=partition0,nodesetIds=[nodeset0] --slurm-default-partition partition0 --format json
To create a cluster
my-cluster
in locationus-central1-a
with config in JSON string format run the following example:gcloud alpha cluster-director clusters create my-cluster --location=us-central1-a --config='{"key": "value"}'
Or create a JSON file
my-cluster-config.json
with the cluster specs and run the following file example:gcloud alpha cluster-director clusters create my-cluster --location=us-central1-a --config=my-cluster-config.json
- POSITIONAL ARGUMENTS
-
-
Cluster resource - Name of the cluster resource. Formats: cluster |
projects/{project}/locations/{locations}/clusters/{cluster} The arguments in
this group can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other ways.
To set the
project
attribute:-
provide the argument
cluster
on the command line with a fully specified name; -
provide the argument
--project
on the command line; -
set the property
core/project
.
This must be specified.
CLUSTER
-
ID of the cluster or fully qualified identifier for the cluster.
To set the
cluster
attribute:-
provide the argument
cluster
on the command line.
This positional argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--location
=LOCATION
-
The location id of the cluster resource.
To set the
location
attribute:-
provide the argument
cluster
on the command line with a fully specified name; -
provide the argument
--location
on the command line.
-
provide the argument
-
provide the argument
-
Cluster resource - Name of the cluster resource. Formats: cluster |
projects/{project}/locations/{locations}/clusters/{cluster} The arguments in
this group can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other ways.
- REQUIRED FLAGS
-
-
Cluster configuration for provisioning.
Exactly one of these must be specified:
--config
=[compute
=COMPUTE
],[description
=DESCRIPTION
],[labels
=LABELS
],[name
=NAME
],[networks
=NETWORKS
],[orchestrator
=ORCHESTRATOR
],[storages
=STORAGES
]-
Configuration of the cluster specs in the form of a JSON object. Sets
config
value.compute
-
Sets
compute
value.resourceRequests
-
Sets
resourceRequests
value.disks
-
Sets
disks
value.boot
-
Sets
boot
value. sizeGb
-
Required, sets
sizeGb
value. sourceImage
-
Sets
sourceImage
value. type
-
Required, sets
type
value.
guestAccelerators
-
Sets
guestAccelerators
value.acceleratorType
-
Sets
acceleratorType
value. count
-
Sets
count
value.
id
-
Sets
id
value. machineType
-
Sets
machineType
value. maxRunDuration
-
Sets
maxRunDuration
value. provisioningModel
-
Sets
provisioningModel
value. reservationAffinity
-
Sets
reservationAffinity
value.key
-
Sets
key
value. type
-
Sets
type
value. values
-
Sets
values
value.
terminationAction
-
Sets
terminationAction
value. zone
-
Sets
zone
value.
description
-
Sets
description
value. labels
-
Sets
labels
value.KEY
-
Sets
KEY
value. VALUE
-
Sets
VALUE
value.
name
-
Sets
name
value. networks
-
Sets
networks
value.initializeParams
-
Sets
initializeParams
value.description
-
Sets
description
value. network
-
Sets
network
value.
networkSource
-
Sets
networkSource
value.network
-
Sets
network
value. subnetwork
-
Sets
subnetwork
value.
orchestrator
-
Sets
orchestrator
value.slurm
-
Sets
slurm
value.config
-
Sets
config
value.prologEpilogTimeout
-
Sets
prologEpilogTimeout
value. prologFlags
-
Sets
prologFlags
value. requeueExitCodes
-
Sets
requeueExitCodes
value. requeueHoldExitCodes
-
Sets
requeueHoldExitCodes
value.
defaultPartition
-
Sets
defaultPartition
value. epilogBashScripts
-
Sets
epilogBashScripts
value. loginNodes
-
Sets
loginNodes
value.count
-
Sets
count
value. disks
-
Sets
disks
value.boot
-
Sets
boot
value. sizeGb
-
Required, sets
sizeGb
value. sourceImage
-
Sets
sourceImage
value. type
-
Required, sets
type
value.
enableOsLogin
-
Sets
enableOsLogin
value. enablePublicIps
-
Sets
enablePublicIps
value. labels
-
Sets
labels
value.KEY
-
Sets
KEY
value. VALUE
-
Sets
VALUE
value.
machineType
-
Sets
machineType
value. serviceAccount
-
Sets
serviceAccount
value.email
-
Sets
email
value. scopes
-
Sets
scopes
value.
startupScript
-
Sets
startupScript
value. storageConfigs
-
Sets
storageConfigs
value.id
-
Sets
id
value. localMount
-
Sets
localMount
value.
zone
-
Sets
zone
value.
nodeSets
-
Sets
nodeSets
value.canIpForward
-
Sets
canIpForward
value. enableOsLogin
-
Sets
enableOsLogin
value. enablePublicIps
-
Sets
enablePublicIps
value. id
-
Sets
id
value. labels
-
Sets
labels
value.KEY
-
Sets
KEY
value. VALUE
-
Sets
VALUE
value.
maxDynamicNodeCount
-
Sets
maxDynamicNodeCount
value. resourceRequestId
-
Sets
resourceRequestId
value. serviceAccount
-
Sets
serviceAccount
value.email
-
Sets
email
value. scopes
-
Sets
scopes
value.
startupScript
-
Sets
startupScript
value. staticNodeCount
-
Sets
staticNodeCount
value. storageConfigs
-
Sets
storageConfigs
value.id
-
Sets
id
value. localMount
-
Sets
localMount
value.
partitions
-
Sets
partitions
value.exclusive
-
Sets
exclusive
value. id
-
Sets
id
value. nodeSetIds
-
Sets
nodeSetIds
value.
prologBashScripts
-
Sets
prologBashScripts
value. taskEpilogBashScripts
-
Sets
taskEpilogBashScripts
value. taskPrologBashScripts
-
Sets
taskPrologBashScripts
value.
storages
-
Sets
storages
value.id
-
Sets
id
value. initializeParams
-
Sets
initializeParams
value.filestore
-
Sets
filestore
value.description
-
Sets
description
value. -
Sets
fileShares
value.capacityGb
-
Sets
capacityGb
value. -
Sets
fileShare
value.
filestore
-
Sets
filestore
value. protocol
-
Sets
protocol
value. tier
-
Sets
tier
value.
gcs
-
Sets
gcs
value.autoclass
-
Sets
autoclass
value.enabled
-
Sets
enabled
value. terminalStorageClass
-
Sets
terminalStorageClass
value.
bucket
-
Sets
bucket
value. hierarchicalNamespace
-
Sets
hierarchicalNamespace
value.enabled
-
Sets
enabled
value.
storageClass
-
Sets
storageClass
value.
lustre
-
Sets
lustre
value.capacityGb
-
Sets
capacityGb
value. description
-
Sets
description
value. filesystem
-
Sets
filesystem
value. lustre
-
Sets
lustre
value.
storageSource
-
Sets
storageSource
value.bucket
-
Sets
bucket
value. filestore
-
Sets
filestore
value. lustre
-
Sets
lustre
value.
Shorthand Example:
--config=compute={resourceRequests=[{disks=[{boot=boolean,sizeGb=int,sourceImage=string,type=string}],guestAccelerators=[{acceleratorType=string,count=int}],id=string,machineType=string,maxRunDuration=int,provisioningModel=string,reservationAffinity={key=string,type=string,values},terminationAction=string,zone=string}]},description=string,labels={string=string},name=string,networks=[{initializeParams={description=string,network=string},networkSource={network=string,subnetwork=string}}],orchestrator={slurm={config={prologEpilogTimeout=string,prologFlags,requeueExitCodes,requeueHoldExitCodes},defaultPartition=string,epilogBashScripts,loginNodes={count=int,disks=[{boot=boolean,sizeGb=int,sourceImage=string,type=string}],enableOsLogin=boolean,enablePublicIps=boolean,labels={string=string},machineType=string,serviceAccount={email=string,scopes},startupScript=string,storageConfigs=[{id=string,localMount=string}],zone=string},nodeSets=[{canIpForward=boolean,enableOsLogin=boolean,enablePublicIps=boolean,id=string,labels={string=string},maxDynamicNodeCount=int,resourceRequestId=string,serviceAccount={email=string,scopes},startupScript=string,staticNodeCount=int,storageConfigs=[{id=string,localMount=string}]}],partitions=[{exclusive=boolean,id=string,nodeSetIds=[string]}],prologBashScripts,taskEpilogBashScripts,taskPrologBashScripts}},storages=[{id=string,initializeParams={filestore={description=string,fileShares=[{capacityGb=int,fileShare=string}],filestore=string,protocol=string,tier=string},gcs={autoclass={enabled=boolean,terminalStorageClass=string},bucket=string,hierarchicalNamespace={enabled=boolean},storageClass=string},lustre={capacityGb=int,description=string,filesystem=string,lustre=string}},storageSource={bucket=string,filestore=string,lustre=string}}]
JSON Example:
--config='{"compute": {"resourceRequests": [{"disks": [{"boot": boolean, "sizeGb": int, "sourceImage": "string", "type": "string"}], "guestAccelerators": [{"acceleratorType": "string", "count": int}], "id": "string", "machineType": "string", "maxRunDuration": int, "provisioningModel": "string", "reservationAffinity": {"key": "string", "type": "string", "values"}, "terminationAction": "string", "zone": "string"}]}, "description": "string", "labels": {"string": "string"}, "name": "string", "networks": [{"initializeParams": {"description": "string", "network": "string"}, "networkSource": {"network": "string", "subnetwork": "string"}}], "orchestrator": {"slurm": {"config": {"prologEpilogTimeout": "string", "prologFlags", "requeueExitCodes", "requeueHoldExitCodes"}, "defaultPartition": "string", "epilogBashScripts", "loginNodes": {"count": int, "disks": [{"boot": boolean, "sizeGb": int, "sourceImage": "string", "type": "string"}], "enableOsLogin": boolean, "enablePublicIps": boolean, "labels": {"string": "string"}, "machineType": "string", "serviceAccount": {"email": "string", "scopes"}, "startupScript": "string", "storageConfigs": [{"id": "string", "localMount": "string"}], "zone": "string"}, "nodeSets": [{"canIpForward": boolean, "enableOsLogin": boolean, "enablePublicIps": boolean, "id": "string", "labels": {"string": "string"}, "maxDynamicNodeCount": int, "resourceRequestId": "string", "serviceAccount": {"email": "string", "scopes"}, "startupScript": "string", "staticNodeCount": int, "storageConfigs": [{"id": "string", "localMount": "string"}]}], "partitions": [{"exclusive": boolean, "id": "string", "nodeSetIds": ["string"]}], "prologBashScripts", "taskEpilogBashScripts", "taskPrologBashScripts"}}, "storages": [{"id": "string", "initializeParams": {"filestore": {"description": "string", "fileShares": [{"capacityGb": int, "fileShare": "string"}], "filestore": "string", "protocol": "string", "tier": "string"}, "gcs": {"autoclass": {"enabled": boolean, "terminalStorageClass": "string"}, "bucket": "string", "hierarchicalNamespace": {"enabled": boolean}, "storageClass": "string"}, "lustre": {"capacityGb": int, "description": "string", "filesystem": "string", "lustre": "string"}}, "storageSource": {"bucket": "string", "filestore": "string", "lustre": "string"}}]}'
File Example:
--config=path_to_file.(yaml|json)
-
Flag Configurations to define cluster spec.
--compute-resource-disks
=[boot
=BOOT
],[computeId
=COMPUTEID
],[sizeGb
=SIZEGB
],[sourceImage
=SOURCEIMAGE
],[type
=TYPE
]-
Parameters to define disk config for compute resource.
For e.g. --compute-resource-disks computeId={computeId},type={diskType},boot=true,sizeGb={diskSize},sourceImage={family/{image-family} | {image}}
Note:
- for boot disk, all fields are required.
- for non-boot disk, only computeId, type and sizeGb are required.
Required, sets
compute_resource_disks
value.boot
-
Sets
boot
value. computeId
-
Required, sets
computeId
value. sizeGb
-
Required, sets
sizeGb
value. sourceImage
-
Sets
sourceImage
value. type
-
Required, sets
type
value.
Shorthand Example:
--compute-resource-disks=boot=boolean,computeId=string,sizeGb=int,sourceImage=string,type=string --compute-resource-disks=boot=boolean,computeId=string,sizeGb=int,sourceImage=string,type=string
JSON Example:
--compute-resource-disks='[{"boot": boolean, "computeId": "string", "sizeGb": int, "sourceImage": "string", "type": "string"}]'
File Example:
--compute-resource-disks=path_to_file.(yaml|json)
This flag argument must be specified if any of the other arguments in this group are specified.
--compute-resources
=[guestAcceleratorCount
=GUESTACCELERATORCOUNT
],[guestAcceleratorType
=GUESTACCELERATORTYPE
],[machineType
=MACHINETYPE
],[maxRunDuration
=MAXRUNDURATION
],[name
=NAME
],[provisioningModel
=PROVISIONINGMODEL
],[terminationAction
=TERMINATIONACTION
],[zone
=ZONE
]-
Parameters to define cluster compute resource.
For e.g. --compute-resources name={computeId},zone={zone},machineType={machineType}
Supported provisioningModel values:
- PROVISIONING_MODEL_STANDARD
- PROVISIONING_MODEL_SPOT
- PROVISIONING_MODEL_FLEX_START
- PROVISIONING_MODEL_RESERVATION_BOUND
Supported terminationAction values:
- TERMINATION_ACTION_DELETE
- TERMINATION_ACTION_STOP.
Required, sets
compute_resources
value.guestAcceleratorCount
-
Sets
guestAcceleratorCount
value. guestAcceleratorType
-
Sets
guestAcceleratorType
value. machineType
-
Required, sets
machineType
value. maxRunDuration
-
Sets
maxRunDuration
value. name
-
Required, sets
name
value. provisioningModel
-
Sets
provisioningModel
value. terminationAction
-
Sets
terminationAction
value. zone
-
Required, sets
zone
value.
Shorthand Example:
--compute-resources=guestAcceleratorCount=int,guestAcceleratorType=string,machineType=string,maxRunDuration=int,name=string,provisioningModel=string,terminationAction=string,zone=string --compute-resources=guestAcceleratorCount=int,guestAcceleratorType=string,machineType=string,maxRunDuration=int,name=string,provisioningModel=string,terminationAction=string,zone=string
JSON Example:
--compute-resources='[{"guestAcceleratorCount": int, "guestAcceleratorType": "string", "machineType": "string", "maxRunDuration": int, "name": "string", "provisioningModel": "string", "terminationAction": "string", "zone": "string"}]'
File Example:
--compute-resources=path_to_file.(yaml|json)
This flag argument must be specified if any of the other arguments in this group are specified.
--slurm-login-node
=[count
=COUNT
],[enableOSLogin
=ENABLEOSLOGIN
],[enablePublicIPs
=ENABLEPUBLICIPS
],[labels
=LABELS
],[machineType
=MACHINETYPE
],[serviceAccountEmail
=SERVICEACCOUNTEMAIL
],[serviceAccountScopes
=SERVICEACCOUNTSCOPES
],[startupScript
=STARTUPSCRIPT
],[zone
=ZONE
]-
Parameters to define slurm cluster login node.
For e.g. --slurm-login-node machineType={machineType},zone={zone},count={count},enableOSLogin=true,enablePublicIPs=true,serviceAccountEmail={serviceAccountEmail},serviceAccountScopes=[scope1,scope2],startupScript="echo hello",labels="{key1=value1,key2=value2}"
Defaults:
- count: 1
- enableOSLogin: true
- enablePublicIPs: true
Note:
-
startupScript:
- Either str or file_path
- For file_path, only bash file format (.sh or .bash) is supported.
- For file_path, absolute or relative path to current work directory is supported.
Required, sets
slurm_login_node
value.
count
-
Sets
count
value. enableOSLogin
-
Sets
enableOSLogin
value. enablePublicIPs
-
Sets
enablePublicIPs
value. labels
-
Sets
labels
value.KEY
-
Sets
KEY
value. VALUE
-
Sets
VALUE
value.
machineType
-
Required, sets
machineType
value. serviceAccountEmail
-
Sets
serviceAccountEmail
value. serviceAccountScopes
-
Sets
serviceAccountScopes
value. startupScript
-
Sets
startupScript
value. zone
-
Required, sets
zone
value.
Shorthand Example:
--slurm-login-node=count=int,enableOSLogin=boolean,enablePublicIPs=boolean,labels={string=string},machineType=string,serviceAccountEmail=string,serviceAccountScopes,startupScript=string,zone=string
JSON Example:
--slurm-login-node='{"count": int, "enableOSLogin": boolean, "enablePublicIPs": boolean, "labels": {"string": "string"}, "machineType": "string", "serviceAccountEmail": "string", "serviceAccountScopes", "startupScript": "string", "zone": "string"}'
File Example:
--slurm-login-node=path_to_file.(yaml|json)
This flag argument must be specified if any of the other arguments in this group are specified.
--slurm-login-node-disks
=[boot
=BOOT
],[sizeGb
=SIZEGB
],[sourceImage
=SOURCEIMAGE
],[type
=TYPE
]-
Parameters to define disk config for slurm cluster login node.
For e.g. --slurm-login-node-disks type={diskType},boot=true,sizeGb={diskSize},sourceImage={family/{image-family} | {image}}
Note:
- for boot disk, all fields are required.
- for non-boot disk, only type and sizeGb are required.
Required, sets
slurm_login_node_disks
value.boot
-
Sets
boot
value. sizeGb
-
Required, sets
sizeGb
value. sourceImage
-
Sets
sourceImage
value. type
-
Required, sets
type
value.
Shorthand Example:
--slurm-login-node-disks=[{boot=boolean,sizeGb=int,sourceImage=string,type=string}] --slurm-login-node-disks=[{boot=boolean,sizeGb=int,sourceImage=string,type=string}]
JSON Example:
--slurm-login-node-disks='[{"boot": boolean, "sizeGb": int, "sourceImage": "string", "type": "string"}]'
File Example:
--slurm-login-node-disks=path_to_file.(yaml|json)
This flag argument must be specified if any of the other arguments in this group are specified.
--slurm-node-sets
=[computeId
=COMPUTEID
],[enableIPForward
=ENABLEIPFORWARD
],[enableOSLogin
=ENABLEOSLOGIN
],[enablePublicIPs
=ENABLEPUBLICIPS
],[labels
=LABELS
],[maxDynamicNodeCount
=MAXDYNAMICNODECOUNT
],[name
=NAME
],[serviceAccountEmail
=SERVICEACCOUNTEMAIL
],[serviceAccountScopes
=SERVICEACCOUNTSCOPES
],[startupScript
=STARTUPSCRIPT
],[staticNodeCount
=STATICNODECOUNT
]-
Parameters to define slurm cluster nodeset config.
For e.g. --slurm-node-sets name={nodesetId},computeId={computeId},staticNodeCount={staticNodeCount},maxDynamicNodeCount={maxDynamicNodeCount},enableOSLogin=true,enableIPForward=false,enablePublicIPs=false,serviceAccountEmail={serviceAccountEmail},serviceAccountScopes=[scope1,scope2],startupScript="echo hello",labels="{key1=value1,key2=value2}"
Defaults:
- staticNodeCount: 1
- enableOSLogin: true
Note:
-
startupScript:
- Either str or file_path
- For file_path, only bash file format (.sh or .bash) is supported.
- For file_path, absolute or relative path to current work directory is supported.
Required, sets
slurm_node_sets
value.
computeId
-
Required, sets
computeId
value. enableIPForward
-
Sets
enableIPForward
value. enableOSLogin
-
Sets
enableOSLogin
value. enablePublicIPs
-
Sets
enablePublicIPs
value. labels
-
Sets
labels
value.KEY
-
Sets
KEY
value. VALUE
-
Sets
VALUE
value.
maxDynamicNodeCount
-
Sets
maxDynamicNodeCount
value. name
-
Required, sets
name
value. serviceAccountEmail
-
Sets
serviceAccountEmail
value. serviceAccountScopes
-
Sets
serviceAccountScopes
value. startupScript
-
Sets
startupScript
value. staticNodeCount
-
Sets
staticNodeCount
value.
Shorthand Example:
--slurm-node-sets=computeId=string,enableIPForward=boolean,enableOSLogin=boolean,enablePublicIPs=boolean,labels={string=string},maxDynamicNodeCount=int,name=string,serviceAccountEmail=string,serviceAccountScopes=[string],startupScript=string,staticNodeCount=int --slurm-node-sets=computeId=string,enableIPForward=boolean,enableOSLogin=boolean,enablePublicIPs=boolean,labels={string=string},maxDynamicNodeCount=int,name=string,serviceAccountEmail=string,serviceAccountScopes=[string],startupScript=string,staticNodeCount=int
JSON Example:
--slurm-node-sets='[{"computeId": "string", "enableIPForward": boolean, "enableOSLogin": boolean, "enablePublicIPs": boolean, "labels": {"string": "string"}, "maxDynamicNodeCount": int, "name": "string", "serviceAccountEmail": "string", "serviceAccountScopes": ["string"], "startupScript": "string", "staticNodeCount": int}]'
File Example:
--slurm-node-sets=path_to_file.(yaml|json)
This flag argument must be specified if any of the other arguments in this group are specified.
--slurm-partitions
=[exclusive
=EXCLUSIVE
],[name
=NAME
],[nodesetIds
=NODESETIDS
]-
Parameters to define slurm cluster partitions.
For e.g. --slurm-partitions name={partitionId},nodesetIds=[{nodesetId1},{nodesetId2}],exclusive=false.
Required, sets
slurm_partitions
value.exclusive
-
Sets
exclusive
value. name
-
Required, sets
name
value. nodesetIds
-
Required, sets
nodesetIds
value.
Shorthand Example:
--slurm-partitions=exclusive=boolean,name=string,nodesetIds=[string] --slurm-partitions=exclusive=boolean,name=string,nodesetIds=[string]
JSON Example:
--slurm-partitions='[{"exclusive": boolean, "name": "string", "nodesetIds": ["string"]}]'
File Example:
--slurm-partitions=path_to_file.(yaml|json)
This flag argument must be specified if any of the other arguments in this group are specified.
--compute-resource-reservations
=[computeId
=COMPUTEID
],[key
=KEY
],[type
=TYPE
],[values
=VALUES
]-
Parameters to define reservation for compute resource.
For e.g. --compute-resource-reservations computeId={computeId},type=RESERVATION_TYPE_SPECIFIC_RESERVATION,values=zones/{zone}/reservations/{reservation}
Supported type values:
- RESERVATION_TYPE_NO_RESERVATION
- RESERVATION_TYPE_ANY_RESERVATION
- RESERVATION_TYPE_SPECIFIC_RESERVATION
Defaults:
- key: compute.googleapis.com/reservation-name (if type is RESERVATION_TYPE_SPECIFIC_RESERVATION or RESERVATION_TYPE_ANY_RESERVATION).
Sets
compute_resource_reservations
value.computeId
-
Required, sets
computeId
value. key
-
Sets
key
value. type
-
Required, sets
type
value. values
-
Sets
values
value.
Shorthand Example:
--compute-resource-reservations=computeId=string,key=string,type=string,values --compute-resource-reservations=computeId=string,key=string,type=string,values
JSON Example:
--compute-resource-reservations='[{"computeId": "string", "key": "string", "type": "string", "values"}]'
File Example:
--compute-resource-reservations=path_to_file.(yaml|json)
--create-filestores
=[description
=DESCRIPTION
],[fileshare
=FILESHARE
],[name
=NAME
],[protocol
=PROTOCOL
],[sizeGb
=SIZEGB
],[tier
=TIER
]-
Parameters to create a filestore instance.
For e.g. --create-filestores name=locations/{location}/instances/{filestore},tier=TIER_BASIC_HDD,sizeGb=100,fileshare=nfsshare
Supported tier values:
- TIER_BASIC_HDD
- TIER_BASIC_SSD
- TIER_HIGH_SCALE_SSD
- TIER_ZONAL
- TIER_ENTERPRISE
- TIER_REGIONAL
Supported protocol values:
- PROTOCOL_NFSV3
- PROTOCOL_NFSV41
- If not specified, defaults to PROTOCOL_NFSV3
Defaults:
- protocol: PROTOCOL_NFSV3.
Sets
create_filestores
value.description
-
Sets
description
value. -
Required, sets
fileshare
value. name
-
Required, sets
name
value. protocol
-
Sets
protocol
value. sizeGb
-
Required, sets
sizeGb
value. tier
-
Required, sets
tier
value.
Shorthand Example:
--create-filestores=description=string,fileshare=string,name=string,protocol=string,sizeGb=int,tier=string --create-filestores=description=string,fileshare=string,name=string,protocol=string,sizeGb=int,tier=string
JSON Example:
--create-filestores='[{"description": "string", "fileshare": "string", "name": "string", "protocol": "string", "sizeGb": int, "tier": "string"}]'
File Example:
--create-filestores=path_to_file.(yaml|json)
--create-gcs-buckets
=[enableAutoclass
=ENABLEAUTOCLASS
],[enableHNS
=ENABLEHNS
],[name
=NAME
],[storageClass
=STORAGECLASS
]-
Parameters to create a Google Cloud Storage bucket.
For e.g. --create-gcs-buckets name={bucket-path}
Supported storageClass values:
- STORAGE_CLASS_STANDARD
- STORAGE_CLASS_NEARLINE
- STORAGE_CLASS_COLDLINE
- STORAGE_CLASS_ARCHIVE
Defaults:
- storageClass: STORAGE_CLASS_STANDARD
Note:
- Either storageClass or enableAutoclass can be set.
- if enableAutoclass is set, enableHNS should not be set.
- HNS: Hierarchical namespace.
Sets
create_gcs_buckets
value.enableAutoclass
-
Sets
enableAutoclass
value. enableHNS
-
Sets
enableHNS
value. name
-
Required, sets
name
value. storageClass
-
Sets
storageClass
value.
Shorthand Example:
--create-gcs-buckets=enableAutoclass=boolean,enableHNS=boolean,name=string,storageClass=string --create-gcs-buckets=enableAutoclass=boolean,enableHNS=boolean,name=string,storageClass=string
JSON Example:
--create-gcs-buckets='[{"enableAutoclass": boolean, "enableHNS": boolean, "name": "string", "storageClass": "string"}]'
File Example:
--create-gcs-buckets=path_to_file.(yaml|json)
--create-lustres
=[description
=DESCRIPTION
],[filesystem
=FILESYSTEM
],[name
=NAME
],[sizeGb
=SIZEGB
]-
Parameters to create a Lustre instance.
For e.g. --create-lustres name=locations/{location}/instances/{lustre},sizeGb={lustreSize},filesystem={filesystem}.
Sets
create_lustres
value.description
-
Sets
description
value. filesystem
-
Required, sets
filesystem
value. name
-
Required, sets
name
value. sizeGb
-
Required, sets
sizeGb
value.
Shorthand Example:
--create-lustres=description=string,filesystem=string,name=string,sizeGb=int --create-lustres=description=string,filesystem=string,name=string,sizeGb=int
JSON Example:
--create-lustres='[{"description": "string", "filesystem": "string", "name": "string", "sizeGb": int}]'
File Example:
--create-lustres=path_to_file.(yaml|json)
--description
=DESCRIPTION
-
Description of the cluster.
For e.g. --description
(ALPHA)
Creates a Cluster Director resource. --filestores
=[FILESTORES
,…]-
Reference of existing filestore instance.
For e.g. --filestores locations/{location}/instances/{filestore}
--gcs-buckets
=[GCS_BUCKETS
,…]-
Reference of existing Google Cloud Storage bucket.
For e.g. --gcs-buckets {bucket-path}
--labels
=[LABELS
,…]-
Cluster labels as key value pairs.
For e.g. --labels key1=value1,key2=value2.
Sets
labels
value.KEY
-
Sets
KEY
value. VALUE
-
Sets
VALUE
value.
Shorthand Example:
--labels={string=string}
JSON Example:
--labels='{"string": "string"}'
File Example:
--labels=path_to_file.(yaml|json)
--lustres
=[LUSTRES
,…]-
Reference of existing Lustre instance.
For e.g. --lustres locations/{location}/instances/{lustre}
--slurm-config
=[jobEpilogBashScripts
=JOBEPILOGBASHSCRIPTS
],[jobPrologBashScripts
=JOBPROLOGBASHSCRIPTS
],[prologEpilogTimeout
=PROLOGEPILOGTIMEOUT
],[prologFlags
=PROLOGFLAGS
],[requeueExitCodes
=REQUEUEEXITCODES
],[requeueHoldExitCodes
=REQUEUEHOLDEXITCODES
],[taskEpilogBashScripts
=TASKEPILOGBASHSCRIPTS
],[taskPrologBashScripts
=TASKPROLOGBASHSCRIPTS
]-
Parameters to define slurm cluster config.
For e.g. --slurm-config requeueExitCodes=[1,2,3],requeueHoldExitCodes=[4,5,6],prologFlags=[ALLOC,CONTAIN,NO_HOLD],prologEpilogTimeout=10000s,jobPrologBashScripts=["echo hello",…],jobEpilogBashScripts=["echo goodbye",…],taskPrologBashScripts=["echo hi",…],taskEpilogBashScripts=["echo bye",…]
Supported prologFlags values:
- ALLOC
- CONTAIN
- DEFER_BATCH
- NO_HOLD
- FORCE_REQUEUE_ON_FAIL
- RUN_IN_JOB
- SERIAL
- X11
Note:
-
jobPrologBashScripts, jobEpilogBashScripts, taskPrologBashScripts,
taskEpilogBashScripts:
- Either str or file_path
- For file_path, only bash file format (.sh or .bash) is supported.
- For file_path, absolute or relative path to current work directory is supported.
Sets
slurm_config
value.
jobEpilogBashScripts
-
Sets
jobEpilogBashScripts
value. jobPrologBashScripts
-
Sets
jobPrologBashScripts
value. prologEpilogTimeout
-
Sets
prologEpilogTimeout
value. prologFlags
-
Sets
prologFlags
value. requeueExitCodes
-
Sets
requeueExitCodes
value. requeueHoldExitCodes
-
Sets
requeueHoldExitCodes
value. taskEpilogBashScripts
-
Sets
taskEpilogBashScripts
value. taskPrologBashScripts
-
Sets
taskPrologBashScripts
value.
Shorthand Example:
--slurm-config=jobEpilogBashScripts=[string],jobPrologBashScripts=[string],prologEpilogTimeout=string,prologFlags=[string],requeueExitCodes=[int],requeueHoldExitCodes=[int],taskEpilogBashScripts=[string],taskPrologBashScripts=[string]
JSON Example:
--slurm-config='{"jobEpilogBashScripts": ["string"], "jobPrologBashScripts": ["string"], "prologEpilogTimeout": "string", "prologFlags": ["string"], "requeueExitCodes": [int], "requeueHoldExitCodes": [int], "taskEpilogBashScripts": ["string"], "taskPrologBashScripts": ["string"]}'
File Example:
--slurm-config=path_to_file.(yaml|json)
--slurm-default-partition
=SLURM_DEFAULT_PARTITION
-
Parameters to define slurm cluster default partition.
For e.g. --slurm-default-partition {partitionId}
-
Network configuration for the cluster.
Exactly one of these must be specified:
--create-network
=CREATE_NETWORK
-
Name of the network to be created.
For e.g. --create-network {network}
-
Use an existing network source for the cluster.
--network
=NETWORK
-
Reference of existing network name.
For e.g. --network {network}
--subnet
=SUBNET
-
Reference of existing subnetwork name.
For e.g. --subnet regions/{region}/subnetworks/{subnetwork}
-
Cluster configuration for provisioning.
- OPTIONAL FLAGS
-
--async
- Return immediately, without waiting for the operation in progress to complete.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file
,--account
,--billing-project
,--configuration
,--flags-file
,--flatten
,--format
,--help
,--impersonate-service-account
,--log-http
,--project
,--quiet
,--trace-token
,--user-output-enabled
,--verbosity
.Run
$ gcloud help
for details. - NOTES
- This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.
gcloud alpha cluster-director clusters create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-09 UTC.