brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [4/8] incubator-brooklyn git commit: Riak Linux
Date Fri, 13 Mar 2015 11:20:04 GMT
Riak Linux

- Launching riak. Add sbin path before using service start
  It is needed because of CentOS 5

- Update the test instance from CentOS 5.6 to CentOS 5.9
  the 5.6 has problem when using curl with ssl and
  it is over 3 years old


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/7e1cbede
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/7e1cbede
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/7e1cbede

Branch: refs/heads/master
Commit: 7e1cbede795b03dad78496727f3f0f8bd35198f8
Parents: a6eefab
Author: Valentin Aitken <bostko@gmail.com>
Authored: Fri Feb 27 18:15:42 2015 +0200
Committer: Valentin Aitken <bostko@gmail.com>
Committed: Mon Mar 2 13:26:34 2015 +0200

----------------------------------------------------------------------
 .../test/java/brooklyn/entity/AbstractEc2LiveTest.java |  6 +++---
 .../entity/database/rubyrep/RubyRepEc2LiveTest.java    |  2 +-
 .../entity/messaging/rabbit/RabbitEc2LiveTest.java     |  2 +-
 .../entity/network/bind/BindDnsServerEc2LiveTest.java  |  2 +-
 .../brooklyn/entity/nosql/riak/RiakNodeSshDriver.java  | 13 +++++++++----
 .../couchbase/CouchbaseSyncGatewayEc2LiveTest.java     |  2 +-
 .../brooklyn/entity/proxy/nginx/NginxEc2LiveTest.java  |  2 +-
 7 files changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/7e1cbede/software/base/src/test/java/brooklyn/entity/AbstractEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/brooklyn/entity/AbstractEc2LiveTest.java b/software/base/src/test/java/brooklyn/entity/AbstractEc2LiveTest.java
index 42245a3..7cf3ebc 100644
--- a/software/base/src/test/java/brooklyn/entity/AbstractEc2LiveTest.java
+++ b/software/base/src/test/java/brooklyn/entity/AbstractEc2LiveTest.java
@@ -108,9 +108,9 @@ public abstract class AbstractEc2LiveTest extends BrooklynAppLiveTestSupport
{
     }
 
     @Test(groups = {"Live"})
