From 94b9f27e46523be932f5e947c38f13fbcd4343aa Mon Sep 17 00:00:00 2001 From: Marwan Ahmed Date: Fri, 27 Dec 2019 12:13:16 +0800 Subject: [PATCH 1/4] Generate azure instance types. --- .../azure/azure_instance_types.go | 1899 ++++++++++------- .../azure/azure_instance_types/gen.go | 164 ++ .../cloudprovider/azure/azure_manager.go | 2 + .../cloudprovider/azure/azure_scale_set.go | 2 +- hack/boilerplate/boilerplate.py | 3 +- 5 files changed, 1348 insertions(+), 722 deletions(-) create mode 100644 cluster-autoscaler/cloudprovider/azure/azure_instance_types/gen.go diff --git a/cluster-autoscaler/cloudprovider/azure/azure_instance_types.go b/cluster-autoscaler/cloudprovider/azure/azure_instance_types.go index 6dd9406bcd2d..ea7eece6229b 100644 --- a/cluster-autoscaler/cloudprovider/azure/azure_instance_types.go +++ b/cluster-autoscaler/cloudprovider/azure/azure_instance_types.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,9 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// This file was generated by go generate; DO NOT EDIT + package azure -type instanceType struct { +// InstanceType is the sepc of Azure instance +type InstanceType struct { InstanceType string VCPU int64 MemoryMb int64 @@ -24,71 +27,71 @@ type instanceType struct { } // InstanceTypes is a map of azure resources -var InstanceTypes = map[string]*instanceType{ - "Standard_D4s_v3": { - InstanceType: "Standard_D4s_v3", - VCPU: 4, - MemoryMb: 16384, +var InstanceTypes = map[string]*InstanceType{ + "Basic_A0": { + InstanceType: "Basic_A0", + VCPU: 1, + MemoryMb: 0, GPU: 0, }, - "Standard_DS11_v2_Promo": { - InstanceType: "Standard_DS11_v2_Promo", + "Basic_A1": { + InstanceType: "Basic_A1", + VCPU: 1, + MemoryMb: 1024, + GPU: 0, + }, + "Basic_A2": { + InstanceType: "Basic_A2", VCPU: 2, - MemoryMb: 14336, + MemoryMb: 3072, GPU: 0, }, - "Standard_D8s_v3": { - InstanceType: "Standard_D8s_v3", - VCPU: 8, - MemoryMb: 32768, + "Basic_A3": { + InstanceType: "Basic_A3", + VCPU: 4, + MemoryMb: 7168, GPU: 0, }, - "Standard_D32_v3": { - InstanceType: "Standard_D32_v3", - VCPU: 32, - MemoryMb: 131072, + "Basic_A4": { + InstanceType: "Basic_A4", + VCPU: 8, + MemoryMb: 14336, GPU: 0, }, - "Standard_G1": { - InstanceType: "Standard_G1", - VCPU: 2, - MemoryMb: 28672, + "Standard_A0": { + InstanceType: "Standard_A0", + VCPU: 1, + MemoryMb: 0, GPU: 0, }, - "Standard_G2": { - InstanceType: "Standard_G2", - VCPU: 4, - MemoryMb: 57344, + "Standard_A1": { + InstanceType: "Standard_A1", + VCPU: 1, + MemoryMb: 1024, GPU: 0, }, - "Standard_G3": { - InstanceType: "Standard_G3", + "Standard_A10": { + InstanceType: "Standard_A10", VCPU: 8, - MemoryMb: 114688, + MemoryMb: 57344, GPU: 0, }, - "Standard_G4": { - InstanceType: "Standard_G4", + "Standard_A11": { + InstanceType: "Standard_A11", VCPU: 16, - MemoryMb: 229376, + MemoryMb: 114688, GPU: 0, }, - "Standard_G5": { - InstanceType: "Standard_G5", - VCPU: 32, - MemoryMb: 458752, + "Standard_A1_v2": { + InstanceType: "Standard_A1_v2", + VCPU: 1, + MemoryMb: 2048, GPU: 0, }, - "Standard_NV24": { - InstanceType: "Standard_NV24", - VCPU: 24, - MemoryMb: 229376, - GPU: 4, - }, - "Standard_E4s_v3": { - InstanceType: "Standard_E4s_v3", - VCPU: 4, - MemoryMb: 32768, + "Standard_A2": { + InstanceType: "Standard_A2", + VCPU: 2, + MemoryMb: 3072, GPU: 0, }, "Standard_A2_v2": { @@ -97,190 +100,172 @@ var InstanceTypes = map[string]*instanceType{ MemoryMb: 4096, GPU: 0, }, - "Standard_E2_v3": { - InstanceType: "Standard_E2_v3", + "Standard_A2m_v2": { + InstanceType: "Standard_A2m_v2", VCPU: 2, MemoryMb: 16384, GPU: 0, }, - "Standard_D2s_v3": { - InstanceType: "Standard_D2s_v3", - VCPU: 2, - MemoryMb: 8192, - GPU: 0, - }, - "Standard_M64-16ms": { - InstanceType: "Standard_M64-16ms", - VCPU: 0, - MemoryMb: 0, + "Standard_A3": { + InstanceType: "Standard_A3", + VCPU: 4, + MemoryMb: 7168, GPU: 0, }, - "Standard_D5_v2": { - InstanceType: "Standard_D5_v2", - VCPU: 16, - MemoryMb: 57344, + "Standard_A4": { + InstanceType: "Standard_A4", + VCPU: 8, + MemoryMb: 14336, GPU: 0, }, - "Standard_A1_v2": { - InstanceType: "Standard_A1_v2", - VCPU: 1, - MemoryMb: 2048, + "Standard_A4_v2": { + InstanceType: "Standard_A4_v2", + VCPU: 4, + MemoryMb: 8192, GPU: 0, }, - "Standard_A8m_v2": { - InstanceType: "Standard_A8m_v2", - VCPU: 8, - MemoryMb: 65536, + "Standard_A4m_v2": { + InstanceType: "Standard_A4m_v2", + VCPU: 4, + MemoryMb: 32768, GPU: 0, }, - "Standard_D11_v2_Promo": { - InstanceType: "Standard_D11_v2_Promo", + "Standard_A5": { + InstanceType: "Standard_A5", VCPU: 2, MemoryMb: 14336, GPU: 0, }, - "Standard_DS14-4_v2": { - InstanceType: "Standard_DS14-4_v2", - VCPU: 16, - MemoryMb: 114688, + "Standard_A6": { + InstanceType: "Standard_A6", + VCPU: 4, + MemoryMb: 28672, GPU: 0, }, - "Standard_M64ms": { - InstanceType: "Standard_M64ms", - VCPU: 0, - MemoryMb: 0, + "Standard_A7": { + InstanceType: "Standard_A7", + VCPU: 8, + MemoryMb: 57344, GPU: 0, }, - "Standard_E8s_v3": { - InstanceType: "Standard_E8s_v3", + "Standard_A8": { + InstanceType: "Standard_A8", VCPU: 8, - MemoryMb: 65536, + MemoryMb: 57344, GPU: 0, }, - "Standard_E64i_v3": { - InstanceType: "Standard_E64i_v3", - VCPU: 64, - MemoryMb: 442368, + "Standard_A8_v2": { + InstanceType: "Standard_A8_v2", + VCPU: 8, + MemoryMb: 16384, GPU: 0, }, - "Standard_A4m_v2": { - InstanceType: "Standard_A4m_v2", - VCPU: 4, - MemoryMb: 32768, + "Standard_A8m_v2": { + InstanceType: "Standard_A8m_v2", + VCPU: 8, + MemoryMb: 65536, GPU: 0, }, - "Standard_ND6s": { - InstanceType: "Standard_ND6s", - VCPU: 6, - MemoryMb: 114688, - GPU: 1, - }, - "Standard_H16r": { - InstanceType: "Standard_H16r", + "Standard_A9": { + InstanceType: "Standard_A9", VCPU: 16, MemoryMb: 114688, GPU: 0, }, - "Standard_D4": { - InstanceType: "Standard_D4", - VCPU: 8, - MemoryMb: 28672, + "Standard_B12ms": { + InstanceType: "Standard_B12ms", + VCPU: 12, + MemoryMb: 49152, GPU: 0, }, - "Standard_DS14-8_v2": { - InstanceType: "Standard_DS14-8_v2", + "Standard_B16ms": { + InstanceType: "Standard_B16ms", VCPU: 16, - MemoryMb: 114688, - GPU: 0, - }, - "Standard_E8_v3": { - InstanceType: "Standard_E8_v3", - VCPU: 8, MemoryMb: 65536, GPU: 0, }, - "Standard_D1": { - InstanceType: "Standard_D1", + "Standard_B1ls": { + InstanceType: "Standard_B1ls", VCPU: 1, - MemoryMb: 3584, - GPU: 0, - }, - "Standard_M64s": { - InstanceType: "Standard_M64s", - VCPU: 0, MemoryMb: 0, GPU: 0, }, - "Standard_D3": { - InstanceType: "Standard_D3", - VCPU: 4, - MemoryMb: 14336, - GPU: 0, - }, - "Standard_D2": { - InstanceType: "Standard_D2", - VCPU: 2, - MemoryMb: 7168, - GPU: 0, - }, "Standard_B1ms": { InstanceType: "Standard_B1ms", VCPU: 1, MemoryMb: 2048, GPU: 0, }, - "Standard_GS5-16": { - InstanceType: "Standard_GS5-16", - VCPU: 32, - MemoryMb: 458752, + "Standard_B1s": { + InstanceType: "Standard_B1s", + VCPU: 1, + MemoryMb: 1024, GPU: 0, }, - "Standard_D2_v2_Promo": { - InstanceType: "Standard_D2_v2_Promo", + "Standard_B20ms": { + InstanceType: "Standard_B20ms", + VCPU: 20, + MemoryMb: 81920, + GPU: 0, + }, + "Standard_B2ms": { + InstanceType: "Standard_B2ms", VCPU: 2, - MemoryMb: 7168, + MemoryMb: 8192, GPU: 0, }, - "Standard_DS13_v2": { - InstanceType: "Standard_DS13_v2", - VCPU: 8, - MemoryMb: 57344, + "Standard_B2s": { + InstanceType: "Standard_B2s", + VCPU: 2, + MemoryMb: 4096, GPU: 0, }, - "Standard_H8m": { - InstanceType: "Standard_H8m", - VCPU: 8, - MemoryMb: 114688, + "Standard_B4ms": { + InstanceType: "Standard_B4ms", + VCPU: 4, + MemoryMb: 16384, GPU: 0, }, - "Standard_E32-8s_v3": { - InstanceType: "Standard_E32-8s_v3", - VCPU: 32, - MemoryMb: 262144, + "Standard_B8ms": { + InstanceType: "Standard_B8ms", + VCPU: 8, + MemoryMb: 32768, GPU: 0, }, - "Standard_F72s_v2": { - InstanceType: "Standard_F72s_v2", - VCPU: 0, - MemoryMb: 0, + "Standard_D1": { + InstanceType: "Standard_D1", + VCPU: 1, + MemoryMb: 3072, GPU: 0, }, - "Standard_F32s_v2": { - InstanceType: "Standard_F32s_v2", - VCPU: 0, - MemoryMb: 0, + "Standard_D11": { + InstanceType: "Standard_D11", + VCPU: 2, + MemoryMb: 14336, GPU: 0, }, - "Standard_F2s": { - InstanceType: "Standard_F2s", + "Standard_D11_v2": { + InstanceType: "Standard_D11_v2", VCPU: 2, - MemoryMb: 4096, + MemoryMb: 14336, GPU: 0, }, - "Standard_D14_v2": { - InstanceType: "Standard_D14_v2", - VCPU: 16, - MemoryMb: 114688, + "Standard_D11_v2_Promo": { + InstanceType: "Standard_D11_v2_Promo", + VCPU: 2, + MemoryMb: 14336, + GPU: 0, + }, + "Standard_D12": { + InstanceType: "Standard_D12", + VCPU: 4, + MemoryMb: 28672, + GPU: 0, + }, + "Standard_D12_v2": { + InstanceType: "Standard_D12_v2", + VCPU: 4, + MemoryMb: 28672, GPU: 0, }, "Standard_D12_v2_Promo": { @@ -289,70 +274,142 @@ var InstanceTypes = map[string]*instanceType{ MemoryMb: 28672, GPU: 0, }, - "Standard_DS13-2_v2": { - InstanceType: "Standard_DS13-2_v2", + "Standard_D13": { + InstanceType: "Standard_D13", VCPU: 8, MemoryMb: 57344, GPU: 0, }, - "Standard_D4_v2_Promo": { - InstanceType: "Standard_D4_v2_Promo", + "Standard_D13_v2": { + InstanceType: "Standard_D13_v2", VCPU: 8, - MemoryMb: 28672, + MemoryMb: 57344, GPU: 0, }, - "Standard_B2ms": { - InstanceType: "Standard_B2ms", - VCPU: 2, - MemoryMb: 8192, + "Standard_D13_v2_Promo": { + InstanceType: "Standard_D13_v2_Promo", + VCPU: 8, + MemoryMb: 57344, GPU: 0, }, - "Standard_D3_v2_Promo": { - InstanceType: "Standard_D3_v2_Promo", - VCPU: 4, - MemoryMb: 14336, + "Standard_D14": { + InstanceType: "Standard_D14", + VCPU: 16, + MemoryMb: 114688, GPU: 0, }, - "Standard_DS12_v2_Promo": { - InstanceType: "Standard_DS12_v2_Promo", - VCPU: 4, - MemoryMb: 28672, + "Standard_D14_v2": { + InstanceType: "Standard_D14_v2", + VCPU: 16, + MemoryMb: 114688, GPU: 0, }, - "Standard_NC6s_v3": { - InstanceType: "Standard_NC6s_v3", - VCPU: 6, + "Standard_D14_v2_Promo": { + InstanceType: "Standard_D14_v2_Promo", + VCPU: 16, MemoryMb: 114688, - GPU: 1, + GPU: 0, }, - "Standard_NC6s_v2": { - InstanceType: "Standard_NC6s_v2", - VCPU: 6, - MemoryMb: 114688, - GPU: 1, + "Standard_D15_v2": { + InstanceType: "Standard_D15_v2", + VCPU: 20, + MemoryMb: 143360, + GPU: 0, }, - "Standard_DS13-4_v2": { - InstanceType: "Standard_DS13-4_v2", - VCPU: 8, - MemoryMb: 57344, + "Standard_D16_v3": { + InstanceType: "Standard_D16_v3", + VCPU: 16, + MemoryMb: 65536, GPU: 0, }, - "Standard_NC24": { - InstanceType: "Standard_NC24", - VCPU: 24, - MemoryMb: 229376, - GPU: 4, + "Standard_D16a_v4": { + InstanceType: "Standard_D16a_v4", + VCPU: 16, + MemoryMb: 65536, + GPU: 0, }, - "Standard_D64_v3": { - InstanceType: "Standard_D64_v3", - VCPU: 64, - MemoryMb: 262144, + "Standard_D16as_v4": { + InstanceType: "Standard_D16as_v4", + VCPU: 16, + MemoryMb: 65536, GPU: 0, }, - "Standard_E32s_v3": { - InstanceType: "Standard_E32s_v3", + "Standard_D16s_v3": { + InstanceType: "Standard_D16s_v3", + VCPU: 16, + MemoryMb: 65536, + GPU: 0, + }, + "Standard_D1_v2": { + InstanceType: "Standard_D1_v2", + VCPU: 1, + MemoryMb: 3072, + GPU: 0, + }, + "Standard_D2": { + InstanceType: "Standard_D2", + VCPU: 2, + MemoryMb: 7168, + GPU: 0, + }, + "Standard_D2_v2": { + InstanceType: "Standard_D2_v2", + VCPU: 2, + MemoryMb: 7168, + GPU: 0, + }, + "Standard_D2_v2_Promo": { + InstanceType: "Standard_D2_v2_Promo", + VCPU: 2, + MemoryMb: 7168, + GPU: 0, + }, + "Standard_D2_v3": { + InstanceType: "Standard_D2_v3", + VCPU: 2, + MemoryMb: 8192, + GPU: 0, + }, + "Standard_D2a_v4": { + InstanceType: "Standard_D2a_v4", + VCPU: 2, + MemoryMb: 8192, + GPU: 0, + }, + "Standard_D2as_v4": { + InstanceType: "Standard_D2as_v4", + VCPU: 2, + MemoryMb: 8192, + GPU: 0, + }, + "Standard_D2s_v3": { + InstanceType: "Standard_D2s_v3", + VCPU: 2, + MemoryMb: 8192, + GPU: 0, + }, + "Standard_D3": { + InstanceType: "Standard_D3", + VCPU: 4, + MemoryMb: 14336, + GPU: 0, + }, + "Standard_D32_v3": { + InstanceType: "Standard_D32_v3", VCPU: 32, - MemoryMb: 262144, + MemoryMb: 131072, + GPU: 0, + }, + "Standard_D32a_v4": { + InstanceType: "Standard_D32a_v4", + VCPU: 32, + MemoryMb: 131072, + GPU: 0, + }, + "Standard_D32as_v4": { + InstanceType: "Standard_D32as_v4", + VCPU: 32, + MemoryMb: 131072, GPU: 0, }, "Standard_D32s_v3": { @@ -361,10 +418,34 @@ var InstanceTypes = map[string]*instanceType{ MemoryMb: 131072, GPU: 0, }, - "Standard_D4_v3": { - InstanceType: "Standard_D4_v3", + "Standard_D3_v2": { + InstanceType: "Standard_D3_v2", VCPU: 4, - MemoryMb: 16384, + MemoryMb: 14336, + GPU: 0, + }, + "Standard_D3_v2_Promo": { + InstanceType: "Standard_D3_v2_Promo", + VCPU: 4, + MemoryMb: 14336, + GPU: 0, + }, + "Standard_D4": { + InstanceType: "Standard_D4", + VCPU: 8, + MemoryMb: 28672, + GPU: 0, + }, + "Standard_D48_v3": { + InstanceType: "Standard_D48_v3", + VCPU: 48, + MemoryMb: 196608, + GPU: 0, + }, + "Standard_D48s_v3": { + InstanceType: "Standard_D48s_v3", + VCPU: 48, + MemoryMb: 196608, GPU: 0, }, "Standard_D4_v2": { @@ -373,38 +454,38 @@ var InstanceTypes = map[string]*instanceType{ MemoryMb: 28672, GPU: 0, }, - "Standard_D13_v2_Promo": { - InstanceType: "Standard_D13_v2_Promo", + "Standard_D4_v2_Promo": { + InstanceType: "Standard_D4_v2_Promo", VCPU: 8, - MemoryMb: 57344, + MemoryMb: 28672, GPU: 0, }, - "Standard_L8s": { - InstanceType: "Standard_L8s", - VCPU: 8, - MemoryMb: 65536, + "Standard_D4_v3": { + InstanceType: "Standard_D4_v3", + VCPU: 4, + MemoryMb: 16384, GPU: 0, }, - "Standard_M64-32ms": { - InstanceType: "Standard_M64-32ms", - VCPU: 0, - MemoryMb: 0, + "Standard_D4a_v4": { + InstanceType: "Standard_D4a_v4", + VCPU: 4, + MemoryMb: 16384, GPU: 0, }, - "Standard_DS3_v2_Promo": { - InstanceType: "Standard_DS3_v2_Promo", + "Standard_D4as_v4": { + InstanceType: "Standard_D4as_v4", VCPU: 4, - MemoryMb: 14336, + MemoryMb: 16384, GPU: 0, }, - "Standard_ND12s": { - InstanceType: "Standard_ND12s", - VCPU: 12, - MemoryMb: 688128, - GPU: 2, + "Standard_D4s_v3": { + InstanceType: "Standard_D4s_v3", + VCPU: 4, + MemoryMb: 16384, + GPU: 0, }, - "Standard_DS5_v2_Promo": { - InstanceType: "Standard_DS5_v2_Promo", + "Standard_D5_v2": { + InstanceType: "Standard_D5_v2", VCPU: 16, MemoryMb: 57344, GPU: 0, @@ -415,34 +496,70 @@ var InstanceTypes = map[string]*instanceType{ MemoryMb: 57344, GPU: 0, }, - "Standard_D16_v3": { - InstanceType: "Standard_D16_v3", - VCPU: 16, - MemoryMb: 65638, + "Standard_D64_v3": { + InstanceType: "Standard_D64_v3", + VCPU: 64, + MemoryMb: 262144, GPU: 0, }, - "Standard_E64-32s_v3": { - InstanceType: "Standard_E64-32s_v3", + "Standard_D64s_v3": { + InstanceType: "Standard_D64s_v3", VCPU: 64, - MemoryMb: 442368, + MemoryMb: 262144, GPU: 0, }, - "Standard_GS5-8": { - InstanceType: "Standard_GS5-8", - VCPU: 32, - MemoryMb: 458752, + "Standard_D8_v3": { + InstanceType: "Standard_D8_v3", + VCPU: 8, + MemoryMb: 32768, GPU: 0, }, - "Standard_DS13_v2_Promo": { - InstanceType: "Standard_DS13_v2_Promo", + "Standard_D8a_v4": { + InstanceType: "Standard_D8a_v4", VCPU: 8, - MemoryMb: 57344, + MemoryMb: 32768, GPU: 0, }, - "Standard_F16s_v2": { - InstanceType: "Standard_F16s_v2", - VCPU: 0, - MemoryMb: 0, + "Standard_D8as_v4": { + InstanceType: "Standard_D8as_v4", + VCPU: 8, + MemoryMb: 32768, + GPU: 0, + }, + "Standard_D8s_v3": { + InstanceType: "Standard_D8s_v3", + VCPU: 8, + MemoryMb: 32768, + GPU: 0, + }, + "Standard_DC2s": { + InstanceType: "Standard_DC2s", + VCPU: 2, + MemoryMb: 8192, + GPU: 0, + }, + "Standard_DC4s": { + InstanceType: "Standard_DC4s", + VCPU: 4, + MemoryMb: 16384, + GPU: 0, + }, + "Standard_DS1": { + InstanceType: "Standard_DS1", + VCPU: 1, + MemoryMb: 3072, + GPU: 0, + }, + "Standard_DS11": { + InstanceType: "Standard_DS11", + VCPU: 2, + MemoryMb: 14336, + GPU: 0, + }, + "Standard_DS11-1_v2": { + InstanceType: "Standard_DS11-1_v2", + VCPU: 2, + MemoryMb: 14336, GPU: 0, }, "Standard_DS11_v2": { @@ -451,46 +568,70 @@ var InstanceTypes = map[string]*instanceType{ MemoryMb: 14336, GPU: 0, }, - "Standard_D11": { - InstanceType: "Standard_D11", + "Standard_DS11_v2_Promo": { + InstanceType: "Standard_DS11_v2_Promo", VCPU: 2, MemoryMb: 14336, GPU: 0, }, - "Standard_D13": { - InstanceType: "Standard_D13", - VCPU: 8, - MemoryMb: 57344, + "Standard_DS12": { + InstanceType: "Standard_DS12", + VCPU: 4, + MemoryMb: 28672, GPU: 0, }, - "Standard_D12": { - InstanceType: "Standard_D12", + "Standard_DS12-1_v2": { + InstanceType: "Standard_DS12-1_v2", VCPU: 4, MemoryMb: 28672, GPU: 0, }, - "Standard_NC24r": { - InstanceType: "Standard_NC24r", - VCPU: 24, - MemoryMb: 229376, - GPU: 4, - }, - "Standard_D14": { - InstanceType: "Standard_D14", - VCPU: 16, - MemoryMb: 114688, + "Standard_DS12-2_v2": { + InstanceType: "Standard_DS12-2_v2", + VCPU: 4, + MemoryMb: 28672, GPU: 0, }, - "Standard_GS4-4": { - InstanceType: "Standard_GS4-4", - VCPU: 16, - MemoryMb: 229376, + "Standard_DS12_v2": { + InstanceType: "Standard_DS12_v2", + VCPU: 4, + MemoryMb: 28672, GPU: 0, }, - "Standard_F4s": { - InstanceType: "Standard_F4s", + "Standard_DS12_v2_Promo": { + InstanceType: "Standard_DS12_v2_Promo", VCPU: 4, - MemoryMb: 8192, + MemoryMb: 28672, + GPU: 0, + }, + "Standard_DS13": { + InstanceType: "Standard_DS13", + VCPU: 8, + MemoryMb: 57344, + GPU: 0, + }, + "Standard_DS13-2_v2": { + InstanceType: "Standard_DS13-2_v2", + VCPU: 8, + MemoryMb: 57344, + GPU: 0, + }, + "Standard_DS13-4_v2": { + InstanceType: "Standard_DS13-4_v2", + VCPU: 8, + MemoryMb: 57344, + GPU: 0, + }, + "Standard_DS13_v2": { + InstanceType: "Standard_DS13_v2", + VCPU: 8, + MemoryMb: 57344, + GPU: 0, + }, + "Standard_DS13_v2_Promo": { + InstanceType: "Standard_DS13_v2_Promo", + VCPU: 8, + MemoryMb: 57344, GPU: 0, }, "Standard_DS14": { @@ -499,22 +640,22 @@ var InstanceTypes = map[string]*instanceType{ MemoryMb: 114688, GPU: 0, }, - "Standard_DS13": { - InstanceType: "Standard_DS13", - VCPU: 8, - MemoryMb: 57344, + "Standard_DS14-4_v2": { + InstanceType: "Standard_DS14-4_v2", + VCPU: 16, + MemoryMb: 114688, GPU: 0, }, - "Standard_DS12": { - InstanceType: "Standard_DS12", - VCPU: 4, - MemoryMb: 28672, + "Standard_DS14-8_v2": { + InstanceType: "Standard_DS14-8_v2", + VCPU: 16, + MemoryMb: 114688, GPU: 0, }, - "Standard_DS11": { - InstanceType: "Standard_DS11", - VCPU: 2, - MemoryMb: 14336, + "Standard_DS14_v2": { + InstanceType: "Standard_DS14_v2", + VCPU: 16, + MemoryMb: 114688, GPU: 0, }, "Standard_DS14_v2_Promo": { @@ -523,184 +664,94 @@ var InstanceTypes = map[string]*instanceType{ MemoryMb: 114688, GPU: 0, }, - "Standard_NV6": { - InstanceType: "Standard_NV6", - VCPU: 6, - MemoryMb: 57344, - GPU: 1, - }, - "Standard_NV6_Promo": { - InstanceType: "Standard_NV6_Promo", - VCPU: 6, - MemoryMb: 57344, - GPU: 1, - }, - "Standard_D15_v2": { - InstanceType: "Standard_D15_v2", + "Standard_DS15_v2": { + InstanceType: "Standard_DS15_v2", VCPU: 20, MemoryMb: 143360, GPU: 0, }, - "Standard_D3_v2": { - InstanceType: "Standard_D3_v2", - VCPU: 4, - MemoryMb: 14336, + "Standard_DS1_v2": { + InstanceType: "Standard_DS1_v2", + VCPU: 1, + MemoryMb: 3072, GPU: 0, }, - "Standard_L32s": { - InstanceType: "Standard_L32s", - VCPU: 32, - MemoryMb: 262144, + "Standard_DS2": { + InstanceType: "Standard_DS2", + VCPU: 2, + MemoryMb: 7168, GPU: 0, }, - "Standard_NC12s_v3": { - InstanceType: "Standard_NC12s_v3", - VCPU: 12, - MemoryMb: 229376, - GPU: 2, - }, - "Standard_NC12s_v2": { - InstanceType: "Standard_NC12s_v2", - VCPU: 12, - MemoryMb: 229376, - GPU: 2, - }, - "Standard_A2m_v2": { - InstanceType: "Standard_A2m_v2", + "Standard_DS2_v2": { + InstanceType: "Standard_DS2_v2", VCPU: 2, - MemoryMb: 16384, + MemoryMb: 7168, GPU: 0, }, - "Standard_E32_v3": { - InstanceType: "Standard_E32_v3", - VCPU: 32, - MemoryMb: 262144, + "Standard_DS2_v2_Promo": { + InstanceType: "Standard_DS2_v2_Promo", + VCPU: 2, + MemoryMb: 7168, GPU: 0, }, - "Standard_DS12_v2": { - InstanceType: "Standard_DS12_v2", + "Standard_DS3": { + InstanceType: "Standard_DS3", VCPU: 4, - MemoryMb: 28672, - GPU: 0, - }, - "Standard_D14_v2_Promo": { - InstanceType: "Standard_D14_v2_Promo", - VCPU: 16, - MemoryMb: 114688, + MemoryMb: 14336, GPU: 0, }, - "Standard_F4": { - InstanceType: "Standard_F4", + "Standard_DS3_v2": { + InstanceType: "Standard_DS3_v2", VCPU: 4, - MemoryMb: 8192, + MemoryMb: 14336, GPU: 0, }, - "Standard_H16m": { - InstanceType: "Standard_H16m", - VCPU: 16, - MemoryMb: 229376, + "Standard_DS3_v2_Promo": { + InstanceType: "Standard_DS3_v2_Promo", + VCPU: 4, + MemoryMb: 14336, GPU: 0, }, - "Standard_F8s": { - InstanceType: "Standard_F8s", + "Standard_DS4": { + InstanceType: "Standard_DS4", VCPU: 8, - MemoryMb: 16384, - GPU: 0, - }, - "Standard_E64s_v3": { - InstanceType: "Standard_E64s_v3", - VCPU: 64, - MemoryMb: 442368, + MemoryMb: 28672, GPU: 0, }, - "Standard_DS12-1_v2": { - InstanceType: "Standard_DS12-1_v2", - VCPU: 4, + "Standard_DS4_v2": { + InstanceType: "Standard_DS4_v2", + VCPU: 8, MemoryMb: 28672, GPU: 0, }, - "Standard_E8-4s_v3": { - InstanceType: "Standard_E8-4s_v3", + "Standard_DS4_v2_Promo": { + InstanceType: "Standard_DS4_v2_Promo", VCPU: 8, - MemoryMb: 65536, + MemoryMb: 28672, GPU: 0, }, - "Standard_NV12": { - InstanceType: "Standard_NV12", - VCPU: 12, - MemoryMb: 114688, - GPU: 2, - }, - "Standard_E16-4s_v3": { - InstanceType: "Standard_E16-4s_v3", + "Standard_DS5_v2": { + InstanceType: "Standard_DS5_v2", VCPU: 16, - MemoryMb: 131072, + MemoryMb: 57344, GPU: 0, }, - "Standard_ND24rs": { - InstanceType: "Standard_ND24rs", - VCPU: 24, - MemoryMb: 458752, - GPU: 4, - }, - "Standard_D8_v3": { - InstanceType: "Standard_D8_v3", - VCPU: 8, - MemoryMb: 32768, - GPU: 0, - }, - "Standard_DS12-2_v2": { - InstanceType: "Standard_DS12-2_v2", - VCPU: 4, - MemoryMb: 28672, - GPU: 0, - }, - "Standard_B8ms": { - InstanceType: "Standard_B8ms", - VCPU: 8, - MemoryMb: 32768, - GPU: 0, - }, - "Standard_DS4_v2_Promo": { - InstanceType: "Standard_DS4_v2_Promo", - VCPU: 8, - MemoryMb: 28672, - GPU: 0, - }, - "Standard_DS14_v2": { - InstanceType: "Standard_DS14_v2", + "Standard_DS5_v2_Promo": { + InstanceType: "Standard_DS5_v2_Promo", VCPU: 16, - MemoryMb: 114688, + MemoryMb: 57344, GPU: 0, }, - "Standard_NC24s_v2": { - InstanceType: "Standard_NC24s_v2", - VCPU: 24, - MemoryMb: 458752, - GPU: 4, - }, - "Standard_M128-64ms": { - InstanceType: "Standard_M128-64ms", - VCPU: 0, - MemoryMb: 0, + "Standard_E16-4s_v3": { + InstanceType: "Standard_E16-4s_v3", + VCPU: 16, + MemoryMb: 131072, GPU: 0, }, - "Standard_NC24rs_v3": { - InstanceType: "Standard_NC24rs_v3", - VCPU: 24, - MemoryMb: 458752, - GPU: 4, - }, - "Standard_NC24rs_v2": { - InstanceType: "Standard_NC24rs_v2", - VCPU: 24, - MemoryMb: 458752, - GPU: 4, - }, - "Standard_E8-2s_v3": { - InstanceType: "Standard_E8-2s_v3", - VCPU: 8, - MemoryMb: 65536, + "Standard_E16-8s_v3": { + InstanceType: "Standard_E16-8s_v3", + VCPU: 16, + MemoryMb: 131072, GPU: 0, }, "Standard_E16_v3": { @@ -709,424 +760,406 @@ var InstanceTypes = map[string]*instanceType{ MemoryMb: 131072, GPU: 0, }, - "Standard_E4-2s_v3": { - InstanceType: "Standard_E4-2s_v3", - VCPU: 4, - MemoryMb: 32768, + "Standard_E16a_v4": { + InstanceType: "Standard_E16a_v4", + VCPU: 16, + MemoryMb: 131072, GPU: 0, }, - "Standard_NC6": { - InstanceType: "Standard_NC6", - VCPU: 6, - MemoryMb: 57344, - GPU: 1, - }, - "Standard_D11_v2": { - InstanceType: "Standard_D11_v2", - VCPU: 2, - MemoryMb: 14336, + "Standard_E16as_v4": { + InstanceType: "Standard_E16as_v4", + VCPU: 16, + MemoryMb: 131072, GPU: 0, }, - "Standard_F16s": { - InstanceType: "Standard_F16s", + "Standard_E16s_v3": { + InstanceType: "Standard_E16s_v3", VCPU: 16, - MemoryMb: 32768, + MemoryMb: 131072, GPU: 0, }, - "Standard_DS11-1_v2": { - InstanceType: "Standard_DS11-1_v2", - VCPU: 2, - MemoryMb: 14336, + "Standard_E20_v3": { + InstanceType: "Standard_E20_v3", + VCPU: 20, + MemoryMb: 163840, GPU: 0, }, - "Standard_NC24s_v3": { - InstanceType: "Standard_NC24s_v3", - VCPU: 24, - MemoryMb: 458752, - GPU: 4, - }, - "Standard_M128s": { - InstanceType: "Standard_M128s", - VCPU: 0, - MemoryMb: 0, + "Standard_E20a_v4": { + InstanceType: "Standard_E20a_v4", + VCPU: 20, + MemoryMb: 163840, GPU: 0, }, - "Standard_DS3_v2": { - InstanceType: "Standard_DS3_v2", - VCPU: 4, - MemoryMb: 14336, + "Standard_E20as_v4": { + InstanceType: "Standard_E20as_v4", + VCPU: 20, + MemoryMb: 163840, GPU: 0, }, - "Standard_GS5": { - InstanceType: "Standard_GS5", - VCPU: 32, - MemoryMb: 458752, + "Standard_E20s_v3": { + InstanceType: "Standard_E20s_v3", + VCPU: 20, + MemoryMb: 163840, GPU: 0, }, - "Standard_A4_v2": { - InstanceType: "Standard_A4_v2", - VCPU: 4, - MemoryMb: 8192, + "Standard_E2_v3": { + InstanceType: "Standard_E2_v3", + VCPU: 2, + MemoryMb: 16384, GPU: 0, }, - "Standard_GS1": { - InstanceType: "Standard_GS1", + "Standard_E2a_v4": { + InstanceType: "Standard_E2a_v4", VCPU: 2, - MemoryMb: 28672, + MemoryMb: 16384, GPU: 0, }, - "Standard_GS2": { - InstanceType: "Standard_GS2", - VCPU: 4, - MemoryMb: 57344, + "Standard_E2as_v4": { + InstanceType: "Standard_E2as_v4", + VCPU: 2, + MemoryMb: 16384, GPU: 0, }, - "Standard_GS3": { - InstanceType: "Standard_GS3", - VCPU: 8, - MemoryMb: 114688, + "Standard_E2s_v3": { + InstanceType: "Standard_E2s_v3", + VCPU: 2, + MemoryMb: 16384, GPU: 0, }, - "Standard_D64s_v3": { - InstanceType: "Standard_D64s_v3", - VCPU: 64, + "Standard_E32-16s_v3": { + InstanceType: "Standard_E32-16s_v3", + VCPU: 32, MemoryMb: 262144, GPU: 0, }, - "Standard_F64s_v2": { - InstanceType: "Standard_F64s_v2", - VCPU: 0, - MemoryMb: 0, + "Standard_E32-8s_v3": { + InstanceType: "Standard_E32-8s_v3", + VCPU: 32, + MemoryMb: 262144, GPU: 0, }, - "Standard_GS4": { - InstanceType: "Standard_GS4", - VCPU: 16, - MemoryMb: 229376, + "Standard_E32_v3": { + InstanceType: "Standard_E32_v3", + VCPU: 32, + MemoryMb: 262144, GPU: 0, }, - "Standard_D13_v2": { - InstanceType: "Standard_D13_v2", - VCPU: 8, - MemoryMb: 57344, + "Standard_E32a_v4": { + InstanceType: "Standard_E32a_v4", + VCPU: 32, + MemoryMb: 262144, GPU: 0, }, - "Standard_NC12": { - InstanceType: "Standard_NC12", - VCPU: 12, - MemoryMb: 114688, - GPU: 2, + "Standard_E32as_v4": { + InstanceType: "Standard_E32as_v4", + VCPU: 32, + MemoryMb: 262144, + GPU: 0, }, - "Standard_D1_v2": { - InstanceType: "Standard_D1_v2", - VCPU: 1, - MemoryMb: 3584, + "Standard_E32s_v3": { + InstanceType: "Standard_E32s_v3", + VCPU: 32, + MemoryMb: 262144, GPU: 0, }, - "Standard_E16-8s_v3": { - InstanceType: "Standard_E16-8s_v3", - VCPU: 16, - MemoryMb: 131072, + "Standard_E4-2s_v3": { + InstanceType: "Standard_E4-2s_v3", + VCPU: 4, + MemoryMb: 32768, GPU: 0, }, - "Standard_L16s": { - InstanceType: "Standard_L16s", - VCPU: 16, - MemoryMb: 131072, + "Standard_E48_v3": { + InstanceType: "Standard_E48_v3", + VCPU: 48, + MemoryMb: 393216, GPU: 0, }, - "Standard_D2_v3": { - InstanceType: "Standard_D2_v3", - VCPU: 2, - MemoryMb: 8192, + "Standard_E48as_v4": { + InstanceType: "Standard_E48as_v4", + VCPU: 48, + MemoryMb: 393216, GPU: 0, }, - "Standard_D2_v2": { - InstanceType: "Standard_D2_v2", - VCPU: 2, - MemoryMb: 7168, + "Standard_E48s_v3": { + InstanceType: "Standard_E48s_v3", + VCPU: 48, + MemoryMb: 393216, GPU: 0, }, - "Standard_H16mr": { - InstanceType: "Standard_H16mr", - VCPU: 16, - MemoryMb: 229376, + "Standard_E4_v3": { + InstanceType: "Standard_E4_v3", + VCPU: 4, + MemoryMb: 32768, GPU: 0, }, - "Standard_A6": { - InstanceType: "Standard_A6", + "Standard_E4a_v4": { + InstanceType: "Standard_E4a_v4", VCPU: 4, - MemoryMb: 28672, + MemoryMb: 32768, GPU: 0, }, - "Standard_A7": { - InstanceType: "Standard_A7", - VCPU: 8, - MemoryMb: 57344, + "Standard_E4as_v4": { + InstanceType: "Standard_E4as_v4", + VCPU: 4, + MemoryMb: 32768, GPU: 0, }, - "Standard_A4": { - InstanceType: "Standard_A4", - VCPU: 8, - MemoryMb: 14336, + "Standard_E4s_v3": { + InstanceType: "Standard_E4s_v3", + VCPU: 4, + MemoryMb: 32768, GPU: 0, }, - "Standard_A5": { - InstanceType: "Standard_A5", - VCPU: 2, - MemoryMb: 14336, + "Standard_E64-16s_v3": { + InstanceType: "Standard_E64-16s_v3", + VCPU: 64, + MemoryMb: 442368, GPU: 0, }, - "Standard_A2": { - InstanceType: "Standard_A2", - VCPU: 2, - MemoryMb: 3584, + "Standard_E64-32s_v3": { + InstanceType: "Standard_E64-32s_v3", + VCPU: 64, + MemoryMb: 442368, GPU: 0, }, - "Standard_A3": { - InstanceType: "Standard_A3", - VCPU: 4, - MemoryMb: 7168, + "Standard_E64_v3": { + InstanceType: "Standard_E64_v3", + VCPU: 64, + MemoryMb: 442368, GPU: 0, }, - "Standard_A0": { - InstanceType: "Standard_A0", - VCPU: 1, - MemoryMb: 768, + "Standard_E64as_v4": { + InstanceType: "Standard_E64as_v4", + VCPU: 64, + MemoryMb: 442368, GPU: 0, }, - "Standard_A1": { - InstanceType: "Standard_A1", - VCPU: 1, - MemoryMb: 1792, + "Standard_E64i_v3": { + InstanceType: "Standard_E64i_v3", + VCPU: 64, + MemoryMb: 442368, GPU: 0, }, - "Standard_DS5_v2": { - InstanceType: "Standard_DS5_v2", - VCPU: 16, - MemoryMb: 57344, + "Standard_E64is_v3": { + InstanceType: "Standard_E64is_v3", + VCPU: 64, + MemoryMb: 442368, GPU: 0, }, - "Standard_A8": { - InstanceType: "Standard_A8", + "Standard_E64s_v3": { + InstanceType: "Standard_E64s_v3", + VCPU: 64, + MemoryMb: 442368, + GPU: 0, + }, + "Standard_E8-2s_v3": { + InstanceType: "Standard_E8-2s_v3", VCPU: 8, - MemoryMb: 57344, + MemoryMb: 65536, GPU: 0, }, - "Standard_A9": { - InstanceType: "Standard_A9", - VCPU: 16, - MemoryMb: 114688, + "Standard_E8-4s_v3": { + InstanceType: "Standard_E8-4s_v3", + VCPU: 8, + MemoryMb: 65536, GPU: 0, }, - "Basic_A4": { - InstanceType: "Basic_A4", + "Standard_E8_v3": { + InstanceType: "Standard_E8_v3", VCPU: 8, - MemoryMb: 14336, + MemoryMb: 65536, GPU: 0, }, - "Standard_E64-16s_v3": { - InstanceType: "Standard_E64-16s_v3", - VCPU: 64, - MemoryMb: 442368, + "Standard_E8a_v4": { + InstanceType: "Standard_E8a_v4", + VCPU: 8, + MemoryMb: 65536, GPU: 0, }, - "Basic_A2": { - InstanceType: "Basic_A2", - VCPU: 2, - MemoryMb: 3584, + "Standard_E8as_v4": { + InstanceType: "Standard_E8as_v4", + VCPU: 8, + MemoryMb: 65536, GPU: 0, }, - "Basic_A3": { - InstanceType: "Basic_A3", - VCPU: 4, - MemoryMb: 7168, + "Standard_E8s_v3": { + InstanceType: "Standard_E8s_v3", + VCPU: 8, + MemoryMb: 65536, GPU: 0, }, - "Basic_A0": { - InstanceType: "Basic_A0", - VCPU: 1, - MemoryMb: 768, + "Standard_E96as_v4": { + InstanceType: "Standard_E96as_v4", + VCPU: 96, + MemoryMb: 688128, GPU: 0, }, - "Basic_A1": { - InstanceType: "Basic_A1", + "Standard_F1": { + InstanceType: "Standard_F1", VCPU: 1, - MemoryMb: 1792, + MemoryMb: 2048, GPU: 0, }, - "Standard_A10": { - InstanceType: "Standard_A10", - VCPU: 8, - MemoryMb: 57344, + "Standard_F16": { + InstanceType: "Standard_F16", + VCPU: 16, + MemoryMb: 32768, GPU: 0, }, - "Standard_A11": { - InstanceType: "Standard_A11", + "Standard_F16s": { + InstanceType: "Standard_F16s", VCPU: 16, - MemoryMb: 114688, + MemoryMb: 32768, GPU: 0, }, - "Standard_E4_v3": { - InstanceType: "Standard_E4_v3", - VCPU: 4, + "Standard_F16s_v2": { + InstanceType: "Standard_F16s_v2", + VCPU: 16, MemoryMb: 32768, GPU: 0, }, - "Standard_F8s_v2": { - InstanceType: "Standard_F8s_v2", - VCPU: 0, - MemoryMb: 0, + "Standard_F1s": { + InstanceType: "Standard_F1s", + VCPU: 1, + MemoryMb: 2048, GPU: 0, }, - "Standard_F4s_v2": { - InstanceType: "Standard_F4s_v2", - VCPU: 0, - MemoryMb: 0, + "Standard_F2": { + InstanceType: "Standard_F2", + VCPU: 2, + MemoryMb: 4096, GPU: 0, }, - "Standard_ND24s": { - InstanceType: "Standard_ND24s", - VCPU: 24, - MemoryMb: 458752, - GPU: 4, - }, - "Standard_B2s": { - InstanceType: "Standard_B2s", + "Standard_F2s": { + InstanceType: "Standard_F2s", VCPU: 2, MemoryMb: 4096, GPU: 0, }, - "Standard_DS2_v2": { - InstanceType: "Standard_DS2_v2", + "Standard_F2s_v2": { + InstanceType: "Standard_F2s_v2", VCPU: 2, - MemoryMb: 7168, + MemoryMb: 4096, GPU: 0, }, - "Standard_F1s": { - InstanceType: "Standard_F1s", - VCPU: 1, - MemoryMb: 2048, + "Standard_F32s_v2": { + InstanceType: "Standard_F32s_v2", + VCPU: 32, + MemoryMb: 65536, GPU: 0, }, - "Standard_E16s_v3": { - InstanceType: "Standard_E16s_v3", - VCPU: 16, - MemoryMb: 131072, + "Standard_F4": { + InstanceType: "Standard_F4", + VCPU: 4, + MemoryMb: 8192, GPU: 0, }, - "Standard_B4ms": { - InstanceType: "Standard_B4ms", - VCPU: 4, - MemoryMb: 16384, + "Standard_F48s_v2": { + InstanceType: "Standard_F48s_v2", + VCPU: 48, + MemoryMb: 98304, GPU: 0, }, - "Standard_DS15_v2": { - InstanceType: "Standard_DS15_v2", - VCPU: 20, - MemoryMb: 143360, + "Standard_F4s": { + InstanceType: "Standard_F4s", + VCPU: 4, + MemoryMb: 8192, GPU: 0, }, - "Standard_D12_v2": { - InstanceType: "Standard_D12_v2", + "Standard_F4s_v2": { + InstanceType: "Standard_F4s_v2", VCPU: 4, - MemoryMb: 28672, + MemoryMb: 8192, GPU: 0, }, - "Standard_M128-32ms": { - InstanceType: "Standard_M128-32ms", - VCPU: 0, - MemoryMb: 0, + "Standard_F64s_v2": { + InstanceType: "Standard_F64s_v2", + VCPU: 64, + MemoryMb: 131072, GPU: 0, }, - "Standard_M128ms": { - InstanceType: "Standard_M128ms", - VCPU: 0, - MemoryMb: 0, + "Standard_F72s_v2": { + InstanceType: "Standard_F72s_v2", + VCPU: 72, + MemoryMb: 147456, GPU: 0, }, - "Standard_DS3": { - InstanceType: "Standard_DS3", - VCPU: 4, - MemoryMb: 14336, + "Standard_F8": { + InstanceType: "Standard_F8", + VCPU: 8, + MemoryMb: 16384, GPU: 0, }, - "Standard_DS2": { - InstanceType: "Standard_DS2", - VCPU: 2, - MemoryMb: 7168, + "Standard_F8s": { + InstanceType: "Standard_F8s", + VCPU: 8, + MemoryMb: 16384, GPU: 0, }, - "Standard_DS1": { - InstanceType: "Standard_DS1", - VCPU: 1, - MemoryMb: 3584, + "Standard_F8s_v2": { + InstanceType: "Standard_F8s_v2", + VCPU: 8, + MemoryMb: 16384, GPU: 0, }, - "Standard_DS2_v2_Promo": { - InstanceType: "Standard_DS2_v2_Promo", + "Standard_G1": { + InstanceType: "Standard_G1", VCPU: 2, - MemoryMb: 7168, + MemoryMb: 28672, GPU: 0, }, - "Standard_DS1_v2": { - InstanceType: "Standard_DS1_v2", - VCPU: 1, - MemoryMb: 3584, + "Standard_G2": { + InstanceType: "Standard_G2", + VCPU: 4, + MemoryMb: 57344, GPU: 0, }, - "Standard_DS4": { - InstanceType: "Standard_DS4", + "Standard_G3": { + InstanceType: "Standard_G3", VCPU: 8, - MemoryMb: 28672, + MemoryMb: 114688, GPU: 0, }, - "Standard_F2": { - InstanceType: "Standard_F2", - VCPU: 2, - MemoryMb: 4096, + "Standard_G4": { + InstanceType: "Standard_G4", + VCPU: 16, + MemoryMb: 229376, GPU: 0, }, - "Standard_F1": { - InstanceType: "Standard_F1", - VCPU: 1, - MemoryMb: 2048, + "Standard_G5": { + InstanceType: "Standard_G5", + VCPU: 32, + MemoryMb: 458752, GPU: 0, }, - "Standard_E2s_v3": { - InstanceType: "Standard_E2s_v3", + "Standard_GS1": { + InstanceType: "Standard_GS1", VCPU: 2, - MemoryMb: 16384, - GPU: 0, - }, - "Standard_F2s_v2": { - InstanceType: "Standard_F2s_v2", - VCPU: 0, - MemoryMb: 0, - GPU: 0, - }, - "Standard_E64is_v3": { - InstanceType: "Standard_E64is_v3", - VCPU: 64, - MemoryMb: 442368, + MemoryMb: 28672, GPU: 0, }, - "Standard_L4s": { - InstanceType: "Standard_L4s", + "Standard_GS2": { + InstanceType: "Standard_GS2", VCPU: 4, - MemoryMb: 32768, + MemoryMb: 57344, GPU: 0, }, - "Standard_H16": { - InstanceType: "Standard_H16", - VCPU: 16, + "Standard_GS3": { + InstanceType: "Standard_GS3", + VCPU: 8, MemoryMb: 114688, GPU: 0, }, - "Standard_F8": { - InstanceType: "Standard_F8", - VCPU: 8, - MemoryMb: 16384, + "Standard_GS4": { + InstanceType: "Standard_GS4", + VCPU: 16, + MemoryMb: 229376, + GPU: 0, + }, + "Standard_GS4-4": { + InstanceType: "Standard_GS4-4", + VCPU: 16, + MemoryMb: 229376, GPU: 0, }, "Standard_GS4-8": { @@ -1135,16 +1168,70 @@ var InstanceTypes = map[string]*instanceType{ MemoryMb: 229376, GPU: 0, }, - "Standard_DS4_v2": { - InstanceType: "Standard_DS4_v2", - VCPU: 8, - MemoryMb: 28672, + "Standard_GS5": { + InstanceType: "Standard_GS5", + VCPU: 32, + MemoryMb: 458752, GPU: 0, }, - "Standard_D16s_v3": { - InstanceType: "Standard_D16s_v3", + "Standard_GS5-16": { + InstanceType: "Standard_GS5-16", + VCPU: 32, + MemoryMb: 458752, + GPU: 0, + }, + "Standard_GS5-8": { + InstanceType: "Standard_GS5-8", + VCPU: 32, + MemoryMb: 458752, + GPU: 0, + }, + "Standard_H16": { + InstanceType: "Standard_H16", VCPU: 16, - MemoryMb: 65536, + MemoryMb: 114688, + GPU: 0, + }, + "Standard_H16_Promo": { + InstanceType: "Standard_H16_Promo", + VCPU: 16, + MemoryMb: 114688, + GPU: 0, + }, + "Standard_H16m": { + InstanceType: "Standard_H16m", + VCPU: 16, + MemoryMb: 229376, + GPU: 0, + }, + "Standard_H16m_Promo": { + InstanceType: "Standard_H16m_Promo", + VCPU: 16, + MemoryMb: 229376, + GPU: 0, + }, + "Standard_H16mr": { + InstanceType: "Standard_H16mr", + VCPU: 16, + MemoryMb: 229376, + GPU: 0, + }, + "Standard_H16mr_Promo": { + InstanceType: "Standard_H16mr_Promo", + VCPU: 16, + MemoryMb: 229376, + GPU: 0, + }, + "Standard_H16r": { + InstanceType: "Standard_H16r", + VCPU: 16, + MemoryMb: 114688, + GPU: 0, + }, + "Standard_H16r_Promo": { + InstanceType: "Standard_H16r_Promo", + VCPU: 16, + MemoryMb: 114688, GPU: 0, }, "Standard_H8": { @@ -1153,34 +1240,406 @@ var InstanceTypes = map[string]*instanceType{ MemoryMb: 57344, GPU: 0, }, - "Standard_A8_v2": { - InstanceType: "Standard_A8_v2", + "Standard_H8_Promo": { + InstanceType: "Standard_H8_Promo", VCPU: 8, - MemoryMb: 16384, + MemoryMb: 57344, GPU: 0, }, - "Standard_B1s": { - InstanceType: "Standard_B1s", - VCPU: 1, - MemoryMb: 1024, + "Standard_H8m": { + InstanceType: "Standard_H8m", + VCPU: 8, + MemoryMb: 114688, GPU: 0, }, - "Standard_F16": { - InstanceType: "Standard_F16", + "Standard_H8m_Promo": { + InstanceType: "Standard_H8m_Promo", + VCPU: 8, + MemoryMb: 114688, + GPU: 0, + }, + "Standard_L16s": { + InstanceType: "Standard_L16s", + VCPU: 16, + MemoryMb: 131072, + GPU: 0, + }, + "Standard_L16s_v2": { + InstanceType: "Standard_L16s_v2", VCPU: 16, + MemoryMb: 131072, + GPU: 0, + }, + "Standard_L32s": { + InstanceType: "Standard_L32s", + VCPU: 32, + MemoryMb: 262144, + GPU: 0, + }, + "Standard_L32s_v2": { + InstanceType: "Standard_L32s_v2", + VCPU: 32, + MemoryMb: 262144, + GPU: 0, + }, + "Standard_L48s_v2": { + InstanceType: "Standard_L48s_v2", + VCPU: 48, + MemoryMb: 393216, + GPU: 0, + }, + "Standard_L4s": { + InstanceType: "Standard_L4s", + VCPU: 4, MemoryMb: 32768, GPU: 0, }, - "Standard_E64_v3": { - InstanceType: "Standard_E64_v3", + "Standard_L64s_v2": { + InstanceType: "Standard_L64s_v2", VCPU: 64, - MemoryMb: 442368, + MemoryMb: 524288, GPU: 0, }, - "Standard_E32-16s_v3": { - InstanceType: "Standard_E32-16s_v3", + "Standard_L80s_v2": { + InstanceType: "Standard_L80s_v2", + VCPU: 80, + MemoryMb: 655360, + GPU: 0, + }, + "Standard_L8s": { + InstanceType: "Standard_L8s", + VCPU: 8, + MemoryMb: 65536, + GPU: 0, + }, + "Standard_L8s_v2": { + InstanceType: "Standard_L8s_v2", + VCPU: 8, + MemoryMb: 65536, + GPU: 0, + }, + "Standard_M128": { + InstanceType: "Standard_M128", + VCPU: 128, + MemoryMb: 2048000, + GPU: 0, + }, + "Standard_M128-32ms": { + InstanceType: "Standard_M128-32ms", + VCPU: 128, + MemoryMb: 3891200, + GPU: 0, + }, + "Standard_M128-64ms": { + InstanceType: "Standard_M128-64ms", + VCPU: 128, + MemoryMb: 3891200, + GPU: 0, + }, + "Standard_M128m": { + InstanceType: "Standard_M128m", + VCPU: 128, + MemoryMb: 3891200, + GPU: 0, + }, + "Standard_M128ms": { + InstanceType: "Standard_M128ms", + VCPU: 128, + MemoryMb: 3891200, + GPU: 0, + }, + "Standard_M128s": { + InstanceType: "Standard_M128s", + VCPU: 128, + MemoryMb: 2048000, + GPU: 0, + }, + "Standard_M16-4ms": { + InstanceType: "Standard_M16-4ms", + VCPU: 16, + MemoryMb: 447488, + GPU: 0, + }, + "Standard_M16-8ms": { + InstanceType: "Standard_M16-8ms", + VCPU: 16, + MemoryMb: 447488, + GPU: 0, + }, + "Standard_M16ms": { + InstanceType: "Standard_M16ms", + VCPU: 16, + MemoryMb: 447488, + GPU: 0, + }, + "Standard_M208ms_v2": { + InstanceType: "Standard_M208ms_v2", + VCPU: 208, + MemoryMb: 5836800, + GPU: 0, + }, + "Standard_M208s_v2": { + InstanceType: "Standard_M208s_v2", + VCPU: 208, + MemoryMb: 2918400, + GPU: 0, + }, + "Standard_M32-16ms": { + InstanceType: "Standard_M32-16ms", + VCPU: 32, + MemoryMb: 896000, + GPU: 0, + }, + "Standard_M32-8ms": { + InstanceType: "Standard_M32-8ms", + VCPU: 32, + MemoryMb: 896000, + GPU: 0, + }, + "Standard_M32ls": { + InstanceType: "Standard_M32ls", VCPU: 32, MemoryMb: 262144, GPU: 0, }, + "Standard_M32ms": { + InstanceType: "Standard_M32ms", + VCPU: 32, + MemoryMb: 896000, + GPU: 0, + }, + "Standard_M32ts": { + InstanceType: "Standard_M32ts", + VCPU: 32, + MemoryMb: 196608, + GPU: 0, + }, + "Standard_M416ms_v2": { + InstanceType: "Standard_M416ms_v2", + VCPU: 416, + MemoryMb: 11673600, + GPU: 0, + }, + "Standard_M416s_v2": { + InstanceType: "Standard_M416s_v2", + VCPU: 416, + MemoryMb: 5836800, + GPU: 0, + }, + "Standard_M64": { + InstanceType: "Standard_M64", + VCPU: 64, + MemoryMb: 1024000, + GPU: 0, + }, + "Standard_M64-16ms": { + InstanceType: "Standard_M64-16ms", + VCPU: 64, + MemoryMb: 1792000, + GPU: 0, + }, + "Standard_M64-32ms": { + InstanceType: "Standard_M64-32ms", + VCPU: 64, + MemoryMb: 1792000, + GPU: 0, + }, + "Standard_M64ls": { + InstanceType: "Standard_M64ls", + VCPU: 64, + MemoryMb: 524288, + GPU: 0, + }, + "Standard_M64m": { + InstanceType: "Standard_M64m", + VCPU: 64, + MemoryMb: 1792000, + GPU: 0, + }, + "Standard_M64ms": { + InstanceType: "Standard_M64ms", + VCPU: 64, + MemoryMb: 1792000, + GPU: 0, + }, + "Standard_M64s": { + InstanceType: "Standard_M64s", + VCPU: 64, + MemoryMb: 1024000, + GPU: 0, + }, + "Standard_M8-2ms": { + InstanceType: "Standard_M8-2ms", + VCPU: 8, + MemoryMb: 223232, + GPU: 0, + }, + "Standard_M8-4ms": { + InstanceType: "Standard_M8-4ms", + VCPU: 8, + MemoryMb: 223232, + GPU: 0, + }, + "Standard_M8ms": { + InstanceType: "Standard_M8ms", + VCPU: 8, + MemoryMb: 223232, + GPU: 0, + }, + "Standard_NC12": { + InstanceType: "Standard_NC12", + VCPU: 12, + MemoryMb: 114688, + GPU: 2, + }, + "Standard_NC12_Promo": { + InstanceType: "Standard_NC12_Promo", + VCPU: 12, + MemoryMb: 114688, + GPU: 2, + }, + "Standard_NC12s_v2": { + InstanceType: "Standard_NC12s_v2", + VCPU: 12, + MemoryMb: 229376, + GPU: 2, + }, + "Standard_NC12s_v3": { + InstanceType: "Standard_NC12s_v3", + VCPU: 12, + MemoryMb: 229376, + GPU: 2, + }, + "Standard_NC24": { + InstanceType: "Standard_NC24", + VCPU: 24, + MemoryMb: 229376, + GPU: 4, + }, + "Standard_NC24_Promo": { + InstanceType: "Standard_NC24_Promo", + VCPU: 24, + MemoryMb: 229376, + GPU: 4, + }, + "Standard_NC24r": { + InstanceType: "Standard_NC24r", + VCPU: 24, + MemoryMb: 229376, + GPU: 4, + }, + "Standard_NC24r_Promo": { + InstanceType: "Standard_NC24r_Promo", + VCPU: 24, + MemoryMb: 229376, + GPU: 4, + }, + "Standard_NC24rs_v2": { + InstanceType: "Standard_NC24rs_v2", + VCPU: 24, + MemoryMb: 458752, + GPU: 4, + }, + "Standard_NC24rs_v3": { + InstanceType: "Standard_NC24rs_v3", + VCPU: 24, + MemoryMb: 458752, + GPU: 4, + }, + "Standard_NC24s_v2": { + InstanceType: "Standard_NC24s_v2", + VCPU: 24, + MemoryMb: 458752, + GPU: 4, + }, + "Standard_NC24s_v3": { + InstanceType: "Standard_NC24s_v3", + VCPU: 24, + MemoryMb: 458752, + GPU: 4, + }, + "Standard_NC6": { + InstanceType: "Standard_NC6", + VCPU: 6, + MemoryMb: 57344, + GPU: 1, + }, + "Standard_NC6_Promo": { + InstanceType: "Standard_NC6_Promo", + VCPU: 6, + MemoryMb: 57344, + GPU: 1, + }, + "Standard_NC6s_v2": { + InstanceType: "Standard_NC6s_v2", + VCPU: 6, + MemoryMb: 114688, + GPU: 1, + }, + "Standard_NC6s_v3": { + InstanceType: "Standard_NC6s_v3", + VCPU: 6, + MemoryMb: 114688, + GPU: 1, + }, + "Standard_ND12s": { + InstanceType: "Standard_ND12s", + VCPU: 12, + MemoryMb: 229376, + GPU: 2, + }, + "Standard_ND24rs": { + InstanceType: "Standard_ND24rs", + VCPU: 24, + MemoryMb: 458752, + GPU: 4, + }, + "Standard_ND24s": { + InstanceType: "Standard_ND24s", + VCPU: 24, + MemoryMb: 458752, + GPU: 4, + }, + "Standard_ND6s": { + InstanceType: "Standard_ND6s", + VCPU: 6, + MemoryMb: 114688, + GPU: 1, + }, + "Standard_NV12": { + InstanceType: "Standard_NV12", + VCPU: 12, + MemoryMb: 114688, + GPU: 2, + }, + "Standard_NV12_Promo": { + InstanceType: "Standard_NV12_Promo", + VCPU: 12, + MemoryMb: 114688, + GPU: 2, + }, + "Standard_NV24": { + InstanceType: "Standard_NV24", + VCPU: 24, + MemoryMb: 229376, + GPU: 4, + }, + "Standard_NV24_Promo": { + InstanceType: "Standard_NV24_Promo", + VCPU: 24, + MemoryMb: 229376, + GPU: 4, + }, + "Standard_NV6": { + InstanceType: "Standard_NV6", + VCPU: 6, + MemoryMb: 57344, + GPU: 1, + }, + "Standard_NV6_Promo": { + InstanceType: "Standard_NV6_Promo", + VCPU: 6, + MemoryMb: 57344, + GPU: 1, + }, } diff --git a/cluster-autoscaler/cloudprovider/azure/azure_instance_types/gen.go b/cluster-autoscaler/cloudprovider/azure/azure_instance_types/gen.go new file mode 100644 index 000000000000..99d472e12982 --- /dev/null +++ b/cluster-autoscaler/cloudprovider/azure/azure_instance_types/gen.go @@ -0,0 +1,164 @@ +// +build ignore + +/* +Copyright 2019 The Kubernetes Authors. + +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. +*/ + +package main + +import ( + "encoding/json" + "html/template" + "io/ioutil" + "os" + "os/exec" + "strconv" + "strings" + + "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/azure" + "k8s.io/klog" +) + +var packageTemplate = template.Must(template.New("").Parse(`/* +Copyright 2018 The Kubernetes Authors. + +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. +*/ + +// This file was generated by go generate; DO NOT EDIT + +package azure + +// InstanceType is the sepc of Azure instance +type InstanceType struct { + InstanceType string + VCPU int64 + MemoryMb int64 + GPU int64 +} + +// InstanceTypes is a map of azure resources +var InstanceTypes = map[string]*InstanceType{ +{{- range .InstanceTypes }} + "{{ .InstanceType }}": { + InstanceType: "{{ .InstanceType }}", + VCPU: {{ .VCPU }}, + MemoryMb: {{ .MemoryMb }}, + GPU: {{ .GPU }}, + }, +{{- end }} +} +`)) + +type InstanceCapabilities struct { + Name string + Value string +} + +type RawInstanceType struct { + Name string + ResourceType string + Capabilities []InstanceCapabilities +} + +func getAllAzureVirtualMachineTypes() (result map[string]*azure.InstanceType, err error) { + cmd := exec.Command("az", "vm", "list-skus", "-o", "json") + stdout, err := cmd.StdoutPipe() + if err != nil { + return nil, err + } + if err = cmd.Start(); err != nil { + return nil, err + } + bytes, err := ioutil.ReadAll(stdout) + if err != nil { + return nil, err + } + + if err := cmd.Wait(); err != nil { + return nil, err + } + + allInstances := make([]RawInstanceType, 0) + err = json.Unmarshal(bytes, &allInstances) + if err != nil { + return nil, err + } + + virtualMachines := make(map[string]*azure.InstanceType) + for _, instance := range allInstances { + if strings.EqualFold(instance.ResourceType, "virtualMachines") { + var virtualMachine azure.InstanceType + virtualMachine.InstanceType = instance.Name + for _, capability := range instance.Capabilities { + switch capability.Name { + case "vCPUs": + virtualMachine.VCPU, err = strconv.ParseInt(capability.Value, 10, 64) + if err != nil { + return nil, err + } + case "MemoryGB": + memoryMb, err := strconv.ParseFloat(capability.Value, 10) + if err != nil { + return nil, err + } + virtualMachine.MemoryMb = int64(memoryMb) * 1024 + case "GPUs": + virtualMachine.GPU, err = strconv.ParseInt(capability.Value, 10, 64) + if err != nil { + return nil, err + } + } + } + virtualMachines[virtualMachine.InstanceType] = &virtualMachine + } + } + + return virtualMachines, err +} + +func main() { + instanceTypes, err := getAllAzureVirtualMachineTypes() + if err != nil { + klog.Fatal(err) + } + + f, err := os.Create("azure_instance_types.go") + if err != nil { + klog.Fatal(err) + } + + defer f.Close() + + err = packageTemplate.Execute(f, struct { + InstanceTypes map[string]*azure.InstanceType + }{ + InstanceTypes: instanceTypes, + }) + + if err != nil { + klog.Fatal(err) + } +} diff --git a/cluster-autoscaler/cloudprovider/azure/azure_manager.go b/cluster-autoscaler/cloudprovider/azure/azure_manager.go index fda14ce0789b..e5032b3e9200 100644 --- a/cluster-autoscaler/cloudprovider/azure/azure_manager.go +++ b/cluster-autoscaler/cloudprovider/azure/azure_manager.go @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +//go:generate go run azure_instance_types/gen.go + package azure import ( diff --git a/cluster-autoscaler/cloudprovider/azure/azure_scale_set.go b/cluster-autoscaler/cloudprovider/azure/azure_scale_set.go index 6f599e6e92d6..9fdee6ce35c5 100644 --- a/cluster-autoscaler/cloudprovider/azure/azure_scale_set.go +++ b/cluster-autoscaler/cloudprovider/azure/azure_scale_set.go @@ -552,7 +552,7 @@ func (scaleSet *ScaleSet) buildNodeFromTemplate(template compute.VirtualMachineS Capacity: apiv1.ResourceList{}, } - var vmssType *instanceType + var vmssType *InstanceType for k := range InstanceTypes { if strings.EqualFold(k, *template.Sku.Name) { vmssType = InstanceTypes[k] diff --git a/hack/boilerplate/boilerplate.py b/hack/boilerplate/boilerplate.py index 664a6b8100f0..089a28f58d3b 100755 --- a/hack/boilerplate/boilerplate.py +++ b/hack/boilerplate/boilerplate.py @@ -154,7 +154,8 @@ def file_extension(filename): # list all the files contain 'DO NOT EDIT', but are not generated skipped_ungenerated_files = ['hack/build-ui.sh', 'hack/lib/swagger.sh', 'hack/boilerplate/boilerplate.py', - 'cluster-autoscaler/cloudprovider/aws/ec2_instance_types/gen.go'] + 'cluster-autoscaler/cloudprovider/aws/ec2_instance_types/gen.go', + 'cluster-autoscaler/cloudprovider/azure/azure_instance_types/gen.go'] def normalize_files(files): newfiles = [] From 76365b540f56ad62feb4a651f2913e26584dec58 Mon Sep 17 00:00:00 2001 From: Nigel Foucha Date: Mon, 2 Mar 2020 13:55:52 -0500 Subject: [PATCH 2/4] [Azure] Add fallback check for 'Promo' instance types --- .../cloudprovider/azure/azure_scale_set.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cluster-autoscaler/cloudprovider/azure/azure_scale_set.go b/cluster-autoscaler/cloudprovider/azure/azure_scale_set.go index 9fdee6ce35c5..dc146de381fe 100644 --- a/cluster-autoscaler/cloudprovider/azure/azure_scale_set.go +++ b/cluster-autoscaler/cloudprovider/azure/azure_scale_set.go @@ -559,6 +559,22 @@ func (scaleSet *ScaleSet) buildNodeFromTemplate(template compute.VirtualMachineS break } } + + promoRe := regexp.MustCompile(`(?i)_promo`) + if promoRe.MatchString(*template.Sku.Name) { + if vmssType == nil { + // We didn't find an exact match but this is a promo type, check for matching standard + klog.V(1).Infof("No exact match found for %s, checking standard types", *template.Sku.Name) + skuName := promoRe.ReplaceAllString(*template.Sku.Name, "") + for k := range InstanceTypes { + if strings.EqualFold(k, skuName) { + vmssType = InstanceTypes[k] + break + } + } + } + } + if vmssType == nil { return nil, fmt.Errorf("instance type %q not supported", *template.Sku.Name) } From 6aa51a56f94416ac057bac2ded069cb4cb5de8ae Mon Sep 17 00:00:00 2001 From: Nicholas Kiraly Date: Thu, 9 Jul 2020 23:43:45 -0400 Subject: [PATCH 3/4] Add various azure instance types now available --- .../azure/azure_instance_types.go | 644 +++++++++++++++++- 1 file changed, 643 insertions(+), 1 deletion(-) diff --git a/cluster-autoscaler/cloudprovider/azure/azure_instance_types.go b/cluster-autoscaler/cloudprovider/azure/azure_instance_types.go index ea7eece6229b..521d3c94b9aa 100644 --- a/cluster-autoscaler/cloudprovider/azure/azure_instance_types.go +++ b/cluster-autoscaler/cloudprovider/azure/azure_instance_types.go @@ -322,6 +322,12 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 65536, GPU: 0, }, + "Standard_D16_v4": { + InstanceType: "Standard_D16_v4", + VCPU: 16, + MemoryMb: 65536, + GPU: 0, + }, "Standard_D16a_v4": { InstanceType: "Standard_D16a_v4", VCPU: 16, @@ -334,12 +340,30 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 65536, GPU: 0, }, + "Standard_D16d_v4": { + InstanceType: "Standard_D16d_v4", + VCPU: 16, + MemoryMb: 65536, + GPU: 0, + }, + "Standard_D16ds_v4": { + InstanceType: "Standard_D16ds_v4", + VCPU: 16, + MemoryMb: 65536, + GPU: 0, + }, "Standard_D16s_v3": { InstanceType: "Standard_D16s_v3", VCPU: 16, MemoryMb: 65536, GPU: 0, }, + "Standard_D16s_v4": { + InstanceType: "Standard_D16s_v4", + VCPU: 16, + MemoryMb: 65536, + GPU: 0, + }, "Standard_D1_v2": { InstanceType: "Standard_D1_v2", VCPU: 1, @@ -370,6 +394,12 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 8192, GPU: 0, }, + "Standard_D2_v4": { + InstanceType: "Standard_D2_v4", + VCPU: 2, + MemoryMb: 8192, + GPU: 0, + }, "Standard_D2a_v4": { InstanceType: "Standard_D2a_v4", VCPU: 2, @@ -382,12 +412,30 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 8192, GPU: 0, }, + "Standard_D2d_v4": { + InstanceType: "Standard_D2d_v4", + VCPU: 2, + MemoryMb: 8192, + GPU: 0, + }, + "Standard_D2ds_v4": { + InstanceType: "Standard_D2ds_v4", + VCPU: 2, + MemoryMb: 8192, + GPU: 0, + }, "Standard_D2s_v3": { InstanceType: "Standard_D2s_v3", VCPU: 2, MemoryMb: 8192, GPU: 0, }, + "Standard_D2s_v4": { + InstanceType: "Standard_D2s_v4", + VCPU: 2, + MemoryMb: 8192, + GPU: 0, + }, "Standard_D3": { InstanceType: "Standard_D3", VCPU: 4, @@ -400,6 +448,12 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 131072, GPU: 0, }, + "Standard_D32_v4": { + InstanceType: "Standard_D32_v4", + VCPU: 32, + MemoryMb: 131072, + GPU: 0, + }, "Standard_D32a_v4": { InstanceType: "Standard_D32a_v4", VCPU: 32, @@ -412,12 +466,30 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 131072, GPU: 0, }, + "Standard_D32d_v4": { + InstanceType: "Standard_D32d_v4", + VCPU: 32, + MemoryMb: 131072, + GPU: 0, + }, + "Standard_D32ds_v4": { + InstanceType: "Standard_D32ds_v4", + VCPU: 32, + MemoryMb: 131072, + GPU: 0, + }, "Standard_D32s_v3": { InstanceType: "Standard_D32s_v3", VCPU: 32, MemoryMb: 131072, GPU: 0, }, + "Standard_D32s_v4": { + InstanceType: "Standard_D32s_v4", + VCPU: 32, + MemoryMb: 131072, + GPU: 0, + }, "Standard_D3_v2": { InstanceType: "Standard_D3_v2", VCPU: 4, @@ -442,12 +514,48 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 196608, GPU: 0, }, + "Standard_D48_v4": { + InstanceType: "Standard_D48_v4", + VCPU: 48, + MemoryMb: 196608, + GPU: 0, + }, + "Standard_D48a_v4": { + InstanceType: "Standard_D48a_v4", + VCPU: 48, + MemoryMb: 196608, + GPU: 0, + }, + "Standard_D48as_v4": { + InstanceType: "Standard_D48as_v4", + VCPU: 48, + MemoryMb: 196608, + GPU: 0, + }, + "Standard_D48d_v4": { + InstanceType: "Standard_D48d_v4", + VCPU: 48, + MemoryMb: 196608, + GPU: 0, + }, + "Standard_D48ds_v4": { + InstanceType: "Standard_D48ds_v4", + VCPU: 48, + MemoryMb: 196608, + GPU: 0, + }, "Standard_D48s_v3": { InstanceType: "Standard_D48s_v3", VCPU: 48, MemoryMb: 196608, GPU: 0, }, + "Standard_D48s_v4": { + InstanceType: "Standard_D48s_v4", + VCPU: 48, + MemoryMb: 196608, + GPU: 0, + }, "Standard_D4_v2": { InstanceType: "Standard_D4_v2", VCPU: 8, @@ -466,6 +574,12 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 16384, GPU: 0, }, + "Standard_D4_v4": { + InstanceType: "Standard_D4_v4", + VCPU: 4, + MemoryMb: 16384, + GPU: 0, + }, "Standard_D4a_v4": { InstanceType: "Standard_D4a_v4", VCPU: 4, @@ -478,12 +592,30 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 16384, GPU: 0, }, + "Standard_D4d_v4": { + InstanceType: "Standard_D4d_v4", + VCPU: 4, + MemoryMb: 16384, + GPU: 0, + }, + "Standard_D4ds_v4": { + InstanceType: "Standard_D4ds_v4", + VCPU: 4, + MemoryMb: 16384, + GPU: 0, + }, "Standard_D4s_v3": { InstanceType: "Standard_D4s_v3", VCPU: 4, MemoryMb: 16384, GPU: 0, }, + "Standard_D4s_v4": { + InstanceType: "Standard_D4s_v4", + VCPU: 4, + MemoryMb: 16384, + GPU: 0, + }, "Standard_D5_v2": { InstanceType: "Standard_D5_v2", VCPU: 16, @@ -502,18 +634,60 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 262144, GPU: 0, }, + "Standard_D64_v4": { + InstanceType: "Standard_D64_v4", + VCPU: 64, + MemoryMb: 262144, + GPU: 0, + }, + "Standard_D64a_v4": { + InstanceType: "Standard_D64a_v4", + VCPU: 64, + MemoryMb: 262144, + GPU: 0, + }, + "Standard_D64as_v4": { + InstanceType: "Standard_D64as_v4", + VCPU: 64, + MemoryMb: 262144, + GPU: 0, + }, + "Standard_D64d_v4": { + InstanceType: "Standard_D64d_v4", + VCPU: 64, + MemoryMb: 262144, + GPU: 0, + }, + "Standard_D64ds_v4": { + InstanceType: "Standard_D64ds_v4", + VCPU: 64, + MemoryMb: 262144, + GPU: 0, + }, "Standard_D64s_v3": { InstanceType: "Standard_D64s_v3", VCPU: 64, MemoryMb: 262144, GPU: 0, }, + "Standard_D64s_v4": { + InstanceType: "Standard_D64s_v4", + VCPU: 64, + MemoryMb: 262144, + GPU: 0, + }, "Standard_D8_v3": { InstanceType: "Standard_D8_v3", VCPU: 8, MemoryMb: 32768, GPU: 0, }, + "Standard_D8_v4": { + InstanceType: "Standard_D8_v4", + VCPU: 8, + MemoryMb: 32768, + GPU: 0, + }, "Standard_D8a_v4": { InstanceType: "Standard_D8a_v4", VCPU: 8, @@ -526,6 +700,18 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 32768, GPU: 0, }, + "Standard_D8d_v4": { + InstanceType: "Standard_D8d_v4", + VCPU: 8, + MemoryMb: 32768, + GPU: 0, + }, + "Standard_D8ds_v4": { + InstanceType: "Standard_D8ds_v4", + VCPU: 8, + MemoryMb: 32768, + GPU: 0, + }, "Standard_D8s_v3": { InstanceType: "Standard_D8s_v3", VCPU: 8, @@ -538,12 +724,54 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 8192, GPU: 0, }, + "Standard_D8s_v4": { + InstanceType: "Standard_D8s_v4", + VCPU: 8, + MemoryMb: 32768, + GPU: 0, + }, + "Standard_D96a_v4": { + InstanceType: "Standard_D96a_v4", + VCPU: 96, + MemoryMb: 393216, + GPU: 0, + }, + "Standard_D96as_v4": { + InstanceType: "Standard_D96as_v4", + VCPU: 96, + MemoryMb: 393216, + GPU: 0, + }, + "Standard_DC1s_v2": { + InstanceType: "Standard_DC1s_v2", + VCPU: 1, + MemoryMb: 4096, + GPU: 0, + }, + "Standard_DC2s_v2": { + InstanceType: "Standard_DC2s_v2", + VCPU: 2, + MemoryMb: 8192, + GPU: 0, + }, "Standard_DC4s": { InstanceType: "Standard_DC4s", VCPU: 4, MemoryMb: 16384, GPU: 0, }, + "Standard_DC4s_v2": { + InstanceType: "Standard_DC4s_v2", + VCPU: 4, + MemoryMb: 16384, + GPU: 0, + }, + "Standard_DC8_v2": { + InstanceType: "Standard_DC8_v2", + VCPU: 8, + MemoryMb: 32768, + GPU: 0, + }, "Standard_DS1": { InstanceType: "Standard_DS1", VCPU: 1, @@ -742,24 +970,54 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 57344, GPU: 0, }, + "Standard_E16-4ds_v4": { + InstanceType: "Standard_E16-4ds_v4", + VCPU: 16, + MemoryMb: 131072, + GPU: 0, + }, "Standard_E16-4s_v3": { InstanceType: "Standard_E16-4s_v3", VCPU: 16, MemoryMb: 131072, GPU: 0, }, + "Standard_E16-4s_v4": { + InstanceType: "Standard_E16-4s_v4", + VCPU: 16, + MemoryMb: 131072, + GPU: 0, + }, + "Standard_E16-8ds_v4": { + InstanceType: "Standard_E16-8ds_v4", + VCPU: 16, + MemoryMb: 131072, + GPU: 0, + }, "Standard_E16-8s_v3": { InstanceType: "Standard_E16-8s_v3", VCPU: 16, MemoryMb: 131072, GPU: 0, }, + "Standard_E16-8s_v4": { + InstanceType: "Standard_E16-8s_v4", + VCPU: 16, + MemoryMb: 131072, + GPU: 0, + }, "Standard_E16_v3": { InstanceType: "Standard_E16_v3", VCPU: 16, MemoryMb: 131072, GPU: 0, }, + "Standard_E16_v4": { + InstanceType: "Standard_E16_v4", + VCPU: 16, + MemoryMb: 131072, + GPU: 0, + }, "Standard_E16a_v4": { InstanceType: "Standard_E16a_v4", VCPU: 16, @@ -772,18 +1030,42 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 131072, GPU: 0, }, + "Standard_E16d_v4": { + InstanceType: "Standard_E16d_v4", + VCPU: 16, + MemoryMb: 131072, + GPU: 0, + }, + "Standard_E16ds_v4": { + InstanceType: "Standard_E16ds_v4", + VCPU: 16, + MemoryMb: 131072, + GPU: 0, + }, "Standard_E16s_v3": { InstanceType: "Standard_E16s_v3", VCPU: 16, MemoryMb: 131072, GPU: 0, }, + "Standard_E16s_v4": { + InstanceType: "Standard_E16s_v4", + VCPU: 16, + MemoryMb: 131072, + GPU: 0, + }, "Standard_E20_v3": { InstanceType: "Standard_E20_v3", VCPU: 20, MemoryMb: 163840, GPU: 0, }, + "Standard_E20_v4": { + InstanceType: "Standard_E20_v4", + VCPU: 20, + MemoryMb: 163840, + GPU: 0, + }, "Standard_E20a_v4": { InstanceType: "Standard_E20a_v4", VCPU: 20, @@ -796,18 +1078,42 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 163840, GPU: 0, }, + "Standard_E20d_v4": { + InstanceType: "Standard_E20d_v4", + VCPU: 20, + MemoryMb: 163840, + GPU: 0, + }, + "Standard_E20ds_v4": { + InstanceType: "Standard_E20ds_v4", + VCPU: 20, + MemoryMb: 163840, + GPU: 0, + }, "Standard_E20s_v3": { InstanceType: "Standard_E20s_v3", VCPU: 20, MemoryMb: 163840, GPU: 0, }, + "Standard_E20s_v4": { + InstanceType: "Standard_E20s_v4", + VCPU: 20, + MemoryMb: 163840, + GPU: 0, + }, "Standard_E2_v3": { InstanceType: "Standard_E2_v3", VCPU: 2, MemoryMb: 16384, GPU: 0, }, + "Standard_E2_v4": { + InstanceType: "Standard_E2_v4", + VCPU: 2, + MemoryMb: 16384, + GPU: 0, + }, "Standard_E2a_v4": { InstanceType: "Standard_E2a_v4", VCPU: 2, @@ -820,30 +1126,78 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 16384, GPU: 0, }, + "Standard_E2d_v4": { + InstanceType: "Standard_E2d_v4", + VCPU: 2, + MemoryMb: 16384, + GPU: 0, + }, + "Standard_E2ds_v4": { + InstanceType: "Standard_E2ds_v4", + VCPU: 2, + MemoryMb: 16384, + GPU: 0, + }, "Standard_E2s_v3": { InstanceType: "Standard_E2s_v3", VCPU: 2, MemoryMb: 16384, GPU: 0, }, + "Standard_E2s_v4": { + InstanceType: "Standard_E2s_v4", + VCPU: 2, + MemoryMb: 16384, + GPU: 0, + }, + "Standard_E32-16ds_v4": { + InstanceType: "Standard_E32-16ds_v4", + VCPU: 32, + MemoryMb: 262144, + GPU: 0, + }, "Standard_E32-16s_v3": { InstanceType: "Standard_E32-16s_v3", VCPU: 32, MemoryMb: 262144, GPU: 0, }, + "Standard_E32-16s_v4": { + InstanceType: "Standard_E32-16s_v4", + VCPU: 32, + MemoryMb: 262144, + GPU: 0, + }, + "Standard_E32-8ds_v4": { + InstanceType: "Standard_E32-8ds_v4", + VCPU: 32, + MemoryMb: 262144, + GPU: 0, + }, "Standard_E32-8s_v3": { InstanceType: "Standard_E32-8s_v3", VCPU: 32, MemoryMb: 262144, GPU: 0, }, + "Standard_E32-8s_v4": { + InstanceType: "Standard_E32-8s_v4", + VCPU: 32, + MemoryMb: 262144, + GPU: 0, + }, "Standard_E32_v3": { InstanceType: "Standard_E32_v3", VCPU: 32, MemoryMb: 262144, GPU: 0, }, + "Standard_E32_v4": { + InstanceType: "Standard_E32_v4", + VCPU: 32, + MemoryMb: 262144, + GPU: 0, + }, "Standard_E32a_v4": { InstanceType: "Standard_E32a_v4", VCPU: 32, @@ -856,42 +1210,108 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 262144, GPU: 0, }, + "Standard_E32d_v4": { + InstanceType: "Standard_E32d_v4", + VCPU: 32, + MemoryMb: 262144, + GPU: 0, + }, + "Standard_E32ds_v4": { + InstanceType: "Standard_E32ds_v4", + VCPU: 32, + MemoryMb: 262144, + GPU: 0, + }, "Standard_E32s_v3": { InstanceType: "Standard_E32s_v3", VCPU: 32, MemoryMb: 262144, GPU: 0, }, + "Standard_E32s_v4": { + InstanceType: "Standard_E32s_v4", + VCPU: 32, + MemoryMb: 262144, + GPU: 0, + }, + "Standard_E4-2ds_v4": { + InstanceType: "Standard_E4-2ds_v4", + VCPU: 4, + MemoryMb: 32768, + GPU: 0, + }, "Standard_E4-2s_v3": { InstanceType: "Standard_E4-2s_v3", VCPU: 4, MemoryMb: 32768, GPU: 0, }, + "Standard_E4-2s_v4": { + InstanceType: "Standard_E4-2s_v4", + VCPU: 4, + MemoryMb: 32768, + GPU: 0, + }, "Standard_E48_v3": { InstanceType: "Standard_E48_v3", VCPU: 48, MemoryMb: 393216, GPU: 0, }, + "Standard_E48_v4": { + InstanceType: "Standard_E48_v4", + VCPU: 48, + MemoryMb: 393216, + GPU: 0, + }, + "Standard_E48a_v4": { + InstanceType: "Standard_E48a_v4", + VCPU: 48, + MemoryMb: 393216, + GPU: 0, + }, "Standard_E48as_v4": { InstanceType: "Standard_E48as_v4", VCPU: 48, MemoryMb: 393216, GPU: 0, }, + "Standard_E48d_v4": { + InstanceType: "Standard_E48d_v4", + VCPU: 48, + MemoryMb: 393216, + GPU: 0, + }, + "Standard_E48ds_v4": { + InstanceType: "Standard_E48ds_v4", + VCPU: 48, + MemoryMb: 393216, + GPU: 0, + }, "Standard_E48s_v3": { InstanceType: "Standard_E48s_v3", VCPU: 48, MemoryMb: 393216, GPU: 0, }, + "Standard_E48s_v4": { + InstanceType: "Standard_E48s_v4", + VCPU: 48, + MemoryMb: 393216, + GPU: 0, + }, "Standard_E4_v3": { InstanceType: "Standard_E4_v3", VCPU: 4, MemoryMb: 32768, GPU: 0, }, + "Standard_E4_v4": { + InstanceType: "Standard_E4_v4", + VCPU: 4, + MemoryMb: 32768, + GPU: 0, + }, "Standard_E4a_v4": { InstanceType: "Standard_E4a_v4", VCPU: 4, @@ -904,34 +1324,100 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 32768, GPU: 0, }, + "Standard_E4d_v4": { + InstanceType: "Standard_E4d_v4", + VCPU: 4, + MemoryMb: 32768, + GPU: 0, + }, + "Standard_E4ds_v4": { + InstanceType: "Standard_E4ds_v4", + VCPU: 4, + MemoryMb: 32768, + GPU: 0, + }, "Standard_E4s_v3": { InstanceType: "Standard_E4s_v3", VCPU: 4, MemoryMb: 32768, GPU: 0, }, + "Standard_E4s_v4": { + InstanceType: "Standard_E4s_v4", + VCPU: 4, + MemoryMb: 32768, + GPU: 0, + }, + "Standard_E64-16ds_v4": { + InstanceType: "Standard_E64-16ds_v4", + VCPU: 64, + MemoryMb: 516096, + GPU: 0, + }, "Standard_E64-16s_v3": { InstanceType: "Standard_E64-16s_v3", VCPU: 64, MemoryMb: 442368, GPU: 0, }, + "Standard_E64-16s_v4": { + InstanceType: "Standard_E64-16s_v4", + VCPU: 64, + MemoryMb: 516096, + GPU: 0, + }, + "Standard_E64-32ds_v4": { + InstanceType: "Standard_E64-32ds_v4", + VCPU: 64, + MemoryMb: 516096, + GPU: 0, + }, "Standard_E64-32s_v3": { InstanceType: "Standard_E64-32s_v3", VCPU: 64, MemoryMb: 442368, GPU: 0, }, + "Standard_E64-32s_v4": { + InstanceType: "Standard_E64-32s_v4", + VCPU: 64, + MemoryMb: 516096, + GPU: 0, + }, "Standard_E64_v3": { InstanceType: "Standard_E64_v3", VCPU: 64, MemoryMb: 442368, GPU: 0, }, + "Standard_E64_v4": { + InstanceType: "Standard_E64_v4", + VCPU: 64, + MemoryMb: 516096, + GPU: 0, + }, + "Standard_E64a_v4": { + InstanceType: "Standard_E64a_v4", + VCPU: 64, + MemoryMb: 524288, + GPU: 0, + }, "Standard_E64as_v4": { InstanceType: "Standard_E64as_v4", VCPU: 64, - MemoryMb: 442368, + MemoryMb: 524288, + GPU: 0, + }, + "Standard_E64d_v4": { + InstanceType: "Standard_E64d_v4", + VCPU: 64, + MemoryMb: 516096, + GPU: 0, + }, + "Standard_E64ds_v4": { + InstanceType: "Standard_E64ds_v4", + VCPU: 64, + MemoryMb: 516096, GPU: 0, }, "Standard_E64i_v3": { @@ -952,24 +1438,60 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 442368, GPU: 0, }, + "Standard_E64s_v4": { + InstanceType: "Standard_E64s_v4", + VCPU: 64, + MemoryMb: 516096, + GPU: 0, + }, + "Standard_E8-2ds_v4": { + InstanceType: "Standard_E8-2ds_v4", + VCPU: 8, + MemoryMb: 65536, + GPU: 0, + }, "Standard_E8-2s_v3": { InstanceType: "Standard_E8-2s_v3", VCPU: 8, MemoryMb: 65536, GPU: 0, }, + "Standard_E8-2s_v4": { + InstanceType: "Standard_E8-2s_v4", + VCPU: 8, + MemoryMb: 65536, + GPU: 0, + }, + "Standard_E8-4ds_v4": { + InstanceType: "Standard_E8-4ds_v4", + VCPU: 8, + MemoryMb: 65536, + GPU: 0, + }, "Standard_E8-4s_v3": { InstanceType: "Standard_E8-4s_v3", VCPU: 8, MemoryMb: 65536, GPU: 0, }, + "Standard_E8-4s_v4": { + InstanceType: "Standard_E8-4s_v4", + VCPU: 8, + MemoryMb: 65536, + GPU: 0, + }, "Standard_E8_v3": { InstanceType: "Standard_E8_v3", VCPU: 8, MemoryMb: 65536, GPU: 0, }, + "Standard_E8_v4": { + InstanceType: "Standard_E8_v4", + VCPU: 8, + MemoryMb: 65536, + GPU: 0, + }, "Standard_E8a_v4": { InstanceType: "Standard_E8a_v4", VCPU: 8, @@ -982,12 +1504,36 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 65536, GPU: 0, }, + "Standard_E8d_v4": { + InstanceType: "Standard_E8d_v4", + VCPU: 8, + MemoryMb: 65536, + GPU: 0, + }, + "Standard_E8ds_v4": { + InstanceType: "Standard_E8ds_v4", + VCPU: 8, + MemoryMb: 65536, + GPU: 0, + }, "Standard_E8s_v3": { InstanceType: "Standard_E8s_v3", VCPU: 8, MemoryMb: 65536, GPU: 0, }, + "Standard_E8s_v4": { + InstanceType: "Standard_E8s_v4", + VCPU: 8, + MemoryMb: 65536, + GPU: 0, + }, + "Standard_E96a_v4": { + InstanceType: "Standard_E96a_v4", + VCPU: 96, + MemoryMb: 688128, + GPU: 0, + }, "Standard_E96as_v4": { InstanceType: "Standard_E96as_v4", VCPU: 96, @@ -1258,6 +1804,24 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 114688, GPU: 0, }, + "Standard_HB120rs_v2": { + InstanceType: "Standard_HB120rs_v2", + VCPU: 120, + MemoryMb: 479232, + GPU: 0, + }, + "Standard_HB60rs": { + InstanceType: "Standard_HB60rs", + VCPU: 60, + MemoryMb: 228352, + GPU: 0, + }, + "Standard_HC44rs": { + InstanceType: "Standard_HC44rs", + VCPU: 44, + MemoryMb: 334848, + GPU: 0, + }, "Standard_L16s": { InstanceType: "Standard_L16s", VCPU: 16, @@ -1414,6 +1978,18 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 196608, GPU: 0, }, + "Standard_M416-208ms_v2": { + InstanceType: "Standard_M416-208ms_v2", + VCPU: 416, + MemoryMb: 11673600, + GPU: 0, + }, + "Standard_M416-208s_v2": { + InstanceType: "Standard_M416-208s_v2", + VCPU: 416, + MemoryMb: 5836800, + GPU: 0, + }, "Standard_M416ms_v2": { InstanceType: "Standard_M416ms_v2", VCPU: 416, @@ -1606,6 +2182,12 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 114688, GPU: 1, }, + "Standard_ND40rs_v2": { + InstanceType: "Standard_ND40rs_v2", + VCPU: 40, + MemoryMb: 688128, + GPU: 8, + }, "Standard_NV12": { InstanceType: "Standard_NV12", VCPU: 12, @@ -1618,6 +2200,24 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 114688, GPU: 2, }, + "Standard_NV12s_v2": { + InstanceType: "Standard_NV12s_v2", + VCPU: 12, + MemoryMb: 229376, + GPU: 2, + }, + "Standard_NV12s_v3": { + InstanceType: "Standard_NV12s_v3", + VCPU: 12, + MemoryMb: 114688, + GPU: 1, + }, + "Standard_NV16as_v4": { + InstanceType: "Standard_NV16as_v4", + VCPU: 16, + MemoryMb: 57344, + GPU: 1, + }, "Standard_NV24": { InstanceType: "Standard_NV24", VCPU: 24, @@ -1630,6 +2230,36 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 229376, GPU: 4, }, + "Standard_NV24s_v2": { + InstanceType: "Standard_NV24s_v2", + VCPU: 24, + MemoryMb: 458752, + GPU: 4, + }, + "Standard_NV24s_v3": { + InstanceType: "Standard_NV24s_v3", + VCPU: 24, + MemoryMb: 229376, + GPU: 2, + }, + "Standard_NV32as_v4": { + InstanceType: "Standard_NV32as_v4", + VCPU: 32, + MemoryMb: 114688, + GPU: 1, + }, + "Standard_NV48s_v3": { + InstanceType: "Standard_NV48s_v3", + VCPU: 48, + MemoryMb: 458752, + GPU: 4, + }, + "Standard_NV4as_v4": { + InstanceType: "Standard_NV4as_v4", + VCPU: 4, + MemoryMb: 14336, + GPU: 1, + }, "Standard_NV6": { InstanceType: "Standard_NV6", VCPU: 6, @@ -1642,4 +2272,16 @@ var InstanceTypes = map[string]*InstanceType{ MemoryMb: 57344, GPU: 1, }, + "Standard_NV6s_v2": { + InstanceType: "Standard_NV6s_v2", + VCPU: 6, + MemoryMb: 114688, + GPU: 1, + }, + "Standard_NV8as_v4": { + InstanceType: "Standard_NV8as_v4", + VCPU: 8, + MemoryMb: 28672, + GPU: 1, + }, } From 47cfe704e13f1bac277ce977ceb0bcb50b8ab90e Mon Sep 17 00:00:00 2001 From: Marwan Ahmed Date: Thu, 20 Aug 2020 17:52:30 -0700 Subject: [PATCH 4/4] remove the generator from the backport --- .../azure/azure_instance_types/gen.go | 164 ------------------ .../cloudprovider/azure/azure_manager.go | 2 - hack/boilerplate/boilerplate.py | 3 +- 3 files changed, 1 insertion(+), 168 deletions(-) delete mode 100644 cluster-autoscaler/cloudprovider/azure/azure_instance_types/gen.go diff --git a/cluster-autoscaler/cloudprovider/azure/azure_instance_types/gen.go b/cluster-autoscaler/cloudprovider/azure/azure_instance_types/gen.go deleted file mode 100644 index 99d472e12982..000000000000 --- a/cluster-autoscaler/cloudprovider/azure/azure_instance_types/gen.go +++ /dev/null @@ -1,164 +0,0 @@ -// +build ignore - -/* -Copyright 2019 The Kubernetes Authors. - -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. -*/ - -package main - -import ( - "encoding/json" - "html/template" - "io/ioutil" - "os" - "os/exec" - "strconv" - "strings" - - "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/azure" - "k8s.io/klog" -) - -var packageTemplate = template.Must(template.New("").Parse(`/* -Copyright 2018 The Kubernetes Authors. - -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. -*/ - -// This file was generated by go generate; DO NOT EDIT - -package azure - -// InstanceType is the sepc of Azure instance -type InstanceType struct { - InstanceType string - VCPU int64 - MemoryMb int64 - GPU int64 -} - -// InstanceTypes is a map of azure resources -var InstanceTypes = map[string]*InstanceType{ -{{- range .InstanceTypes }} - "{{ .InstanceType }}": { - InstanceType: "{{ .InstanceType }}", - VCPU: {{ .VCPU }}, - MemoryMb: {{ .MemoryMb }}, - GPU: {{ .GPU }}, - }, -{{- end }} -} -`)) - -type InstanceCapabilities struct { - Name string - Value string -} - -type RawInstanceType struct { - Name string - ResourceType string - Capabilities []InstanceCapabilities -} - -func getAllAzureVirtualMachineTypes() (result map[string]*azure.InstanceType, err error) { - cmd := exec.Command("az", "vm", "list-skus", "-o", "json") - stdout, err := cmd.StdoutPipe() - if err != nil { - return nil, err - } - if err = cmd.Start(); err != nil { - return nil, err - } - bytes, err := ioutil.ReadAll(stdout) - if err != nil { - return nil, err - } - - if err := cmd.Wait(); err != nil { - return nil, err - } - - allInstances := make([]RawInstanceType, 0) - err = json.Unmarshal(bytes, &allInstances) - if err != nil { - return nil, err - } - - virtualMachines := make(map[string]*azure.InstanceType) - for _, instance := range allInstances { - if strings.EqualFold(instance.ResourceType, "virtualMachines") { - var virtualMachine azure.InstanceType - virtualMachine.InstanceType = instance.Name - for _, capability := range instance.Capabilities { - switch capability.Name { - case "vCPUs": - virtualMachine.VCPU, err = strconv.ParseInt(capability.Value, 10, 64) - if err != nil { - return nil, err - } - case "MemoryGB": - memoryMb, err := strconv.ParseFloat(capability.Value, 10) - if err != nil { - return nil, err - } - virtualMachine.MemoryMb = int64(memoryMb) * 1024 - case "GPUs": - virtualMachine.GPU, err = strconv.ParseInt(capability.Value, 10, 64) - if err != nil { - return nil, err - } - } - } - virtualMachines[virtualMachine.InstanceType] = &virtualMachine - } - } - - return virtualMachines, err -} - -func main() { - instanceTypes, err := getAllAzureVirtualMachineTypes() - if err != nil { - klog.Fatal(err) - } - - f, err := os.Create("azure_instance_types.go") - if err != nil { - klog.Fatal(err) - } - - defer f.Close() - - err = packageTemplate.Execute(f, struct { - InstanceTypes map[string]*azure.InstanceType - }{ - InstanceTypes: instanceTypes, - }) - - if err != nil { - klog.Fatal(err) - } -} diff --git a/cluster-autoscaler/cloudprovider/azure/azure_manager.go b/cluster-autoscaler/cloudprovider/azure/azure_manager.go index e5032b3e9200..fda14ce0789b 100644 --- a/cluster-autoscaler/cloudprovider/azure/azure_manager.go +++ b/cluster-autoscaler/cloudprovider/azure/azure_manager.go @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -//go:generate go run azure_instance_types/gen.go - package azure import ( diff --git a/hack/boilerplate/boilerplate.py b/hack/boilerplate/boilerplate.py index 089a28f58d3b..664a6b8100f0 100755 --- a/hack/boilerplate/boilerplate.py +++ b/hack/boilerplate/boilerplate.py @@ -154,8 +154,7 @@ def file_extension(filename): # list all the files contain 'DO NOT EDIT', but are not generated skipped_ungenerated_files = ['hack/build-ui.sh', 'hack/lib/swagger.sh', 'hack/boilerplate/boilerplate.py', - 'cluster-autoscaler/cloudprovider/aws/ec2_instance_types/gen.go', - 'cluster-autoscaler/cloudprovider/azure/azure_instance_types/gen.go'] + 'cluster-autoscaler/cloudprovider/aws/ec2_instance_types/gen.go'] def normalize_files(files): newfiles = []