package org.lamport.tla.toolbox.jcloud;

public class EC2CloudTLCInstanceParameters extends CloudTLCInstanceParameters {

	private final String tlcParams;

	public EC2CloudTLCInstanceParameters(final String tlcParams) {
        this.tlcParams = tlcParams.trim();
	}

	@Override
	public String getOwnerId() {
		// ubuntu official
		return "owner-id=owner-id=099720109477;state=available;image-type=machine";
	}

	@Override
	public String getCloudProvier() {
		return "aws-ec2";
	}

	@Override
	public String getImageId() {
		// ubuntu 64bit 14.04 trusty paravirtual release
		// https://cloud-images.ubuntu.com/releases/14.04/release/
		return "us-east-1/ami-e411d98c";
	}

	@Override
	public String getHardwareId() {
		return "m2.4xlarge";
	}

	@Override
	public String getJavaSystemProperties() {
		return "-Dtlc2.tool.fp.FPSet.impl=tlc2.tool.fp.OffHeapDiskFPSet";
	}

	@Override
	public String getJavaVMArgs() {
		return "-Xmx24G -Xms24G -XX:MaxDirectMemorySize=32g";
	}

	@Override
	public String getTLCParameters() {
		if (tlcParams.length() > 0) {
			return "-workers 12 " + tlcParams;
		}
		return "-workers 12";
	}
}

@@ -516,25 +516,25 @@
 Id() %7B%0A%09%09// 
-u
+U
 buntu 64bit 
@@ -538,18 +538,20 @@
 it 14.04
- t
+.2 T
 rusty pa
@@ -559,16 +559,31 @@
 avirtual
+/instance-store
  release
@@ -644,16 +644,167 @@
 elease/%0A
+%09%09// or http://cloud-images.ubuntu.com/locator/ec2/%0A%09%09// See http://aws.amazon.com/amazon-linux-ami/instance-type-matrix/%0A%09%09// for paravirtual vs. hvm%0A
 %09%09return
@@ -823,16 +823,16 @@
 ami-
-e411d98c
+3234315a
 %22;%0A%09
@@ -874,24 +874,57 @@
 dwareId() %7B%0A
+%09%09// m2 only support paravirtual%0A
 %09%09return %22m2

Use most recent 14.04 point release to minimize the number security updates installed after instance startup.