http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ac1a7c09/software/database/src/main/resources/org/apache/brooklyn/entity/database/crate/crate.yaml
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/crate/crate.yaml
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/crate/crate.yaml
new file mode 100644
index 0000000..42fcee5
--- /dev/null
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/crate/crate.yaml
@@ -0,0 +1,28 @@
+# 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/incubator-brooklyn/blob/ac1a7c09/software/database/src/main/resources/org/apache/brooklyn/entity/database/mariadb/my.cnf
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mariadb/my.cnf
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mariadb/my.cnf
new file mode 100644
index 0000000..d78f88e
--- /dev/null
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mariadb/my.cnf
@@ -0,0 +1,19 @@
+[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/incubator-brooklyn/blob/ac1a7c09/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini
new file mode 100644
index 0000000..ee437ac
--- /dev/null
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/ConfigurationFile.ini
@@ -0,0 +1,390 @@
+;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/incubator-brooklyn/blob/ac1a7c09/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/checkrunningmssql.bat
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/checkrunningmssql.bat
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/checkrunningmssql.bat
new file mode 100644
index 0000000..34512c8
--- /dev/null
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/checkrunningmssql.bat
@@ -0,0 +1,23 @@
+[#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/incubator-brooklyn/blob/ac1a7c09/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/configuremssql.ps1
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/configuremssql.ps1
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/configuremssql.ps1
new file mode 100644
index 0000000..06522fd
--- /dev/null
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/configuremssql.ps1
@@ -0,0 +1,22 @@
+[#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/incubator-brooklyn/blob/ac1a7c09/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
new file mode 100644
index 0000000..6c1f30b
--- /dev/null
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/installmssql.ps1
@@ -0,0 +1,49 @@
+[#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)
+
+Invoke-Command -ComputerName localhost -credential $mycreds -scriptblock {
+    param($driveLetter)
+    Start-Process ( $driveLetter + "setup.exe") -ArgumentList 
"/ConfigurationFile=C:\ConfigurationFile.ini" -RedirectStandardOutput 
"C:\sqlout.txt" -RedirectStandardError "C:\sqlerr.txt" -Wait
+} -Authentication CredSSP -argumentlist $driveLetter
+
+## Process complete
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ac1a7c09/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/launchmssql.bat
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/launchmssql.bat
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/launchmssql.bat
new file mode 100644
index 0000000..ad0deff
--- /dev/null
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/launchmssql.bat
@@ -0,0 +1,25 @@
+[#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/incubator-brooklyn/blob/ac1a7c09/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml
new file mode 100644
index 0000000..413ec3d
--- /dev/null
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/mssql.yaml
@@ -0,0 +1,40 @@
+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: brooklyn.entity.basic.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/incubator-brooklyn/blob/ac1a7c09/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/stopmssql.bat
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/stopmssql.bat
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/stopmssql.bat
new file mode 100644
index 0000000..68358f1
--- /dev/null
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mssql/stopmssql.bat
@@ -0,0 +1,24 @@
+[#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/incubator-brooklyn/blob/ac1a7c09/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
new file mode 100644
index 0000000..85f55ab
--- /dev/null
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql.conf
@@ -0,0 +1,19 @@
+[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
+
+# Custom configuration options
+${driver.mySqlServerOptionsString}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ac1a7c09/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
new file mode 100644
index 0000000..791f2da
--- /dev/null
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_master.conf
@@ -0,0 +1,26 @@
+[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
+
+# 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/incubator-brooklyn/blob/ac1a7c09/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
new file mode 100644
index 0000000..2e1e945
--- /dev/null
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/mysql/mysql_slave.conf
@@ -0,0 +1,33 @@
+[#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
+
+# 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
+[#if !config["mysql.slave.replicate_do_db"]??            
]#[/#if]replicate-do-db             = ${config["mysql.slave.replicate_do_db"]!}
+[#if !config["mysql.slave.replicate_ignore_db"]??        
]#[/#if]replicate-ignore-db         = 
${config["mysql.slave.replicate_ignore_db"]!}
+[#if !config["mysql.slave.replicate_do_table"]??         
]#[/#if]replicate-do-table          = 
${config["mysql.slave.replicate_do_table"]!}
+[#if !config["mysql.slave.replicate_ignore_table"]??     
]#[/#if]replicate-ignore-table      = 
${config["mysql.slave.replicate_ignore_table"]!}
+[#if !config["mysql.slave.replicate_wild_do_table"]??    
]#[/#if]replicate-wild-do-table     = 
${config["mysql.slave.replicate_wild_do_table"]!}
+[#if 
!config["mysql.slave.replicate_wild_ignore_table"]??]#[/#if]replicate-wild-ignore-table
 = ${config["mysql.slave.replicate_wild_ignore_table"]!}
+
+# Custom configuration options
+${driver.mySqlServerOptionsString}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ac1a7c09/software/database/src/main/resources/org/apache/brooklyn/entity/database/postgresql/postgresql.conf
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/postgresql/postgresql.conf
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/postgresql/postgresql.conf
new file mode 100644
index 0000000..b6234c9
--- /dev/null
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/postgresql/postgresql.conf
@@ -0,0 +1,513 @@
+[#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/incubator-brooklyn/blob/ac1a7c09/software/database/src/main/resources/org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf
----------------------------------------------------------------------
diff --git 
a/software/database/src/main/resources/org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf
 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf
new file mode 100644
index 0000000..12fed6f
--- /dev/null
+++ 
b/software/database/src/main/resources/org/apache/brooklyn/entity/database/rubyrep/rubyrep.conf
@@ -0,0 +1,28 @@
+[#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/incubator-brooklyn/blob/ac1a7c09/software/database/src/test/java/brooklyn/entity/database/VogellaExampleAccess.java
----------------------------------------------------------------------
diff --git 
a/software/database/src/test/java/brooklyn/entity/database/VogellaExampleAccess.java
 
b/software/database/src/test/java/brooklyn/entity/database/VogellaExampleAccess.java
deleted file mode 100644
index 4916c7c..0000000
--- 
a/software/database/src/test/java/brooklyn/entity/database/VogellaExampleAccess.java
+++ /dev/null
@@ -1,161 +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 brooklyn.entity.database;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.collect.Lists;
-
-import java.sql.*;
-import java.util.List;
-
-/**
- * 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 {
-        List<List<String>> results = Lists.newArrayList();
-        // Result set get the result of the SQL query
-        ResultSet resultSet = statement.executeQuery("SELECT myuser, webpage, 
datum, summary, COMMENTS from COMMENTS");
-        // 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();
-    }
-
-    // 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.info("The columns in the table are: ");
-
-        log.info("Table: " + resultSet.getMetaData().getTableName(1));
-        for (int i = 1; i <= resultSet.getMetaData().getColumnCount(); i++) {
-            log.info("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.info("User: " + user);
-            log.info("Website: " + website);
-            log.info("Summary: " + summary);
-            log.info("Date: " + date);
-            log.info("Comment: " + comment);
-        }
-    }
-
-    // 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/incubator-brooklyn/blob/ac1a7c09/software/database/src/test/java/brooklyn/entity/database/crate/CrateNodeIntegrationTest.java
----------------------------------------------------------------------
diff --git 
a/software/database/src/test/java/brooklyn/entity/database/crate/CrateNodeIntegrationTest.java
 
b/software/database/src/test/java/brooklyn/entity/database/crate/CrateNodeIntegrationTest.java
deleted file mode 100644
index 3439217..0000000
--- 
a/software/database/src/test/java/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 brooklyn.entity.database.crate;
-
-import static org.testng.Assert.assertFalse;
-
-import org.apache.brooklyn.api.entity.proxying.EntitySpec;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.test.entity.TestApplication;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-import brooklyn.entity.basic.ApplicationBuilder;
-import brooklyn.entity.basic.Entities;
-import brooklyn.entity.trait.Startable;
-import org.apache.brooklyn.location.basic.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/incubator-brooklyn/blob/ac1a7c09/software/database/src/test/java/brooklyn/entity/database/mariadb/MariaDbIntegrationTest.java
----------------------------------------------------------------------
diff --git 
a/software/database/src/test/java/brooklyn/entity/database/mariadb/MariaDbIntegrationTest.java
 
b/software/database/src/test/java/brooklyn/entity/database/mariadb/MariaDbIntegrationTest.java
deleted file mode 100644
index 1dc25df..0000000
--- 
a/software/database/src/test/java/brooklyn/entity/database/mariadb/MariaDbIntegrationTest.java
+++ /dev/null
@@ -1,127 +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 brooklyn.entity.database.mariadb;
-
-import java.io.File;
-import java.net.InetAddress;
-
-import org.apache.brooklyn.api.entity.proxying.EntitySpec;
-import org.apache.brooklyn.api.management.ManagementContext;
-import org.apache.brooklyn.core.management.internal.LocalManagementContext;
-import org.apache.brooklyn.test.entity.TestApplication;
-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 brooklyn.config.BrooklynProperties;
-import brooklyn.entity.basic.ApplicationBuilder;
-import brooklyn.entity.basic.Entities;
-import brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import brooklyn.entity.database.VogellaExampleAccess;
-
-import org.apache.brooklyn.location.basic.LocalhostMachineProvisioningLocation;
-
-import brooklyn.util.collections.MutableMap;
-import brooklyn.util.text.Strings;
-
-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', 
'[email protected]','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();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ac1a7c09/software/database/src/test/java/brooklyn/entity/database/mariadb/MariaDbLiveEc2Test.java
----------------------------------------------------------------------
diff --git 
a/software/database/src/test/java/brooklyn/entity/database/mariadb/MariaDbLiveEc2Test.java
 
b/software/database/src/test/java/brooklyn/entity/database/mariadb/MariaDbLiveEc2Test.java
deleted file mode 100644
index a860f1c..0000000
--- 
a/software/database/src/test/java/brooklyn/entity/database/mariadb/MariaDbLiveEc2Test.java
+++ /dev/null
@@ -1,57 +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 brooklyn.entity.database.mariadb;
-
-import org.apache.brooklyn.api.entity.proxying.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.testng.annotations.Test;
-
-import brooklyn.entity.AbstractEc2LiveTest;
-import brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import brooklyn.entity.database.VogellaExampleAccess;
-
-import org.apache.brooklyn.location.jclouds.JcloudsLocation;
-
-import com.google.common.collect.ImmutableList;
-
-@Test(groups = { "Live" })
-public class MariaDbLiveEc2Test extends AbstractEc2LiveTest {
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        // TODO For some CentOS VMs (e.g. in AWS 6.3, us-east-1/ami-a96b01c0), 
currently need to turn off iptables unfortunately.
-        // Should really just open the ports in iptables.
-        MariaDbNode mariadb = 
app.createAndManageChild(EntitySpec.create(MariaDbNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, 
MariaDbIntegrationTest.CREATION_SCRIPT)
-                
.configure(MariaDbNode.PROVISIONING_PROPERTIES.subKey(JcloudsLocation.STOP_IPTABLES.getName()),
 true));
-
-        app.start(ImmutableList.of(loc));
-
-        new VogellaExampleAccess("com.mysql.jdbc.Driver", 
mariadb.getAttribute(DatastoreCommon.DATASTORE_URL)).readModifyAndRevertDataBase();
-    }
-
-    @Override
-    @Test(enabled=false, groups = "Live")
-    public void test_Debian_7_2() throws Exception { } // Disabled because 
MariaDB not available
-
-    @Test(enabled=false)
-    public void testDummy() {} // Convince testng IDE integration that this 
really does have test methods  
-
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ac1a7c09/software/database/src/test/java/brooklyn/entity/database/mariadb/MariaDbLiveRackspaceTest.java
----------------------------------------------------------------------
diff --git 
a/software/database/src/test/java/brooklyn/entity/database/mariadb/MariaDbLiveRackspaceTest.java
 
b/software/database/src/test/java/brooklyn/entity/database/mariadb/MariaDbLiveRackspaceTest.java
deleted file mode 100644
index e3c617c..0000000
--- 
a/software/database/src/test/java/brooklyn/entity/database/mariadb/MariaDbLiveRackspaceTest.java
+++ /dev/null
@@ -1,104 +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 brooklyn.entity.database.mariadb;
-
-import java.util.Arrays;
-
-import org.apache.brooklyn.api.entity.proxying.EntitySpec;
-import org.testng.annotations.Test;
-
-import brooklyn.entity.database.DatastoreMixins.DatastoreCommon;
-import brooklyn.entity.database.VogellaExampleAccess;
-import org.apache.brooklyn.location.basic.SshMachineLocation;
-import org.apache.brooklyn.location.jclouds.JcloudsLocation;
-import brooklyn.util.net.Protocol;
-import brooklyn.util.ssh.IptablesCommands;
-import brooklyn.util.ssh.IptablesCommands.Chain;
-import brooklyn.util.ssh.IptablesCommands.Policy;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * The MariaDbLiveTest installs MariaDb on various operating systems like 
Ubuntu, CentOS, Red Hat etc. To make sure that
- * MariaDb works like expected on these Operating Systems.
- */
-public class MariaDbLiveRackspaceTest extends MariaDbIntegrationTest {
-    @Test(groups = {"Live"})
-    public void test_Debian_6() throws Exception {
-        test("Debian 6");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_Ubuntu_10_0() throws Exception {
-        test("Ubuntu 10.0");
-    }
-
-    @Test(groups = {"Live", "Live-sanity"})
-    public void test_Ubuntu_12_0() throws Exception {
-        test("Ubuntu 12.0");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_Ubuntu_13() throws Exception {
-        test("Ubuntu 13");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_CentOS_6() throws Exception {
-        test("CentOS 6");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_CentOS_5() throws Exception {
-        test("CentOS 5");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_Fedora() throws Exception {
-        test("Fedora ");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_Red_Hat_Enterprise_Linux_6() throws Exception {
-        test("Red Hat Enterprise Linux 6");
-    }
-
-    @Test(groups = {"Live"})
-    public void test_localhost() throws Exception {
-        super.test_localhost();
-    }
-
-    public void test(String osRegex) throws Exception {
-        MariaDbNode mariadb = 
tapp.createAndManageChild(EntitySpec.create(MariaDbNode.class)
-                .configure(DatastoreCommon.CREATION_SCRIPT_CONTENTS, 
CREATION_SCRIPT));
-
-        
brooklynProperties.put("brooklyn.location.jclouds.rackspace-cloudservers-uk.imageNameRegex",
 osRegex);
-        
brooklynProperties.remove("brooklyn.location.jclouds.rackspace-cloudservers-uk.image-id");
-        
brooklynProperties.remove("brooklyn.location.jclouds.rackspace-cloudservers-uk.imageId");
-        
brooklynProperties.put("brooklyn.location.jclouds.rackspace-cloudservers-uk.inboundPorts",
 Arrays.asList(22, 3306));
-        JcloudsLocation jcloudsLocation = (JcloudsLocation) 
managementContext.getLocationRegistry().resolve("jclouds:rackspace-cloudservers-uk");
-
-        tapp.start(ImmutableList.of(jcloudsLocation));
-
-        SshMachineLocation l = (SshMachineLocation) 
mariadb.getLocations().iterator().next();
-        l.execCommands("add iptables rule", 
ImmutableList.of(IptablesCommands.insertIptablesRule(Chain.INPUT, Protocol.TCP, 
3306, Policy.ACCEPT)));
-
-        new VogellaExampleAccess("com.mysql.jdbc.Driver", 
mariadb.getAttribute(DatastoreCommon.DATASTORE_URL)).readModifyAndRevertDataBase();
-    } 
-}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ac1a7c09/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterIntegrationTest.java
----------------------------------------------------------------------
diff --git 
a/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterIntegrationTest.java
 
b/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterIntegrationTest.java
deleted file mode 100644
index 3bc12eb..0000000
--- 
a/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterIntegrationTest.java
+++ /dev/null
@@ -1,44 +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 brooklyn.entity.database.mysql;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.Iterables;
-
-import brooklyn.entity.BrooklynAppLiveTestSupport;
-import brooklyn.util.os.Os;
-
-public class MySqlClusterIntegrationTest extends BrooklynAppLiveTestSupport {
-
-    @Test(groups = {"Integration"})
-    public void test_localhost() throws Exception {
-        try {
-            MySqlClusterTestHelper.test(app, 
mgmt.getLocationRegistry().resolve("localhost"));
-        } finally {
-            for (Entity member : 
Iterables.getOnlyElement(app.getChildren()).getChildren()) {
-                String runDir = member.getAttribute(MySqlNode.RUN_DIR);
-                if (runDir != null) {
-                    Os.deleteRecursively(runDir);
-                }
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ac1a7c09/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterLiveEc2Test.java
----------------------------------------------------------------------
diff --git 
a/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterLiveEc2Test.java
 
b/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterLiveEc2Test.java
deleted file mode 100644
index 477f81b..0000000
--- 
a/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterLiveEc2Test.java
+++ /dev/null
@@ -1,43 +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 brooklyn.entity.database.mysql;
-
-import org.testng.annotations.Test;
-
-import brooklyn.entity.AbstractEc2LiveTest;
-
-import org.apache.brooklyn.api.location.Location;
-
-@Test(groups = { "Live" })
-public class MySqlClusterLiveEc2Test extends AbstractEc2LiveTest {
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        MySqlClusterTestHelper.test(app, loc);
-    }
-
-    @Override
-    @Test(enabled=false, groups = "Live")
-    public void test_Debian_7_2() throws Exception { } // Disabled because 
MySQl not available
-
-    @Test(enabled=false)
-    public void testDummy() {} // Convince testng IDE integration that this 
really does have test methods  
-
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ac1a7c09/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterLiveSoftlayerTest.java
----------------------------------------------------------------------
diff --git 
a/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterLiveSoftlayerTest.java
 
b/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterLiveSoftlayerTest.java
deleted file mode 100644
index 6f1556c..0000000
--- 
a/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterLiveSoftlayerTest.java
+++ /dev/null
@@ -1,39 +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 brooklyn.entity.database.mysql;
-
-import org.testng.annotations.Test;
-
-import brooklyn.entity.AbstractSoftlayerLiveTest;
-
-import org.apache.brooklyn.api.location.Location;
-
-@Test(groups = { "Live" })
-public class MySqlClusterLiveSoftlayerTest extends AbstractSoftlayerLiveTest {
-
-    @Override
-    protected void doTest(Location loc) throws Exception {
-        MySqlClusterTestHelper.test(app, loc);
-    }
-
-    @Test(enabled=false)
-    public void testDummy() {} // Convince testng IDE integration that this 
really does have test methods  
-
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ac1a7c09/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterTestHelper.java
----------------------------------------------------------------------
diff --git 
a/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterTestHelper.java
 
b/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterTestHelper.java
deleted file mode 100644
index 739d818..0000000
--- 
a/software/database/src/test/java/brooklyn/entity/database/mysql/MySqlClusterTestHelper.java
+++ /dev/null
@@ -1,115 +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 brooklyn.entity.database.mysql;
-
-import static org.testng.Assert.assertEquals;
-
-import java.util.List;
-
-import org.apache.brooklyn.api.entity.proxying.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.test.entity.TestApplication;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Joiner;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
-
-import brooklyn.entity.database.VogellaExampleAccess;
-import brooklyn.test.Asserts;
-import brooklyn.util.collections.MutableMap;
-import brooklyn.util.exceptions.Exceptions;
-
-/**
- * Runs a slightly modified version of the popular Vogella MySQL tutorial,
- * from
- * http://www.vogella.de/articles/MySQLJava/article.html
- */
-public class MySqlClusterTestHelper {
-    public static final Logger log = 
LoggerFactory.getLogger(MySqlClusterTestHelper.class);
-
-    // From http://www.vogella.de/articles/MySQLJava/article.html
-    public static final String CREATION_SCRIPT = 
Joiner.on("\n").join(ImmutableList.of(
-            "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'@'%';",
-            "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', 
'[email protected]','http://www.vogella.de', '2009-09-14 10:33:11', 
'Summary','My first comment' );"
-            ));
-
-    public static void test(TestApplication app, Location location) throws 
Exception {
-        MySqlCluster mysql = 
app.createAndManageChild(EntitySpec.create(MySqlCluster.class)
-                .configure(MySqlCluster.INITIAL_SIZE, 2)
-                .configure(MySqlNode.MYSQL_SERVER_CONF, MutableMap.<String, 
Object>of("skip-name-resolve","")));
-
-        app.start(ImmutableList.of(location));
-        log.info("MySQL started");
-        MySqlNode masterEntity = (MySqlNode) 
mysql.getAttribute(MySqlCluster.FIRST);
-        masterEntity.invoke(MySqlNode.EXECUTE_SCRIPT, 
ImmutableMap.of("commands", CREATION_SCRIPT)).asTask().getUnchecked();
-
-        VogellaExampleAccess masterDb = new 
VogellaExampleAccess("com.mysql.jdbc.Driver", 
mysql.getAttribute(MySqlNode.DATASTORE_URL));
-        VogellaExampleAccess slaveDb = new 
VogellaExampleAccess("com.mysql.jdbc.Driver", 
Iterables.getOnlyElement(mysql.getAttribute(MySqlCluster.SLAVE_DATASTORE_URL_LIST)));
-        masterDb.connect();
-        slaveDb.connect();
-
-        assertSlave(masterDb, slaveDb, 1);
-        masterDb.modifyDataBase();
-        assertSlave(masterDb, slaveDb, 2);
-        masterDb.revertDatabase();
-        assertSlave(masterDb, slaveDb, 1);
-
-        masterDb.close();
-        slaveDb.close();
-
-        log.info("Ran vogella MySQL example -- SUCCESS");
-    }
-
-    private static void assertSlave(final VogellaExampleAccess masterDb, final 
VogellaExampleAccess slaveDb, final int recordCnt) throws Exception {
-        Asserts.succeedsEventually(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    List<List<String>> masterResult = masterDb.readDataBase();
-                    assertEquals(masterResult.size(), recordCnt);
-                    assertEquals(masterResult, slaveDb.readDataBase());
-                } catch (Exception e) {
-                    throw Exceptions.propagate(e);
-                }
-            }
-        });
-    }
-}

Reply via email to