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