github.com/axw/juju@v0.0.0-20161005053422-4bd6544d08d4/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(ericsnow) Dynamically generate the type specs from the official 20 // JSON file. 21 22 // Shared-core machine types. 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 61 { // High memory machine types 62 Name: "n1-highmem-2", 63 Arches: arches, 64 CpuCores: 2, 65 CpuPower: instances.CpuPower(550), 66 Mem: 13000, 67 VirtType: &vtype, 68 }, { 69 Name: "n1-highmem-4", 70 Arches: arches, 71 CpuCores: 4, 72 CpuPower: instances.CpuPower(1100), 73 Mem: 26000, 74 VirtType: &vtype, 75 }, { 76 Name: "n1-highmem-8", 77 Arches: arches, 78 CpuCores: 8, 79 CpuPower: instances.CpuPower(2200), 80 Mem: 52000, 81 VirtType: &vtype, 82 }, { 83 Name: "n1-highmem-16", 84 Arches: arches, 85 CpuCores: 16, 86 CpuPower: instances.CpuPower(4400), 87 Mem: 104000, 88 VirtType: &vtype, 89 }, 90 91 { // High CPU machine types 92 Name: "n1-highcpu-2", 93 Arches: arches, 94 CpuCores: 2, 95 CpuPower: instances.CpuPower(550), 96 Mem: 1800, 97 VirtType: &vtype, 98 }, { 99 Name: "n1-highcpu-4", 100 Arches: arches, 101 CpuCores: 4, 102 CpuPower: instances.CpuPower(1100), 103 Mem: 3600, 104 VirtType: &vtype, 105 }, { 106 Name: "n1-highcpu-8", 107 Arches: arches, 108 CpuCores: 8, 109 CpuPower: instances.CpuPower(2200), 110 Mem: 7200, 111 VirtType: &vtype, 112 }, { 113 Name: "n1-highcpu-16", 114 Arches: arches, 115 CpuCores: 16, 116 CpuPower: instances.CpuPower(4400), 117 Mem: 14400, 118 VirtType: &vtype, 119 }, 120 121 { // Micro and small machine types 122 Name: "f1-micro", 123 Arches: arches, 124 CpuCores: 1, 125 CpuPower: instances.CpuPower(0), 126 Mem: 600, 127 VirtType: &vtype, 128 }, { 129 Name: "g1-small", 130 Arches: arches, 131 CpuCores: 1, 132 CpuPower: instances.CpuPower(138), 133 Mem: 1700, 134 VirtType: &vtype, 135 }, 136 }