From a74adb07fa1691709849490746a0219bac4b80e9 Mon Sep 17 00:00:00 2001 From: kirill lykov Date: Fri, 27 May 2022 18:34:41 +0200 Subject: [PATCH] Upd doc comment for cloud CreateInstances (#25609) --- net/scripts/azure-provider.sh | 14 ++++++++------ net/scripts/colo-provider.sh | 17 +++++++++-------- net/scripts/ec2-provider.sh | 18 +++++++++++++----- net/scripts/gce-provider.sh | 15 ++++++++------- 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/net/scripts/azure-provider.sh b/net/scripts/azure-provider.sh index e4d2c2bad..e7824963f 100755 --- a/net/scripts/azure-provider.sh +++ b/net/scripts/azure-provider.sh @@ -173,28 +173,30 @@ cloud_Initialize() { } # -# cloud_CreateInstances [networkName] [namePrefix] [numNodes] [imageName] -# [machineType] [bootDiskSize] [enableGpu] -# [startupScript] [address] +# cloud_CreateInstances [networkName] [namePrefix] [numNodes] +# [enableGpu] [machineType] [zone] +# [bootDiskSize] [startupScript] [address] +# [bootDiskType] [additionalDiskSize] [preemptible] # # Creates one more identical instances. # # networkName - unique name of this testnet # namePrefix - unique string to prefix all the instance names with # numNodes - number of instances to create -# imageName - Disk image for the instances +# enableGpu - Optionally enable GPU, use the value "true" to enable +# eg, request 4 K80 GPUs with "count=4,type=nvidia-tesla-k80" # machineType - GCE machine type. Note that this may also include an # `--accelerator=` or other |gcloud compute instances create| # options +# zone - cloud zone # bootDiskSize - Optional size of the boot disk in GB -# enableGpu - Optionally enable GPU, use the value "true" to enable -# eg, request 4 K80 GPUs with "count=4,type=nvidia-tesla-k80" # startupScript - Optional startup script to execute when the instance boots # address - Optional name of the GCE static IP address to attach to the # instance. Requires that |numNodes| = 1 and that addressName # has been provisioned in the GCE region that is hosting `$zone` # bootDiskType - Optional specify SSD or HDD boot disk # additionalDiskSize - Optional specify size of additional storage volume +# preemptible - Optionally request a preemptible instance ("true") # # Tip: use cloud_FindInstances to locate the instances once this function # returns diff --git a/net/scripts/colo-provider.sh b/net/scripts/colo-provider.sh index c0a58821c..4275612a8 100755 --- a/net/scripts/colo-provider.sh +++ b/net/scripts/colo-provider.sh @@ -128,29 +128,30 @@ cloud_Initialize() { } # -# cloud_CreateInstances [networkName] [namePrefix] [numNodes] [imageName] -# [machineType] [bootDiskSize] [enableGpu] -# [startupScript] [address] +# cloud_CreateInstances [networkName] [namePrefix] [numNodes] +# [enableGpu] [machineType] [zone] +# [bootDiskSize] [startupScript] [address] +# [bootDiskType] [additionalDiskSize] [preemptible] # # Creates one more identical instances. # # networkName - unique name of this testnet # namePrefix - unique string to prefix all the instance names with # numNodes - number of instances to create -# imageName - Disk image for the instances +# enableGpu - Optionally enable GPU, use the value "true" to enable +# eg, request 4 K80 GPUs with "count=4,type=nvidia-tesla-k80" # machineType - GCE machine type. Note that this may also include an # `--accelerator=` or other |gcloud compute instances create| # options +# zone - cloud zone # bootDiskSize - Optional size of the boot disk in GB -# enableGpu - Optionally enable GPU, use the value "true" to enable -# eg, request 4 K80 GPUs with "count=4,type=nvidia-tesla-k80" # startupScript - Optional startup script to execute when the instance boots # address - Optional name of the GCE static IP address to attach to the # instance. Requires that |numNodes| = 1 and that addressName -# has been provisioned in the GCE region that is hosting `${zone}` +# has been provisioned in the GCE region that is hosting `$zone` # bootDiskType - Optional specify SSD or HDD boot disk # additionalDiskSize - Optional specify size of additional storage volume -# preemptible - Optionally request a preemptible instance ("true") +# preemptible - Optionally request a preemptible instance ("true") # # Tip: use cloud_FindInstances to locate the instances once this function # returns diff --git a/net/scripts/ec2-provider.sh b/net/scripts/ec2-provider.sh index 365b8119b..03e420440 100755 --- a/net/scripts/ec2-provider.sh +++ b/net/scripts/ec2-provider.sh @@ -139,23 +139,30 @@ cloud_Initialize() { } # -# cloud_CreateInstances [networkName] [namePrefix] [numNodes] [imageName] -# [machineType] [bootDiskSize] [startupScript] [address] +# cloud_CreateInstances [networkName] [namePrefix] [numNodes] +# [enableGpu] [machineType] [zone] +# [bootDiskSize] [startupScript] [address] +# [bootDiskType] [additionalDiskSize] [preemptible] # # Creates one more identical instances. # # networkName - unique name of this testnet # namePrefix - unique string to prefix all the instance names with # numNodes - number of instances to create -# imageName - Disk image for the instances -# machineType - GCE machine type +# enableGpu - Optionally enable GPU, use the value "true" to enable +# eg, request 4 K80 GPUs with "count=4,type=nvidia-tesla-k80" +# machineType - GCE machine type. Note that this may also include an +# `--accelerator=` or other |gcloud compute instances create| +# options +# zone - cloud zone # bootDiskSize - Optional size of the boot disk in GB # startupScript - Optional startup script to execute when the instance boots # address - Optional name of the GCE static IP address to attach to the # instance. Requires that |numNodes| = 1 and that addressName -# has been provisioned in the GCE region that is hosting |zone| +# has been provisioned in the GCE region that is hosting `$zone` # bootDiskType - Optional specify SSD or HDD boot disk # additionalDiskSize - Optional specify size of additional storage volume +# preemptible - Optionally request a preemptible instance ("true") # # Tip: use cloud_FindInstances to locate the instances once this function # returns @@ -169,6 +176,7 @@ cloud_CreateInstances() { declare optionalBootDiskSize="$7" declare optionalStartupScript="$8" declare optionalAddress="$9" + declare region= region=$(__cloud_GetRegion "$zone") diff --git a/net/scripts/gce-provider.sh b/net/scripts/gce-provider.sh index f2f8e2cc0..a4c9deb15 100755 --- a/net/scripts/gce-provider.sh +++ b/net/scripts/gce-provider.sh @@ -130,29 +130,30 @@ cloud_Initialize() { } # -# cloud_CreateInstances [networkName] [namePrefix] [numNodes] [imageName] -# [machineType] [bootDiskSize] [enableGpu] -# [startupScript] [address] +# cloud_CreateInstances [networkName] [namePrefix] [numNodes] +# [enableGpu] [machineType] [zone] +# [bootDiskSize] [startupScript] [address] +# [bootDiskType] [additionalDiskSize] [preemptible] # # Creates one more identical instances. # # networkName - unique name of this testnet # namePrefix - unique string to prefix all the instance names with # numNodes - number of instances to create -# imageName - Disk image for the instances +# enableGpu - Optionally enable GPU, use the value "true" to enable +# eg, request 4 K80 GPUs with "count=4,type=nvidia-tesla-k80" # machineType - GCE machine type. Note that this may also include an # `--accelerator=` or other |gcloud compute instances create| # options +# zone - cloud zone # bootDiskSize - Optional size of the boot disk in GB -# enableGpu - Optionally enable GPU, use the value "true" to enable -# eg, request 4 K80 GPUs with "count=4,type=nvidia-tesla-k80" # startupScript - Optional startup script to execute when the instance boots # address - Optional name of the GCE static IP address to attach to the # instance. Requires that |numNodes| = 1 and that addressName # has been provisioned in the GCE region that is hosting `$zone` # bootDiskType - Optional specify SSD or HDD boot disk # additionalDiskSize - Optional specify size of additional storage volume -# preemptible - Optionally request a preemptible instance ("true") +# preemptible - Optionally request a preemptible instance ("true") # # Tip: use cloud_FindInstances to locate the instances once this function # returns