You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sv...@apache.org on 2016/05/03 12:22:52 UTC

[3/4] brooklyn-library git commit: CouchDB fixes

CouchDB fixes

- Changing the download link not to use the apache backup server
- CouchDB is installed in the standard Brooklyn way

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/5dc0af7c
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/5dc0af7c
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/5dc0af7c

Branch: refs/heads/master
Commit: 5dc0af7ca6ea9123d2051277b4cc718b62191bdb
Parents: 517e79c
Author: Yavor Yanchev <ya...@yanchev.com>
Authored: Tue Apr 26 11:52:19 2016 +0300
Committer: Yavor Yanchev <ya...@yanchev.com>
Committed: Tue Apr 26 14:59:48 2016 +0300

----------------------------------------------------------------------
 .../apache/brooklyn/entity/nosql/couchdb/CouchDBNode.java   | 2 +-
 .../brooklyn/entity/nosql/couchdb/CouchDBNodeSshDriver.java | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/5dc0af7c/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNode.java
----------------------------------------------------------------------
diff --git a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNode.java b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNode.java
index 6d6eff4..430a2b1 100644
--- a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNode.java
+++ b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNode.java
@@ -40,7 +40,7 @@ public interface CouchDBNode extends SoftwareProcess, WebAppService {
 
     @SetFromFlag("downloadUrl")
     AttributeSensorAndConfigKey<String, String> DOWNLOAD_URL = ConfigKeys.newSensorAndConfigKeyWithDefault(SoftwareProcess.DOWNLOAD_URL,
-            "http://www-eu.apache.org/dist/couchdb/source/${version}/apache-couchdb-${version}.tar.gz");
+            "http://www.mirrorservice.org/sites/ftp.apache.org/couchdb/source/${version}/apache-couchdb-${version}.tar.gz");
 
     @SetFromFlag("archiveNameFormat")
     ConfigKey<String> ARCHIVE_DIRECTORY_NAME_FORMAT = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.ARCHIVE_DIRECTORY_NAME_FORMAT, "apache-couchdb-%s");

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/5dc0af7c/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeSshDriver.java
----------------------------------------------------------------------
diff --git a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeSshDriver.java b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeSshDriver.java
index bb0b52a..2b2ddc6 100644
--- a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeSshDriver.java
+++ b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchdb/CouchDBNodeSshDriver.java
@@ -119,10 +119,11 @@ public class CouchDBNodeSshDriver extends AbstractSoftwareProcessSshDriver imple
        cmds.add(format("cd %s", getExpandedInstallDir()));
 
        StringBuilder configureCommand = new StringBuilder("./configure")
-               .append(format(" --prefix=%s", getRunDir()))
+               .append(format(" --prefix=%s/dist", getExpandedInstallDir()))
                .append(" --with-erlang=/usr/lib64/erlang/usr/include ");
 
        cmds.addAll(ImmutableList.of(
+               "mkdir -p dist",
                configureCommand.toString(),
                "make install"));
 
@@ -181,7 +182,11 @@ public class CouchDBNodeSshDriver extends AbstractSoftwareProcessSshDriver imple
         log.info("Customizing {} (Cluster {})", entity, getClusterName());
         Networking.checkPortsValid(getPortMap());
 
-        newScript(CUSTOMIZING).execute();
+        newScript(CUSTOMIZING)
+        .body.append(
+                format("mkdir -p %s", getRunDir()),
+                format("cp -R %s/dist/{bin,etc,lib,share,var} %s", getExpandedInstallDir(), getRunDir()))
+        .execute();
 
         // Copy the configuration files across
         String destinationConfigFile = Os.mergePathsUnix(getRunDir(), getCouchDBConfigFileName());