JCLOUDS-621 add missing R3, t2.micro, t2.small and t2.medium instance types to EC2

This commit is contained in:
Reynald Borer 2014-11-18 13:47:45 +01:00 committed by Adrian Cole
parent d7f0a675fa
commit 4d8edca77e
3 changed files with 197 additions and 1 deletions

View File

@ -237,6 +237,33 @@ public class EC2HardwareBuilder extends HardwareBuilder {
.processors(ImmutableList.of(new Processor(1.0, 1.0))).rootDeviceType(RootDeviceType.EBS);
}
/**
* @see InstanceType#T2_MICRO
*/
public static EC2HardwareBuilder t2_micro() {
return new EC2HardwareBuilder(InstanceType.T2_MICRO)
.ram(1024)
.processors(ImmutableList.of(new Processor(1.0, 0.1))).rootDeviceType(RootDeviceType.EBS);
}
/**
* @see InstanceType#T2_SMALL
*/
public static EC2HardwareBuilder t2_small() {
return new EC2HardwareBuilder(InstanceType.T2_SMALL)
.ram(2048)
.processors(ImmutableList.of(new Processor(1.0, 0.2))).rootDeviceType(RootDeviceType.EBS);
}
/**
* @see InstanceType#T2_MEDIUM
*/
public static EC2HardwareBuilder t2_medium() {
return new EC2HardwareBuilder(InstanceType.T2_MEDIUM)
.ram(4096)
.processors(ImmutableList.of(new Processor(1.0, 0.4))).rootDeviceType(RootDeviceType.EBS);
}
/**
* @see InstanceType#M1_LARGE
*/
@ -589,6 +616,67 @@ public class EC2HardwareBuilder extends HardwareBuilder {
.virtualizationType(VirtualizationType.HVM);
}
/**
* @see InstanceType#R3_LARGE
*/
public static EC2HardwareBuilder r3_large() {
return new EC2HardwareBuilder(InstanceType.R3_LARGE)
.ram(15616)
.processors(ImmutableList.of(new Processor(2.0, 2.5)))
.volumes(ImmutableList.<Volume> of(
new VolumeBuilder().type(LOCAL).size(10.0f).device("/dev/sda1").bootDevice(true).durable(false).build(),
new VolumeBuilder().type(LOCAL).size(32.0f).device("/dev/sdb").bootDevice(false).durable(false).build()));
}
/**
* @see InstanceType#R3_XLARGE
*/
public static EC2HardwareBuilder r3_xlarge() {
return new EC2HardwareBuilder(InstanceType.R3_XLARGE)
.ram(31232)
.processors(ImmutableList.of(new Processor(4.0, 2.5)))
.volumes(ImmutableList.<Volume> of(
new VolumeBuilder().type(LOCAL).size(10.0f).device("/dev/sda1").bootDevice(true).durable(false).build(),
new VolumeBuilder().type(LOCAL).size(80.0f).device("/dev/sdb").bootDevice(false).durable(false).build()));
}
/**
* @see InstanceType#R3_2XLARGE
*/
public static EC2HardwareBuilder r3_2xlarge() {
return new EC2HardwareBuilder(InstanceType.R3_2XLARGE)
.ram(62464)
.processors(ImmutableList.of(new Processor(8.0, 2.5)))
.volumes(ImmutableList.<Volume> of(
new VolumeBuilder().type(LOCAL).size(10.0f).device("/dev/sda1").bootDevice(true).durable(false).build(),
new VolumeBuilder().type(LOCAL).size(160.0f).device("/dev/sdb").bootDevice(false).durable(false).build()));
}
/**
* @see InstanceType#R3_4XLARGE
*/
public static EC2HardwareBuilder r3_4xlarge() {
return new EC2HardwareBuilder(InstanceType.R3_4XLARGE)
.ram(124928)
.processors(ImmutableList.of(new Processor(16.0, 2.5)))
.volumes(ImmutableList.<Volume> of(
new VolumeBuilder().type(LOCAL).size(10.0f).device("/dev/sda1").bootDevice(true).durable(false).build(),
new VolumeBuilder().type(LOCAL).size(320.0f).device("/dev/sdb").bootDevice(false).durable(false).build()));
}
/**
* @see InstanceType#R3_8XLARGE
*/
public static EC2HardwareBuilder r3_8xlarge() {
return new EC2HardwareBuilder(InstanceType.R3_8XLARGE)
.ram(249856)
.processors(ImmutableList.of(new Processor(32.0, 2.5)))
.volumes(ImmutableList.<Volume> of(
new VolumeBuilder().type(LOCAL).size(10.0f).device("/dev/sda1").bootDevice(true).durable(false).build(),
new VolumeBuilder().type(LOCAL).size(320.0f).device("/dev/sdb").bootDevice(false).durable(false).build(),
new VolumeBuilder().type(LOCAL).size(320.0f).device("/dev/sdc").bootDevice(false).durable(false).build()));
}
@SuppressWarnings("unchecked")
@Override
public Hardware build() {

View File

@ -37,6 +37,39 @@ public class InstanceType {
*/
public static final String T1_MICRO = "t1.micro";
/**
* Micro Burstable Performance Instance
* <ul>
* <li>1 GB memory</li>
* <li>1 vCPU / 10% baseline performance</li>
* <li>No instance storage (EBS storage only)</li>
* <li>64-bit platform</li>
* </ul>
*/
public static final String T2_MICRO = "t2.micro";
/**
* Micro Burstable Performance Instance
* <ul>
* <li>2 GB memory</li>
* <li>1 vCPU / 20% baseline performance</li>
* <li>No instance storage (EBS storage only)</li>
* <li>64-bit platform</li>
* </ul>
*/
public static final String T2_SMALL = "t2.small";
/**
* Micro Burstable Performance Instance
* <ul>
* <li>4 GB memory</li>
* <li>2 vCPU / 40% baseline performance</li>
* <li>No instance storage (EBS storage only)</li>
* <li>64-bit platform</li>
* </ul>
*/
public static final String T2_MEDIUM = "t2.medium";
/**
* Small Instance
* <ul>
@ -383,4 +416,63 @@ public class InstanceType {
* </ul>
*/
public static final String I2_8XLARGE = "i2.8xlarge";
/**
* R3 Large Memory Optimized
* <ul>
* <li>15.25 GB memory</li>
* <li>2 vCPU</li>
* <li>1 SSD-based volume with 32 GiB of instance storage</li>
* <li>64-bit platform</li>
* </ul>
*/
public static final String R3_LARGE = "r3.large";
/**
* R3 Extra Large Memory Optimized
* <ul>
* <li>30.5 GB memory</li>
* <li>4 vCPU</li>
* <li>1 SSD-based volume with 80 GiB of instance storage</li>
* <li>64-bit platform</li>
* </ul>
*/
public static final String R3_XLARGE = "r3.xlarge";
/**
* R3 Double Extra Large Memory Optimized
* <ul>
* <li>61 GB memory</li>
* <li>8 vCPU</li>
* <li>1 SSD-based volume with 160 GiB of instance storage</li>
* <li>64-bit platform</li>
* <li>Network Performance: High</li>
* </ul>
*/
public static final String R3_2XLARGE = "r3.2xlarge";
/**
* R3 Quadruple Extra Large Memory Optimized
* <ul>
* <li>122 GB memory</li>
* <li>16 vCPU</li>
* <li>1 SSD-based volume with 320 GiB of instance storage</li>
* <li>64-bit platform</li>
* <li>Network Performance: High</li>
* </ul>
*/
public static final String R3_4XLARGE = "r3.4xlarge";
/**
* R3 Octuple Extra Large Memory Optimized
* <ul>
* <li>244 GB memory</li>
* <li>32 vCPU</li>
* <li>2 SSD-based volumes with 320 GiB of instance storage</li>
* <li>64-bit platform</li>
* <li>Network Performance: 10 Gigabit</li>
* </ul>
*/
public static final String R3_8XLARGE = "r3.8xlarge";
}

View File

@ -45,6 +45,14 @@ import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m3_large;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m3_medium;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m3_xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.t1_micro;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.t2_micro;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.t2_small;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.t2_medium;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.r3_large;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.r3_xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.r3_2xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.r3_4xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.r3_8xlarge;
import java.util.Set;
@ -79,6 +87,9 @@ public class AWSEC2HardwareSupplier extends EC2HardwareSupplier {
sizes.add(g2_2xlarge().supportsImageIds(ccAmis).build());
sizes.add(t1_micro().build());
sizes.add(t2_micro().build());
sizes.add(t2_small().build());
sizes.add(t2_medium().build());
sizes.add(c1_medium().build());
sizes.add(c1_xlarge().build());
sizes.add(c3_large().build());
@ -101,6 +112,11 @@ public class AWSEC2HardwareSupplier extends EC2HardwareSupplier {
sizes.add(m3_large().build());
sizes.add(m3_xlarge().build());
sizes.add(m3_2xlarge().build());
sizes.add(r3_large().build());
sizes.add(r3_xlarge().build());
sizes.add(r3_2xlarge().build());
sizes.add(r3_4xlarge().build());
sizes.add(r3_8xlarge().build());
return sizes.build();
}