-    public void test_CentOS_5_6() throws Exception {
-        // Image: {id=us-east-1/ami-49e32320, providerId=ami-49e32320, name=RightImage_CentOS_5.6_x64_v5.7.14,
location={scope=REGION, id=us-east-1, description=us-east-1, parent=aws-ec2, iso3166Codes=[US-VA]},
os={family=centos, arch=paravirtual, version=5.6, description=rightscale-us-east/RightImage_CentOS_5.6_x64_v5.7.14.manifest.xml,
is64Bit=true}, description=rightscale-us-east/RightImage_CentOS_5.6_x64_v5.7.14.manifest.xml,
version=5.7.14, status=AVAILABLE[available], loginUser=root, userMetadata={owner=411009282317,
rootDeviceType=instance-store, virtualizationType=paravirtual, hypervisor=xen}}
-        runTest(ImmutableMap.of("imageId", "us-east-1/ami-49e32320", "hardwareId", SMALL_HARDWARE_ID));
+    public void test_CentOS_5() throws Exception {
+        // Image: {id=us-east-1/ami-e4bffe8d, providerId=ami-e4bffe8d, name=RightImage_CentOS_5.9_x64_v12.11.4_EBS,
location={scope=REGION, id=us-east-1, description=us-east-1, parent=aws-ec2, iso3166Codes=[US-VA]},
os={family=centos, arch=paravirtual, version=5.0, description=411009282317/RightImage_CentOS_5.9_x64_v12.11.4_EBS,
is64Bit=true}, description=RightImage_CentOS_5.9_x64_v12.11.4_EBS, version=12.11.4_EBS, status=AVAILABLE[available],
loginUser=root, userMetadata={owner=411009282317, rootDeviceType=ebs, virtualizationType=paravirtual,
hypervisor=xen}}
+        runTest(ImmutableMap.of("imageId", "us-east-1/ami-e4bffe8d", "hardwareId", SMALL_HARDWARE_ID));
     }
 
     @Test(groups = {"Live"})

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/7e1cbede/software/database/src/test/java/brooklyn/entity/database/rubyrep/RubyRepEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/software/database/src/test/java/brooklyn/entity/database/rubyrep/RubyRepEc2LiveTest.java
b/software/database/src/test/java/brooklyn/entity/database/rubyrep/RubyRepEc2LiveTest.java
index f3ca5df..55dae29 100644
--- a/software/database/src/test/java/brooklyn/entity/database/rubyrep/RubyRepEc2LiveTest.java
+++ b/software/database/src/test/java/brooklyn/entity/database/rubyrep/RubyRepEc2LiveTest.java
@@ -62,7 +62,7 @@ public class RubyRepEc2LiveTest extends AbstractEc2LiveTest {
 
     @Override
     @Test(enabled=false, groups = "Live")
-    public void test_CentOS_5_6() throws Exception { } // Diabling all except Ubuntu 12.0
temporarily
+    public void test_CentOS_5() throws Exception { } // Diabling all except Ubuntu 12.0 temporarily
 
     @Override
     @Test(enabled=false, groups = "Live")

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/7e1cbede/software/messaging/src/test/java/brooklyn/entity/messaging/rabbit/RabbitEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/software/messaging/src/test/java/brooklyn/entity/messaging/rabbit/RabbitEc2LiveTest.java
b/software/messaging/src/test/java/brooklyn/entity/messaging/rabbit/RabbitEc2LiveTest.java
index 59ef9db..4f37448 100644
--- a/software/messaging/src/test/java/brooklyn/entity/messaging/rabbit/RabbitEc2LiveTest.java
+++ b/software/messaging/src/test/java/brooklyn/entity/messaging/rabbit/RabbitEc2LiveTest.java
@@ -84,7 +84,7 @@ public class RabbitEc2LiveTest extends AbstractEc2LiveTest {
     }
 
     @Override
-    public void test_CentOS_5_6() throws SkipException {
+    public void test_CentOS_5() throws SkipException {
         // Not supported. The EPEL repository described here at [1] does not contain erlang,
and the
         // Erlang repository at [1] requires old versions of rpmlib. Additionally, [2] suggests
that
         // Centos 5 is not supported

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/7e1cbede/software/network/src/test/java/brooklyn/entity/network/bind/BindDnsServerEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/software/network/src/test/java/brooklyn/entity/network/bind/BindDnsServerEc2LiveTest.java
b/software/network/src/test/java/brooklyn/entity/network/bind/BindDnsServerEc2LiveTest.java
index cb192c2..dafcf3f 100644
--- a/software/network/src/test/java/brooklyn/entity/network/bind/BindDnsServerEc2LiveTest.java
+++ b/software/network/src/test/java/brooklyn/entity/network/bind/BindDnsServerEc2LiveTest.java
@@ -57,7 +57,7 @@ public class BindDnsServerEc2LiveTest extends AbstractEc2LiveTest {
     }
 
     @Override
-    public void test_CentOS_5_6() throws Exception {
+    public void test_CentOS_5() throws Exception {
         LOG.debug("{} skipped CentOS 5.6 test", this);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/7e1cbede/software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNodeSshDriver.java
----------------------------------------------------------------------
diff --git a/software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNodeSshDriver.java
b/software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNodeSshDriver.java
index d390383..ed44f4f 100644
--- a/software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNodeSshDriver.java
+++ b/software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNodeSshDriver.java
@@ -109,7 +109,7 @@ public class RiakNodeSshDriver extends AbstractSoftwareProcessSshDriver
implemen
     private List<String> installFromPackageCloud() {
         OsDetails osDetails = getMachine().getMachineDetails().getOsDetails();
         return ImmutableList.<String>builder()
-                .add(osDetails.getName().toLowerCase().contains("debian") ? "export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
: "")
+                .add(osDetails.getName().toLowerCase().contains("debian") ? addSbinPathCommand()
: "")
                 .add(ifNotExecutable("curl", Joiner.on('\n').join(installCurl())))
                 .addAll(ifExecutableElse("yum", installDebianBased(), installRpmBased()))
                 .build();
@@ -137,9 +137,8 @@ public class RiakNodeSshDriver extends AbstractSoftwareProcessSshDriver
implemen
                 .build();
     }
 
-    private static String ifExecutableElse(String command, String ifTrue, String otherwise)
{
-        return Joiner.on('\n').join(
-                ifExecutableElse(command, ImmutableList.<String>of(ifTrue), ImmutableList.<String>of(otherwise)));
+    private static String addSbinPathCommand() {
+        return "export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
     }
 
     /**
@@ -154,6 +153,11 @@ public class RiakNodeSshDriver extends AbstractSoftwareProcessSshDriver
implemen
         return String.format("{ { test ! -z `which %s`; } || { %s; } }", command, statement);
     }
 
+    private static String ifExecutableElse(String command, String ifTrue, String otherwise)
{
+        return com.google.common.base.Joiner.on('\n').join(
+                ifExecutableElse(command, ImmutableList.<String>of(ifTrue), ImmutableList.<String>of(otherwise)));
+    }
+
     private static ImmutableList<String> ifExecutableElse(String command, List<String>
ifTrue, List<String> otherwise) {
         return ImmutableList.<String>builder()
                 .add(String.format("if test -z `which %s`; then", command))
@@ -235,6 +239,7 @@ public class RiakNodeSshDriver extends AbstractSoftwareProcessSshDriver
implemen
     public void launch() {
         List<String> commands = Lists.newLinkedList();
         if (isPackageInstall) {
+            commands.add(addSbinPathCommand());
             commands.add(sudo("service riak start"));
         } else {
             // NOTE: See instructions at http://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/7e1cbede/software/nosql/src/test/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/software/nosql/src/test/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayEc2LiveTest.java
b/software/nosql/src/test/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayEc2LiveTest.java
index 7f2327a..e0a5f3c 100644
--- a/software/nosql/src/test/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayEc2LiveTest.java
+++ b/software/nosql/src/test/java/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayEc2LiveTest.java
@@ -96,7 +96,7 @@ public class CouchbaseSyncGatewayEc2LiveTest extends AbstractEc2LiveTest
{
     
     @Test(groups = {"Live"})
     @Override
-    public void test_CentOS_5_6() throws Exception {
+    public void test_CentOS_5() throws Exception {
         // Unsupported
         // error: Failed dependencies:
         //     libc.so.6(GLIBC_2.7)(64bit) is needed by couchbase-server-2.5.1-1083.x86_64

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/7e1cbede/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxEc2LiveTest.java
b/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxEc2LiveTest.java
index b22ee7b..0cd493b 100644
--- a/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxEc2LiveTest.java
+++ b/software/webapp/src/test/java/brooklyn/entity/proxy/nginx/NginxEc2LiveTest.java
@@ -42,7 +42,7 @@ public class NginxEc2LiveTest extends AbstractEc2LiveTest {
      *   test_Ubuntu_12_0:                invocation error for disable requiretty 
      */
     
-    /* PASSED: test_CentOS_5_6
+    /* PASSED: test_CentOS_5
      * PASSED: test_CentOS_6_3
      * PASSED: test_Debian_6
      * PASSED: test_Ubuntu_10_0


Mime
View raw message