brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rich...@apache.org
Subject [03/10] incubator-brooklyn git commit: Update MySql version to latest available
Date Fri, 07 Aug 2015 17:53:36 GMT
Update MySql version to latest available

Downloads use CDN now, no mirrors used.


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

Branch: refs/heads/master
Commit: 93993f113260409b817e7452ceeccf214d9331f9
Parents: f968473
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Tue Jul 28 20:28:48 2015 +0300
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Wed Aug 5 15:23:06 2015 +0300

----------------------------------------------------------------------
 .../brooklyn/location/basic/BasicOsDetails.java |  4 ++--
 .../mysql/DynamicToyMySqlEntityBuilder.java     | 17 ++++++++-------
 .../entity/database/DatastoreMixins.java        |  1 -
 .../entity/database/mysql/MySqlNode.java        | 19 +++++-----------
 .../entity/database/mysql/MySqlSshDriver.java   | 23 ++++++++++----------
 5 files changed, 27 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/93993f11/core/src/main/java/brooklyn/location/basic/BasicOsDetails.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/location/basic/BasicOsDetails.java b/core/src/main/java/brooklyn/location/basic/BasicOsDetails.java
index 049bfbf..a9eba56 100644
--- a/core/src/main/java/brooklyn/location/basic/BasicOsDetails.java
+++ b/core/src/main/java/brooklyn/location/basic/BasicOsDetails.java
@@ -106,8 +106,8 @@ public class BasicOsDetails implements OsDetails {
     }
 
     public static class OsVersions {
-        public static final String MAC_10_5 = "10.5";
-        public static final String MAC_10_6 = "10.6";
+        public static final String MAC_10_8 = "10.8";
+        public static final String MAC_10_9 = "10.9";
     }
     
     public static class Factory {

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/93993f11/software/base/src/test/java/brooklyn/entity/software/mysql/DynamicToyMySqlEntityBuilder.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/brooklyn/entity/software/mysql/DynamicToyMySqlEntityBuilder.java
b/software/base/src/test/java/brooklyn/entity/software/mysql/DynamicToyMySqlEntityBuilder.java
index a40182d..719f56c 100644
--- a/software/base/src/test/java/brooklyn/entity/software/mysql/DynamicToyMySqlEntityBuilder.java
+++ b/software/base/src/test/java/brooklyn/entity/software/mysql/DynamicToyMySqlEntityBuilder.java
@@ -89,17 +89,18 @@ public class DynamicToyMySqlEntityBuilder {
     public static String getOsTag(Entity e) {
         // e.g. "osx10.6-x86_64"; see http://www.mysql.com/downloads/mysql/#downloads
         OsDetails os = ((SshMachineLocation)Iterables.getOnlyElement(e.getLocations())).getOsDetails();
-        if (os == null) return "linux2.6-i686";
+        if (os == null) return "linux-glibc2.5-x86_64";
         if (os.isMac()) {
-            String osp1 = os.getVersion()==null ? "osx10.5" //lowest common denominator
-                : new ComparableVersion(os.getVersion()).isGreaterThanOrEqualTo(OsVersions.MAC_10_6)
? "osx10.6"
-                : new ComparableVersion(os.getVersion()).isGreaterThanOrEqualTo(OsVersions.MAC_10_5)
? "osx10.5"
-                : "osx10.5";  //lowest common denominator
-            String osp2 = os.is64bit() ? "x86_64" : "x86";
-            return osp1+"-"+osp2;
+            String osp1 = os.getVersion()==null ? "osx10.8" //lowest common denominator
+                : new ComparableVersion(os.getVersion()).isGreaterThanOrEqualTo(OsVersions.MAC_10_9)
? "osx10.9"
+                : "osx10.8";  //lowest common denominator
+            if (!os.is64bit()) {
+                throw new IllegalStateException("Only 64 bit MySQL build is available for
OS X");
+            }
+            return osp1+"-x86_64";
         }
         //assume generic linux
-        String osp1 = "linux2.6";
+        String osp1 = "linux-glibc2.5";
         String osp2 = os.is64bit() ? "x86_64" : "i686";
         return osp1+"-"+osp2;
     }

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/93993f11/software/database/src/main/java/brooklyn/entity/database/DatastoreMixins.java
----------------------------------------------------------------------
diff --git a/software/database/src/main/java/brooklyn/entity/database/DatastoreMixins.java
b/software/database/src/main/java/brooklyn/entity/database/DatastoreMixins.java
index f11f0a6..d41559c 100644
--- a/software/database/src/main/java/brooklyn/entity/database/DatastoreMixins.java
+++ b/software/database/src/main/java/brooklyn/entity/database/DatastoreMixins.java
@@ -26,7 +26,6 @@ import brooklyn.config.ConfigKey;
 import brooklyn.entity.Effector;
 import brooklyn.entity.Entity;
 import brooklyn.entity.basic.ConfigKeys;
-import brooklyn.entity.basic.EntityLocal;
 import brooklyn.entity.effector.Effectors;
 import brooklyn.event.AttributeSensor;
 import brooklyn.event.basic.Sensors;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/93993f11/software/database/src/main/java/brooklyn/entity/database/mysql/MySqlNode.java
----------------------------------------------------------------------
diff --git a/software/database/src/main/java/brooklyn/entity/database/mysql/MySqlNode.java
b/software/database/src/main/java/brooklyn/entity/database/mysql/MySqlNode.java
index 065aabb..0268520 100644
--- a/software/database/src/main/java/brooklyn/entity/database/mysql/MySqlNode.java
+++ b/software/database/src/main/java/brooklyn/entity/database/mysql/MySqlNode.java
@@ -23,7 +23,6 @@ import brooklyn.config.ConfigKey;
 import brooklyn.entity.basic.Attributes;
 import brooklyn.entity.basic.ConfigKeys;
 import brooklyn.entity.basic.SoftwareProcess;
-import brooklyn.entity.database.DatabaseNode;
 import brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
 import brooklyn.entity.proxying.ImplementedBy;
 import brooklyn.entity.trait.HasShortName;
@@ -38,25 +37,17 @@ import brooklyn.util.flags.SetFromFlag;
 
 @Catalog(name="MySql Node", description="MySql is an open source relational database management
system (RDBMS)", iconUrl="classpath:///mysql-logo-110x57.png")
 @ImplementedBy(MySqlNodeImpl.class)
-public interface MySqlNode extends SoftwareProcess, HasShortName, DatastoreCommon, DatabaseNode
{
+public interface MySqlNode extends SoftwareProcess, HasShortName, DatastoreCommon {
 
     // NOTE MySQL changes the minor version number of their GA release frequently, check
for latest version if install fails
     @SetFromFlag("version")
-    public static final ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION,
"5.5.37");
+    public static final ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION,
"5.6.26");
 
-    //http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.21-osx10.6-x86_64.tar.gz/from/http://gd.tuwien.ac.at/db/mysql/
-    //http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.21-linux2.6-i686.tar.gz/from/http://gd.tuwien.ac.at/db/mysql/
+    //http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.26-osx10.9-x86_64.tar.gz
+    //http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.26-linux-glibc2.5-x86_64.tar.gz
     @SetFromFlag("downloadUrl")
     public static final BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new
StringAttributeSensorAndConfigKey(
-            Attributes.DOWNLOAD_URL, "http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-${version}-${driver.osTag}.tar.gz/from/${driver.mirrorUrl}");
-
-    /** download mirror, if desired; defaults to Austria which seems one of the fastest */
-    @SetFromFlag("mirrorUrl")
-    public static final ConfigKey<String> MIRROR_URL = ConfigKeys.newStringConfigKey("mysql.install.mirror.url",
"URL of mirror", 
-//        "http://mysql.mirrors.pair.com/"   // Pennsylvania
-//        "http://gd.tuwien.ac.at/db/mysql/"
-        "http://www.mirrorservice.org/sites/ftp.mysql.com/" //UK mirror service
-         );
+            Attributes.DOWNLOAD_URL, "http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-${version}-${driver.osTag}.tar.gz");
 
     @SetFromFlag("port")
     public static final PortAttributeSensorAndConfigKey MYSQL_PORT = new PortAttributeSensorAndConfigKey("mysql.port",
"MySQL port", PortRanges.fromString("3306, 13306+"));

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/93993f11/software/database/src/main/java/brooklyn/entity/database/mysql/MySqlSshDriver.java
----------------------------------------------------------------------
diff --git a/software/database/src/main/java/brooklyn/entity/database/mysql/MySqlSshDriver.java
b/software/database/src/main/java/brooklyn/entity/database/mysql/MySqlSshDriver.java
index fb13175..c51c7d7 100644
--- a/software/database/src/main/java/brooklyn/entity/database/mysql/MySqlSshDriver.java
+++ b/software/database/src/main/java/brooklyn/entity/database/mysql/MySqlSshDriver.java
@@ -77,25 +77,22 @@ public class MySqlSshDriver extends AbstractSoftwareProcessSshDriver implements
     public String getOsTag() {
         // e.g. "osx10.6-x86_64"; see http://www.mysql.com/downloads/mysql/#downloads
         OsDetails os = getLocation().getOsDetails();
-        if (os == null) return "linux2.6-i686";
+        if (os == null) return "linux-glibc2.5-x86_64";
         if (os.isMac()) {
-            String osp1 = os.getVersion()==null ? "osx10.5" //lowest common denominator
-                : new ComparableVersion(os.getVersion()).isGreaterThanOrEqualTo(OsVersions.MAC_10_6)
? "osx10.6"
-                : new ComparableVersion(os.getVersion()).isGreaterThanOrEqualTo(OsVersions.MAC_10_5)
? "osx10.5"
-                : "osx10.5";  //lowest common denominator
-            String osp2 = os.is64bit() ? "x86_64" : "x86";
-            return osp1+"-"+osp2;
+            String osp1 = os.getVersion()==null ? "osx10.8" //lowest common denominator
+                : new ComparableVersion(os.getVersion()).isGreaterThanOrEqualTo(OsVersions.MAC_10_9)
? "osx10.9"
+                : "osx10.8";  //lowest common denominator
+            if (!os.is64bit()) {
+                throw new IllegalStateException("Only 64 bit MySQL build is available for
OS X");
+            }
+            return osp1+"-x86_64";
         }
         //assume generic linux
-        String osp1 = "linux2.6";
+        String osp1 = "linux-glibc2.5";
         String osp2 = os.is64bit() ? "x86_64" : "i686";
         return osp1+"-"+osp2;
     }
 
-    public String getMirrorUrl() {
-        return entity.getConfig(MySqlNode.MIRROR_URL);
-    }
-
     public String getBaseDir() { return getExpandedInstallDir(); }
 
     public String getDataDir() {
@@ -143,6 +140,7 @@ public class MySqlSshDriver extends AbstractSoftwareProcessSshDriver implements
         newScript(INSTALLING).body.append(commands).execute();
     }
 
+    @Override
     public MySqlNodeImpl getEntity() { return (MySqlNodeImpl) super.getEntity(); }
     public int getPort() { return getEntity().getPort(); }
     public String getSocketUid() { return getEntity().getSocketUid(); }
@@ -260,6 +258,7 @@ public class MySqlSshDriver extends AbstractSoftwareProcessSshDriver implements
         return format("%s/bin/mysqladmin --defaults-file=%s status", getBaseDir(), Urls.mergePaths(getRunDir(),
getConfigFile()));
     }
 
+    @Override
     public ProcessTaskWrapper<Integer> executeScriptAsync(String commands) {
         String filename = "mysql-commands-"+Identifiers.makeRandomId(8);
         DynamicTasks.queue(SshEffectorTasks.put(Urls.mergePaths(getRunDir(), filename)).contents(commands).summary("copying
datastore script to execute "+filename));


Mime
View raw message