brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [26/51] [abbrv] [partial] brooklyn-library git commit: move subdir from incubator up a level as it is promoted to its own repo (first non-incubator commit!)
Date Mon, 01 Feb 2016 17:48:02 GMT
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNode.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNode.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNode.java
deleted file mode 100644
index e6580bb..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNode.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.brooklyn.entity.database.rubyrep;
-
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.core.sensor.BasicAttributeSensorAndConfigKey.StringAttributeSensorAndConfigKey;
-import org.apache.brooklyn.entity.database.DatastoreMixins;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.util.core.flags.SetFromFlag;
-
-@Catalog(name = "RubyRep Node", description = "RubyRep is a database replication system", iconUrl = "classpath:///rubyrep-logo.jpeg")
-@ImplementedBy(RubyRepNodeImpl.class)
-public interface RubyRepNode extends SoftwareProcess {
-
-    @SetFromFlag("version")
-    ConfigKey<String> SUGGESTED_VERSION = ConfigKeys.newConfigKeyWithDefault(SoftwareProcess.SUGGESTED_VERSION, "1.2.0");
-
-    @SetFromFlag("downloadUrl")
-    public static final BasicAttributeSensorAndConfigKey<String> DOWNLOAD_URL = new StringAttributeSensorAndConfigKey(
-            Attributes.DOWNLOAD_URL, "http://files.rubyforge.vm.bytemark.co.uk/rubyrep/rubyrep-${version}.zip");
-
-    @SetFromFlag("configurationScriptUrl")
-    ConfigKey<String> CONFIGURATION_SCRIPT_URL = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.configScriptUrl",
-            "URL where RubyRep configuration can be found - disables other configuration options (except version)");
-
-    @SetFromFlag("templateUrl")
-    ConfigKey<String> TEMPLATE_CONFIGURATION_URL = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.templateConfigurationUrl", "Template file (in freemarker format) for the rubyrep.conf file",
-            "classpath://org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf");
-
-    @SetFromFlag("tables")
-    ConfigKey<String> TABLE_REGEXP = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.tableRegex", "Regular expression to select tables to sync using RubyRep", ".");
-
-    @SetFromFlag("replicationInterval")
-    ConfigKey<Integer> REPLICATION_INTERVAL = ConfigKeys.newIntegerConfigKey(
-            "database.rubyrep.replicationInterval", "Replication Interval", 30);
-
-    @SetFromFlag("startupTimeout")
-    ConfigKey<Integer> DATABASE_STARTUP_TIMEOUT = ConfigKeys.newIntegerConfigKey(
-            "database.rubyrep.startupTimeout", "Time to wait until databases have started up (in seconds)", 120);
-
-    // Left database
-
-    AttributeSensor<String> LEFT_DATASTORE_URL = Sensors.newSensorWithPrefix("left", DatastoreMixins.DATASTORE_URL);
-
-    @SetFromFlag("leftDatabase")
-    ConfigKey<? extends DatastoreCommon> LEFT_DATABASE = ConfigKeys.newConfigKey(DatastoreCommon.class,
-            "database.rubyrep.leftDatabase", "Brooklyn database entity to use as the left DBMS");
-
-    @SetFromFlag("leftDatabaseName")
-    ConfigKey<String> LEFT_DATABASE_NAME = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.leftDatabaseName", "name of database to use for left db");
-
-    @SetFromFlag("leftUsername")
-    ConfigKey<String> LEFT_USERNAME = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.leftUsername", "username to connect to left db");
-
-    @SetFromFlag("leftPassword")
-    ConfigKey<String> LEFT_PASSWORD = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.leftPassword", "password to connect to left db");
-
-    // Right database
-
-    AttributeSensor<String> RIGHT_DATASTORE_URL = Sensors.newSensorWithPrefix("right", DatastoreMixins.DATASTORE_URL);
-
-    @SetFromFlag("rightDatabase")
-    ConfigKey<? extends DatastoreCommon> RIGHT_DATABASE = ConfigKeys.newConfigKey(DatastoreCommon.class,
-            "database.rubyrep.rightDatabase", "Brooklyn database entity to use as the right DBMS");
-
-    @SetFromFlag("rightDatabaseName")
-    ConfigKey<String> RIGHT_DATABASE_NAME = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.rightDatabaseName", "name of database to use for right db");
-
-    @SetFromFlag("rightUsername")
-    ConfigKey<String> RIGHT_USERNAME = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.rightUsername", "username to connect to right db");
-
-    @SetFromFlag("rightPassword")
-    ConfigKey<String> RIGHT_PASSWORD = ConfigKeys.newStringConfigKey(
-            "database.rubyrep.rightPassword", "password to connect to right db");
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNodeImpl.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNodeImpl.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNodeImpl.java
deleted file mode 100644
index 44f898a..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepNodeImpl.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.brooklyn.entity.database.rubyrep;
-
-import java.net.URI;
-
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.software.base.SoftwareProcessImpl;
-import org.apache.brooklyn.util.time.Duration;
-
-public class RubyRepNodeImpl extends SoftwareProcessImpl implements RubyRepNode {
-
-    @Override
-    protected void connectSensors() {
-        super.connectSensors();
-        connectServiceUpIsRunning();
-    }
-
-    @Override
-    public void disconnectSensors() {
-        disconnectServiceUpIsRunning();
-        super.disconnectSensors();
-    }
-
-    /**
-     * Set the database {@link DatastoreCommon#DATASTORE_URL urls} as attributes when they become available on the entities.
-     */
-    @Override
-    protected void preStart() {
-        super.preStart();
-
-        DatastoreCommon leftNode = getConfig(LEFT_DATABASE);
-        if (leftNode != null) {
-            sensors().set(LEFT_DATASTORE_URL, Entities.submit(this, DependentConfiguration.attributeWhenReady(leftNode, DatastoreCommon.DATASTORE_URL)).getUnchecked(getDatabaseStartupDelay()));
-        }
-
-        DatastoreCommon rightNode = getConfig(RIGHT_DATABASE);
-        if (rightNode != null) {
-            sensors().set(RIGHT_DATASTORE_URL, Entities.submit(this, DependentConfiguration.attributeWhenReady(rightNode, DatastoreCommon.DATASTORE_URL)).getUnchecked(getDatabaseStartupDelay()));
-        }
-    }
-
-    @Override
-    public Class<?> getDriverInterface() {
-        return RubyRepDriver.class;
-    }
-
-    public Duration getDatabaseStartupDelay() {
-        return Duration.seconds(getConfig(DATABASE_STARTUP_TIMEOUT));
-    }
-
-    // Accessors used in freemarker template processing
-
-    public int getReplicationInterval() {
-        return getConfig(REPLICATION_INTERVAL);
-    }
-    
-    public String getTableRegex() {
-        return getConfig(TABLE_REGEXP);
-    }
-    
-    public URI getLeftDatabaseUrl() {
-        return URI.create(getAttribute(LEFT_DATASTORE_URL));
-    }
-    
-    public String getLeftDatabaseName() {
-        return getConfig(LEFT_DATABASE_NAME);
-    }
-
-    public String getLeftUsername() {
-        return getConfig(LEFT_USERNAME);
-    }
-
-    public String getLeftPassword() {
-        return getConfig(LEFT_PASSWORD);
-    }
-
-    public URI getRightDatabaseUrl() {
-        return URI.create(getAttribute(RIGHT_DATASTORE_URL));
-    }
-
-    public String getRightDatabaseName() {
-        return getConfig(RIGHT_DATABASE_NAME);
-    }
-
-    public String getRightUsername() {
-        return getConfig(RIGHT_USERNAME);
-    }
-
-    public String getRightPassword() {
-        return getConfig(RIGHT_PASSWORD);
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepSshDriver.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepSshDriver.java b/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepSshDriver.java
deleted file mode 100644
index 4d0a9ef..0000000
--- a/brooklyn-library/software/database/src/main/java/org/apache/brooklyn/entity/database/rubyrep/RubyRepSshDriver.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.brooklyn.entity.database.rubyrep;
-
-import static java.lang.String.format;
-
-import java.io.Reader;
-import java.net.URISyntaxException;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-
-import org.apache.brooklyn.api.entity.EntityLocal;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.entity.software.base.AbstractSoftwareProcessSshDriver;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.location.ssh.SshMachineLocation;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.os.Os;
-import org.apache.brooklyn.util.ssh.BashCommands;
-import org.apache.brooklyn.util.stream.Streams;
-
-import com.google.common.collect.ImmutableList;
-
-public class RubyRepSshDriver extends AbstractSoftwareProcessSshDriver implements RubyRepDriver {
-
-    public static final Logger log = LoggerFactory.getLogger(RubyRepSshDriver.class);
-
-    public RubyRepSshDriver(EntityLocal entity, SshMachineLocation machine) {
-        super(entity, machine);
-
-        entity.sensors().set(Attributes.LOG_FILE_LOCATION, getLogFileLocation());
-    }
-
-    protected String getLogFileLocation() {
-        return Os.mergePaths(getRunDir(), "log", "rubyrep.log");
-    }
-
-    @Override
-    public void preInstall() {
-        resolver = Entities.newDownloader(this);
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("rubyrep-%s", getVersion()))));
-    }
-
-    @Override
-    public void install() {
-        List<String> urls = resolver.getTargets();
-        String saveAs = resolver.getFilename();
-
-        List<String> commands = ImmutableList.<String>builder()
-                .addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs))
-                .add(BashCommands.INSTALL_UNZIP)
-                .add("unzip " + saveAs)
-                .build();
-
-        newScript(INSTALLING)
-                .body.append(commands)
-                .failOnNonZeroResultCode()
-                .execute();
-    }
-
-    @Override
-    public void customize() {
-        newScript(CUSTOMIZING)
-                .body.append(format("cp -R %s %s", getExpandedInstallDir(), getRunDir()))
-                .failOnNonZeroResultCode()
-                .execute();
-        try {
-            customizeConfiguration();
-        } catch (Exception e) {
-            log.error("Failed to configure rubyrep, replication is unlikely to succeed", e);
-        }
-    }
-
-    protected void customizeConfiguration() throws ExecutionException, InterruptedException, URISyntaxException {
-        log.info("Copying creation script " + getEntity().toString());
-
-        // TODO check these semantics are what we really want?
-        String configScriptUrl = entity.getConfig(RubyRepNode.CONFIGURATION_SCRIPT_URL);
-        Reader configContents;
-        if (configScriptUrl != null) {
-            // If set accept as-is
-            configContents = Streams.reader(resource.getResourceFromUrl(configScriptUrl));
-        } else {
-            String configScriptContents = processTemplate(entity.getConfig(RubyRepNode.TEMPLATE_CONFIGURATION_URL));
-            configContents = Streams.newReaderWithContents(configScriptContents);
-        }
-
-        getMachine().copyTo(configContents, getRunDir() + "/rubyrep.conf");
-    }
-
-    @Override
-    public void launch() {
-        newScript(MutableMap.of("usePidFile", true), LAUNCHING)
-                .body.append(format("nohup rubyrep-%s/jruby/bin/jruby rubyrep-%s/bin/rubyrep replicate -c rubyrep.conf > ./console 2>&1 &", getVersion(), getVersion()))
-                .execute();
-    }
-
-    @Override
-    public boolean isRunning() {
-        return newScript(MutableMap.of("usePidFile", true), CHECK_RUNNING).execute() == 0;
-    }
-
-    @Override
-    public void stop() {
-        newScript(MutableMap.of("usePidFile", true), STOPPING).execute();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/mariadb-logo-180x119.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/mariadb-logo-180x119.png b/brooklyn-library/software/database/src/main/resources/mariadb-logo-180x119.png
deleted file mode 100644
index cea7acd..0000000
Binary files a/brooklyn-library/software/database/src/main/resources/mariadb-logo-180x119.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/mysql-logo-110x57.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/mysql-logo-110x57.png b/brooklyn-library/software/database/src/main/resources/mysql-logo-110x57.png
deleted file mode 100644
index 797c21d..0000000
Binary files a/brooklyn-library/software/database/src/main/resources/mysql-logo-110x57.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/crate/crate.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/crate/crate.yaml b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/crate/crate.yaml
deleted file mode 100644
index 42fcee5..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/crate/crate.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-# The Crate distribution comes with comprehensive instructions on available
-# configuration. Select sections are reproduced here.
-
-
-############################## Network And HTTP ###############################
-
-# Crate, by default, binds itself to the 0.0.0.0 address, and listens
-# on port [4200-4300] for HTTP traffic and on port [4300-4400] for node-to-node
-# communication. (the range means that if the port is busy, it will automatically
-# try the next port).
-
-# Set both 'bind_host' and 'publish_host':
-network.host: ${driver.subnetHostname}
-
-# Set a custom port for the node to node communication (4300 by default):
-transport.tcp.port: ${entity.port?c}
-
-# Set a custom port to listen for HTTP traffic:
-http.port: ${entity.httpPort?c}
-
-
-#################################### Paths ####################################
-
-# Path to directory where to store table data allocated for this node.
-path.data: ${driver.dataLocation}
-
-# Path to log files:
-path.logs: ${driver.runDir}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mariadb/my.cnf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mariadb/my.cnf b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mariadb/my.cnf
deleted file mode 100644
index d78f88e..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mariadb/my.cnf
+++ /dev/null
@@ -1,19 +0,0 @@
-[client]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-user            = root
-password        = ${entity.password}
-
-# Here follows entries for some specific programs
-
-# The MariaDB server, which (confusingly) uses MySQL terminology for backwards compatibility
-[mysqld]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-basedir         = ${driver.baseDir}
-datadir         = ${driver.dataDir}
-bind-address    = 0.0.0.0
-# skip-networking
-
-# Custom configuration options
-${driver.mariaDbServerOptionsString}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini
deleted file mode 100644
index ee437ac..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini
+++ /dev/null
@@ -1,390 +0,0 @@
-;SQL Server 2012 Configuration File
-
-
-[OPTIONS]
-
-
-
-; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter. 
-
-
-
-ACTION="Install"
-
-; Detailed help for command line argument ROLE has not been defined yet.
-
-ROLE="AllFeatures_WithDefaults"
-
-
-; Detailed help for command line argument ENU has not been defined yet. 
-
-
-
-ENU="True"
-
-
-
-; Setup will not display any user interface. 
-
-
-
-QUIET="True"
-
- 
-
-; Setup will display progress only, without any user interaction. 
-
-
-
-QUIETSIMPLE="False"
-
-
-
-; Specify whether SQL Server Setup should discover and include product updates. The valid values are True and False or 1 and 0. By default SQL Server Setup will include updates that are found. 
-
-
-
-UpdateEnabled="False"
-
-
-
-; Specifies features to install, uninstall, or upgrade. The list of top-level features include SQL, AS, RS, IS, MDS, and Tools. The SQL feature will install the Database Engine, Replication, Full-Text, and Data Quality Services (DQS) server. The Tools feature will install Management Tools, Books online components, SQL Server Data Tools, and other shared components. 
-
-
-
-FEATURES="${config['mssql.features']}"
-
-
-
-; Specify the location where SQL Server Setup will obtain product updates. The valid values are "MU" to search Microsoft Update, a valid folder path, a relative path such as .\MyUpdates or a UNC share. By default SQL Server Setup will search Microsoft Update or a Windows Update service through the Window Server Update Services. 
-
-
-
-UpdateSource="MU"
-
-
-
-; Displays the command line parameters usage 
-
-
-
-HELP="False"
-
-
-
-; Specifies that the detailed Setup log should be piped to the console. 
-
-
-
-INDICATEPROGRESS="True"
-
-
-
-; Specifies that Setup should install into WOW64. This command line argument is not supported on an IA64 or a 32-bit system. 
-
-
-
-X86="False"
-
-
-
-; Specify the root installation directory for shared components.  This directory remains unchanged after shared components are already installed. 
-
-
-
-INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
-
-
-
-; Specify the root installation directory for the WOW64 shared components.  This directory remains unchanged after WOW64 shared components are already installed. 
-
-
-
-INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server"
-
-
-
-; Specify a default or named instance. MSSQLSERVER is the default instance for non-Express editions and SQLExpress for Express editions. This parameter is required when installing the SQL Server Database Engine (SQL), Analysis Services (AS), or Reporting Services (RS). 
-
-
-
-INSTANCENAME="MSSQLSERVER"
-
-
-
-; Specify the Instance ID for the SQL Server features you have specified. SQL Server directory structure, registry structure, and service names will incorporate the instance ID of the SQL Server instance. 
-
-
-
-INSTANCEID="MSSQLSERVER"
-
-
-
-; Specify that SQL Server feature usage data can be collected and sent to Microsoft. Specify 1 or True to enable and 0 or False to disable this feature. 
-
-
-
-SQMREPORTING="False"
-
-
-; The account used by the Distributed Replay Controller service.
-
-CTLRSVCACCOUNT="NT Service\SQL Server Distributed Replay Controller"
-
-; The startup type for the Distributed Replay Controller service.
-
-CTLRSTARTUPTYPE="Manual"
-
-; The account used by the Distributed Replay Client service.
-
-CLTSVCACCOUNT="NT Service\SQL Server Distributed Replay Client"
-
-; The startup type for the Distributed Replay Client service.
-
-CLTSTARTUPTYPE="Manual"
-
-; The result directory for the Distributed Replay Client service.
-
-CLTRESULTDIR="C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\ResultDir"
-
-; The working directory for the Distributed Replay Client service.
-
-CLTWORKINGDIR="C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\WorkingDir"
-
-; RSInputSettings_RSInstallMode_Description
-
-RSINSTALLMODE="DefaultNativeMode"
-
-; RSInputSettings_RSInstallMode_Description
-
-RSSHPINSTALLMODE="SharePointFilesOnlyMode"
-
-; Specify if errors can be reported to Microsoft to improve future SQL Server releases. Specify 1 or True to enable and 0 or False to disable this feature.
-
-
-
-; Specify if errors can be reported to Microsoft to improve future SQL Server releases. Specify 1 or True to enable and 0 or False to disable this feature. 
-
-
-
-ERRORREPORTING="False"
-
-
-
-; Specify the installation directory. 
-
-
-
-INSTANCEDIR="C:\Program Files\Microsoft SQL Server"
-
-
-
-; Agent account name 
-
-
-
-AGTSVCACCOUNT="NT Service\SQLSERVERAGENT"
-
-
-
-; Auto-start service after installation.  
-
-
-
-AGTSVCSTARTUPTYPE="Automatic"
-
-
-; Startup type for Integration Services.
-
-ISSVCSTARTUPTYPE="Automatic"
-
-; Account for Integration Services: Domain\User or system account.
-
-ISSVCACCOUNT="NT Service\MsDtsServer110"
-
-; The name of the account that the Analysis Services service runs under.
-
-ASSVCACCOUNT="NT Service\MSSQLServerOLAPService"
-
-; Controls the service startup type setting after the service has been created.
-
-ASSVCSTARTUPTYPE="Automatic"
-
-; The collation to be used by Analysis Services.
-
-ASCOLLATION="Latin1_General_CI_AS"
-
-; The location for the Analysis Services data files.
-
-ASDATADIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Data"
-
-; The location for the Analysis Services log files.
-
-ASLOGDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Log"
-
-; The location for the Analysis Services backup files.
-
-ASBACKUPDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Backup"
-
-; The location for the Analysis Services temporary files.
-
-ASTEMPDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Temp"
-
-; The location for the Analysis Services configuration files.
-
-ASCONFIGDIR="C:\Program Files\Microsoft SQL Server\MSAS11.MSSQLSERVER\OLAP\Config"
-
-; Specifies whether or not the MSOLAP provider is allowed to run in process.
-
-ASPROVIDERMSOLAP="1"
-
-; Specifies the list of administrator accounts that need to be provisioned.
-
-ASSYSADMINACCOUNTS="BUILTIN\Administrators"
-
-; Specifies the server mode of the Analysis Services instance. Valid values are MULTIDIMENSIONAL and TABULAR. The default value is MULTIDIMENSIONAL.
-
-ASSERVERMODE="MULTIDIMENSIONAL"
-
-; CM brick TCP communication port 
-
-
-
-COMMFABRICPORT="0"
-
-
-
-; How matrix will use private networks 
-
-
-
-COMMFABRICNETWORKLEVEL="0"
-
-
-
-; How inter brick communication will be protected 
-
-
-
-COMMFABRICENCRYPTION="0"
-
-
-
-; TCP port used by the CM brick 
-
-
-
-MATRIXCMBRICKCOMMPORT="0"
-
-
-
-; Startup type for the SQL Server service. 
-
-
-
-SQLSVCSTARTUPTYPE="Automatic"
-
-
-
-; Level to enable FILESTREAM feature at (0, 1, 2 or 3). 
-
-
-
-FILESTREAMLEVEL="0"
-
-
-
-; Set to "1" to enable RANU for SQL Server Express. 
-
-
-
-ENABLERANU="False"
-
-
-
-; Specifies a Windows collation or an SQL collation to use for the Database Engine. 
-
-
-
-SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
-
-
-
-; Account for SQL Server service: Domain\User or system account. 
-
-
-
-SQLSVCACCOUNT="NT Service\MSSQLSERVER"
-
-
-
-; Windows account(s) to provision as SQL Server system administrators. 
-
-
-
-SQLSYSADMINACCOUNTS="BUILTIN\Administrators"
-
-
-
-; The default is Windows Authentication. Use "SQL" for Mixed Mode Authentication. 
-
-
-
-SECURITYMODE="SQL"
-
-
-SAPWD="${config['mssql.sa.password']}"
-
-
-
-; Provision current user as a Database Engine system administrator for SQL Server 2012 Express. 
-
-
-
-ADDCURRENTUSERASSQLADMIN="False"
-
-
-
-; Specify 0 to disable or 1 to enable the TCP/IP protocol. 
-
-
-
-TCPENABLED="1"
-
-
-
-; Specify 0 to disable or 1 to enable the Named Pipes protocol. 
-
-
-
-NPENABLED="0"
-
-
-
-; Startup type for Browser Service. 
-
-
-
-BROWSERSVCSTARTUPTYPE="Disabled"
-
-
-; Specifies which account the report server NT service should execute under.  When omitted or when the value is empty string, the default built-in account for the current operating system.
-; The username part of RSSVCACCOUNT is a maximum of 20 characters long and
-; The domain part of RSSVCACCOUNT is a maximum of 254 characters long.
-
-RSSVCACCOUNT="NT Service\ReportServer"
-
-; Specifies how the startup mode of the report server NT service.  When
-; Manual - Service startup is manual mode (default).
-; Automatic - Service startup is automatic mode.
-; Disabled - Service is disabled
-
-RSSVCSTARTUPTYPE="Automatic"
-
-; Add description of input argument FTSVCACCOUNT
-
-FTSVCACCOUNT="NT Service\MSSQLFDLauncher"
-
-
-
-IAcceptSQLServerLicenseTerms="True"

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/checkrunningmssql.bat
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/checkrunningmssql.bat b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/checkrunningmssql.bat
deleted file mode 100644
index 34512c8..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/checkrunningmssql.bat
+++ /dev/null
@@ -1,23 +0,0 @@
-[#ftl]
-@echo off
-REM Licensed to the Apache Software Foundation (ASF) under one
-REM or more contributor license agreements.  See the NOTICE file
-REM distributed with this work for additional information
-REM regarding copyright ownership.  The ASF licenses this file
-REM to you under the Apache License, Version 2.0 (the
-REM "License"); you may not use this file except in compliance
-REM with the License.  You may obtain a copy of the License at
-REM
-REM   http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing,
-REM software distributed under the License is distributed on an
-REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-REM KIND, either express or implied.  See the License for the
-REM specific language governing permissions and limitations
-REM under the License.
-
-set serviceName=MSSQL\$${config['mssql.instance.name']}
-
-[#noparse]
-sc query %serviceName% | find "RUNNING"

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/configuremssql.ps1
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/configuremssql.ps1 b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/configuremssql.ps1
deleted file mode 100644
index 06522fd..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/configuremssql.ps1
+++ /dev/null
@@ -1,22 +0,0 @@
-[#ftl]
-#!ps1
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-netsh advfirewall firewall add rule name=SQLPort dir=in protocol=tcp action=allow localport=1433 remoteip=any profile=any
-( Get-WmiObject -Namespace "root\Microsoft\SqlServer\ComputerManagement11" -Query "Select * from ServerNetworkProtocolProperty where ProtocolName='Tcp' and IPAddressName='IPAll' and PropertyName='TcpPort'" ).SetStringValue("1433")

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1 b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
deleted file mode 100644
index fcbf54a..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
+++ /dev/null
@@ -1,45 +0,0 @@
-[#ftl]
-#!ps1
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-$Url = "${config['mssql.download.url']}"
-$Path = "C:\sql2008.iso"
-$Username = "${config['mssql.download.user']}"
-$Password = '${config['mssql.download.password']}'
-
-
-$WebClient = New-Object System.Net.WebClient
-$WebClient.Credentials = New-Object System.Net.Networkcredential($Username, $Password)
-$WebClient.DownloadFile( $url, $path )
-
-$mountResult = Mount-DiskImage $Path -PassThru
-$driveLetter = (($mountResult | Get-Volume).DriveLetter) + ":\"
-
-New-Item -ItemType Directory -Force -Path "C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\ResultDir"
-New-Item -ItemType Directory -Force -Path "C:\Program Files (x86)\Microsoft SQL Server\DReplayClient\WorkingDir"
-
-Install-WindowsFeature NET-Framework-Core
-
-$pass = '${attribute['windows.password']}'
-$secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force
-$mycreds = New-Object System.Management.Automation.PSCredential ($($env:COMPUTERNAME + "\Administrator"), $secpasswd)
-
-$process = Start-Process ( $driveLetter + "setup.exe") -ArgumentList "/ConfigurationFile=C:\ConfigurationFile.ini" -Credential $mycreds -RedirectStandardOutput "C:\sqlout.txt" -RedirectStandardError "C:\sqlerr.txt" -Wait -PassThru
-exit $process.ExitCode

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/launchmssql.bat
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/launchmssql.bat b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/launchmssql.bat
deleted file mode 100644
index ad0deff..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/launchmssql.bat
+++ /dev/null
@@ -1,25 +0,0 @@
-[#ftl]
-@echo off
-REM Licensed to the Apache Software Foundation (ASF) under one
-REM or more contributor license agreements.  See the NOTICE file
-REM distributed with this work for additional information
-REM regarding copyright ownership.  The ASF licenses this file
-REM to you under the Apache License, Version 2.0 (the
-REM "License"); you may not use this file except in compliance
-REM with the License.  You may obtain a copy of the License at
-REM
-REM   http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing,
-REM software distributed under the License is distributed on an
-REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-REM KIND, either express or implied.  See the License for the
-REM specific language governing permissions and limitations
-REM under the License.
-
-set serviceName=MSSQL\$${config['mssql.instance.name']}
-
-[#noparse]
-sc stop %serviceName%
-sc config %serviceName% start=auto
-sc start %serviceName%

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml
deleted file mode 100644
index c3d3c99..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
-name: mssql
-
-location:
-  jclouds:aws-ec2:us-west-2:
-    displayName: AWS Oregon (Windows)
-    imageId: us-west-2/ami-8fd3f9bf
-    hardwareId:  m3.medium
-    useJcloudsSshInit: false
-    templateOptions:
-      subnetId: subnet-a10e96c4
-      securityGroupIds: [['sg-a2d0c2c7']]
-      mapNewVolumeToDeviceName: ["/dev/sda1", 100, true]
-
-services:
-- type: org.apache.brooklyn.entity.software.base.VanillaWindowsProcess
-  brooklyn.config:
-    templates.install:
-      classpath://org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini: "C:\\ConfigurationFile.ini"
-      classpath://org/apache/brooklyn/entity/database/mssql/installmssql.ps1: "C:\\installmssql.ps1"
-      classpath://org/apache/brooklyn/entity/database/mssql/configuremssql.ps1: "C:\\configuremssql.ps1"
-      classpath://org/apache/brooklyn/entity/database/mssql/launchmssql.bat: "C:\\launchmssql.bat"
-      classpath://org/apache/brooklyn/entity/database/mssql/stopmssql.bat: "C:\\stopmssql.bat"
-    install.command: powershell -command "C:\\installmssql.ps1"
-    customize.command: powershell -command "C:\\configuremssql.ps1"
-    launch.command: "C:\\launchmssql.bat"
-    stop.command: "C:\\stopmssql.bat"
-    checkRunning.command: echo true
-
-    ## NOTE: Values must be supplied for the following
-    mssql.download.url:
-    mssql.download.user:
-    mssql.download.password:
-    mssql.sa.password:
-    mssql.instance.name:
-
-    ## The following is a list of *all* MSSQL features. Installation time and footprint can be greatly
-    ## reduced by removing unnecessary features
-    mssql.features: "SQLENGINE,REPLICATION,FULLTEXT,DQ,AS,RS,RS_SHP,DQC,BIDS,CONN,IS,BC,SDK,BOL,SSMS,ADV_SSMS,DREPLAY_CTLR,DREPLAY_CLT,SNAC_SDK"
-  provisioning.properties:
-    required.ports: 1433
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/stopmssql.bat
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/stopmssql.bat b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/stopmssql.bat
deleted file mode 100644
index 68358f1..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/stopmssql.bat
+++ /dev/null
@@ -1,24 +0,0 @@
-[#ftl]
-@echo off
-REM Licensed to the Apache Software Foundation (ASF) under one
-REM or more contributor license agreements.  See the NOTICE file
-REM distributed with this work for additional information
-REM regarding copyright ownership.  The ASF licenses this file
-REM to you under the Apache License, Version 2.0 (the
-REM "License"); you may not use this file except in compliance
-REM with the License.  You may obtain a copy of the License at
-REM
-REM   http://www.apache.org/licenses/LICENSE-2.0
-REM
-REM Unless required by applicable law or agreed to in writing,
-REM software distributed under the License is distributed on an
-REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-REM KIND, either express or implied.  See the License for the
-REM specific language governing permissions and limitations
-REM under the License.
-
-set serviceName=MSSQL\$${config['mssql.instance.name']}
-
-[#noparse]
-sc config %serviceName% start=demand
-sc stop %serviceName%

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
deleted file mode 100644
index 40b4086..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-[client]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-user            = root
-password        = ${entity.password}
-
-# Here follows entries for some specific programs
-
-# The MySQL server
-[mysqld]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-basedir         = ${driver.baseDir}
-datadir         = ${driver.dataDir}
-bind-address    = 0.0.0.0
-log_error       = ${driver.runDir}/mysql_error_${entity.getId()}.log
-log_warnings    = 2
-general_log      = ${config["mysql.general_log"]?string('on','off')}
-general_log_file = ${driver.runDir}/mysql_general_${entity.getId()}.log
-# skip-networking
-
-#Prevent the GRANT statement from automatically creating new user accounts if it would otherwise do so,
-#unless authentication information is specified
-sql_mode = NO_AUTO_CREATE_USER
-
-# Custom configuration options
-${driver.mySqlServerOptionsString}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
deleted file mode 100644
index 54a773b..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
+++ /dev/null
@@ -1,30 +0,0 @@
-[client]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-user            = root
-password        = ${entity.password}
-
-# Here follows entries for some specific programs
-
-# The MySQL server
-[mysqld]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-basedir         = ${driver.baseDir}
-datadir         = ${driver.dataDir}
-bind-address    = 0.0.0.0
-# skip-networking
-
-#Prevent the GRANT statement from automatically creating new user accounts if it would otherwise do so,
-#unless authentication information is specified
-sql_mode = NO_AUTO_CREATE_USER
-
-# Replication config
-server-id       = 1
-binlog-format   = mixed
-log-bin         = mysql-bin
-sync_binlog     = 1
-innodb_flush_log_at_trx_commit=1
-
-# Custom configuration options
-${driver.mySqlServerOptionsString}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
deleted file mode 100644
index b4af02a..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
+++ /dev/null
@@ -1,50 +0,0 @@
-[#ftl]
-[client]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-user            = root
-password        = ${entity.password}
-
-# Here follows entries for some specific programs
-
-# The MySQL server
-[mysqld]
-port            = ${driver.port?c}
-socket          = /tmp/mysql.sock.${entity.socketUid}.${driver.port?c}
-basedir         = ${driver.baseDir}
-datadir         = ${driver.dataDir}
-bind-address    = 0.0.0.0
-# skip-networking
-
-#Prevent the GRANT statement from automatically creating new user accounts if it would otherwise do so,
-#unless authentication information is specified
-sql_mode = NO_AUTO_CREATE_USER
-
-# Replication config
-server-id       = ${config["mysql.server_id"]}
-relay-log       = mysql-slave-${config["mysql.server_id"]}-relay
-relay-log-recovery = 1
-relay-log-info-repository = TABLE
-relay-log-purge = 1
-[#list config["mysql.slave.replicate_do_db"]! as db]
-replicate-do-db = ${db}
-[/#list]
-
-[#list config["mysql.slave.replicate_do_table"]! as db]
-replicate-do-table = ${db}
-[/#list]
-
-[#list config["mysql.slave.replicate_ignore_table"]! as db]
-replicate-ignore-table = ${db}
-[/#list]
-
-[#list config["mysql.slave.replicate_wild_do_table"]! as db]
-replicate-wild-do-table = ${db}
-[/#list]
-
-[#list config["mysql.slave.replicate_wild_ignore_table"]! as db]
-replicate-wild-ignore-table = ${db}
-[/#list]
-
-# Custom configuration options
-${driver.mySqlServerOptionsString}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/postgresql/postgresql.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/postgresql/postgresql.conf b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/postgresql/postgresql.conf
deleted file mode 100644
index b6234c9..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/postgresql/postgresql.conf
+++ /dev/null
@@ -1,513 +0,0 @@
-[#ftl]
-#
-
-# -----------------------------
-# PostgreSQL configuration file
-# -----------------------------
-#
-# This file consists of lines of the form:
-#
-#   name = value
-#
-# (The "=" is optional.)  Whitespace may be used.  Comments are introduced with
-# "#" anywhere on a line.  The complete list of parameter names and allowed
-# values can be found in the PostgreSQL documentation.
-#
-# The commented-out settings shown in this file represent the default values.
-# Re-commenting a setting is NOT sufficient to revert it to the default value;
-# you need to reload the server.
-#
-# This file is read on server startup and when the server receives a SIGHUP
-# signal.  If you edit the file on a running system, you have to SIGHUP the
-# server for the changes to take effect, or use "pg_ctl reload".  Some
-# parameters, which are marked below, require a server shutdown and restart to
-# take effect.
-#
-# Any parameter can also be given as a command-line option to the server, e.g.,
-# "postgres -c log_connections=on".  Some parameters can be changed at run time
-# with the "SET" SQL command.
-#
-# Memory units:  kB = kilobytes        Time units:  ms  = milliseconds
-#                MB = megabytes                     s   = seconds
-#                GB = gigabytes                     min = minutes
-#                                                   h   = hours
-#                                                   d   = days
-
-
-#------------------------------------------------------------------------------
-# FILE LOCATIONS
-#------------------------------------------------------------------------------
-
-# The default values of these variables are driven from the -D command-line
-# option or PGDATA environment variable.
-
-data_directory = '${driver.dataDir}'       # use data in another directory
-                    # (change requires restart)
-#hba_file = '${driver.dataDir}/pg_hba.conf' # host-based authentication file
-                    # (change requires restart)
-#ident_file = '${driver.dataDir}/pg_ident.conf' # ident configuration file
-                    # (change requires restart)
-
-# If external_pid_file is not explicitly set, no extra PID file is written.
-external_pid_file = '${driver.pidFile}'       # write an extra PID file
-                    # (change requires restart)
-
-
-#------------------------------------------------------------------------------
-# CONNECTIONS AND AUTHENTICATION
-#------------------------------------------------------------------------------
-
-# - Connection Settings -
-
-listen_addresses = '${driver.hostname}'     # what IP address(es) to listen on;
-                    # comma-separated list of addresses;
-                    # defaults to 'localhost', '*' = all
-                    # (change requires restart)
-port = ${entity.postgreSqlPort?c}                # (change requires restart)
-max_connections = ${entity.maxConnections?c}           # (change requires restart)
-# Note:  Increasing max_connections costs ~400 bytes of shared memory per 
-# connection slot, plus lock space (see max_locks_per_transaction).
-#superuser_reserved_connections = 3 # (change requires restart)
-#unix_socket_directory = ''     # (change requires restart)
-#unix_socket_group = ''         # (change requires restart)
-#unix_socket_permissions = 0777     # begin with 0 to use octal notation
-                    # (change requires restart)
-#bonjour = off              # advertise server via Bonjour
-                    # (change requires restart)
-#bonjour_name = ''          # defaults to the computer name
-                    # (change requires restart)
-
-# - Security and Authentication -
-
-#authentication_timeout = 1min      # 1s-600s
-#ssl = off              # (change requires restart)
-#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH'  # allowed SSL ciphers
-                    # (change requires restart)
-#password_encryption = on
-#db_user_namespace = off
-
-# Kerberos and GSSAPI
-#krb_server_keyfile = ''
-#krb_srvname = 'postgres'       # (Kerberos only)
-#krb_caseins_users = off
-
-# - TCP Keepalives -
-# see "man 7 tcp" for details
-
-#tcp_keepalives_idle = 0        # TCP_KEEPIDLE, in seconds;
-                    # 0 selects the system default
-#tcp_keepalives_interval = 0        # TCP_KEEPINTVL, in seconds;
-                    # 0 selects the system default
-#tcp_keepalives_count = 0       # TCP_KEEPCNT;
-                    # 0 selects the system default
-
-
-#------------------------------------------------------------------------------
-# RESOURCE USAGE (except WAL)
-#------------------------------------------------------------------------------
-
-# - Memory -
-
-shared_buffers = ${entity.sharedMemory}           # min 128kB
-                    # (change requires restart)
-#temp_buffers = 8MB         # min 800kB
-#max_prepared_transactions = 0      # zero disables the feature
-                    # (change requires restart)
-# Note:  Increasing max_prepared_transactions costs ~600 bytes of shared memory
-# per transaction slot, plus lock space (see max_locks_per_transaction).
-# It is not advisable to set max_prepared_transactions nonzero unless you
-# actively intend to use prepared transactions.
-#work_mem = 1MB             # min 64kB
-#maintenance_work_mem = 16MB        # min 1MB
-#max_stack_depth = 2MB          # min 100kB
-
-# - Kernel Resource Usage -
-
-#max_files_per_process = 1000       # min 25
-                    # (change requires restart)
-#shared_preload_libraries = ''      # (change requires restart)
-
-# - Cost-Based Vacuum Delay -
-
-#vacuum_cost_delay = 0ms        # 0-100 milliseconds
-#vacuum_cost_page_hit = 1       # 0-10000 credits
-#vacuum_cost_page_miss = 10     # 0-10000 credits
-#vacuum_cost_page_dirty = 20        # 0-10000 credits
-#vacuum_cost_limit = 200        # 1-10000 credits
-
-# - Background Writer -
-
-#bgwriter_delay = 200ms         # 10-10000ms between rounds
-#bgwriter_lru_maxpages = 100        # 0-1000 max buffers written/round
-#bgwriter_lru_multiplier = 2.0      # 0-10.0 multipler on buffers scanned/round
-
-# - Asynchronous Behavior -
-
-#effective_io_concurrency = 1       # 1-1000. 0 disables prefetching
-
-
-#------------------------------------------------------------------------------
-# WRITE AHEAD LOG
-#------------------------------------------------------------------------------
-
-# - Settings -
-
-#fsync = on             # turns forced synchronization on or off
-#synchronous_commit = on        # immediate fsync at commit
-#wal_sync_method = fsync        # the default is the first option 
-                    # supported by the operating system:
-                    #   open_datasync
-                    #   fdatasync
-                    #   fsync
-                    #   fsync_writethrough
-                    #   open_sync
-#full_page_writes = on          # recover from partial page writes
-#wal_buffers = 64kB         # min 32kB
-                    # (change requires restart)
-#wal_writer_delay = 200ms       # 1-10000 milliseconds
-
-#commit_delay = 0           # range 0-100000, in microseconds
-#commit_siblings = 5            # range 1-1000
-
-# - Checkpoints -
-
-#checkpoint_segments = 3        # in logfile segments, min 1, 16MB each
-#checkpoint_timeout = 5min      # range 30s-1h
-#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
-#checkpoint_warning = 30s       # 0 disables
-
-# - Archiving -
-
-#archive_mode = off     # allows archiving to be done
-                # (change requires restart)
-#archive_command = ''       # command to use to archive a logfile segment
-#archive_timeout = 0        # force a logfile segment switch after this
-                # number of seconds; 0 disables
-
-
-#------------------------------------------------------------------------------
-# QUERY TUNING
-#------------------------------------------------------------------------------
-
-# - Planner Method Configuration -
-
-#enable_bitmapscan = on
-#enable_hashagg = on
-#enable_hashjoin = on
-#enable_indexscan = on
-#enable_mergejoin = on
-#enable_nestloop = on
-#enable_seqscan = on
-#enable_sort = on
-#enable_tidscan = on
-
-# - Planner Cost Constants -
-
-#seq_page_cost = 1.0            # measured on an arbitrary scale
-#random_page_cost = 4.0         # same scale as above
-#cpu_tuple_cost = 0.01          # same scale as above
-#cpu_index_tuple_cost = 0.005       # same scale as above
-#cpu_operator_cost = 0.0025     # same scale as above
-#effective_cache_size = 128MB
-
-# - Genetic Query Optimizer -
-
-#geqo = on
-#geqo_threshold = 12
-#geqo_effort = 5            # range 1-10
-#geqo_pool_size = 0         # selects default based on effort
-#geqo_generations = 0           # selects default based on effort
-#geqo_selection_bias = 2.0      # range 1.5-2.0
-#geqo_seed = 0.0            # range 0.0-1.0
-
-# - Other Planner Options -
-
-#default_statistics_target = 100    # range 1-10000
-#constraint_exclusion = partition   # on, off, or partition
-#cursor_tuple_fraction = 0.1        # range 0.0-1.0
-#from_collapse_limit = 8
-#join_collapse_limit = 8        # 1 disables collapsing of explicit 
-                    # JOIN clauses
-
-
-#------------------------------------------------------------------------------
-# ERROR REPORTING AND LOGGING
-#------------------------------------------------------------------------------
-
-# - Where to Log -
-
-#log_destination = 'stderr'     # Valid values are combinations of
-                    # stderr, csvlog, syslog and eventlog,
-                    # depending on platform.  csvlog
-                    # requires logging_collector to be on.
-
-# This is used when logging to stderr:
-#logging_collector = off        # Enable capturing of stderr and csvlog
-                    # into log files. Required to be on for
-                    # csvlogs.
-                    # (change requires restart)
-
-# These are only used if logging_collector is on:
-#log_directory = 'pg_log'       # directory where log files are written,
-                    # can be absolute or relative to PGDATA
-#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'    # log file name pattern,
-                    # can include strftime() escapes
-#log_truncate_on_rotation = off     # If on, an existing log file of the
-                    # same name as the new log file will be
-                    # truncated rather than appended to.
-                    # But such truncation only occurs on
-                    # time-driven rotation, not on restarts
-                    # or size-driven rotation.  Default is
-                    # off, meaning append to existing files
-                    # in all cases.
-#log_rotation_age = 1d          # Automatic rotation of logfiles will
-                    # happen after that time.  0 disables.
-#log_rotation_size = 10MB       # Automatic rotation of logfiles will 
-                    # happen after that much log output.
-                    # 0 disables.
-
-# These are relevant when logging to syslog:
-#syslog_facility = 'LOCAL0'
-#syslog_ident = 'postgres'
-
-#silent_mode = off          # Run server silently.
-                    # DO NOT USE without syslog or
-                    # logging_collector
-                    # (change requires restart)
-
-
-# - When to Log -
-
-#client_min_messages = notice       # values in order of decreasing detail:
-                    #   debug5
-                    #   debug4
-                    #   debug3
-                    #   debug2
-                    #   debug1
-                    #   log
-                    #   notice
-                    #   warning
-                    #   error
-
-#log_min_messages = warning     # values in order of decreasing detail:
-                    #   debug5
-                    #   debug4
-                    #   debug3
-                    #   debug2
-                    #   debug1
-                    #   info
-                    #   notice
-                    #   warning
-                    #   error
-                    #   log
-                    #   fatal
-                    #   panic
-
-#log_error_verbosity = default      # terse, default, or verbose messages
-
-#log_min_error_statement = error    # values in order of decreasing detail:
-                    #   debug5
-                    #   debug4
-                    #   debug3
-                    #   debug2
-                    #   debug1
-                    #   info
-                    #   notice
-                    #   warning
-                    #   error
-                    #   log
-                    #   fatal
-                    #   panic (effectively off)
-
-#log_min_duration_statement = -1    # -1 is disabled, 0 logs all statements
-                    # and their durations, > 0 logs only
-                    # statements running at least this number
-                    # of milliseconds
-
-
-# - What to Log -
-
-#debug_print_parse = off
-#debug_print_rewritten = off
-#debug_print_plan = off
-#debug_pretty_print = on
-#log_checkpoints = off
-#log_connections = off
-#log_disconnections = off
-#log_duration = off
-#log_hostname = off
-#log_line_prefix = ''           # special values:
-                    #   %u = user name
-                    #   %d = database name
-                    #   %r = remote host and port
-                    #   %h = remote host
-                    #   %p = process ID
-                    #   %t = timestamp without milliseconds
-                    #   %m = timestamp with milliseconds
-                    #   %i = command tag
-                    #   %e = SQL state
-                    #   %c = session ID
-                    #   %l = session line number
-                    #   %s = session start timestamp
-                    #   %v = virtual transaction ID
-                    #   %x = transaction ID (0 if none)
-                    #   %q = stop here in non-session
-                    #        processes
-                    #   %% = '%'
-                    # e.g. '<%u%%%d> '
-#log_lock_waits = off           # log lock waits >= deadlock_timeout
-#log_statement = 'none'         # none, ddl, mod, all
-#log_temp_files = -1            # log temporary files equal or larger
-                    # than the specified size in kilobytes;
-                    # -1 disables, 0 logs all temp files
-#log_timezone = unknown         # actually, defaults to TZ environment
-                    # setting
-
-
-#------------------------------------------------------------------------------
-# RUNTIME STATISTICS
-#------------------------------------------------------------------------------
-
-# - Query/Index Statistics Collector -
-
-#track_activities = on
-#track_counts = on
-#track_functions = none         # none, pl, all
-#track_activity_query_size = 1024
-#update_process_title = on
-#stats_temp_directory = 'pg_stat_tmp'
-
-
-# - Statistics Monitoring -
-
-#log_parser_stats = off
-#log_planner_stats = off
-#log_executor_stats = off
-#log_statement_stats = off
-
-
-#------------------------------------------------------------------------------
-# AUTOVACUUM PARAMETERS
-#------------------------------------------------------------------------------
-
-#autovacuum = on            # Enable autovacuum subprocess?  'on' 
-                    # requires track_counts to also be on.
-#log_autovacuum_min_duration = -1   # -1 disables, 0 logs all actions and
-                    # their durations, > 0 logs only
-                    # actions running at least this number
-                    # of milliseconds.
-#autovacuum_max_workers = 3     # max number of autovacuum subprocesses
-#autovacuum_naptime = 1min      # time between autovacuum runs
-#autovacuum_vacuum_threshold = 50   # min number of row updates before
-                    # vacuum
-#autovacuum_analyze_threshold = 50  # min number of row updates before 
-                    # analyze
-#autovacuum_vacuum_scale_factor = 0.2   # fraction of table size before vacuum
-#autovacuum_analyze_scale_factor = 0.1  # fraction of table size before analyze
-#autovacuum_freeze_max_age = 200000000  # maximum XID age before forced vacuum
-                    # (change requires restart)
-#autovacuum_vacuum_cost_delay = 20ms    # default vacuum cost delay for
-                    # autovacuum, in milliseconds;
-                    # -1 means use vacuum_cost_delay
-#autovacuum_vacuum_cost_limit = -1  # default vacuum cost limit for
-                    # autovacuum, -1 means use
-                    # vacuum_cost_limit
-
-
-#------------------------------------------------------------------------------
-# CLIENT CONNECTION DEFAULTS
-#------------------------------------------------------------------------------
-
-# - Statement Behavior -
-
-#search_path = '"[#noparse]$user[/#noparse]",public'     # schema names
-#default_tablespace = ''        # a tablespace name, '' uses the default
-#temp_tablespaces = ''          # a list of tablespace names, '' uses
-                    # only default tablespace
-#check_function_bodies = on
-#default_do_language = 'plpgsql'
-#default_transaction_isolation = 'read committed'
-#default_transaction_read_only = off
-#session_replication_role = 'origin'
-#statement_timeout = 0          # in milliseconds, 0 is disabled
-#vacuum_freeze_min_age = 50000000
-#vacuum_freeze_table_age = 150000000
-#bytea_output = 'hex'           # hex, escape
-#xmlbinary = 'base64'
-#xmloption = 'content'
-
-# - Locale and Formatting -
-
-datestyle = 'iso, mdy'
-#intervalstyle = 'postgres'
-#timezone = unknown         # actually, defaults to TZ environment
-                    # setting
-#timezone_abbreviations = 'Default'     # Select the set of available time zone
-                    # abbreviations.  Currently, there are
-                    #   Default
-                    #   Australia
-                    #   India
-                    # You can create your own file in
-                    # share/timezonesets/.
-#extra_float_digits = 0         # min -15, max 3
-#client_encoding = sql_ascii        # actually, defaults to database
-                    # encoding
-
-# These settings are initialized by initdb, but they can be changed.
-lc_messages = 'en_US.UTF-8'         # locale for system error message
-                    # strings
-lc_monetary = 'en_US.UTF-8'         # locale for monetary formatting
-lc_numeric = 'en_US.UTF-8'          # locale for number formatting
-lc_time = 'en_US.UTF-8'             # locale for time formatting
-
-# default configuration for text search
-default_text_search_config = 'pg_catalog.english'
-
-# - Other Defaults -
-
-#dynamic_library_path = '[#noparse]$libdir[/#noparse]'
-#local_preload_libraries = ''
-
-
-#------------------------------------------------------------------------------
-# LOCK MANAGEMENT
-#------------------------------------------------------------------------------
-
-#deadlock_timeout = 1s
-#max_locks_per_transaction = 64     # min 10
-                    # (change requires restart)
-# Note:  Each lock table slot uses ~270 bytes of shared memory, and there are
-# max_locks_per_transaction * (max_connections + max_prepared_transactions)
-# lock table slots.
-
-
-#------------------------------------------------------------------------------
-# VERSION/PLATFORM COMPATIBILITY
-#------------------------------------------------------------------------------
-
-# - Previous PostgreSQL Versions -
-
-#add_missing_from = off
-#array_nulls = on
-#backslash_quote = safe_encoding    # on, off, or safe_encoding
-#default_with_oids = off
-#escape_string_warning = on
-#regex_flavor = advanced        # advanced, extended, or basic
-#sql_inheritance = on
-#standard_conforming_strings = off
-#synchronize_seqscans = on
-
-# - Other Platforms and Clients -
-
-#transform_null_equals = off
-
-
-#------------------------------------------------------------------------------
-# CUSTOMIZED OPTIONS
-#------------------------------------------------------------------------------
-
-#custom_variable_classes = ''       # list of custom variable class names
-
-# Lines that pgtune has had problems parsing
-
-log_line_prefix = 'user=%u,db=%d '

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf b/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf
deleted file mode 100644
index 12fed6f..0000000
--- a/brooklyn-library/software/database/src/main/resources/org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf
+++ /dev/null
@@ -1,28 +0,0 @@
-[#ftl]
-#
-
-RR::Initializer::run do |config|
-config.left = {
-:adapter  => '${entity.leftDatabaseUrl.scheme}', 
-:database => '${entity.leftDatabaseName}',
-:username => '${entity.leftUsername}',
-:password => '${entity.leftPassword}',
-:host     => '${entity.leftDatabaseUrl.host}',
-:port     => ${entity.leftDatabaseUrl.port?c}
-}
- 
-config.right ={
-:adapter  => '${entity.rightDatabaseUrl.scheme}', 
-:database => '${entity.rightDatabaseName}',
-:username => '${entity.rightUsername}',
-:password => '${entity.rightPassword}',
-:host     => '${entity.rightDatabaseUrl.host}',
-:port     => ${entity.rightDatabaseUrl.port?c}
-}
- 
-config.include_tables /${entity.tableRegex}/
-config.options[:replication_interval] = ${entity.replicationInterval?c}
-config.options[:logged_replication_events] = [
-:all_changes, 
-:all_conflicts
-]end

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/main/resources/postgresql-logo-200px.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/main/resources/postgresql-logo-200px.png b/brooklyn-library/software/database/src/main/resources/postgresql-logo-200px.png
deleted file mode 100644
index 966b3cb..0000000
Binary files a/brooklyn-library/software/database/src/main/resources/postgresql-logo-200px.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/VogellaExampleAccess.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/VogellaExampleAccess.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/VogellaExampleAccess.java
deleted file mode 100644
index 348f988..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/VogellaExampleAccess.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.brooklyn.entity.database;
-
-
-import java.sql.Connection;
-import java.sql.Date;
-import java.sql.DriverManager;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.Lists;
-
-/**
- * Basic JDBC Access test Class, based on the Vogella MySQL tutorial
- * http://www.vogella.de/articles/MySQLJava/article.html
- */
-public class VogellaExampleAccess {
-    public static final Logger log = LoggerFactory.getLogger(VogellaExampleAccess.class);
-
-    private Connection connect = null;
-    private Statement statement = null;
-    private final String url;
-    private final String dbName;
-
-    public VogellaExampleAccess(String driverClass, String url) throws ClassNotFoundException {
-        this(driverClass, url, "feedback");
-    }
-    
-    public VogellaExampleAccess(String driverClass, String url, String dbName) throws ClassNotFoundException {
-        // This will load the JDBC driver, each DB has its own driver
-        Class.forName(driverClass);
-        this.url = url;
-        this.dbName = dbName;
-    }
-
-    public void readModifyAndRevertDataBase() throws Exception {
-        connect();
-        readDataBase();
-        modifyDataBase();
-        revertDatabase();
-        close();
-    }
-
-    public void connect() throws Exception {
-        try {
-            // Setup the connection with the DB
-            String jdbcUrl = "jdbc:" + url + dbName + "?" + "user=sqluser&password=sqluserpw";
-            log.info("Connecting to " + jdbcUrl);
-            connect = DriverManager.getConnection(jdbcUrl);
-
-            // Statements allow to issue SQL queries to the database
-            statement = connect.createStatement();
-        } catch (Exception ex) {
-            close();
-            throw ex;
-        }
-    }
-
-    public List<List<String>> readDataBase() throws Exception {
-        return read("SELECT myuser, webpage, datum, summary, COMMENTS from COMMENTS");
-    }
-
-    public List<List<String>> read(String sql) throws SQLException {
-        List<List<String>> results = Lists.newArrayList();
-        // Result set get the result of the SQL query
-        ResultSet resultSet = statement.executeQuery(sql);
-        // ResultSet is initially before the first data set
-        while (resultSet.next()) {
-            List<String> row = Lists.newArrayList();
-            for (int i = 1; i <= resultSet.getMetaData().getColumnCount(); i++) {
-                row.add(resultSet.getObject(i).toString());
-            }
-            results.add(row);
-        }
-        // Should close resultsets
-        resultSet.close();
-        writeResultSet(results);
-        return results;
-    }
-
-    public void modifyDataBase() throws Exception {
-        // PreparedStatements can use variables and are more efficient
-        PreparedStatement preparedStatement = connect.prepareStatement("insert into  COMMENTS values (?, ?, ?, ?, ? , ?, ?)");
-        // "myuser, webpage, datum, summary, COMMENTS from FEEDBACK.COMMENTS");
-        // Parameters start with 1
-        preparedStatement.setInt(1, 2);
-        preparedStatement.setString(2, "Test");
-        preparedStatement.setString(3, "TestEmail");
-        preparedStatement.setString(4, "TestWebpage");
-        preparedStatement.setDate(5, new Date(new java.util.Date().getTime()));
-        preparedStatement.setString(6, "TestSummary");
-        preparedStatement.setString(7, "TestComment");
-        preparedStatement.executeUpdate();
-
-        writeResultSet(readDataBase());
-        preparedStatement.close();
-    }
-    public void execute(String cata, String sql, Object... args) throws Exception {
-        String prevCata = connect.getCatalog();
-        if (cata != null) {
-            connect.setCatalog(cata);
-        }
-        PreparedStatement preparedStatement = connect.prepareStatement(sql);
-        for (int i = 1; i <= args.length; i++) {
-            preparedStatement.setObject(i, args[i-1]);
-        }
-        preparedStatement.executeUpdate();
-
-        writeResultSet(readDataBase());
-        preparedStatement.close();
-        if (cata != null) {
-            connect.setCatalog(prevCata);
-        }
-    }
-
-    // Remove again the insert comment added by modifyDataBase()
-    public void revertDatabase() throws Exception {
-        PreparedStatement preparedStatement = connect
-                .prepareStatement("delete from COMMENTS where myuser= ? ; ");
-        preparedStatement.setString(1, "Test");
-        preparedStatement.executeUpdate();
-
-        ResultSet resultSet = statement.executeQuery("select * from COMMENTS");
-        writeMetaData(resultSet);
-        // Should close resultsets
-        resultSet.close();
-    }
-
-    private void writeMetaData(ResultSet resultSet) throws SQLException {
-        // Get some metadata from the database
-        log.debug("The columns in the table are: ");
-
-        log.debug("Table: " + resultSet.getMetaData().getTableName(1));
-        for (int i = 1; i <= resultSet.getMetaData().getColumnCount(); i++) {
-            log.debug("Column " + i + " " + resultSet.getMetaData().getColumnName(i));
-        }
-    }
-
-    private void writeResultSet(List<List<String>> resultSet) throws SQLException {
-        for (List<String> row : resultSet) {
-            String user = row.get(0);
-            String website = row.get(1);
-            String date = row.get(2);
-            String summary = row.get(3);
-            String comment = row.get(4);
-            log.debug("User: " + user);
-            log.debug("Website: " + website);
-            log.debug("Summary: " + summary);
-            log.debug("Date: " + date);
-            log.debug("Comment: " + comment);
-        }
-    }
-
-    public Set<String> getSchemas() throws SQLException {
-        ResultSet rs = statement.executeQuery("SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA");
-        Set<String> dbs = new HashSet<String>();
-        while (rs.next()) {
-            dbs.add(rs.getString(1));
-        }
-        return dbs;
-    }
-
-    // You should always close the statement and connection
-    public void close() throws Exception {
-        if (statement != null) {
-            statement.close();
-            statement = null;
-        }
-
-        if (connect != null) {
-            connect.close();
-            connect = null;
-        }
-    }
-}    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/crate/CrateNodeIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/crate/CrateNodeIntegrationTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/crate/CrateNodeIntegrationTest.java
deleted file mode 100644
index 10c72c1..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/crate/CrateNodeIntegrationTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.brooklyn.entity.database.crate;
-
-import static org.testng.Assert.assertFalse;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-public class CrateNodeIntegrationTest {
-
-    private TestApplication app;
-    private LocalhostMachineProvisioningLocation localhostProvisioningLocation;
-
-    @BeforeMethod(alwaysRun = true)
-    public void setUp() throws Exception {
-        localhostProvisioningLocation = new LocalhostMachineProvisioningLocation();
-        app = ApplicationBuilder.newManagedApp(TestApplication.class);
-    }
-
-    @AfterMethod(alwaysRun = true)
-    public void tearDown() throws Exception {
-        if (app != null) Entities.destroyAll(app.getManagementContext());
-    }
-
-    @Test(groups = "Integration")
-    public void testCanStartAndStop() throws Exception {
-        CrateNode entity = app.createAndManageChild(EntitySpec.create(CrateNode.class));
-        app.start(ImmutableList.of(localhostProvisioningLocation));
-
-        EntityTestUtils.assertAttributeEqualsEventually(entity, Startable.SERVICE_UP, true);
-        EntityTestUtils.assertAttributeEventuallyNonNull(entity, CrateNode.SERVER_NAME);
-
-        entity.stop();
-        assertFalse(entity.getAttribute(Startable.SERVICE_UP));
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbIntegrationTest.java b/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbIntegrationTest.java
deleted file mode 100644
index 061ec02..0000000
--- a/brooklyn-library/software/database/src/test/java/org/apache/brooklyn/entity/database/mariadb/MariaDbIntegrationTest.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.brooklyn.entity.database.mariadb;
-
-import java.io.File;
-import java.net.InetAddress;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.mgmt.ManagementContext;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.core.internal.BrooklynProperties;
-import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
-import org.apache.brooklyn.core.test.entity.TestApplication;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.text.Strings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.Assert;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import org.apache.brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * Runs a slightly modified version of the popular Vogella MySQL tutorial,
- * from
- * http://www.vogella.de/articles/MySQLJava/article.html
- */
-public class MariaDbIntegrationTest {
-
-    public static final Logger log = LoggerFactory.getLogger(MariaDbIntegrationTest.class);
-    
-    protected BrooklynProperties brooklynProperties;
-    protected ManagementContext managementContext;
-    protected TestApplication tapp;
-    protected String hostname;
-    
-    @BeforeMethod(alwaysRun = true)
-    public void setUp() throws Exception {
-        // can start in AWS by running this -- or use brooklyn CLI/REST for most clouds, or programmatic/config for set of fixed IP machines
-        hostname = InetAddress.getLocalHost().getHostName();
-
-        brooklynProperties = BrooklynProperties.Factory.newDefault();
-        managementContext = new LocalManagementContext(brooklynProperties);
-        tapp = ApplicationBuilder.newManagedApp(TestApplication.class, managementContext);
-    }
-
-    @AfterMethod(alwaysRun=true)
-    public void ensureShutDown() throws Exception {
-        Entities.destroyAllCatching(managementContext);
-    }
-
-    //from http://www.vogella.de/articles/MySQLJava/article.html
-    public static final String CREATION_SCRIPT =
-            "CREATE DATABASE feedback; " +
-            "CREATE USER 'sqluser'@'localhost' IDENTIFIED BY 'sqluserpw'; " +
-            "GRANT USAGE ON *.* TO 'sqluser'@'localhost'; " +
-            "GRANT ALL PRIVILEGES ON feedback.* TO 'sqluser'@'localhost'; " +
-            "CREATE USER 'sqluser'@'%' IDENTIFIED BY 'sqluserpw'; " +
-            "GRANT USAGE ON *.* TO 'sqluser'@'%'; " +
-            "GRANT ALL PRIVILEGES ON feedback.* TO 'sqluser'@'%'; " +
-            "CREATE USER 'sqluser'@'$hostname' IDENTIFIED BY 'sqluserpw'; " +
-            "GRANT USAGE ON *.* TO 'sqluser'@'$hostname'; " +
-            "GRANT ALL PRIVILEGES ON feedback.* TO 'sqluser'@'$hostname'; " +
-            "FLUSH PRIVILEGES; " +
-            "USE feedback; " +
-            "CREATE TABLE COMMENTS ( " +
-                    "id INT NOT NULL AUTO_INCREMENT,  " +
-                    "MYUSER VARCHAR(30) NOT NULL, " +
-                    "EMAIL VARCHAR(30),  " +
-                    "WEBPAGE VARCHAR(100) NOT NULL,  " +
-                    "DATUM DATE NOT NULL,  " +
-                    "SUMMARY VARCHAR(40) NOT NULL, " +
-                    "COMMENTS VARCHAR(400) NOT NULL, " +
-                    "PRIMARY KEY (ID) " +
-                "); " +
-            "INSERT INTO COMMENTS values (default, 'lars', 'myemail@gmail.com','http://www.vogella.de', '2009-09-14 10:33:11', 'Summary','My first comment' );";
-
-    @Test(groups = "Integration")
-    public void test_localhost() throws Exception {
-        String dataDir = "/tmp/mariadb-data-" + Strings.makeRandomId(8);
-        MariaDbNode mariadb = tapp.createAndManageChild(EntitySpec.create(MariaDbNode.class)
-                .configure(MariaDbNode.MARIADB_SERVER_CONF, MutableMap.<String, Object>of("skip-name-resolve",""))
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, CREATION_SCRIPT)
-                .configure(MariaDbNode.DATA_DIR, dataDir));
-        LocalhostMachineProvisioningLocation location = new LocalhostMachineProvisioningLocation();
-
-        tapp.start(ImmutableList.of(location));
-        log.info("MariaDB started");
-
-        new VogellaExampleAccess("com.mysql.jdbc.Driver", mariadb.getAttribute(DatastoreCommon.DATASTORE_URL)).readModifyAndRevertDataBase();
-
-        log.info("Ran vogella MySQL example -- SUCCESS");
-
-        // Ensure the data directory was successfully overridden.
-        File dataDirFile = new File(dataDir);
-        File mariadbSubdirFile = new File(dataDirFile, "mysql");
-        Assert.assertTrue(mariadbSubdirFile.exists());
-
-        // Clean up.
-        dataDirFile.delete();
-    }
-}


Mime
View raw message