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

     1  // Copyright 2014 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package gce
     5  
     6  import (
     7  	"github.com/juju/utils/arch"
     8  
     9  	"github.com/juju/juju/environs/instances"
    10  )
    11  
    12  var (
    13  	vtype  = "kvm"
    14  	arches = []string{arch.AMD64}
    15  )
    16  
    17  // Instance types are not associated with disks in GCE, so we do not
    18  // set RootDisk.
    19  
    20  // TODO(axw) 2016-10-03 #1629821
    21  // Query the machine types dynamically, to avoid hard-coding this
    22  // information (if possible), or else to augment it.
    23  var allInstanceTypes = []instances.InstanceType{
    24  	{ // Standard machine types
    25  		Name:     "n1-standard-1",
    26  		Arches:   arches,
    27  		CpuCores: 1,
    28  		CpuPower: instances.CpuPower(275),
    29  		Mem:      3750,
    30  		VirtType: &vtype,
    31  	}, {
    32  		Name:     "n1-standard-2",
    33  		Arches:   arches,
    34  		CpuCores: 2,
    35  		CpuPower: instances.CpuPower(550),
    36  		Mem:      7500,
    37  		VirtType: &vtype,
    38  	}, {
    39  		Name:     "n1-standard-4",
    40  		Arches:   arches,
    41  		CpuCores: 4,
    42  		CpuPower: instances.CpuPower(1100),
    43  		Mem:      15000,
    44  		VirtType: &vtype,
    45  	}, {
    46  		Name:     "n1-standard-8",
    47  		Arches:   arches,
    48  		CpuCores: 8,
    49  		CpuPower: instances.CpuPower(2200),
    50  		Mem:      30000,
    51  		VirtType: &vtype,
    52  	}, {
    53  		Name:     "n1-standard-16",
    54  		Arches:   arches,
    55  		CpuCores: 16,
    56  		CpuPower: instances.CpuPower(4400),
    57  		Mem:      60000,
    58  		VirtType: &vtype,
    59  	}, {
    60  		Name:     "n1-standard-32",
    61  		Arches:   arches,
    62  		CpuCores: 32,
    63  		CpuPower: instances.CpuPower(8800),
    64  		Mem:      120000,
    65  		VirtType: &vtype,
    66  	},
    67  
    68  	{ // High memory machine types
    69  		Name:     "n1-highmem-2",
    70  		Arches:   arches,
    71  		CpuCores: 2,
    72  		CpuPower: instances.CpuPower(550),
    73  		Mem:      13000,
    74  		VirtType: &vtype,
    75  	}, {
    76  		Name:     "n1-highmem-4",
    77  		Arches:   arches,
    78  		CpuCores: 4,
    79  		CpuPower: instances.CpuPower(1100),
    80  		Mem:      26000,
    81  		VirtType: &vtype,
    82  	}, {
    83  		Name:     "n1-highmem-8",
    84  		Arches:   arches,
    85  		CpuCores: 8,
    86  		CpuPower: instances.CpuPower(2200),
    87  		Mem:      52000,
    88  		VirtType: &vtype,
    89  	}, {
    90  		Name:     "n1-highmem-16",
    91  		Arches:   arches,
    92  		CpuCores: 16,
    93  		CpuPower: instances.CpuPower(4400),
    94  		Mem:      104000,
    95  		VirtType: &vtype,
    96  	}, {
    97  		Name:     "n1-highmem-32",
    98  		Arches:   arches,
    99  		CpuCores: 32,
   100  		CpuPower: instances.CpuPower(8800),
   101  		Mem:      208000,
   102  		VirtType: &vtype,
   103  	},
   104  
   105  	{ // High CPU machine types
   106  		Name:     "n1-highcpu-2",
   107  		Arches:   arches,
   108  		CpuCores: 2,
   109  		CpuPower: instances.CpuPower(550),
   110  		Mem:      1800,
   111  		VirtType: &vtype,
   112  	}, {
   113  		Name:     "n1-highcpu-4",
   114  		Arches:   arches,
   115  		CpuCores: 4,
   116  		CpuPower: instances.CpuPower(1100),
   117  		Mem:      3600,
   118  		VirtType: &vtype,
   119  	}, {
   120  		Name:     "n1-highcpu-8",
   121  		Arches:   arches,
   122  		CpuCores: 8,
   123  		CpuPower: instances.CpuPower(2200),
   124  		Mem:      7200,
   125  		VirtType: &vtype,
   126  	}, {
   127  		Name:     "n1-highcpu-16",
   128  		Arches:   arches,
   129  		CpuCores: 16,
   130  		CpuPower: instances.CpuPower(4400),
   131  		Mem:      14400,
   132  		VirtType: &vtype,
   133  	}, {
   134  		Name:     "n1-highcpu-32",
   135  		Arches:   arches,
   136  		CpuCores: 32,
   137  		CpuPower: instances.CpuPower(8800),
   138  		Mem:      28800,
   139  		VirtType: &vtype,
   140  	},
   141  
   142  	{ // Shared-core machine types.
   143  		Name:     "f1-micro",
   144  		Arches:   arches,
   145  		CpuCores: 1,
   146  		CpuPower: instances.CpuPower(0),
   147  		Mem:      600,
   148  		VirtType: &vtype,
   149  	}, {
   150  		Name:     "g1-small",
   151  		Arches:   arches,
   152  		CpuCores: 1,
   153  		CpuPower: instances.CpuPower(138),
   154  		Mem:      1700,
   155  		VirtType: &vtype,
   156  	},
   157  }