mirror of https://github.com/apache/jclouds.git
added recent aws instance types
This commit is contained in:
parent
4874f1c3c6
commit
b582d4a4a8
|
@ -43,6 +43,8 @@ import org.jclouds.ec2.domain.VirtualizationType;
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
import com.google.common.base.Predicates;
|
import com.google.common.base.Predicates;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import com.google.common.collect.ImmutableList.Builder;
|
||||||
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -294,7 +296,23 @@ public class EC2HardwareBuilder extends HardwareBuilder {
|
||||||
ImmutableList.<Volume> of(new VolumeImpl(10.0f, "/dev/sda1", true, false), new VolumeImpl(840.0f,
|
ImmutableList.<Volume> of(new VolumeImpl(10.0f, "/dev/sda1", true, false), new VolumeImpl(840.0f,
|
||||||
"/dev/sdb", false, false), new VolumeImpl(840.0f, "/dev/sdc", false, false))).is64Bit(true);
|
"/dev/sdb", false, false), new VolumeImpl(840.0f, "/dev/sdc", false, false))).is64Bit(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see InstanceType#M3_XLARGE
|
||||||
|
*/
|
||||||
|
public static EC2HardwareBuilder m3_xlarge() {
|
||||||
|
return new EC2HardwareBuilder(InstanceType.M3_XLARGE).ram(15360)
|
||||||
|
.processors(ImmutableList.of(new Processor(4.0, 3.25))).rootDeviceType(RootDeviceType.EBS).is64Bit(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see InstanceType#M3_2XLARGE
|
||||||
|
*/
|
||||||
|
public static EC2HardwareBuilder m3_2xlarge() {
|
||||||
|
return new EC2HardwareBuilder(InstanceType.M3_2XLARGE).ram(30720)
|
||||||
|
.processors(ImmutableList.of(new Processor(8.0, 3.25))).rootDeviceType(RootDeviceType.EBS).is64Bit(true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see InstanceType#C1_MEDIUM
|
* @see InstanceType#C1_MEDIUM
|
||||||
*/
|
*/
|
||||||
|
@ -355,11 +373,27 @@ public class EC2HardwareBuilder extends HardwareBuilder {
|
||||||
public static EC2HardwareBuilder hi1_4xlarge() {
|
public static EC2HardwareBuilder hi1_4xlarge() {
|
||||||
return new EC2HardwareBuilder(InstanceType.HI1_4XLARGE)
|
return new EC2HardwareBuilder(InstanceType.HI1_4XLARGE)
|
||||||
.ram(60 * 1024 + 512)
|
.ram(60 * 1024 + 512)
|
||||||
.processors(ImmutableList.of(new Processor(8.0, 5.5), new Processor(8.0, 5.5)))
|
.processors(ImmutableList.of(new Processor(16.0, 2.1875)))
|
||||||
.volumes(ImmutableList.<Volume> of(new VolumeImpl(1024.0f, "/dev/sda1", true, false),
|
.volumes(ImmutableList.<Volume> of(new VolumeImpl(1024.0f, "/dev/sda1", true, false),
|
||||||
new VolumeImpl(1024.0f, "/dev/sdb", false, false)));
|
new VolumeImpl(1024.0f, "/dev/sdb", false, false)))
|
||||||
|
.virtualizationType(VirtualizationType.HVM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static EC2HardwareBuilder hs1_8xlarge() {
|
||||||
|
float twoTB = 2048.0f * 1024.0f;
|
||||||
|
Builder<Volume> all24Volumes = ImmutableList.<Volume>builder();
|
||||||
|
all24Volumes.add(new VolumeImpl(twoTB, "/dev/sda1", true, false));
|
||||||
|
for (char letter : ImmutableSet.of('b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
|
||||||
|
'q', 'r', 's', 't', 'u', 'v', 'w', 'x')) {
|
||||||
|
all24Volumes.add(new VolumeImpl(twoTB, "/dev/sd" + letter, false, false));
|
||||||
|
}
|
||||||
|
return new EC2HardwareBuilder(InstanceType.HS1_8XLARGE)
|
||||||
|
.ram(117 * 1024)
|
||||||
|
.processors(ImmutableList.of(new Processor(16.0, 2.1875)))
|
||||||
|
.volumes(all24Volumes.build())
|
||||||
|
.virtualizationType(VirtualizationType.HVM);
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public Hardware build() {
|
public Hardware build() {
|
||||||
|
|
|
@ -119,6 +119,28 @@ public class InstanceType {
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
public static final String M2_4XLARGE = "m2.4xlarge";
|
public static final String M2_4XLARGE = "m2.4xlarge";
|
||||||
|
/**
|
||||||
|
* M3 Extra Large Instance
|
||||||
|
* <ul>
|
||||||
|
* <li>15 GiB memory</li>
|
||||||
|
* <li>13 EC2 Compute Units (4 virtual cores with 3.25 EC2 Compute Units each)</li>
|
||||||
|
* <li>EBS storage only</li>
|
||||||
|
* <li>64-bit platform</li>
|
||||||
|
* <li>I/O Performance: Moderate</li>
|
||||||
|
* </ul>
|
||||||
|
*/
|
||||||
|
public static final String M3_XLARGE = "m3.xlarge";
|
||||||
|
/**
|
||||||
|
* M3 Double Extra Large Instance
|
||||||
|
* <ul>
|
||||||
|
* <li>30 GiB memory</li>
|
||||||
|
* <li>26 EC2 Compute Units (8 virtual cores with 3.25 EC2 Compute Units each)</li>
|
||||||
|
* <li>EBS storage only</li>
|
||||||
|
* <li>64-bit platform</li>
|
||||||
|
* <li>I/O Performance: High</li>
|
||||||
|
* </ul>
|
||||||
|
*/
|
||||||
|
public static final String M3_2XLARGE = "m3.2xlarge";
|
||||||
/**
|
/**
|
||||||
* High-CPU Medium Instance
|
* High-CPU Medium Instance
|
||||||
* <ul>
|
* <ul>
|
||||||
|
@ -197,4 +219,16 @@ public class InstanceType {
|
||||||
*/
|
*/
|
||||||
public static final String HI1_4XLARGE = "hi1.4xlarge";
|
public static final String HI1_4XLARGE = "hi1.4xlarge";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* High Storage Eight Extra Large
|
||||||
|
* <ul>
|
||||||
|
* <li>117 GiB of memory</li>
|
||||||
|
* <li>35 EC2 Compute Units (16 virtual cores*)</li>
|
||||||
|
* <li>24 hard disk drives each with 2 TB of instance storage</li>
|
||||||
|
* <li>64-bit platform</li>
|
||||||
|
* <li>I/O Performance: Very High (10 Gigabit Ethernet)</li>
|
||||||
|
* <li>Storage I/O Performance: Very High**</li>
|
||||||
|
* </ul>
|
||||||
|
*/
|
||||||
|
public static final String HS1_8XLARGE = "hs1.8xlarge";
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.cc1_4xlarge;
|
||||||
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.cc2_8xlarge;
|
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.cc2_8xlarge;
|
||||||
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.cg1_4xlarge;
|
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.cg1_4xlarge;
|
||||||
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.hi1_4xlarge;
|
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.hi1_4xlarge;
|
||||||
|
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.hs1_8xlarge;
|
||||||
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_large;
|
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_large;
|
||||||
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_medium;
|
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_medium;
|
||||||
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_small;
|
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_small;
|
||||||
|
@ -31,6 +32,7 @@ import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m1_xlarge;
|
||||||
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_2xlarge;
|
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_2xlarge;
|
||||||
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_4xlarge;
|
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_4xlarge;
|
||||||
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_xlarge;
|
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.m2_xlarge;
|
||||||
|
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.t1_micro;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -65,9 +67,11 @@ public class AWSEC2HardwareSupplier extends EC2HardwareSupplier {
|
||||||
sizes.add(cc1_4xlarge().supportsImageIds(ccAmis).build());
|
sizes.add(cc1_4xlarge().supportsImageIds(ccAmis).build());
|
||||||
sizes.add(cg1_4xlarge().supportsImageIds(ccAmis).build());
|
sizes.add(cg1_4xlarge().supportsImageIds(ccAmis).build());
|
||||||
sizes.add(cc2_8xlarge().supportsImageIds(ccAmis).build());
|
sizes.add(cc2_8xlarge().supportsImageIds(ccAmis).build());
|
||||||
|
sizes.add(hi1_4xlarge().supportsImageIds(ccAmis).build());
|
||||||
|
sizes.add(hs1_8xlarge().supportsImageIds(ccAmis).build());
|
||||||
sizes.addAll(ImmutableSet.<Hardware> of(t1_micro().build(), c1_medium().build(), c1_xlarge().build(), m1_large()
|
sizes.addAll(ImmutableSet.<Hardware> of(t1_micro().build(), c1_medium().build(), c1_xlarge().build(), m1_large()
|
||||||
.build(), m1_small().build(), m1_medium().build(), m1_xlarge().build(), m2_xlarge().build(),
|
.build(), m1_small().build(), m1_medium().build(), m1_xlarge().build(), m2_xlarge().build(),
|
||||||
m2_2xlarge().build(), m2_4xlarge().build(), hi1_4xlarge().build()));
|
m2_2xlarge().build(), m2_4xlarge().build(), m3_xlarge().build(), m3_xlarge().build()));
|
||||||
return sizes.build();
|
return sizes.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,6 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest {
|
||||||
@Override
|
@Override
|
||||||
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
|
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
|
||||||
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
|
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(OsFamilyVersion64Bit input) {
|
public boolean apply(OsFamilyVersion64Bit input) {
|
||||||
switch (input.family) {
|
switch (input.family) {
|
||||||
|
@ -168,7 +167,6 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDefaultTemplateBuilder() throws IOException {
|
public void testDefaultTemplateBuilder() throws IOException {
|
||||||
|
|
||||||
Template defaultTemplate = view.getComputeService().templateBuilder().build();
|
Template defaultTemplate = view.getComputeService().templateBuilder().build();
|
||||||
assert (defaultTemplate.getImage().getProviderId().startsWith("ami-")) : defaultTemplate;
|
assert (defaultTemplate.getImage().getProviderId().startsWith("ami-")) : defaultTemplate;
|
||||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "pv-2012.09.rc-1");
|
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "pv-2012.09.rc-1");
|
||||||
|
@ -200,26 +198,14 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest {
|
||||||
Template fastestTemplate = view.getComputeService().templateBuilder().fastest().osFamily(OsFamily.AMZN_LINUX)
|
Template fastestTemplate = view.getComputeService().templateBuilder().fastest().osFamily(OsFamily.AMZN_LINUX)
|
||||||
.build();
|
.build();
|
||||||
assert (fastestTemplate.getImage().getProviderId().startsWith("ami-")) : fastestTemplate;
|
assert (fastestTemplate.getImage().getProviderId().startsWith("ami-")) : fastestTemplate;
|
||||||
assertEquals(fastestTemplate.getHardware().getProviderId(), InstanceType.HI1_4XLARGE);
|
assertEquals(fastestTemplate.getHardware().getProviderId(), InstanceType.CC2_8XLARGE);
|
||||||
assertEquals(fastestTemplate.getImage().getOperatingSystem().getVersion(), "pv-2012.09.rc-1");
|
assertEquals(fastestTemplate.getImage().getOperatingSystem().getVersion(), "2011.09.2");
|
||||||
assertEquals(fastestTemplate.getImage().getOperatingSystem().is64Bit(), true);
|
assertEquals(fastestTemplate.getImage().getOperatingSystem().is64Bit(), true);
|
||||||
assertEquals(fastestTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.AMZN_LINUX);
|
assertEquals(fastestTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.AMZN_LINUX);
|
||||||
assertEquals(fastestTemplate.getImage().getUserMetadata().get("rootDeviceType"), "instance-store");
|
assertEquals(fastestTemplate.getImage().getUserMetadata().get("rootDeviceType"), "ebs");
|
||||||
assertEquals(fastestTemplate.getLocation().getId(), "us-east-1");
|
assertEquals(fastestTemplate.getLocation().getId(), "us-east-1");
|
||||||
assertEquals(getCores(fastestTemplate.getHardware()), 16.0d);
|
assertEquals(getCores(fastestTemplate.getHardware()), 16.0d);
|
||||||
assertEquals(fastestTemplate.getImage().getOperatingSystem().getArch(), "paravirtual");
|
assertEquals(fastestTemplate.getImage().getOperatingSystem().getArch(), "hvm");
|
||||||
|
|
||||||
fastestTemplate = view.getComputeService().templateBuilder().fastest().build();
|
|
||||||
System.out.println(fastestTemplate.getImage());
|
|
||||||
assert (fastestTemplate.getImage().getProviderId().startsWith("ami-")) : fastestTemplate;
|
|
||||||
assertEquals(fastestTemplate.getHardware().getProviderId(), InstanceType.HI1_4XLARGE);
|
|
||||||
assertEquals(fastestTemplate.getImage().getOperatingSystem().getVersion(), "9.10");
|
|
||||||
assertEquals(fastestTemplate.getImage().getOperatingSystem().is64Bit(), true);
|
|
||||||
assertEquals(fastestTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
|
||||||
assertEquals(fastestTemplate.getImage().getUserMetadata().get("rootDeviceType"), "instance-store");
|
|
||||||
assertEquals(fastestTemplate.getLocation().getId(), "us-east-1");
|
|
||||||
assertEquals(getCores(fastestTemplate.getHardware()), 16.0d);
|
|
||||||
assertEquals(fastestTemplate.getImage().getOperatingSystem().getArch(), "paravirtual");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -107,7 +107,8 @@ public class SpotInstanceClientLiveTest extends BaseComputeServiceContextLiveTe
|
||||||
"Windows", "Windows (Amazon VPC)")).apply(spot.getProductDescription()) : spot;
|
"Windows", "Windows (Amazon VPC)")).apply(spot.getProductDescription()) : spot;
|
||||||
assert in(
|
assert in(
|
||||||
ImmutableSet.of("c1.medium", "c1.xlarge", "cc1.4xlarge", "cg1.4xlarge", "cc2.8xlarge", "m1.large",
|
ImmutableSet.of("c1.medium", "c1.xlarge", "cc1.4xlarge", "cg1.4xlarge", "cc2.8xlarge", "m1.large",
|
||||||
"m1.small", "m1.medium", "m1.xlarge", "m2.2xlarge", "m2.4xlarge", "m2.xlarge", "t1.micro")).apply(
|
"m1.small", "m1.medium", "m1.xlarge", "m2.2xlarge", "m2.4xlarge", "m2.xlarge", "m3.xlarge",
|
||||||
|
"m3.2xlarge", "t1.micro")).apply(
|
||||||
spot.getInstanceType()) : spot;
|
spot.getInstanceType()) : spot;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue