brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [48/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:24 GMT
http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/SingleWebServerExample.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/SingleWebServerExample.java b/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/SingleWebServerExample.java
deleted file mode 100644
index cec7a7e..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/SingleWebServerExample.java
+++ /dev/null
@@ -1,66 +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.demo;
-
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Attributes;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.entity.webapp.JavaWebAppService;
-import org.apache.brooklyn.entity.webapp.jboss.JBoss7Server;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-/** This example starts one web app on 8080, waits for a keypress, then stops it. */
-public class SingleWebServerExample extends AbstractApplication {
-
-    public static final Logger LOG = LoggerFactory.getLogger(SingleWebServerExample.class);
-
-    private static final String WAR_PATH = "classpath://hello-world-webapp.war";
-
-    @Override
-    public void initApp() {
-        addChild(EntitySpec.create(JBoss7Server.class)
-                .configure(JavaWebAppService.ROOT_WAR, WAR_PATH)
-                .configure(Attributes.HTTP_PORT, PortRanges.fromString("8080+")));
-    }
-
-    // Shows how to use ApplicationBuilder without sub-classing, but for CLI usage one should sub-class
-    public static void main(String[] argv) throws Exception {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", "localhost");
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                .application(EntitySpec.create(StartableApplication.class, SingleWebServerExample.class).displayName("Brooklyn WebApp example"))
-                .webconsolePort(port)
-                .location(location)
-                .start();
-         
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExample.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExample.java b/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExample.java
deleted file mode 100644
index 601537a..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExample.java
+++ /dev/null
@@ -1,122 +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.demo;
-
-import static org.apache.brooklyn.core.sensor.DependentConfiguration.attributeWhenReady;
-import static org.apache.brooklyn.core.sensor.DependentConfiguration.formatString;
-import static org.apache.brooklyn.entity.java.JavaEntityMethods.javaSysProp;
-
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.entity.database.mysql.MySqlNode;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.sensor.AttributeSensor;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.DynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.JavaWebAppService;
-import org.apache.brooklyn.entity.webapp.WebAppService;
-import org.apache.brooklyn.entity.webapp.WebAppServiceConstants;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy;
-import org.apache.brooklyn.policy.enricher.HttpLatencyDetector;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-
-/**
- * Launches a 3-tier app with nginx, clustered jboss, and mysql.
- **/
-public class WebClusterDatabaseExample extends AbstractApplication {
-    
-    public static final Logger LOG = LoggerFactory.getLogger(WebClusterDatabaseExample.class);
-    
-    public static final String WAR_PATH = "classpath://hello-world-sql-webapp.war";
-    
-    public static final String DB_SETUP_SQL_URL = "classpath://visitors-creation-script.sql";
-    
-    public static final String DB_TABLE = "visitors";
-    public static final String DB_USERNAME = "brooklyn";
-    public static final String DB_PASSWORD = "br00k11n";
-    
-    public static final AttributeSensor<Integer> APPSERVERS_COUNT = Sensors.newIntegerSensor( 
-            "appservers.count", "Number of app servers deployed");
-
-    @Override
-    public void initApp() {
-        MySqlNode mysql = addChild(EntitySpec.create(MySqlNode.class)
-                .configure("creationScriptUrl", DB_SETUP_SQL_URL));
-        
-        ControlledDynamicWebAppCluster web = addChild(EntitySpec.create(ControlledDynamicWebAppCluster.class)
-                .configure(WebAppService.HTTP_PORT, PortRanges.fromString("8080+"))
-                .configure(JavaWebAppService.ROOT_WAR, WAR_PATH)
-                .configure(javaSysProp("brooklyn.example.db.url"), 
-                        formatString("jdbc:%s%s?user=%s\\&password=%s", 
-                                attributeWhenReady(mysql, MySqlNode.DATASTORE_URL), 
-                                DB_TABLE, DB_USERNAME, DB_PASSWORD)) );
-
-        web.enrichers().add(HttpLatencyDetector.builder().
-                url(ControlledDynamicWebAppCluster.ROOT_URL).
-                rollup(10, TimeUnit.SECONDS).
-                build());
-
-        // simple scaling policy
-        web.getCluster().policies().add(AutoScalerPolicy.builder().
-                metric(DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW_PER_NODE).
-                metricRange(10, 100).
-                sizeRange(1, 5).
-                build());
-
-        // expose some KPI's
-        enrichers().add(Enrichers.builder()
-                .propagating(WebAppServiceConstants.ROOT_URL,
-                        DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW,
-                        HttpLatencyDetector.REQUEST_LATENCY_IN_SECONDS_IN_WINDOW)
-                .from(web)
-                .build());
-
-        enrichers().add(Enrichers.builder()
-                .propagating(ImmutableMap.of(DynamicWebAppCluster.GROUP_SIZE, APPSERVERS_COUNT))
-                .from(web)
-                .build());
-    }
-
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", "localhost");
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                .application(EntitySpec.create(StartableApplication.class, WebClusterDatabaseExample.class).displayName("Brooklyn WebApp Cluster with Database example"))
-                .webconsolePort(port)
-                .location(location)
-                .start();
-         
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExampleApp.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExampleApp.java b/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExampleApp.java
deleted file mode 100644
index 5c58fee..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExampleApp.java
+++ /dev/null
@@ -1,174 +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.demo;
-
-import static org.apache.brooklyn.core.sensor.DependentConfiguration.attributeWhenReady;
-import static org.apache.brooklyn.core.sensor.DependentConfiguration.formatString;
-
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.catalog.CatalogConfig;
-import org.apache.brooklyn.api.entity.EntitySpec;
-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.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.Sensors;
-import org.apache.brooklyn.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.DynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.JavaWebAppService;
-import org.apache.brooklyn.entity.webapp.WebAppService;
-import org.apache.brooklyn.entity.webapp.WebAppServiceConstants;
-import org.apache.brooklyn.entity.database.mysql.MySqlNode;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.java.JavaEntityMethods;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy;
-import org.apache.brooklyn.policy.enricher.HttpLatencyDetector;
-import org.apache.brooklyn.util.CommandLineUtil;
-import org.apache.brooklyn.util.core.BrooklynMavenArtifacts;
-import org.apache.brooklyn.util.core.ResourceUtils;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
-
-/**
- * Launches a 3-tier app with nginx, clustered jboss, and mysql.
- * <p>
- * Includes some advanced features such as KPI / derived sensors,
- * and annotations for use in a catalog.
- * <p>
- * This variant also increases minimum size to 2.  
- * Note the policy min size must have the same value,
- * otherwise it fights with cluster set up trying to reduce the cluster size!
- **/
-@Catalog(name="Elastic Java Web + DB",
-    description="Deploys a WAR to a load-balanced elastic Java AppServer cluster, " +
-            "with an auto-scaling policy, " +
-            "wired to a database initialized with the provided SQL; " +
-            "defaults to a 'Hello World' chatroom app.",
-    iconUrl="classpath://brooklyn/demo/glossy-3d-blue-web-icon.png")
-public class WebClusterDatabaseExampleApp extends AbstractApplication implements StartableApplication {
-    
-    public static final Logger LOG = LoggerFactory.getLogger(WebClusterDatabaseExampleApp.class);
-    
-    public static final String DEFAULT_LOCATION = "localhost";
-
-    public static final String DEFAULT_WAR_PATH = ResourceUtils.create(WebClusterDatabaseExampleApp.class)
-            // take this war, from the classpath, or via maven if not on the classpath
-            .firstAvailableUrl(
-                    "classpath://hello-world-sql-webapp.war",
-                    BrooklynMavenArtifacts.localUrl("example", "brooklyn-example-hello-world-sql-webapp", "war"))
-            .or("classpath://hello-world-sql-webapp.war");
-    
-    @CatalogConfig(label="WAR (URL)", priority=2)
-    public static final ConfigKey<String> WAR_PATH = ConfigKeys.newConfigKey(
-        "app.war", "URL to the application archive which should be deployed", 
-        DEFAULT_WAR_PATH);    
-
-    // TODO to expose in catalog we need to let the keystore url be specified (not hard)
-    // and also confirm that this works for nginx (might be a bit fiddly);
-    // booleans in the gui are working (With checkbox)
-    @CatalogConfig(label="HTTPS")
-    public static final ConfigKey<Boolean> USE_HTTPS = ConfigKeys.newConfigKey(
-            "app.https", "Whether the application should use HTTPS only or just HTTP only (default)", false);
-    
-    public static final String DEFAULT_DB_SETUP_SQL_URL = "classpath://visitors-creation-script.sql";
-    
-    @CatalogConfig(label="DB Setup SQL (URL)", priority=1)
-    public static final ConfigKey<String> DB_SETUP_SQL_URL = ConfigKeys.newConfigKey(
-        "app.db_sql", "URL to the SQL script to set up the database", 
-        DEFAULT_DB_SETUP_SQL_URL);
-    
-    public static final String DB_TABLE = "visitors";
-    public static final String DB_USERNAME = "brooklyn";
-    public static final String DB_PASSWORD = "br00k11n";
-    
-    public static final AttributeSensor<Integer> APPSERVERS_COUNT = Sensors.newIntegerSensor( 
-            "appservers.count", "Number of app servers deployed");
-    public static final AttributeSensor<Double> REQUESTS_PER_SECOND_IN_WINDOW = 
-            WebAppServiceConstants.REQUESTS_PER_SECOND_IN_WINDOW;
-    public static final AttributeSensor<String> ROOT_URL = WebAppServiceConstants.ROOT_URL;
-
-    @Override
-    public void initApp() {
-        MySqlNode mysql = addChild(
-                EntitySpec.create(MySqlNode.class)
-                        .configure(MySqlNode.CREATION_SCRIPT_URL, Entities.getRequiredUrlConfig(this, DB_SETUP_SQL_URL)));
-
-        ControlledDynamicWebAppCluster web = addChild(
-                EntitySpec.create(ControlledDynamicWebAppCluster.class)
-                        .configure(WebAppService.HTTP_PORT, PortRanges.fromString("8080+"))
-                        // to specify a diferrent appserver:
-//                        .configure(ControlledDynamicWebAppCluster.MEMBER_SPEC, EntitySpec.create(TomcatServer.class))
-                        .configure(JavaWebAppService.ROOT_WAR, Entities.getRequiredUrlConfig(this, WAR_PATH))
-                        .configure(JavaEntityMethods.javaSysProp("brooklyn.example.db.url"), 
-                                formatString("jdbc:%s%s?user=%s\\&password=%s", 
-                                        attributeWhenReady(mysql, MySqlNode.DATASTORE_URL), DB_TABLE, DB_USERNAME, DB_PASSWORD))
-                        .configure(DynamicCluster.INITIAL_SIZE, 2)
-                        .configure(WebAppService.ENABLED_PROTOCOLS, ImmutableSet.of(getConfig(USE_HTTPS) ? "https" : "http")) );
-
-        web.enrichers().add(HttpLatencyDetector.builder()
-                .url(ROOT_URL)
-                .rollup(10, TimeUnit.SECONDS)
-                .build());
-        
-        web.getCluster().policies().add(AutoScalerPolicy.builder()
-                .metric(DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW_PER_NODE)
-                .metricRange(10, 100)
-                .sizeRange(2, 5)
-                .build());
-
-        enrichers().add(Enrichers.builder()
-                .propagating(WebAppServiceConstants.ROOT_URL,
-                        DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW,
-                        HttpLatencyDetector.REQUEST_LATENCY_IN_SECONDS_IN_WINDOW)
-                .from(web)
-                .build());
-
-        enrichers().add(Enrichers.builder()
-                .propagating(ImmutableMap.of(DynamicWebAppCluster.GROUP_SIZE, APPSERVERS_COUNT))
-                .from(web)
-                .build());
-    }
-    
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", DEFAULT_LOCATION);
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                 .application(EntitySpec.create(StartableApplication.class, WebClusterDatabaseExampleApp.class)
-                         .displayName("Brooklyn WebApp Cluster with Database example"))
-                 .webconsolePort(port)
-                 .location(location)
-                 .start();
-             
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterExample.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterExample.java b/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterExample.java
deleted file mode 100644
index e5a1ae2..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterExample.java
+++ /dev/null
@@ -1,95 +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.demo;
-
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.internal.BrooklynProperties;
-import org.apache.brooklyn.entity.proxy.nginx.NginxController;
-import org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.DynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.jboss.JBoss7Server;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-/**
- * Launches a clustered and load-balanced set of web servers.
- * Demonstrates syntax, so many of the options used here are the defaults.
- * (So the class could be much simpler, as in WebClusterExampleAlt.)
- * <p>
- * Requires: 
- * -Xmx512m -Xms128m -XX:MaxPermSize=256m
- * and brooklyn-all jar, and this jar or classes dir, on classpath. 
- **/
-public class WebClusterExample extends AbstractApplication {
-    public static final Logger LOG = LoggerFactory.getLogger(WebClusterExample.class);
-    
-    static BrooklynProperties config = BrooklynProperties.Factory.newDefault();
-
-    public static final String DEFAULT_LOCATION = "localhost";
-
-    public static final String WAR_PATH = "classpath://hello-world-webapp.war";
-
-    private NginxController nginxController;
-    private ControlledDynamicWebAppCluster web;
-    
-    @Override
-    public void initApp() {
-        nginxController = addChild(EntitySpec.create(NginxController.class)
-                //.configure("domain", "webclusterexample.brooklyn.local")
-                .configure("port", "8000+"));
-          
-        web = addChild(EntitySpec.create(ControlledDynamicWebAppCluster.class)
-                .displayName("WebApp cluster")
-                .configure(ControlledDynamicWebAppCluster.CONTROLLER, nginxController)
-                .configure(ControlledDynamicWebAppCluster.INITIAL_SIZE, 1)
-                .configure(ControlledDynamicWebAppCluster.MEMBER_SPEC, EntitySpec.create(JBoss7Server.class)
-                        .configure("httpPort", "8080+")
-                        .configure("war", WAR_PATH)));
-        
-        web.getCluster().policies().add(AutoScalerPolicy.builder()
-                .metric(DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW_PER_NODE)
-                .sizeRange(1, 5)
-                .metricRange(10, 100)
-                .build());
-    }
-    
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String location = CommandLineUtil.getCommandLineOption(args, "--location", DEFAULT_LOCATION);
-
-        // TODO Want to parse, to handle multiple locations
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                .application(EntitySpec.create(WebClusterExample.class).displayName("Brooklyn WebApp Cluster example"))
-                .webconsolePort(port)
-                .location(location)
-                .start();
-         
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/resources/logback-custom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/resources/logback-custom.xml b/brooklyn-library/examples/simple-web-cluster/src/main/resources/logback-custom.xml
deleted file mode 100644
index 02a8a82..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/resources/logback-custom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<included>
-
-    <!--
-     
-        this file demonstrates how to customise logging, base on the placeholder 
-        logging-custom.xml included in brooklyn-logging-includes.
-
-    -->        
-  
-    <!-- include this category -->
-    <logger name="org.apache.brooklyn.demo" level="DEBUG"/>
-    
-    <!-- log to simple-web-cluster.log -->
-    <property name="logging.basename" scope="context" value="brooklyn-simple-web-cluster" />
-
-  <!--
-  
-       more customisation is possible by overriding the default-included
-       configuration files, such as logback-main.xml (entirely replacing configuration),
-       or e.g. brooklyn/logback-appender-file.xml (replacing the FILE logger config).
-       
-  -->
-
-</included>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/glossy-3d-blue-web-icon.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/glossy-3d-blue-web-icon.png b/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/glossy-3d-blue-web-icon.png
deleted file mode 100644
index 542a1de..0000000
Binary files a/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/glossy-3d-blue-web-icon.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-riak-todo.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-riak-todo.yaml b/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-riak-todo.yaml
deleted file mode 100644
index 958d29d..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-riak-todo.yaml
+++ /dev/null
@@ -1,46 +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.
-
-name: "Node.JS Todo Application"
-origin: "https://github.com/amirrajan/nodejs-todo/"
-location:
-  jclouds:aws-ec2:us-west-1:
-    imageId: us-west-1/ami-c33cdd87
-services:
-- type: org.apache.brooklyn.entity.nosql.riak.RiakCluster
-  initialSize: 2
-  id: mycluster
-  brooklyn.config:
-    provisioning.properties:
-      osFamily: centos
-      minCores: 4
-      minRam: 2048
-- type: org.apache.brooklyn.entity.webapp.nodejs.NodeJsWebAppService
-  id: nodejs-riak1
-  name: "Node.JS"
-  brooklyn.config:
-    gitRepoUrl:
-      "https://github.com/bostko/nodejs-todo.git"
-    appFileName: server.js
-    appName: nodejs-todo
-    nodePackages:
-    - basho-riak-client
-    env:
-      NODE_ENV: production
-      RIAK_NODES: >
-        $brooklyn:component("mycluster").attributeWhenReady("riak.cluster.nodeListPbPort")
-    launch.latch: $brooklyn:component("mycluster").attributeWhenReady("service.isUp")
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-todo.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-todo.yaml b/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-todo.yaml
deleted file mode 100644
index 6aab1db..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/resources/org/apache/brooklyn/demo/nodejs-todo.yaml
+++ /dev/null
@@ -1,53 +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.
-
-id: nodejs-todo-application
-name: "Node.JS Todo Application"
-origin: "https://github.com/amirrajan/nodejs-todo/"
-locations:
-- jclouds:softlayer:ams01
-services:
-- type: org.apache.brooklyn.entity.nosql.redis.RedisStore
-  id: redis
-  name: "Redis"
-- type: org.apache.brooklyn.entity.webapp.nodejs.NodeJsWebAppService
-  id: nodejs
-  name: "Node.JS"
-  brooklyn.config:
-    gitRepoUrl:
-      "https://github.com/grkvlt/nodejs-todo/"
-    appFileName: server.js
-    appName: nodejs-todo
-    nodePackages:
-    - express
-    - ejs
-    - jasmine-node
-    - underscore
-    - method-override
-    - cookie-parser
-    - express-session
-    - body-parser
-    - cookie-session
-    - redis
-    - redis-url
-    - connect
-    env:
-      REDISTOGO_URL: >
-        $brooklyn:formatString("redis://%s:%d/",
-          component("redis").attributeWhenReady("host.subnet.hostname"),
-          component("redis").attributeWhenReady("redis.port"))
-    launch.latch: $brooklyn:component("redis").attributeWhenReady("service.isUp")
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/resources/visitors-creation-script.sql
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/resources/visitors-creation-script.sql b/brooklyn-library/examples/simple-web-cluster/src/main/resources/visitors-creation-script.sql
deleted file mode 100644
index 2422f8f..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/resources/visitors-creation-script.sql
+++ /dev/null
@@ -1,41 +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.
---
-create database visitors;
-use visitors;
-
-# not necessary to create user if we grant (and not supported in some dialects)
-# create user 'brooklyn' identified by 'br00k11n';
-
-grant usage on *.* to 'brooklyn'@'%' identified by 'br00k11n';
-
-# ''@localhost is sometimes set up, overriding brooklyn@'%', so do a second explicit grant
-grant usage on *.* to 'brooklyn'@'localhost' identified by 'br00k11n';
-
-grant all privileges on visitors.* to 'brooklyn'@'%';
-
-flush privileges;
-
-CREATE TABLE MESSAGES (
-        id BIGINT NOT NULL AUTO_INCREMENT,
-        NAME VARCHAR(30) NOT NULL,
-        MESSAGE VARCHAR(400) NOT NULL,
-        PRIMARY KEY (ID)
-    );
-
-INSERT INTO MESSAGES values (default, 'Isaac Asimov', 'I grew up in Brooklyn' );

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/test/java/org/apache/brooklyn/demo/RebindWebClusterDatabaseExampleAppIntegrationTest.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/test/java/org/apache/brooklyn/demo/RebindWebClusterDatabaseExampleAppIntegrationTest.java b/brooklyn-library/examples/simple-web-cluster/src/test/java/org/apache/brooklyn/demo/RebindWebClusterDatabaseExampleAppIntegrationTest.java
deleted file mode 100644
index 349c268..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/test/java/org/apache/brooklyn/demo/RebindWebClusterDatabaseExampleAppIntegrationTest.java
+++ /dev/null
@@ -1,204 +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.demo;
-
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.location.Location;
-import org.apache.brooklyn.api.sensor.Enricher;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.mgmt.rebind.RebindOptions;
-import org.apache.brooklyn.core.mgmt.rebind.RebindTestFixture;
-import org.apache.brooklyn.enricher.stock.Propagator;
-import org.apache.brooklyn.entity.proxy.nginx.NginxController;
-import org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.DynamicWebAppCluster;
-import org.apache.brooklyn.entity.webapp.tomcat.Tomcat8Server;
-import org.apache.brooklyn.test.Asserts;
-import org.apache.brooklyn.test.EntityTestUtils;
-import org.apache.brooklyn.test.HttpTestUtils;
-import org.apache.brooklyn.test.WebAppMonitor;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.time.Duration;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-import org.apache.brooklyn.entity.database.mysql.MySqlNode;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.java.JavaEntityMethods;
-import org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy;
-import org.apache.brooklyn.policy.enricher.HttpLatencyDetector;
-
-import com.google.common.base.Predicates;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Sets;
-
-
-public class RebindWebClusterDatabaseExampleAppIntegrationTest extends RebindTestFixture<StartableApplication> {
-
-    private static final Logger LOG = LoggerFactory.getLogger(RebindWebClusterDatabaseExampleAppIntegrationTest.class);
-
-    private Location origLoc;
-    private List<WebAppMonitor> webAppMonitors = new CopyOnWriteArrayList<WebAppMonitor>();
-    private ExecutorService executor;
-
-    @BeforeMethod(alwaysRun=true)
-    @Override
-    public void setUp() throws Exception {
-        super.setUp();
-        origLoc = origManagementContext.getLocationRegistry().resolve("localhost");
-        executor = Executors.newCachedThreadPool();
-        webAppMonitors.clear();
-    }
-    
-    @AfterMethod(alwaysRun=true)
-    @Override
-    public void tearDown() throws Exception {
-        for (WebAppMonitor monitor : webAppMonitors) {
-            monitor.terminate();
-        }
-        if (executor != null) executor.shutdownNow();
-        super.tearDown();
-    }
-    
-    @Override
-    protected StartableApplication createApp() {
-        StartableApplication result = origManagementContext.getEntityManager().createEntity(EntitySpec.create(StartableApplication.class)
-                .impl(WebClusterDatabaseExampleApp.class)
-                .configure(DynamicCluster.INITIAL_SIZE, 2));
-        return result;
-    }
-    
-    private WebAppMonitor newWebAppMonitor(String url, int expectedResponseCode) {
-        WebAppMonitor monitor = new WebAppMonitor(url)
-//              .delayMillis(0) FIXME Re-enable to fast polling
-                .expectedResponseCode(expectedResponseCode)
-                .logFailures(LOG);
-        webAppMonitors.add(monitor);
-        executor.execute(monitor);
-        return monitor;
-    }
-    
-    @Test(groups="Integration")
-    public void testRestoresSimpleApp() throws Exception {
-        origApp.start(ImmutableList.of(origLoc));
-        
-        assertAppFunctional(origApp);
-        
-        String clusterUrl = checkNotNull(origApp.getAttribute(WebClusterDatabaseExampleApp.ROOT_URL), "cluster url");
-        WebAppMonitor monitor = newWebAppMonitor(clusterUrl, 200);
-        
-        newApp = rebind(RebindOptions.create().terminateOrigManagementContext(true));
-        assertAppFunctional(newApp);
-
-        // expect no failures during rebind
-        monitor.assertNoFailures("hitting nginx url");
-        monitor.terminate();
-    }
-    
-    private void assertAppFunctional(StartableApplication app) throws Exception {
-        // expect standard config to (still) be set
-        assertNotNull(app.getConfig(WebClusterDatabaseExampleApp.WAR_PATH));
-        assertEquals(app.getConfig(WebClusterDatabaseExampleApp.USE_HTTPS), Boolean.FALSE);
-        assertNotNull(app.getConfig(WebClusterDatabaseExampleApp.DB_SETUP_SQL_URL));
-
-        // expect entities to be there
-        MySqlNode mysql = (MySqlNode) Iterables.find(app.getChildren(), Predicates.instanceOf(MySqlNode.class));
-        ControlledDynamicWebAppCluster web = (ControlledDynamicWebAppCluster) Iterables.find(app.getChildren(), Predicates.instanceOf(ControlledDynamicWebAppCluster.class));
-        final NginxController nginx = (NginxController) Iterables.find(web.getChildren(), Predicates.instanceOf(NginxController.class));
-        DynamicWebAppCluster webCluster = (DynamicWebAppCluster) Iterables.find(web.getChildren(), Predicates.instanceOf(DynamicWebAppCluster.class));
-        Collection<Entity> appservers = web.getMembers();
-        assertEquals(appservers.size(), 2);
-        String clusterUrl = checkNotNull(app.getAttribute(WebClusterDatabaseExampleApp.ROOT_URL), "cluster url");
-        String dbUrl = checkNotNull(mysql.getAttribute(MySqlNode.DATASTORE_URL), "database url");
-        final String expectedJdbcUrl = String.format("jdbc:%s%s?user=%s\\&password=%s", dbUrl, WebClusterDatabaseExampleApp.DB_TABLE, 
-                WebClusterDatabaseExampleApp.DB_USERNAME, WebClusterDatabaseExampleApp.DB_PASSWORD);
-
-        // expect web-app to be reachable, and wired up to database
-        HttpTestUtils.assertHttpStatusCodeEventuallyEquals(clusterUrl, 200);
-        for (Entity appserver : appservers) {
-            String appserverUrl = checkNotNull(appserver.getAttribute(Tomcat8Server.ROOT_URL), "appserver url of "+appserver);
-
-            HttpTestUtils.assertHttpStatusCodeEventuallyEquals(appserverUrl, 200);
-            assertEquals(expectedJdbcUrl, appserver.getConfig(JavaEntityMethods.javaSysProp("brooklyn.example.db.url")), "of "+appserver);
-        }
-
-        WebAppMonitor monitor = newWebAppMonitor(clusterUrl, 200);
-
-        // expect auto-scaler policy to be there, and to be functional (e.g. can trigger resize)
-        AutoScalerPolicy autoScalerPolicy = (AutoScalerPolicy) Iterables.find(webCluster.policies(), Predicates.instanceOf(AutoScalerPolicy.class));
-        
-        autoScalerPolicy.config().set(AutoScalerPolicy.MIN_POOL_SIZE, 3);
-        EntityTestUtils.assertGroupSizeEqualsEventually(web, 3);
-        final Collection<Entity> webMembersAfterGrow = web.getMembers();
-        
-        for (final Entity appserver : webMembersAfterGrow) {
-            Asserts.succeedsEventually(MutableMap.of("timeout", Duration.TWO_MINUTES), new Runnable() {
-                @Override public void run() {
-                    String appserverUrl = checkNotNull(appserver.getAttribute(Tomcat8Server.ROOT_URL), "appserver url of "+appserver);
-                    HttpTestUtils.assertHttpStatusCodeEquals(appserverUrl, 200);
-                    assertEquals(expectedJdbcUrl, appserver.getConfig(JavaEntityMethods.javaSysProp("brooklyn.example.db.url")), "of "+appserver);
-                    Asserts.assertEqualsIgnoringOrder(nginx.getAttribute(NginxController.SERVER_POOL_TARGETS).keySet(), webMembersAfterGrow);
-                }});
-        }
-
-        // expect enrichers to be there
-        Iterables.find(web.enrichers(), Predicates.instanceOf(HttpLatencyDetector.class));
-        Iterable<Enricher> propagatorEnrichers = Iterables.filter(web.enrichers(), Predicates.instanceOf(Propagator.class));
-        assertEquals(Iterables.size(propagatorEnrichers), 3, "propagatorEnrichers="+propagatorEnrichers);
-
-        // Check we see evidence of the enrichers having an effect.
-        // Relying on WebAppMonitor to stimulate activity.
-        EntityTestUtils.assertAttributeEqualsEventually(app, WebClusterDatabaseExampleApp.APPSERVERS_COUNT, 3);
-        EntityTestUtils.assertAttributeChangesEventually(web, DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW);
-        EntityTestUtils.assertAttributeChangesEventually(app, DynamicWebAppCluster.REQUESTS_PER_SECOND_IN_WINDOW);
-        EntityTestUtils.assertAttributeChangesEventually(web, HttpLatencyDetector.REQUEST_LATENCY_IN_SECONDS_MOST_RECENT);
-        EntityTestUtils.assertAttributeChangesEventually(web, HttpLatencyDetector.REQUEST_LATENCY_IN_SECONDS_IN_WINDOW);
-
-        // Restore the web-cluster to its original size of 2
-        autoScalerPolicy.config().set(AutoScalerPolicy.MIN_POOL_SIZE, 2);
-        EntityTestUtils.assertGroupSizeEqualsEventually(web, 2);
-        
-        final Entity removedAppserver = Iterables.getOnlyElement(Sets.difference(ImmutableSet.copyOf(webMembersAfterGrow), ImmutableSet.copyOf(web.getMembers())));
-        Asserts.succeedsEventually(new Runnable() {
-            @Override public void run() {
-                assertFalse(Entities.isManaged(removedAppserver));
-            }});
-        
-        monitor.assertNoFailures("hitting nginx url");
-        monitor.terminate();
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/.gitignore
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/.gitignore b/brooklyn-library/examples/webapps/hello-world-sql/.gitignore
deleted file mode 100644
index 84c048a..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build/

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/pom.xml b/brooklyn-library/examples/webapps/hello-world-sql/pom.xml
deleted file mode 100644
index 19ff3ed..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/pom.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>brooklyn-example-hello-world-sql-webapp</artifactId>
-    <packaging>war</packaging>
-    <name>hello-world-sql-webapp Maven Webapp</name>
-  
-    <parent>
-        <groupId>org.apache.brooklyn.example</groupId>
-        <artifactId>brooklyn-examples-webapps-parent</artifactId>
-        <version>0.9.0-SNAPSHOT</version> <!-- BROOKLYN_VERSION -->
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-      <dependency>
-        <groupId>javax.servlet</groupId>
-        <artifactId>javax.servlet-api</artifactId>
-      </dependency>
-
-      <!-- The riak artifact has a dependency on jackson 2.2.2, but actually requires 2.4.2 to run... -->
-      <dependency>
-        <groupId>com.fasterxml.jackson.core</groupId>
-        <artifactId>jackson-core</artifactId>
-        <version>${fasterxml.jackson.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>com.fasterxml.jackson.core</groupId>
-        <artifactId>jackson-annotations</artifactId>
-        <version>${fasterxml.jackson.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>com.fasterxml.jackson.core</groupId>
-        <artifactId>jackson-databind</artifactId>
-        <version>${fasterxml.jackson.version}</version>
-        <exclusions>
-            <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-            <exclusion>
-                <groupId>com.fasterxml.jackson.core</groupId>
-                <artifactId>jackson-annotations</artifactId>
-            </exclusion>
-        </exclusions>
-      </dependency>
-      <dependency>
-        <groupId>com.fasterxml.jackson.datatype</groupId>
-        <artifactId>jackson-datatype-joda</artifactId>
-        <version>${fasterxml.jackson.version}</version>
-        <exclusions>
-            <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-            <exclusion>
-                <groupId>com.fasterxml.jackson.core</groupId>
-                <artifactId>jackson-annotations</artifactId>
-            </exclusion>
-        </exclusions>
-      </dependency>
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-            <version>${mysql-connector-java.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.mongodb</groupId>
-            <artifactId>mongo-java-driver</artifactId>
-            <version>${mongodb.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.basho.riak</groupId>
-            <artifactId>riak-client</artifactId>
-            <version>${riak.version}</version>
-            <exclusions>
-                <!-- Dependency versions mismatch between transitive dependencies, declare explicitly -->
-                <exclusion>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                    <artifactId>jackson-core</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.fasterxml.jackson.core</groupId>
-                    <artifactId>jackson-annotations</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>com.fasterxml.jackson.datatype</groupId>
-                    <artifactId>jackson-datatype-joda</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <finalName>brooklyn-example-hello-world-sql-webapp</finalName>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/WEB-INF/web.xml b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 8b6f078..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd" >
-
-<web-app>
-  <display-name>Archetype Created Web Application</display-name>
-</web-app>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/available.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/available.jsp b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/available.jsp
deleted file mode 100644
index ddb4bf4..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/available.jsp
+++ /dev/null
@@ -1,81 +0,0 @@
-<html>
-<!--
-    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.
--->
-<head>
-<title>Sample "Hello, World" Application</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-<tr>
-<td>
-<img src="images/bridge-small.png">
-</td>
-<td>
-<h1>Sample Brooklyn Deployed "Hello, World" Application</h1>
-<p>This is the home page for a sample application used to illustrate 
-how web applications can be deployed to multi-cloud environments using Brooklyn.
-</td>
-</tr>
-</table>
-
-<p>
-The following apps are available:
-<p>
-
-<ul>
-<%
-String url=System.getProperty("brooklyn.example.db.url");
-//URL should be supplied e.g. "-Dbrooklyn.example.db.url=jdbc:mysql://localhost/visitors?user=brooklyn&password=br00k11n"
-//(note quoting needed due to ampersand)
-if (url!=null) {
-%>
-<li><a href="db.jsp">SQL database chatroom</a></li>
-<% } %>
-
-<%
-String hadoop=System.getProperty("brooklyn.example.hadoop.site.xml.url");
-//URL should be supplied e.g. -Dbrooklyn.example.hadoop.site.xml.url=file://tmp/hadoop-site.xml
-if (hadoop!=null) {
-%>
-<li><a href="hadoop-chat.jsp">Hadoop chatroom</a></li>
-<li><a href="hadoop-wordcount.jsp">Hadoop wordcount</a> (inevitably!) run over the chats</li>
-<% } %>
-
-
-<%
-    String mongo=System.getProperty("brooklyn.example.mongodb.port");
-    if (mongo!=null) {
-%>
-<li><a href="mongo.jsp">MongoDB chatroom</a></li>
-<%
-    }
-    String riak=System.getProperty("brooklyn.example.riak.nodes");
-    if (riak != null) {
-%>
-<li><a href="riak.jsp">Riak chatroom</a></li>
-<% }
-if (hadoop==null && url==null && mongo==null && riak==null) {
-%>
-<li><i>None.</i> Try one of the other Brooklyn examples to see SQL or Hadoop.</li>
-<% } %>
-</ul>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/db.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/db.jsp b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/db.jsp
deleted file mode 100644
index 7e91b66..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/db.jsp
+++ /dev/null
@@ -1,123 +0,0 @@
-<%@ page language="java" import="java.sql.*"%>
-
-<html>
-<!--
-    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.
--->
-<head>
-<title>Sample Application Database JSP Page</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-<tr>
-<td align=center>
-<img src="images/bridge-small.png">
-</td>
-<td>
-<h1>Sample Brooklyn Deployed WebApp (Database JSP)</h1>
-This is the output of a JSP page that is part of the Hello, World application,
-deployed by brooklyn, to show <b>SQL database interactivity</b>.
-</td>
-</tr>
-</table>
-
-<%
-String url=System.getProperty("brooklyn.example.db.url");
-//URL should be supplied e.g. ""-Dbrooklyn.example.db.url=jdbc:mysql://localhost/visitors?user=brooklyn&password=br00k11n"
-//(note quoting needed due to ampersand)
-if (url==null) {
-%>
-    <p>(There is no database included as part of this example.)</p>
-<% } else { /* begin database-enabled block */ %>
-
-<br/>
-<p>Visitors:</p>
-<ul>
-
-<%
-Connection con=null;
-ResultSet rst=null;
-Statement stmt=null;
-int i=0;
-
-try {
-  
-  String DRIVER = "com.mysql.jdbc.Driver";
-  Class.forName(DRIVER).newInstance();
-
-  con=DriverManager.getConnection(url);
-  stmt=con.createStatement();
-  
-  if (request.getParameter("name")!=null) {
-      //add a message
-      stmt.execute("INSERT INTO MESSAGES values (default, '"+
-              //better escaping and security desired... 
-              //this essentially does StringEscapeUtils.escapeSql (either brooklyn.util or apache commons)
-              request.getParameter("name").replaceAll("'", "''")+
-              "', '"+
-              request.getParameter("message").replaceAll("'", "''")+
-              "')");
-  }
-  
-  rst=stmt.executeQuery("select * from MESSAGES");
-  while (rst.next()) {
-%>
-    <li> <b><%= rst.getString(2) %></b>: <%= rst.getString(3) %> </li>
-<%
-    i++;
-  }
-} catch (Exception e) {
-  i=-1;
-%>
-  <li> <b>The database does not appear to be connected.</b> </li>
-  <li> ERROR: <%= e %> </li>
-<%
-} finally {
-  if (rst!=null) rst.close();
-  if (stmt!=null) stmt.close();
-  if (con!=null) con.close();
-}
-
-if (i==0) {
-%>
-  <li> <i>None.</i> </li>
-<%
-}
-%>
-
-</ul>
-
-<br/>
-
-<p>Please enter a message:</p>
-
-<form action="db.jsp" method="GET">
-  <table>
-    <tr><td>Name: </td><td><input type="text" name="name"></td></tr>
-    <tr><td>Message: </td><td><input type="text" name="message"></td></tr>
-  </table>
-  <input type="submit" value="Submit"/>
-</form>
-
-<% } /* end of database-enabled block */ %>
-
-<br/>
-<p>Click <a href="index.html">here</a> to go back to the main page.</p>
-
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-chat.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-chat.jsp b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-chat.jsp
deleted file mode 100644
index f7e61f4..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-chat.jsp
+++ /dev/null
@@ -1,110 +0,0 @@
-<%@ page language="java" import="java.sql.*"%>
-
-<html>
-<!--
-    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.
--->
-<head>
-<title>Sample Application HDFS JSP Page</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-<tr>
-<td align=center>
-<img src="images/bridge-small.png">
-</td>
-<td>
-<h1>Sample Brooklyn Deployed WebApp (Database JSP)</h1>
-This is the output of a JSP page that is part of the Hello, World application,
-deployed by brooklyn, to show <b>hadoop hdfs used as the data store</b>.
-</td>
-</tr>
-</table>
-
-<%
-String hadoop=System.getProperty("brooklyn.example.hadoop.site.xml.url");
-if (hadoop==null) {
-%>
-    <p>(There is no hadoop included as part of this example.)</p>
-<% } else { /* begin hadoop-enabled block */ 
-
-
-try {
-    org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration();
-    conf.setClassLoader(brooklyn.demo.webapp.hello.HadoopWordCount.class.getClassLoader());
-    conf.addResource(new java.net.URL(hadoop));
-    org.apache.hadoop.fs.FileSystem fsClient = org.apache.hadoop.fs.FileSystem.get(conf);
-    if (fsClient==null) throw new NullPointerException("Can't access fsClient at "+hadoop);
-    
-    if (request.getParameter("name")!=null) {
-        java.io.OutputStream os1 = fsClient.create(new org.apache.hadoop.fs.Path("chats", ""+System.currentTimeMillis()+"-"+((int)(Math.random()*10000))));
-        os1.write(request.getParameter("name").getBytes());
-        os1.write(" : ".getBytes());
-        os1.write(request.getParameter("message").getBytes());
-        os1.flush(); os1.close();
-    }
-%>
-    <br/>
-    <p>Visitors:</p>
-    <ul>
-<%
-    org.apache.hadoop.fs.FileStatus[] files = fsClient.listStatus(new org.apache.hadoop.fs.Path("chats"));
-    if (files==null) files = new org.apache.hadoop.fs.FileStatus[0]; 
-    for (org.apache.hadoop.fs.FileStatus f: files) {
-%>
-        <li> <%= brooklyn.demo.webapp.hello.DemoUtils.stringFromInputStream(fsClient.open(f.getPath())) %> </li>
-<%
-    }
-    if (files.length==0) {
-    %>
-      <li> <i>None.</i> </li>
-    <%
-    }
-    %>
-
-    </ul>
-    <br/>
-
-    <p>Please enter a message:</p>
-
-    <form action="hadoop-chat.jsp" method="GET">
-      <table>
-        <tr><td>Name: </td><td><input type="text" name="name"></td></tr>
-        <tr><td>Message: </td><td><input type="text" name="message"></td></tr>
-      </table>
-      <input type="submit" value="Submit"/>
-    </form>
-
-<%
-} catch (Exception e) {
-%>
-    <b>Error connecting to Hadoop.</b><br/>
-    ERROR: <%= e %><br/><br/>
-    <pre> <%= brooklyn.demo.webapp.hello.DemoUtils.getStackTrace(e) %></pre>
-<%
-}
-}
-%>
-
-    <br/>
-    <p>Click <a href="hadoop-wordcount.jsp">here</a> to run a map-reduce job counting the words in these comments.</p>
-    <p>Click <a href="index.html">here</a> to go back to the main page.</p>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-wordcount.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-wordcount.jsp b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-wordcount.jsp
deleted file mode 100644
index 570a659..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/hadoop-wordcount.jsp
+++ /dev/null
@@ -1,114 +0,0 @@
-<%@ page language="java" import="java.sql.*"%>
-
-<html>
-<!--
-    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.
--->
-<head>
-<title>Sample Application Database JSP Page</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-<tr>
-<td align=center>
-<img src="images/bridge-small.png">
-</td>
-<td>
-<h1>Sample Brooklyn Deployed WebApp (Database JSP)</h1>
-This is the output of a JSP page that is part of the Hello, World application,
-deployed by brooklyn, to show <b>a hadoop map-reduce task run<b>.
-</td>
-</tr>
-</table>
-
-<%
-String hadoop=System.getProperty("brooklyn.example.hadoop.site.xml.url");
-String hadoopJar=System.getProperty("brooklyn.example.hadoop.custom.jar.url");
-if (hadoop==null) {
-%>
-    <p>There is no hadoop included as part of this example. Set brooklyn.example.hadoop.site.xml.url to proceed.</p>
-<% } else if (hadoopJar==null) { 
-%>
-    <p>brooklyn.example.hadoop.custom.jar.url must be set to point to the Jar.</p>
-<%} else { /* begin hadoop-enabled block */ 
-
-try {
-    org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration();
-    conf.setClassLoader(brooklyn.demo.webapp.hello.HadoopWordCount.class.getClassLoader());
-    conf.addResource(new java.net.URL(hadoop));
-    org.apache.hadoop.fs.FileSystem fsClient = org.apache.hadoop.fs.FileSystem.get(conf);
-    if (fsClient==null) throw new NullPointerException("Can't access fsClient at "+hadoop);
-
-    org.apache.hadoop.mapreduce.Job job = brooklyn.demo.webapp.hello.HadoopWordCount.makeJob(conf);
-    ((org.apache.hadoop.mapred.JobConf)job.getConfiguration()).setJar(hadoopJar);
-    org.apache.hadoop.fs.FileStatus[] files = fsClient.listStatus(new org.apache.hadoop.fs.Path("chats"));
-    if (files==null) files = new org.apache.hadoop.fs.FileStatus[0];
-    for (org.apache.hadoop.fs.FileStatus f: files) {
-        org.apache.hadoop.mapreduce.lib.input.FileInputFormat.addInputPath(job, f.getPath());
-    }
-    
-    org.apache.hadoop.fs.Path outp = new org.apache.hadoop.fs.Path("out-"+((int)(Math.random()*10000)));
-    org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.setOutputPath(job, outp);
-
-    boolean result = job.waitForCompletion(true);
-    
-    if (!result) {
-        %> <p><b></b><i>Map reduce job returned non-zero result code.</i></b></p> <%
-    }
-
-    %> <p>Output from map reduce is as follows:</p> <%
-    
-    files = fsClient.listStatus(outp);
-    if (files==null) files = new org.apache.hadoop.fs.FileStatus[0];
-    for (org.apache.hadoop.fs.FileStatus f: files) {
-        try {
-            if (!f.isDir() && f.getLen()>0) {
-                %>
-                <%= f.getPath() %>:<br/>
-                <pre><%= brooklyn.demo.webapp.hello.DemoUtils.stringFromInputStream(fsClient.open(f.getPath())) %></pre>
-                <%
-            }
-        } catch (Exception e) {
-            %> Error: <%= e %><%
-        }
-    }
-    if (files.length==0) {
-    %>
-      <i>No output.</i> </li>
-    <%
-    }
-    
-    fsClient.delete(outp, true);
-    
-} catch (Exception e) {
-%>
-    <b>Error connecting to Hadoop.</b><br/>
-    ERROR: <%= e %><br/>
-    <pre> <%= brooklyn.demo.webapp.hello.DemoUtils.getStackTrace(e) %></pre>
-<%
-} 
-}
-%>
-
-    <br/>
-    <p>Click <a href="hadoop-chat.jsp">here</a> to view the chat room.</p>
-    <p>Click <a href="index.html">here</a> to go back to the main page.</p>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/BrooklynBridge3Large.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/BrooklynBridge3Large.png b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/BrooklynBridge3Large.png
deleted file mode 100644
index 2f8253a..0000000
Binary files a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/BrooklynBridge3Large.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/bridge-small.png
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/bridge-small.png b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/bridge-small.png
deleted file mode 100644
index 4149c3c..0000000
Binary files a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/images/bridge-small.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/index.html b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/index.html
deleted file mode 100644
index 33b9bd9..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/index.html
+++ /dev/null
@@ -1,42 +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.
--->
-
-<html>
-<head>
-<title>Sample "Hello, World" Application</title>
-<link rel="stylesheet" type="text/css" href="styles/main.css">
-</head>
-<body>
-<div id='main'>
-<div id="header">
-	<div class="header_text">
-		<h1>Sample Brooklyn Deployed "Hello, World" Application</h1>
-	</div>
-</div>
-	<div id="container">
-		<div class="text_row">
-		  <div class="app_info"><h3>This is the home page for a sample application used to illustrate 
-		how web applications can be deployed to multi-cloud environments using Brooklyn.</h3></div>
-		  <div class="illustrations"><p>See the available illustrations <a href="available.jsp">here</a>.</p></div>
-		</div>
-	</div>
-</div>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/mongo.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/mongo.jsp b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/mongo.jsp
deleted file mode 100644
index bad529f..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/mongo.jsp
+++ /dev/null
@@ -1,127 +0,0 @@
-<%@ page language="java" import="java.sql.*,com.mongodb.*"%>
-<%@ page import="java.util.Arrays" %>
-
-<html>
-<!--
-    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.
--->
-<head>
-    <title>Sample Application MongoDB JSP Page</title>
-</head>
-<body bgcolor=white>
-
-<table border="0">
-    <tr>
-        <td align=center>
-            <img src="images/bridge-small.png">
-        </td>
-        <td>
-            <h1>Sample Brooklyn Deployed WebApp (MongoDB JSP)</h1>
-            This is the output of a JSP page that is part of the Hello, World application,
-            deployed by brooklyn, to show <b>MongoDB database interactivity</b>.
-        </td>
-    </tr>
-</table>
-
-<%
-String port=System.getProperty("brooklyn.example.mongodb.port");
-String username=System.getProperty("brooklyn.example.mongodb.username");
-String password=System.getProperty("brooklyn.example.mongodb.password");
-String authenticationDatabase=System.getProperty("brooklyn.example.mongodb.authenticationDatabase");
-//URL should be supplied e.g. ""-Dbrooklyn.example.db.url=jdbc:mysql://localhost/visitors?user=brooklyn&password=br00k11n"
-//(note quoting needed due to ampersand)
-if (port==null) {
-%>
-<p>(There is no database included as part of this example.)</p>
-<% } else { %>
-<br/>
-<p>Visitors:</p>
-<ul>
-
-<%
-/* begin database-enabled block */ }
-boolean authenticationEnabled = password != null && password.length() > 0;
-
-ServerAddress address = new ServerAddress("localhost", new Integer(port));
-
-MongoClientOptions connectionOptions = MongoClientOptions.builder()
-    .autoConnectRetry(true)
-    .socketKeepAlive(true)
-    .build();
-
-MongoClient client;
-
-if (authenticationEnabled) {
-    MongoCredential credential = MongoCredential.createMongoCRCredential(username, authenticationDatabase, password.toCharArray());
-    client = new MongoClient(address, Arrays.asList(credential),connectionOptions);
-} else {
-    client = new MongoClient(address, connectionOptions);
-}
-
-DB database = client.getDB("visitors");
-DBCollection messages =  database.getCollection("messages");
-int i=0;
-
-if (request.getParameter("name") != null) {
-    // add a message
-    DBObject newMessage = new BasicDBObject();
-    newMessage.put("name", request.getParameter("name"));
-    newMessage.put("message", request.getParameter("message"));
-    messages.save(newMessage);
-}
-
-DBCursor messageCursor = messages.find();
-
-try {
-    while (messageCursor.hasNext()) {
-        DBObject message = messageCursor.next();
-        i++;
-        %>
-            <li><b><%=message.get("name")%></b>: <%=message.get("message")%></li>
-        <%
-    }
-} finally {
-    messageCursor.close();
-}
-
-if (i==0) {
-%>
-    <li><i>None</i></li>
-<%
-}
-
-%>
-
-</ul>
-
-<br/>
-
-<p>Please enter a message:</p>
-
-<form action="mongo.jsp" method="GET">
-    <table>
-        <tr><td>Name: </td><td><input type="text" name="name"></td></tr>
-        <tr><td>Message: </td><td><input type="text" name="message"></td></tr>
-    </table>
-    <input type="submit" value="Submit"/>
-</form>
-
-<br/>
-<p>Click <a href="index.html">here</a> to go back to the main page.</p>
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/riak.jsp
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/riak.jsp b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/riak.jsp
deleted file mode 100644
index bfb296e..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/riak.jsp
+++ /dev/null
@@ -1,148 +0,0 @@
-<%@ page language="java" import="com.basho.riak.client.IRiakClient,com.basho.riak.client.RiakFactory,com.basho.riak.client.bucket.Bucket" %>
-<%@ page import="com.basho.riak.client.convert.RiakKey" %>
-<%@ page import="com.basho.riak.client.raw.http.HTTPClientConfig" %>
-<%@ page import="com.basho.riak.client.raw.http.HTTPClusterConfig" %>
-<%@ page import="org.joda.time.DateTime" %>
-<%@ page import="java.util.ArrayList" %>
-<%@ page import="java.util.Collections" %>
-<%@ page import="java.util.Comparator" %>
-<%@ page import="java.util.List" %>
-
-<html>
-<!--
-    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.
--->
-
-<%!
-    static class Message {
-        @RiakKey
-        public String id;
-        public String name;
-        public String message;
-        public DateTime dateTime;
-
-        public Message() {}
-
-        public Message(String name, String message) {
-            this.name = name;
-            this.message = message;
-            this.dateTime = DateTime.now();
-        }
-    }
-%>
-
-<head>
-    <title>Sample Application Riak JSP Page</title>
-</head>
-<body bgcolor="white">
-
-<table border="0">
-    <tr>
-        <td align=center>
-            <img src="images/bridge-small.png">
-        </td>
-        <td>
-            <h1>Sample Brooklyn Deployed WebApp (Riak JSP)</h1>
-            This is the output of a JSP page that is part of the Hello, World application,
-            deployed by brooklyn, to show <b>Riak database interactivity</b>.
-        </td>
-    </tr>
-</table>
-
-<%
-    String url = System.getProperty("brooklyn.example.riak.url");
-    if (url == null) {
-%>
-<% } else { %>
-<br/>
-
-<p>Visitors:</p>
-<ul>
-
-    <%
-        }
-
-        String[] riakNodes = System.getProperty("brooklyn.example.riak.nodes").split(",");
-        int maxConnections = 50;
-
-        HTTPClusterConfig httpClusterConfig = new HTTPClusterConfig(maxConnections);
-        HTTPClientConfig httpClientConfig = HTTPClientConfig.defaults();
-        httpClusterConfig.addHosts(httpClientConfig, riakNodes);
-
-        IRiakClient httpClient = RiakFactory.newClient(httpClusterConfig);
-
-        // If the bucket already exists, createBucket simply fetches the bucket
-        Bucket bucket = httpClient.createBucket("visitors").execute();
-
-        if (request.getParameter("name") != null) {
-            Message message = new Message(request.getParameter("name"), request.getParameter("message"));
-            bucket.store(message).withoutFetch().returnBody(true).execute();
-        }
-
-        List<Message> messages = new ArrayList<Message>();
-
-        for (String key : bucket.keys()) {
-            messages.add(bucket.fetch(key, Message.class).execute());
-        }
-
-        Collections.sort(messages, new Comparator<Message>() {
-            public int compare(Message m1, Message m2) {
-                return m1.dateTime.compareTo(m2.dateTime);
-            }
-        });
-
-        for (Message outMessage : messages) {
-            %>
-                <li><b><%=outMessage.name%></b>: <%=outMessage.message%></li>
-            <%
-        }
-
-        httpClient.shutdown();
-
-        if (messages.size() == 0) {
-            %>
-                <li><i>None</i></li>
-            <%
-        }
-    %>
-
-</ul>
-
-<br/>
-
-<p>Please enter a message:</p>
-
-<form action="riak.jsp" method="GET">
-    <table>
-        <tr>
-            <td>Name:</td>
-            <td><input type="text" name="name"></td>
-        </tr>
-        <tr>
-            <td>Message:</td>
-            <td><input type="text" name="message"></td>
-        </tr>
-    </table>
-    <input type="submit" value="Submit"/>
-</form>
-
-<br/>
-
-<p>Click <a href="index.html">here</a> to go back to the main page.</p>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/styles/main.css
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/styles/main.css b/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/styles/main.css
deleted file mode 100644
index c52e212..0000000
--- a/brooklyn-library/examples/webapps/hello-world-sql/src/main/webapp/styles/main.css
+++ /dev/null
@@ -1,71 +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.
-*/
-*{
-	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-}
-body{
-	padding: 0;
-	margin: 0;
-}
-#main{
-	background: url('../images/BrooklynBridge3Large.png') no-repeat fixed;
-	-webkit-background-size: cover;
-	-moz-background-size: cover;
-	-o-background-size: cover;
-	background-size: cover;
-	height: 100vh;
-	background-color: #6BB445;
-}
-#header{
-	text-align: center;
-}
-h1{
-	font-family: "open sans","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
-    text-transform: uppercase;
-    line-height: 105%;
-    letter-spacing: 1px;
-    font-weight: bold;
-    text-align: center;
-    margin: 20px 0 15px;
-    margin: 0;
-    padding-top: 20vh;
-}
-#container{
-	padding-top: 30vh;
-	text-align: center;
-	line-height: 140%;
-    font-family: "Noto Serif","open sans","HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;
-    font-weight: normal;
-    color: white;
-    text-shadow: #000 0px 0px 5px,   #000 0px 0px 5px,   #000 0px 0px 5px,
-	#000 0px 0px 5px,   #000 0px 0px 5px,   #000 0px 0px 5px;
-    font-style: italic;
-    margin-bottom: 45px;
-	width: 80%;
-	margin-left: 10%;
-}
-a{
-	color: #6BB445;
-}
-.text_row{
-	padding: 5%;
-}
-.illustrations{
-	padding-bottom: 5%;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/.gitignore
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/.gitignore b/brooklyn-library/examples/webapps/hello-world-webapp/.gitignore
deleted file mode 100644
index 84c048a..0000000
--- a/brooklyn-library/examples/webapps/hello-world-webapp/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build/

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/pom.xml b/brooklyn-library/examples/webapps/hello-world-webapp/pom.xml
deleted file mode 100644
index 559260e..0000000
--- a/brooklyn-library/examples/webapps/hello-world-webapp/pom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>war</packaging>
-    <artifactId>brooklyn-example-hello-world-webapp</artifactId>
-    <name>hello-world-webapp Maven Webapp</name>
-
-    <parent>
-        <groupId>org.apache.brooklyn.example</groupId>
-        <artifactId>brooklyn-examples-webapps-parent</artifactId>
-        <version>0.9.0-SNAPSHOT</version>   <!-- BROOKLYN_VERSION -->
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-      <dependency>
-        <groupId>javax.servlet</groupId>
-        <artifactId>javax.servlet-api</artifactId>
-      </dependency>
-    </dependencies>
-
-    <build>
-        <finalName>brooklyn-example-hello-world-webapp</finalName>
-    </build>
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/WEB-INF/web.xml b/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 8b6f078..0000000
--- a/brooklyn-library/examples/webapps/hello-world-webapp/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd" >
-
-<web-app>
-  <display-name>Archetype Created Web Application</display-name>
-</web-app>


Mime
View raw message