Issue 724:add ubuntu precise to the supported versions

This commit is contained in:
Adrian Cole 2011-10-16 02:50:45 -07:00
parent bf584390e0
commit 2d704bde59
5 changed files with 12 additions and 7 deletions

View File

@ -162,7 +162,7 @@ public abstract class BaseComputeServiceContextModule extends AbstractModule {
@Provides @Provides
@Named("DEFAULT") @Named("DEFAULT")
protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) { protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) {
return template.osFamily(UBUNTU).osVersionMatches("1[10].[10][04]").os64Bit(true); return template.osFamily(UBUNTU).osVersionMatches("1[012].[01][04]").os64Bit(true);
} }
/** /**

View File

@ -132,7 +132,7 @@ public class RunScriptData {
normalizeHostAndDNSConfig(),// normalizeHostAndDNSConfig(),//
exec("apt-get update -qq"), exec("apt-get update -qq"),
exec("which curl || " + aptInstall + " curl"),// exec("which curl || " + aptInstall + " curl"),//
exec(aptInstall + " openjdk-7-jdk" + "||" + aptInstall + " openjdk-6-jdk"),// exec(aptInstall + " openjdk-6-jdk"),//
exec("echo \"export PATH=\\\"\\$JAVA_HOME/bin/:\\$PATH\\\"\" >> $HOME/.bashrc")); exec("echo \"export PATH=\\\"\\$JAVA_HOME/bin/:\\$PATH\\\"\" >> $HOME/.bashrc"));
public static String yumInstall = "yum --nogpgcheck -y install"; public static String yumInstall = "yum --nogpgcheck -y install";
@ -140,12 +140,12 @@ public class RunScriptData {
public static final Statement YUM_RUN_SCRIPT = newStatementList(// public static final Statement YUM_RUN_SCRIPT = newStatementList(//
normalizeHostAndDNSConfig(),// normalizeHostAndDNSConfig(),//
exec("which curl || " + yumInstall + " curl"),// exec("which curl || " + yumInstall + " curl"),//
exec(yumInstall + " java-1.7.0-openjdk-devel" + "||" + yumInstall + " java-1.6.0-openjdk-devel"),// exec(yumInstall + " java-1.6.0-openjdk-devel"),//
exec("echo \"export PATH=\\\"\\$JAVA_HOME/bin/:\\$PATH\\\"\" >> /etc/bashrc")); exec("echo \"export PATH=\\\"\\$JAVA_HOME/bin/:\\$PATH\\\"\" >> /etc/bashrc"));
public static final Statement ZYPPER_RUN_SCRIPT = newStatementList(// public static final Statement ZYPPER_RUN_SCRIPT = newStatementList(//
normalizeHostAndDNSConfig(),// normalizeHostAndDNSConfig(),//
exec("which curl || zypper install curl"),// exec("which curl || zypper install curl"),//
exec("zypper install java-1.7.0-openjdk" + "||" + "zypper install java-1.6.0-openjdk"),// exec("zypper install java-1.6.0-openjdk"),//
exec("echo \"export PATH=\\\"\\$JAVA_HOME/bin/:\\$PATH\\\"\" >> /etc/bashrc")); exec("echo \"export PATH=\\\"\\$JAVA_HOME/bin/:\\$PATH\\\"\" >> /etc/bashrc"));
} }

View File

@ -181,9 +181,10 @@ public class AWSEC2TemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
assertEquals(fastestTemplate.getImage().getOperatingSystem().getArch(), "hvm"); assertEquals(fastestTemplate.getImage().getOperatingSystem().getArch(), "hvm");
fastestTemplate = context.getComputeService().templateBuilder().fastest().build(); fastestTemplate = context.getComputeService().templateBuilder().fastest().build();
System.out.println(fastestTemplate.getImage());
assert (fastestTemplate.getImage().getProviderId().startsWith("ami-")) : fastestTemplate; assert (fastestTemplate.getImage().getProviderId().startsWith("ami-")) : fastestTemplate;
assertEquals(fastestTemplate.getHardware().getProviderId(), InstanceType.CC1_4XLARGE); assertEquals(fastestTemplate.getHardware().getProviderId(), InstanceType.CC1_4XLARGE);
assertEquals(fastestTemplate.getImage().getOperatingSystem().getVersion(), "11.10"); assertEquals(fastestTemplate.getImage().getOperatingSystem().getVersion(), "12.04");
assertEquals(fastestTemplate.getImage().getOperatingSystem().is64Bit(), true); assertEquals(fastestTemplate.getImage().getOperatingSystem().is64Bit(), true);
assertEquals(fastestTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); assertEquals(fastestTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
assertEquals(fastestTemplate.getImage().getUserMetadata().get("rootDeviceType"), "ebs"); assertEquals(fastestTemplate.getImage().getUserMetadata().get("rootDeviceType"), "ebs");

View File

@ -52,7 +52,9 @@ public class CloudServersUKTemplateBuilderLiveTest extends BaseTemplateBuilderLi
public boolean apply(OsFamilyVersion64Bit input) { public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) { switch (input.family) {
case UBUNTU: case UBUNTU:
return !(input.version.startsWith("11.10") || input.version.equals("8.04")) && input.is64Bit; return !(input.version.startsWith("12.04") || input.version.startsWith("11.10") || input.version
.equals("8.04"))
&& input.is64Bit;
case DEBIAN: case DEBIAN:
return input.is64Bit; return input.is64Bit;
case CENTOS: case CENTOS:

View File

@ -52,7 +52,9 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi
public boolean apply(OsFamilyVersion64Bit input) { public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) { switch (input.family) {
case UBUNTU: case UBUNTU:
return !(input.version.startsWith("11.10") || input.version.equals("8.04")) && input.is64Bit; return !(input.version.startsWith("12.04") || input.version.startsWith("11.10") || input.version
.equals("8.04"))
&& input.is64Bit;
case DEBIAN: case DEBIAN:
return input.is64Bit; return input.is64Bit;
case CENTOS: case CENTOS: