github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/provider/oci/shapespecs.go (about)

     1  // Copyright 2018 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package oci
     5  
     6  // ShapeSpec holds information about a shapes resource allocation
     7  type ShapeSpec struct {
     8  	// Cpus is the number of CPU cores available to the instance
     9  	Cpus int
    10  	// Gpus is the number of GPUs available to this instance
    11  	Gpus int
    12  	// Memory is the amount of RAM available to the instance in MB
    13  	Memory int
    14  	// Bandwidth is the network bandwidth in Gbps. Where there are multiple physical NICs, the speed of the fastest is used.
    15  	Bandwidth float32
    16  	Type      InstanceType
    17  	Tags      []string
    18  }
    19  
    20  // shapeSpecs is a map containing resource information
    21  // about each shape. Unfortunately the API simply returns
    22  // the name of the shape and nothing else. For details see:
    23  // https://docs.cloud.oracle.com/iaas/Content/Compute/References/computeshapes.htm
    24  // https://cloud.oracle.com/infrastructure/pricing
    25  // https://cloud.oracle.com/infrastructure/compute/pricing
    26  var shapeSpecs = map[string]ShapeSpec{
    27  	"VM.Standard1.1": {
    28  		Cpus:      1,
    29  		Memory:    7 * 1024,
    30  		Type:      VirtualMachine,
    31  		Bandwidth: 0.599, // "Up to 600 Mbps"
    32  	},
    33  	"VM.Standard1.2": {
    34  		Cpus:      2,
    35  		Memory:    14 * 1024,
    36  		Type:      VirtualMachine,
    37  		Bandwidth: 1.199, // "Up to 1.2 Gbps"
    38  	},
    39  	"VM.Standard1.4": {
    40  		Cpus:      4,
    41  		Memory:    28 * 1024,
    42  		Type:      VirtualMachine,
    43  		Bandwidth: 1.2,
    44  	},
    45  	"VM.Standard1.8": {
    46  		Cpus:      8,
    47  		Memory:    56 * 1024,
    48  		Type:      VirtualMachine,
    49  		Bandwidth: 2.4,
    50  	},
    51  	"VM.Standard1.16": {
    52  		Cpus:      16,
    53  		Memory:    112 * 1024,
    54  		Type:      VirtualMachine,
    55  		Bandwidth: 4.8,
    56  	},
    57  	"VM.Standard2.1": {
    58  		Cpus:      1,
    59  		Memory:    15 * 1024,
    60  		Type:      VirtualMachine,
    61  		Bandwidth: 1,
    62  	},
    63  	"VM.Standard2.2": {
    64  		Cpus:      2,
    65  		Memory:    30 * 1024,
    66  		Type:      VirtualMachine,
    67  		Bandwidth: 2,
    68  	},
    69  	"VM.Standard2.4": {
    70  		Cpus:      4,
    71  		Memory:    60 * 1024,
    72  		Type:      VirtualMachine,
    73  		Bandwidth: 4.1,
    74  	},
    75  	"VM.Standard2.8": {
    76  		Cpus:      8,
    77  		Memory:    120 * 1024,
    78  		Type:      VirtualMachine,
    79  		Bandwidth: 8.2,
    80  	},
    81  	"VM.Standard2.16": {
    82  		Cpus:      16,
    83  		Memory:    240 * 1024,
    84  		Type:      VirtualMachine,
    85  		Bandwidth: 16.4,
    86  	},
    87  	"VM.Standard2.24": {
    88  		Cpus:      24,
    89  		Memory:    320 * 1024,
    90  		Type:      VirtualMachine,
    91  		Bandwidth: 24.6,
    92  	},
    93  	"VM.DenseIO1.4": {
    94  		Cpus:   4,
    95  		Memory: 60 * 1024,
    96  		Type:   VirtualMachine,
    97  		Tags: []string{
    98  			"denseio",
    99  		},
   100  		Bandwidth: 1.2,
   101  	},
   102  	"VM.DenseIO1.8": {
   103  		Cpus:   8,
   104  		Memory: 120 * 1024,
   105  		Type:   VirtualMachine,
   106  		Tags: []string{
   107  			"denseio",
   108  		},
   109  		Bandwidth: 2.4,
   110  	},
   111  	"VM.DenseIO1.16": {
   112  		Cpus:   16,
   113  		Memory: 240 * 1024,
   114  		Type:   VirtualMachine,
   115  		Tags: []string{
   116  			"denseio",
   117  		},
   118  		Bandwidth: 4.8,
   119  	},
   120  	"VM.DenseIO2.8": {
   121  		Cpus:   8,
   122  		Memory: 120 * 1024,
   123  		Type:   VirtualMachine,
   124  		Tags: []string{
   125  			"denseio",
   126  		},
   127  		Bandwidth: 8.2,
   128  	},
   129  	"VM.DenseIO2.16": {
   130  		Cpus:   16,
   131  		Memory: 240 * 1024,
   132  		Type:   VirtualMachine,
   133  		Tags: []string{
   134  			"denseio",
   135  		},
   136  		Bandwidth: 16.4,
   137  	},
   138  	"VM.DenseIO2.24": {
   139  		Cpus:   24,
   140  		Memory: 320 * 1024,
   141  		Type:   VirtualMachine,
   142  		Tags: []string{
   143  			"denseio",
   144  		},
   145  		Bandwidth: 24.6,
   146  	},
   147  	"VM.Standard.E2.1": {
   148  		Cpus:      1,
   149  		Memory:    8 * 1024,
   150  		Type:      VirtualMachine,
   151  		Bandwidth: 0.7,
   152  	},
   153  	"VM.Standard.E2.2": {
   154  		Cpus:      2,
   155  		Memory:    16 * 1024,
   156  		Type:      VirtualMachine,
   157  		Bandwidth: 1.4,
   158  	},
   159  	"VM.Standard.E2.4": {
   160  		Cpus:      4,
   161  		Memory:    32 * 1024,
   162  		Type:      VirtualMachine,
   163  		Bandwidth: 2.8,
   164  	},
   165  	"VM.Standard.E2.8": {
   166  		Cpus:      8,
   167  		Memory:    64 * 1024,
   168  		Type:      VirtualMachine,
   169  		Bandwidth: 5.6,
   170  	},
   171  	"VM.GPU2.1": {
   172  		Cpus:      12,
   173  		Gpus:      1,
   174  		Memory:    72 * 1024,
   175  		Type:      GPUMachine,
   176  		Bandwidth: 8.0,
   177  		Tags: []string{
   178  			"nvidia_p100",
   179  		},
   180  	},
   181  	"VM.GPU3.1": {
   182  		Cpus:      6,
   183  		Gpus:      1,
   184  		Memory:    90 * 1024,
   185  		Type:      GPUMachine,
   186  		Bandwidth: 6.0,
   187  		Tags: []string{
   188  			"nvidia_v100",
   189  		},
   190  	},
   191  	"VM.GPU3.2": {
   192  		Cpus:      12,
   193  		Gpus:      2,
   194  		Memory:    180 * 1024,
   195  		Type:      GPUMachine,
   196  		Bandwidth: 8.0,
   197  		Tags: []string{
   198  			"nvidia_v100",
   199  		},
   200  	},
   201  	"VM.GPU3.4": {
   202  		Cpus:      24,
   203  		Gpus:      4,
   204  		Memory:    360 * 1024,
   205  		Type:      GPUMachine,
   206  		Bandwidth: 8.0,
   207  		Tags: []string{
   208  			"nvidia_v100",
   209  		},
   210  	},
   211  	"BM.Standard1.36": {
   212  		Cpus:      36,
   213  		Memory:    256 * 1024,
   214  		Type:      BareMetal,
   215  		Bandwidth: 10.0,
   216  	},
   217  	"BM.Standard2.52": {
   218  		Cpus:      52,
   219  		Memory:    768 * 1024,
   220  		Type:      BareMetal,
   221  		Bandwidth: 25.0,
   222  	},
   223  	"BM.DenseIO1.36": {
   224  		Cpus:      36,
   225  		Memory:    512 * 1024,
   226  		Type:      BareMetal,
   227  		Bandwidth: 10.0,
   228  		Tags: []string{
   229  			"denseio",
   230  		},
   231  	},
   232  	"BM.DenseIO2.52": {
   233  		Cpus:   52,
   234  		Memory: 768 * 1024,
   235  		Type:   BareMetal,
   236  		Tags: []string{
   237  			"denseio",
   238  		},
   239  		Bandwidth: 25,
   240  	},
   241  	"BM.GPU2.2": {
   242  		Cpus:      28,
   243  		Gpus:      2,
   244  		Memory:    192 * 1024,
   245  		Type:      GPUMachine,
   246  		Bandwidth: 25,
   247  		Tags: []string{
   248  			"nvidia_p100",
   249  		},
   250  	},
   251  	"BM.GPU3.8": {
   252  		Cpus:      52,
   253  		Gpus:      8,
   254  		Memory:    768 * 1024,
   255  		Type:      GPUMachine,
   256  		Bandwidth: 25,
   257  		Tags: []string{
   258  			"nvidia_v100",
   259  		},
   260  	},
   261  	"BM.Standard.E2.64": {
   262  		Cpus:      64,
   263  		Memory:    512 * 1024,
   264  		Type:      BareMetal,
   265  		Bandwidth: 25.0,
   266  	},
   267  	"BM.HPC2.36": {
   268  		Cpus:      36,
   269  		Memory:    384 * 1024,
   270  		Type:      BareMetal,
   271  		Bandwidth: 25.0,
   272  		Tags: []string{
   273  			"rdma",
   274  		},
   275  	},
   276  }