issue-1026 Support for aws-ec2 hi1.4x instance

This commit is contained in:
vijaykiran 2012-07-24 23:56:06 +02:00
parent 3128eb25fc
commit de3db2103d
4 changed files with 26 additions and 2 deletions

View File

@ -352,6 +352,14 @@ public class EC2HardwareBuilder extends HardwareBuilder {
.virtualizationType(VirtualizationType.HVM); .virtualizationType(VirtualizationType.HVM);
} }
public static EC2HardwareBuilder hi1_4xlarge() {
return new EC2HardwareBuilder(InstanceType.HI1_4XLARGE)
.ram(60 * 1024 + 512)
.processors(ImmutableList.of(new Processor(8.0, 5.5), new Processor(8.0, 5.5)))
.volumes(ImmutableList.<Volume> of(new VolumeImpl(1024.0f, "/dev/sda1", true, false),
new VolumeImpl(1024.0f, "/dev/sdb", false, false)));
}
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public Hardware build() { public Hardware build() {

View File

@ -186,4 +186,17 @@ public class InstanceType {
*/ */
public static final String CC2_8XLARGE = "cc2.8xlarge"; public static final String CC2_8XLARGE = "cc2.8xlarge";
/**
* High I/O Quadruple Extra Large specifications
* <ul>
* <li>60.5 GB of memory</li>
* <li>35 EC2 Compute Units (16 virtual cores)</li>
* <li>2 SSD-based volumes each with 1024 GB 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 HI1_4XLARGE = "hi1.4xlarge";
} }

View File

@ -23,6 +23,7 @@ import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.c1_xlarge;
import static org.jclouds.ec2.compute.domain.EC2HardwareBuilder.cc1_4xlarge; 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.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;
@ -66,7 +67,7 @@ public class AWSEC2HardwareSupplier extends EC2HardwareSupplier {
sizes.add(cc2_8xlarge().supportsImageIds(ccAmis).build()); sizes.add(cc2_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())); m2_2xlarge().build(), m2_4xlarge().build(), hi1_4xlarge().build()));
return sizes.build(); return sizes.build();
} }
} }

View File

@ -36,11 +36,13 @@ import org.jclouds.aws.ec2.domain.PlacementGroup.State;
import org.jclouds.aws.ec2.predicates.PlacementGroupAvailable; import org.jclouds.aws.ec2.predicates.PlacementGroupAvailable;
import org.jclouds.aws.ec2.predicates.PlacementGroupDeleted; import org.jclouds.aws.ec2.predicates.PlacementGroupDeleted;
import org.jclouds.compute.RunNodesException; import org.jclouds.compute.RunNodesException;
import org.jclouds.compute.domain.HardwareBuilder;
import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.domain.OsFamily; import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.Template; import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseComputeServiceContextLiveTest; import org.jclouds.compute.internal.BaseComputeServiceContextLiveTest;
import org.jclouds.compute.predicates.NodePredicates; import org.jclouds.compute.predicates.NodePredicates;
import org.jclouds.ec2.compute.domain.EC2HardwareBuilder;
import org.jclouds.ec2.domain.InstanceType; import org.jclouds.ec2.domain.InstanceType;
import org.jclouds.predicates.RetryablePredicate; import org.jclouds.predicates.RetryablePredicate;
import org.jclouds.scriptbuilder.domain.Statements; import org.jclouds.scriptbuilder.domain.Statements;
@ -131,7 +133,7 @@ public class PlacementGroupClientLiveTest extends BaseComputeServiceContextLiveT
public void testStartCCInstance() throws Exception { public void testStartCCInstance() throws Exception {
Template template = view.getComputeService().templateBuilder().fastest().osFamily(OsFamily.AMZN_LINUX).build(); Template template = view.getComputeService().templateBuilder().fromHardware(EC2HardwareBuilder.cc2_8xlarge().build()).osFamily(OsFamily.AMZN_LINUX).build();
assert template != null : "The returned template was null, but it should have a value."; assert template != null : "The returned template was null, but it should have a value.";
assertEquals(template.getHardware().getProviderId(), InstanceType.CC2_8XLARGE); assertEquals(template.getHardware().getProviderId(), InstanceType.CC2_8XLARGE);
assertEquals(template.getImage().getUserMetadata().get("rootDeviceType"), "ebs"); assertEquals(template.getImage().getUserMetadata().get("rootDeviceType"), "ebs");