You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2016/02/01 18:48:25 UTC

[49/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!)

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/CumulusRDFApplication.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/CumulusRDFApplication.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/CumulusRDFApplication.java
deleted file mode 100644
index 0e3780f..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/CumulusRDFApplication.java
+++ /dev/null
@@ -1,239 +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.Collection;
-import java.util.List;
-import java.util.Map;
-
-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.effector.Effector;
-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.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.EnricherSpec;
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
-import org.apache.brooklyn.core.effector.EffectorBody;
-import org.apache.brooklyn.core.effector.Effectors;
-import org.apache.brooklyn.core.effector.ssh.SshEffectorTasks;
-import org.apache.brooklyn.core.entity.AbstractApplication;
-import org.apache.brooklyn.core.entity.Entities;
-import org.apache.brooklyn.core.entity.EntityInternal;
-import org.apache.brooklyn.core.entity.StartableApplication;
-import org.apache.brooklyn.core.entity.lifecycle.Lifecycle;
-import org.apache.brooklyn.core.entity.lifecycle.ServiceStateLogic;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.location.PortRanges;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.entity.java.UsesJava;
-import org.apache.brooklyn.entity.java.UsesJmx;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraDatacenter;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraFabric;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraNode;
-import org.apache.brooklyn.entity.webapp.JavaWebAppService;
-import org.apache.brooklyn.entity.webapp.tomcat.TomcatServer;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.ha.ServiceFailureDetector;
-import org.apache.brooklyn.policy.ha.ServiceReplacer;
-import org.apache.brooklyn.policy.ha.ServiceRestarter;
-import org.apache.brooklyn.util.CommandLineUtil;
-import org.apache.brooklyn.util.collections.MutableList;
-import org.apache.brooklyn.util.collections.MutableMap;
-import org.apache.brooklyn.util.core.ResourceUtils;
-import org.apache.brooklyn.util.core.config.ConfigBag;
-import org.apache.brooklyn.util.core.task.DynamicTasks;
-import org.apache.brooklyn.util.core.text.TemplateProcessor;
-import org.apache.brooklyn.util.exceptions.Exceptions;
-import org.apache.brooklyn.util.text.Strings;
-import org.apache.brooklyn.util.text.StringEscapes.JavaStringEscapes;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.net.HostAndPort;
-
-/** CumulusRDF application with Cassandra cluster. */
-@Catalog(name="Cumulus RDF Application", description="CumulusRDF Application on a Tomcat server using a multi-region Cassandra fabric")
-public class CumulusRDFApplication extends AbstractApplication {
-
-    private static final Logger log = LoggerFactory.getLogger(CumulusRDFApplication.class);
-
-    @CatalogConfig(label="Cumulus Configuration File (URL)", priority=1)
-    public static final ConfigKey<String> CUMULUS_RDF_CONFIG_URL = ConfigKeys.newConfigKey(
-        "cumulus.config.url", "URL for the YAML configuration file for CumulusRDF", "classpath://cumulus.yaml");
-
-    @CatalogConfig(label="Cassandra Thrift Port", priority=1)
-    public static final ConfigKey<Integer> CASSANDRA_THRIFT_PORT = ConfigKeys.newConfigKey(
-        "cumulus.cassandra.port", "Port to contact the Cassandra cluster on", 9160);
-
-    @CatalogConfig(label="Cassandra Cluster Size", priority=1)
-    public static final ConfigKey<Integer> CASSANDRA_CLUSTER_SIZE = ConfigKeys.newConfigKey(
-        "cumulus.cassandra.cluster.size", "Initial size of the Cassandra cluster", 2);
-
-    @CatalogConfig(label="Multi-region Fabric", priority=1)
-    public static final ConfigKey<Boolean> MULTI_REGION_FABRIC = ConfigKeys.newConfigKey(
-        "cumulus.cassandra.fabric", "Deploy a multi-region Cassandra fabric", false);
-
-    // TODO Fails when given two locations
-    // public static final String DEFAULT_LOCATIONS = "[ jclouds:aws-ec2:us-east-1,jclouds:rackspace-cloudservers-uk ]";
-    public static final String DEFAULT_LOCATIONS = "jclouds:aws-ec2:us-east-1";
-
-    private Effector<Void> cumulusConfig = Effectors.effector(Void.class, "cumulusConfig")
-            .description("Configure the CumulusRDF web application")
-            .buildAbstract();
-
-    private Entity cassandra;
-    private TomcatServer webapp;
-    private HostAndPort endpoint;
-    private final Object endpointMutex = new Object();
-
-    /**
-     * Create the application entities:
-     * <ul>
-     * <li>A {@link CassandraFabric} of {@link CassandraDatacenter}s containing {@link CassandraNode}s
-     * <li>A {@link TomcatServer}
-     * </ul>
-     */
-    @Override
-    public void initApp() {
-        // Cassandra cluster
-        EntitySpec<CassandraDatacenter> clusterSpec = EntitySpec.create(CassandraDatacenter.class)
-                .configure(CassandraDatacenter.MEMBER_SPEC, EntitySpec.create(CassandraNode.class)
-                        //FIXME can probably use JMXMP_AND_RMI now, to deploy to GCE and elsewhere
-                        .configure(UsesJmx.JMX_AGENT_MODE, UsesJmx.JmxAgentModes.JMX_RMI_CUSTOM_AGENT)
-                        .configure(UsesJmx.JMX_PORT, PortRanges.fromString("11099+"))
-                        .configure(UsesJmx.RMI_REGISTRY_PORT, PortRanges.fromString("9001+"))
-                        .configure(CassandraNode.THRIFT_PORT, PortRanges.fromInteger(getConfig(CASSANDRA_THRIFT_PORT)))
-                        .enricher(EnricherSpec.create(ServiceFailureDetector.class))
-                        .policy(PolicySpec.create(ServiceRestarter.class)
-                                .configure(ServiceRestarter.FAILURE_SENSOR_TO_MONITOR, ServiceFailureDetector.ENTITY_FAILED)))
-                .policy(PolicySpec.create(ServiceReplacer.class)
-                        .configure(ServiceReplacer.FAILURE_SENSOR_TO_MONITOR, ServiceRestarter.ENTITY_RESTART_FAILED));
-
-        if (getConfig(MULTI_REGION_FABRIC)) {
-            cassandra = addChild(EntitySpec.create(CassandraFabric.class)
-                    .configure(CassandraDatacenter.CLUSTER_NAME, "Brooklyn")
-                    .configure(CassandraDatacenter.INITIAL_SIZE, getConfig(CASSANDRA_CLUSTER_SIZE)) // per location
-                    .configure(CassandraDatacenter.ENDPOINT_SNITCH_NAME, "org.apache.brooklyn.entity.nosql.cassandra.customsnitch.MultiCloudSnitch")
-                    .configure(CassandraNode.CUSTOM_SNITCH_JAR_URL, "classpath://org/apache/brooklyn/entity/nosql/cassandra/cassandra-multicloud-snitch.jar")
-                    .configure(CassandraFabric.MEMBER_SPEC, clusterSpec));
-        } else {
-            cassandra = addChild(EntitySpec.create(clusterSpec)
-                    .configure(CassandraDatacenter.CLUSTER_NAME, "Brooklyn")
-                    .configure(CassandraDatacenter.INITIAL_SIZE, getConfig(CASSANDRA_CLUSTER_SIZE)));
-        }
-
-        // Tomcat web-app server
-        webapp = addChild(EntitySpec.create(TomcatServer.class)
-                .configure(UsesJmx.JMX_AGENT_MODE, UsesJmx.JmxAgentModes.JMX_RMI_CUSTOM_AGENT)
-                .configure(UsesJmx.JMX_PORT, PortRanges.fromString("11099+"))
-                .configure(UsesJmx.RMI_REGISTRY_PORT, PortRanges.fromString("9001+"))
-                .configure(JavaWebAppService.ROOT_WAR, "https://cumulusrdf.googlecode.com/svn/wiki/downloads/cumulusrdf-1.0.1.war")
-                .configure(UsesJava.JAVA_SYSPROPS, MutableMap.of("cumulusrdf.config-file", "/tmp/cumulus.yaml")));
-
-        // Add an effector to tomcat to reconfigure with a new YAML config file
-        ((EntityInternal) webapp).getMutableEntityType().addEffector(cumulusConfig, new EffectorBody<Void>() {
-            @Override
-            public Void call(ConfigBag parameters) {
-                // Process the YAML template given in the application config
-                String url = Entities.getRequiredUrlConfig(CumulusRDFApplication.this, CUMULUS_RDF_CONFIG_URL);
-                Map<String, Object> config;
-                synchronized (endpointMutex) {
-                    config = MutableMap.<String, Object>of("cassandraHostname", endpoint.getHostText(), "cassandraThriftPort", endpoint.getPort());
-                }
-                String contents = TemplateProcessor.processTemplateContents(ResourceUtils.create(CumulusRDFApplication.this).getResourceAsString(url), config);
-                // Copy the file contents to the remote machine
-                return DynamicTasks.queue(SshEffectorTasks.put("/tmp/cumulus.yaml").contents(contents)).get();
-            }
-        });
-
-        // Listen for HOSTNAME changes from the Cassandra fabric to show at least one node is available
-        subscriptions().subscribe(cassandra, CassandraDatacenter.HOSTNAME, new SensorEventListener<String>() {
-            @Override
-            public void onEvent(SensorEvent<String> event) {
-                if (Strings.isNonBlank(event.getValue())) {
-                    synchronized (endpointMutex) {
-                        String hostname = Entities.submit(CumulusRDFApplication.this, DependentConfiguration.attributeWhenReady(cassandra, CassandraDatacenter.HOSTNAME)).getUnchecked();
-                        Integer thriftPort = Entities.submit(CumulusRDFApplication.this, DependentConfiguration.attributeWhenReady(cassandra, CassandraDatacenter.THRIFT_PORT)).getUnchecked();
-                        HostAndPort current = HostAndPort.fromParts(hostname, thriftPort);
-
-                        // Check if the cluster access point has changed
-                        if (!current.equals(endpoint)) {
-                            log.info("Setting cluster endpoint to {}", current.toString());
-                            endpoint = current;
-
-                            // Reconfigure the CumulusRDF application and restart tomcat if necessary
-                            webapp.invoke(cumulusConfig, MutableMap.<String, Object>of());
-                            if (webapp.getAttribute(Startable.SERVICE_UP)) {
-                                webapp.restart();
-                            }
-                        }
-                    }
-                }
-            }
-        });
-    }
-
-    /**
-     * Controls the startup locations for the webapp and the cassandra fabric.
-     *
-     * @see AbstractApplication#start(Collection)
-     */
-    @Override
-    public void start(Collection<? extends Location> locations) {
-        addLocations(locations);
-
-        // The web application only needs to run in one location, use the first
-        // TODO use a multi-region web cluster
-        Collection<? extends Location> first = MutableList.copyOf(Iterables.limit(locations, 1));
-
-        ServiceStateLogic.setExpectedState(this, Lifecycle.STARTING);
-        try {
-            Entities.invokeEffector(this, cassandra, Startable.START, MutableMap.of("locations", locations)).getUnchecked();
-            Entities.invokeEffector(this, webapp, Startable.START, MutableMap.of("locations", first)).getUnchecked();
-        } catch (Exception e) {
-            throw Exceptions.propagate(e);
-        } finally {
-            ServiceStateLogic.setExpectedState(this, Lifecycle.RUNNING);
-        }
-        log.info("Started CumulusRDF in " + locations);
-    }
-
-
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String locations = CommandLineUtil.getCommandLineOption(args, "--locations", DEFAULT_LOCATIONS);
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                .application(EntitySpec.create(StartableApplication.class, CumulusRDFApplication.class).displayName("CumulusRDF application using Cassandra"))
-                .webconsolePort(port)
-                .locations(Strings.isBlank(locations) ? ImmutableList.<String>of() : JavaStringEscapes.unwrapJsonishListIfPossible(locations))
-                .start();
-
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/HighAvailabilityCassandraCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/HighAvailabilityCassandraCluster.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/HighAvailabilityCassandraCluster.java
deleted file mode 100644
index fbcd44d..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/HighAvailabilityCassandraCluster.java
+++ /dev/null
@@ -1,89 +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.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.catalog.CatalogConfig;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.EnricherSpec;
-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.entity.nosql.cassandra.CassandraDatacenter;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraNode;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.ha.ServiceFailureDetector;
-import org.apache.brooklyn.policy.ha.ServiceReplacer;
-import org.apache.brooklyn.policy.ha.ServiceRestarter;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-@Catalog(name="HA Cassandra Cluster Application", description="Deploy a Cassandra cluster with a High Availability architecture.")
-public class HighAvailabilityCassandraCluster extends AbstractApplication {
-
-    public static final String DEFAULT_LOCATION_SPEC = "aws-ec2:us-east-1";
- 
-    @CatalogConfig(label="Number of Availability Zones", priority=1)
-    public static final ConfigKey<Integer> NUM_AVAILABILITY_ZONES = ConfigKeys.newConfigKey(
-        "cassandra.cluster.numAvailabilityZones", "Number of availability zones to spread the cluster across", 3); 
-    
-    @CatalogConfig(label="Initial Cluster Size", priority=2)
-    public static final ConfigKey<Integer> CASSANDRA_CLUSTER_SIZE = ConfigKeys.newConfigKey(
-        "cassandra.cluster.initialSize", "Initial size of the Cassandra cluster", 6);      
-    
-    
-    @Override
-    public void initApp() {
-        addChild(EntitySpec.create(CassandraDatacenter.class)
-                .configure(CassandraDatacenter.CLUSTER_NAME, "Brooklyn")
-                .configure(CassandraDatacenter.INITIAL_SIZE, getConfig(CASSANDRA_CLUSTER_SIZE))
-                .configure(CassandraDatacenter.ENABLE_AVAILABILITY_ZONES, true)
-                .configure(CassandraDatacenter.NUM_AVAILABILITY_ZONES, getConfig(NUM_AVAILABILITY_ZONES))
-                //See https://github.com/brooklyncentral/brooklyn/issues/973
-                //.configure(CassandraCluster.AVAILABILITY_ZONE_NAMES, ImmutableList.of("us-east-1b", "us-east-1c", "us-east-1e"))
-                .configure(CassandraDatacenter.ENDPOINT_SNITCH_NAME, "GossipingPropertyFileSnitch")
-                .configure(CassandraDatacenter.MEMBER_SPEC, EntitySpec.create(CassandraNode.class)
-                        .enricher(EnricherSpec.create(ServiceFailureDetector.class))
-                        .policy(PolicySpec.create(ServiceRestarter.class)
-                                .configure(ServiceRestarter.FAILURE_SENSOR_TO_MONITOR, ServiceFailureDetector.ENTITY_FAILED)))
-                .policy(PolicySpec.create(ServiceReplacer.class)
-                        .configure(ServiceReplacer.FAILURE_SENSOR_TO_MONITOR, ServiceRestarter.ENTITY_RESTART_FAILED)));
-    }
-    
-    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_SPEC);
-        
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                 .application(EntitySpec.create(StartableApplication.class, HighAvailabilityCassandraCluster.class)
-                         .displayName("Cassandra"))
-                 .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-nosql-cluster/src/main/java/org/apache/brooklyn/demo/ResilientMongoDbApp.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/ResilientMongoDbApp.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/ResilientMongoDbApp.java
deleted file mode 100644
index 814231f..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/ResilientMongoDbApp.java
+++ /dev/null
@@ -1,105 +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.catalog.Catalog;
-import org.apache.brooklyn.api.entity.Entity;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.sensor.SensorEvent;
-import org.apache.brooklyn.api.sensor.SensorEventListener;
-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.enricher.stock.Enrichers;
-import org.apache.brooklyn.entity.group.DynamicCluster;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBReplicaSet;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBServer;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.ha.ServiceFailureDetector;
-import org.apache.brooklyn.policy.ha.ServiceReplacer;
-import org.apache.brooklyn.policy.ha.ServiceRestarter;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-/**
- * Sample showing a MongoDB replica set with resilience policies attached at nodes and the cluster.
- **/
-@Catalog(name="Resilient MongoDB")
-public class ResilientMongoDbApp extends AbstractApplication implements StartableApplication {
-    
-    public static final Logger LOG = LoggerFactory.getLogger(ResilientMongoDbApp.class);
-    
-    public static final String DEFAULT_LOCATION = "named:gce-europe-west1";
-
-    @Override
-    public void initApp() {
-        MongoDBReplicaSet rs = addChild(
-                EntitySpec.create(MongoDBReplicaSet.class)
-                        .configure(MongoDBReplicaSet.INITIAL_SIZE, 3));
-        
-        initResilience(rs);
-        
-        enrichers().add(Enrichers.builder()
-                .propagating(MongoDBReplicaSet.REPLICA_SET_ENDPOINTS, MongoDBServer.REPLICA_SET_PRIMARY_ENDPOINT)
-                .from(rs)
-                .build());
-    }
-    
-    /** this attaches a policy at each MongoDB node listening for ENTITY_FAILED,
-     * attempting to _restart_ the process, and 
-     * failing that attempting to _replace_ the entity (e.g. a new VM), and 
-     * failing that setting the cluster "on-fire" */
-    protected void initResilience(MongoDBReplicaSet rs) {
-        subscriptions().subscribe(rs, DynamicCluster.MEMBER_ADDED, new SensorEventListener<Entity>() {
-            @Override
-            public void onEvent(SensorEvent<Entity> addition) {
-                initSoftwareProcess((SoftwareProcess)addition.getValue());
-            }
-        });
-        rs.policies().add(new ServiceReplacer(ServiceRestarter.ENTITY_RESTART_FAILED));
-    }
-
-    /** invoked whenever a new MongoDB server is added (the server may not be started yet) */
-    protected void initSoftwareProcess(SoftwareProcess p) {
-        p.enrichers().add(new ServiceFailureDetector());
-        p.policies().add(new ServiceRestarter(ServiceFailureDetector.ENTITY_FAILED));
-    }
-    
-    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, ResilientMongoDbApp.class)
-                         .displayName("Resilient MongoDB"))
-                 .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-nosql-cluster/src/main/java/org/apache/brooklyn/demo/RiakClusterExample.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/RiakClusterExample.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/RiakClusterExample.java
deleted file mode 100644
index 646d74e..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/RiakClusterExample.java
+++ /dev/null
@@ -1,76 +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.apache.brooklyn.api.catalog.Catalog;
-import org.apache.brooklyn.api.catalog.CatalogConfig;
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.api.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.EnricherSpec;
-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.entity.nosql.riak.RiakCluster;
-import org.apache.brooklyn.entity.nosql.riak.RiakNode;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.ha.ServiceFailureDetector;
-import org.apache.brooklyn.policy.ha.ServiceRestarter;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
-
-@Catalog(name = "Riak Cluster Application", description = "Riak ring deployment blueprint")
-public class RiakClusterExample extends AbstractApplication {
-
-    public static final String DEFAULT_LOCATION_SPEC = "aws-ec2:us-east-1";
-
-    @CatalogConfig(label = "Riak Ring Size")
-    public static final ConfigKey<Integer> RIAK_RING_SIZE = ConfigKeys.newConfigKey(
-            "riak.ring.size", "Initial size of the Riak Ring", 4);
-
-    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_SPEC);
-        Preconditions.checkArgument(args.isEmpty(), "Unsupported args: " + args);
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                .application(EntitySpec.create(StartableApplication.class, RiakClusterExample.class))
-                .webconsolePort(port)
-                .location(location)
-                .start();
-
-        Entities.dumpInfo(launcher.getApplications());
-    }
-
-    public void initApp() {
-        addChild(EntitySpec.create(RiakCluster.class)
-                .configure(RiakCluster.INITIAL_SIZE, getConfig(RIAK_RING_SIZE))
-                .configure(RiakCluster.MEMBER_SPEC, EntitySpec.create(RiakNode.class)
-                        .enricher(EnricherSpec.create(ServiceFailureDetector.class))
-                        .policy(PolicySpec.create(ServiceRestarter.class)
-                                .configure(ServiceRestarter.FAILURE_SENSOR_TO_MONITOR, ServiceFailureDetector.ENTITY_FAILED))));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCassandraCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCassandraCluster.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCassandraCluster.java
deleted file mode 100644
index 65c189c..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCassandraCluster.java
+++ /dev/null
@@ -1,58 +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.apache.brooklyn.api.entity.EntitySpec;
-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.entity.nosql.cassandra.CassandraDatacenter;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-public class SimpleCassandraCluster extends AbstractApplication {
-
-    private static final String DEFAULT_LOCATION = "localhost";
-
-    @Override
-    public void initApp() {
-        addChild(EntitySpec.create(CassandraDatacenter.class)
-                .configure(CassandraDatacenter.INITIAL_SIZE, 1)
-                .configure(CassandraDatacenter.CLUSTER_NAME, "Brooklyn"));
-    }
-    
-    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, SimpleCassandraCluster.class)
-                         .displayName("Cassandra"))
-                         .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-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCouchDBCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCouchDBCluster.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCouchDBCluster.java
deleted file mode 100644
index 1454ee6..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleCouchDBCluster.java
+++ /dev/null
@@ -1,36 +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.EntitySpec;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.entity.nosql.couchdb.CouchDBCluster;
-
-/** CouchDB cluster. */
-public class SimpleCouchDBCluster extends ApplicationBuilder {
-
-    /** Create entities. */
-    protected void doBuild() {
-        addChild(EntitySpec.create(CouchDBCluster.class)
-                .configure("initialSize", "2")
-                .configure("clusterName", "Brooklyn")
-                .configure("httpPort", "8000+"));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleMongoDBReplicaSet.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleMongoDBReplicaSet.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleMongoDBReplicaSet.java
deleted file mode 100644
index 949729a..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleMongoDBReplicaSet.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 org.apache.brooklyn.demo;
-
-import org.apache.brooklyn.api.entity.EntitySpec;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBReplicaSet;
-import org.apache.brooklyn.entity.nosql.mongodb.MongoDBServer;
-
-public class SimpleMongoDBReplicaSet extends ApplicationBuilder {
-
-    protected void doBuild() {
-        addChild(EntitySpec.create(MongoDBReplicaSet.class)
-            .configure("name", "Simple MongoDB replica set")
-            .configure("initialSize", 3)
-            .configure("replicaSetName", "simple-replica-set")
-            .configure("memberSpec", EntitySpec.create(MongoDBServer.class)
-                    .configure("mongodbConfTemplateUrl", "classpath:///mongodb.conf")
-                    .configure("enableRestInterface", true)
-                    .configure("port", "27017+")));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleRedisCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleRedisCluster.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleRedisCluster.java
deleted file mode 100644
index c505940..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/SimpleRedisCluster.java
+++ /dev/null
@@ -1,35 +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.EntitySpec;
-import org.apache.brooklyn.core.entity.factory.ApplicationBuilder;
-import org.apache.brooklyn.entity.nosql.redis.RedisCluster;
-
-/** Redis cluster. */
-public class SimpleRedisCluster extends ApplicationBuilder {
-
-    /** Create entities. */
-    protected void doBuild() {
-        addChild(EntitySpec.create(RedisCluster.class)
-                .configure("initialSize", "2")
-                .configure("clusterName", "Brooklyn"));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/StormSampleApp.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/StormSampleApp.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/StormSampleApp.java
deleted file mode 100644
index 062e044..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/StormSampleApp.java
+++ /dev/null
@@ -1,69 +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.catalog.Catalog;
-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.entity.StartableApplication;
-import org.apache.brooklyn.entity.messaging.storm.StormDeployment;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-/**
- * Sample showing a storm analyticscluster
- **/
-@Catalog(name="Storm Sample App",
-description="Creates a Storm analytics cluster",
-    iconUrl="classpath://brooklyn/demo/glossy-3d-blue-web-icon.png")
-public class StormSampleApp extends AbstractApplication implements StartableApplication {
-
-    public static final Logger LOG = LoggerFactory.getLogger(StormSampleApp.class);
-
-    public static final String DEFAULT_LOCATION = "named:gce-europe-west1";
-
-    @Override
-    public void initApp() {
-        addChild(EntitySpec.create(StormDeployment.class)
-            .configure(StormDeployment.SUPERVISORS_COUNT, 2)
-            .configure(StormDeployment.ZOOKEEPERS_COUNT, 1));
-    }
-
-    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, StormSampleApp.class)
-                .displayName("Storm App"))
-                .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-nosql-cluster/src/main/java/org/apache/brooklyn/demo/WideAreaCassandraCluster.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/WideAreaCassandraCluster.java b/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/WideAreaCassandraCluster.java
deleted file mode 100644
index 2f0ce34..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/java/org/apache/brooklyn/demo/WideAreaCassandraCluster.java
+++ /dev/null
@@ -1,86 +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.Arrays;
-import java.util.List;
-
-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.policy.PolicySpec;
-import org.apache.brooklyn.api.sensor.EnricherSpec;
-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.entity.nosql.cassandra.CassandraDatacenter;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraFabric;
-import org.apache.brooklyn.entity.nosql.cassandra.CassandraNode;
-import org.apache.brooklyn.launcher.BrooklynLauncher;
-import org.apache.brooklyn.policy.ha.ServiceFailureDetector;
-import org.apache.brooklyn.policy.ha.ServiceReplacer;
-import org.apache.brooklyn.policy.ha.ServiceRestarter;
-import org.apache.brooklyn.util.CommandLineUtil;
-
-import com.google.common.collect.Lists;
-
-@Catalog(name="Wide Area Cassandra Cluster Application", description="Deploy a Cassandra cluster across multiple geographies.")
-public class WideAreaCassandraCluster extends AbstractApplication {
-
-    public static final String DEFAULT_LOCATION_SPEC = "aws-ec2:us-east-1,rackspace-cloudservers-uk";
-    
-    @CatalogConfig(label="Initial Cluster Size (per location)", priority=2)
-    public static final ConfigKey<Integer> CASSANDRA_CLUSTER_SIZE = ConfigKeys.newConfigKey(
-        "cassandra.cluster.initialSize", "Initial size of the Cassandra clusterss", 2);      
-    
-    
-    
-    @Override
-    public void initApp() {
-        addChild(EntitySpec.create(CassandraFabric.class)
-                .configure(CassandraDatacenter.CLUSTER_NAME, "Brooklyn")
-                .configure(CassandraDatacenter.INITIAL_SIZE, getConfig(CASSANDRA_CLUSTER_SIZE)) // per location
-                .configure(CassandraDatacenter.ENDPOINT_SNITCH_NAME, "org.apache.brooklyn.entity.nosql.cassandra.customsnitch.MultiCloudSnitch")
-                .configure(CassandraNode.CUSTOM_SNITCH_JAR_URL, "classpath://org/apache/brooklyn/entity/nosql/cassandra/cassandra-multicloud-snitch.jar")
-                .configure(CassandraFabric.MEMBER_SPEC, EntitySpec.create(CassandraDatacenter.class)
-                        .configure(CassandraDatacenter.MEMBER_SPEC, EntitySpec.create(CassandraNode.class)
-                                .enricher(EnricherSpec.create(ServiceFailureDetector.class))
-                                .policy(PolicySpec.create(ServiceRestarter.class)
-                                        .configure(ServiceRestarter.FAILURE_SENSOR_TO_MONITOR, ServiceFailureDetector.ENTITY_FAILED)))
-                        .policy(PolicySpec.create(ServiceReplacer.class)
-                                .configure(ServiceReplacer.FAILURE_SENSOR_TO_MONITOR, ServiceRestarter.ENTITY_RESTART_FAILED))));
-    }
-    
-    public static void main(String[] argv) {
-        List<String> args = Lists.newArrayList(argv);
-        String port =  CommandLineUtil.getCommandLineOption(args, "--port", "8081+");
-        String locations = CommandLineUtil.getCommandLineOption(args, "--location", DEFAULT_LOCATION_SPEC);
-
-        BrooklynLauncher launcher = BrooklynLauncher.newInstance()
-                 .application(EntitySpec.create(StartableApplication.class, WideAreaCassandraCluster.class)
-                         .displayName("Cassandra"))
-                 .webconsolePort(port)
-                 .locations(Arrays.asList(locations))
-                 .start();
-             
-        Entities.dumpInfo(launcher.getApplications());
-    }
-}

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/cumulus.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/cumulus.yaml b/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/cumulus.yaml
deleted file mode 100644
index 8772d37..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/cumulus.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
-[#ftl]
-#
-# 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.
-#
-storage-layout: "flat"
-cassandra-hosts: "${cassandraHostname}:${cassandraThriftPort?c}"
-cassandra-keyspace: "KeyspaceCumulus"
-proxy-mode: "false"
-triples-subject: -1
-triples-object: 5000
-query-limit: 50000

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/mongodb.conf
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/mongodb.conf b/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/mongodb.conf
deleted file mode 100644
index 5237a54..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/mongodb.conf
+++ /dev/null
@@ -1,32 +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.
-#
-
-# MongoDB configuration file
-
-# Startup configuration.
-verbose = v
-
-# Use less disk space.
-smallfiles = true
-
-# Disable journalling. By default:
-#  - journal is false on 32 and true on 64 bit systems.
-#  - nojournal is true on 32 and false on 64 bit systems.
-journal = false
-nojournal = true
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/ha-cassandra-cluster.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/ha-cassandra-cluster.yaml b/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/ha-cassandra-cluster.yaml
deleted file mode 100644
index a260e74..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/ha-cassandra-cluster.yaml
+++ /dev/null
@@ -1,45 +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.
-#
-# A YAML version of the HighAvailabilityCassandraCluster application
-#
-name: HA Cassandra cluster
-location: aws-ec2:us-east-1
-
-services:
-- type: org.apache.brooklyn.entity.nosql.cassandra.CassandraDatacenter
-  name: Brooklyn
-  brooklyn.config:
-    initialSize: 6
-    enableAvailabilityZones: true
-    # See https://github.com/brooklyncentral/brooklyn/issues/973
-    availabilityZoneNames:
-    - us-east-1b
-    - us-east-1c
-    - us-east-1e
-    numAvailabilityZones: 3
-    snitchName: GossipingPropertyFileSnitch
-    memberSpec:
-      $brooklyn:entitySpec:
-        type: org.apache.brooklyn.entity.nosql.cassandra.CassandraNode
-        brookyn.policies:
-        - type: org.apache.brooklyn.policy.ha.ServiceRestarter
-        brooklyn.enrichers:
-        - type: org.apache.brooklyn.policy.ha.ServiceFailureDetector
-  brooklyn.policies:
-  - type: org.apache.brooklyn.policy.ha.ServiceReplacer

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/simple-cassandra-cluster.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/simple-cassandra-cluster.yaml b/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/simple-cassandra-cluster.yaml
deleted file mode 100644
index 346ea78..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/simple-cassandra-cluster.yaml
+++ /dev/null
@@ -1,28 +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.
-#
-# A YAML version of the SimpleCassandraCluster application
-#
-name: Simple Cassandra cluster
-location: localhost
-
-services:
-- type: org.apache.brooklyn.entity.nosql.cassandra.CassandraDatacenter
-  name: Brooklyn
-  brooklyn.config:
-    initialSize: 1

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/wide-area-cassandra-cluster.yaml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/wide-area-cassandra-cluster.yaml b/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/wide-area-cassandra-cluster.yaml
deleted file mode 100644
index 91b785c..0000000
--- a/brooklyn-library/examples/simple-nosql-cluster/src/main/resources/org/apache/brooklyn/demo/wide-area-cassandra-cluster.yaml
+++ /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.
-#
-# A YAML version of the WideAreaCassandraCluster application
-#
-name: Wide Area Cassandra cluster
-locations:
-- aws-ec2:us-east-1
-- rackspace-cloudservers-uk
-
-services:
-- type: org.apache.brooklyn.entity.nosql.cassandra.CassandraFabric
-  name: Brooklyn
-  brooklyn.config:
-    initialSize: 2
-    snitchName: org.apache.brooklyn.entity.nosql.cassandra.customsnitch.MultiCloudSnitch
-    customSnitchJarUrl: classpath://org/apache/brooklyn/entity/nosql/cassandra/cassandra-multicloud-snitch.jar
-    memberSpec:
-      $brooklyn:entitySpec:
-        type: org.apache.brooklyn.entity.nosql.cassandra.CassandraNode
-        brookyn.policies:
-        - type: org.apache.brooklyn.policy.ha.ServiceRestarter
-        brooklyn.enrichers:
-        - type: org.apache.brooklyn.policy.ha.ServiceFailureDetector
-    brooklyn.policies:
-    - type: org.apache.brooklyn.policy.ha.ServiceReplacer

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/.gitignore
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/.gitignore b/brooklyn-library/examples/simple-web-cluster/.gitignore
deleted file mode 100644
index 9a3d6d6..0000000
--- a/brooklyn-library/examples/simple-web-cluster/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-brooklyn-example-simple-web-cluster/
-brooklyn-example-simple-web-cluster.tar.gz

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/README.txt
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/README.txt b/brooklyn-library/examples/simple-web-cluster/README.txt
deleted file mode 100644
index 598a4ce..0000000
--- a/brooklyn-library/examples/simple-web-cluster/README.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-Instructions for Running Examples
-=================================
-
-The commands below assume that the `brooklyn` script is on your $PATH, this project has been built,
-and you are in this directory.  Adjust to taste for other configurations.
-
-  export BROOKLYN_CLASSPATH=$(pwd)/target/classes
-  
-  # Three-tier: auto-scaling app-server cluster fronted by nginx, MySql backend wired up, on localhost
-  brooklyn launch --app org.apache.brooklyn.demo.WebClusterDatabaseExample --location localhost
-
-The above requires passwordless `ssh localhost` and requires `gcc` to build `nginx`.
-You could instead target your favourite cloud, where this has been tried and tested:
-
-  # Same three-tier, but in Amazon California, prompting for credentials
-  # (the location arg can be changed for any example, of course, and other clouds are available)
-  export JCLOUDS_AWS_EC2_IDENTITY=AKA50M30N3S1DFR0MAW55
-  export JCLOUDS_AWS_EC2_CREDENTIAL=aT0Ps3cr3tC0D3wh1chAW5w1llG1V3y0uTOus333
-  brooklyn launch --app brooklyn.demo.WebClusterDatabaseExample --location aws-ec2:us-west-1
-
-
-Other examples:
-
-  # A very simple app: a single web-server
-  brooklyn launch --app org.apache.brooklyn.demo.SingleWebServerExample --location localhost
-
-  # A simple app: just load-balancer and appservers
-  brooklyn launch --app org.apache.brooklyn.demo.WebClusterExample --location localhost
-
-  # Three-tier example
-  brooklyn launch --app org.apache.brooklyn.demo.WebClusterDatabaseExample --location localhost
-
-
-Redistributable embedded example:
-
-  # To build a redistributable tar.gz with a start.sh script
-  # which invokes the `main` method in the example class to start
-  # (the redistributable will be at:  target/brooklyn-*-bin.tar.gz )
-  mvn clean assembly:assembly
-
-For more information please visit https://brooklyn.incubator.apache.org/.
-
-----
-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.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/pom.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/pom.xml b/brooklyn-library/examples/simple-web-cluster/pom.xml
deleted file mode 100644
index 378ffbb..0000000
--- a/brooklyn-library/examples/simple-web-cluster/pom.xml
+++ /dev/null
@@ -1,164 +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/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>jar</packaging>
-    <artifactId>brooklyn-example-simple-web-cluster</artifactId>
-    <name>Brooklyn Simple Web Cluster Example</name>
-
-    <!-- this is only needed for "mvn deploy"; the group and version can be extracted
-         and parent block removed to run this standalone -->
-    <parent>
-        <groupId>org.apache.brooklyn.example</groupId>
-        <artifactId>brooklyn-examples-parent</artifactId>
-        <version>0.9.0-SNAPSHOT</version>   <!-- BROOKLYN_VERSION -->
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-launcher</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-webapp</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-database</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-software-nosql</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-logback-xml</artifactId>
-            <version>${project.version}</version>
-            <optional>true</optional>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-core</artifactId>
-            <version>${project.version}</version>
-            <classifier>tests</classifier>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.brooklyn</groupId>
-            <artifactId>brooklyn-test-support</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <!-- copy the WAR so it is available on the classpath for programmatic deployment -->
-                <executions>
-                    <execution>
-                        <id>copy</id>
-                        <phase>process-classes</phase>
-                        <goals>
-                            <goal>copy</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <!-- these can fail in eclipse trying to copy _from_ target/classes.
-                                         see http://jira.codehaus.org/browse/MDEP-259 -->
-                                <artifactItem>
-                                    <groupId>org.apache.brooklyn.example</groupId>
-                                    <artifactId>brooklyn-example-hello-world-webapp</artifactId>
-                                    <version>${project.version}</version>
-                                    <type>war</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>target/classes</outputDirectory>
-                                    <destFileName>hello-world-webapp.war</destFileName>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>org.apache.brooklyn.example</groupId>
-                                    <artifactId>brooklyn-example-hello-world-sql-webapp</artifactId>
-                                    <version>${project.version}</version>
-                                    <type>war</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>target/classes</outputDirectory>
-                                    <destFileName>hello-world-sql-webapp.war</destFileName>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <artifactId>maven-clean-plugin</artifactId>
-                <configuration>
-                    <filesets>
-                        <fileset>
-                            <directory>${project.basedir}</directory>
-							<includes>
-                                <include>${project.artifactId}/</include>
-                                <include>brooklyn*.log</include>
-                                <include>brooklyn*.log.*</include>
-                                <include>stacktrace.log</include>
-                            </includes>
-                        </fileset>
-                    </filesets>
-                </configuration>
-            </plugin>            
-            <plugin>
-                <!-- optional, with this block, `mvn assembly:assembly` will build a redistributable tgz -->
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptors>
-                        <descriptor>src/main/assembly/assembly.xml</descriptor>
-                    </descriptors>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-        
-</project>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/resources/jmeter-test-plan.jmx
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/resources/jmeter-test-plan.jmx b/brooklyn-library/examples/simple-web-cluster/resources/jmeter-test-plan.jmx
deleted file mode 100644
index 0eb1741..0000000
--- a/brooklyn-library/examples/simple-web-cluster/resources/jmeter-test-plan.jmx
+++ /dev/null
@@ -1,143 +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.
--->
-<jmeterTestPlan version="1.2" properties="2.1">
-  <hashTree>
-    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Brooklyn local webapp test - load for localhost:8000" enabled="true">
-      <stringProp name="TestPlan.comments"></stringProp>
-      <boolProp name="TestPlan.functional_mode">false</boolProp>
-      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
-      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
-        <collectionProp name="Arguments.arguments"/>
-      </elementProp>
-      <stringProp name="TestPlan.user_define_classpath"></stringProp>
-    </TestPlan>
-    <hashTree>
-      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Test Group - hitting site with 8 threads" enabled="true">
-        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
-        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
-          <boolProp name="LoopController.continue_forever">false</boolProp>
-          <intProp name="LoopController.loops">-1</intProp>
-        </elementProp>
-        <stringProp name="ThreadGroup.num_threads">8</stringProp>
-        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
-        <longProp name="ThreadGroup.start_time">1326116677000</longProp>
-        <longProp name="ThreadGroup.end_time">1326116677000</longProp>
-        <boolProp name="ThreadGroup.scheduler">false</boolProp>
-        <stringProp name="ThreadGroup.duration"></stringProp>
-        <stringProp name="ThreadGroup.delay"></stringProp>
-      </ThreadGroup>
-      <hashTree>
-        <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Timer - frequency 50 reqs/sec per thread (20 ms delay)" enabled="true">
-          <stringProp name="ConstantTimer.delay">20</stringProp>
-        </ConstantTimer>
-        <hashTree/>
-        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP Request - localhost:8000" enabled="true">
-          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
-            <collectionProp name="Arguments.arguments"/>
-          </elementProp>
-          <stringProp name="HTTPSampler.domain">localhost</stringProp>
-          <stringProp name="HTTPSampler.port">8000</stringProp>
-          <stringProp name="HTTPSampler.connect_timeout"></stringProp>
-          <stringProp name="HTTPSampler.response_timeout"></stringProp>
-          <stringProp name="HTTPSampler.protocol"></stringProp>
-          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
-          <stringProp name="HTTPSampler.path"></stringProp>
-          <stringProp name="HTTPSampler.method">GET</stringProp>
-          <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
-          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
-          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
-          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
-          <boolProp name="HTTPSampler.monitor">false</boolProp>
-          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
-        </HTTPSampler>
-        <hashTree/>
-        <CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie Manager" enabled="true">
-          <collectionProp name="CookieManager.cookies"/>
-          <boolProp name="CookieManager.clearEachIteration">false</boolProp>
-        </CookieManager>
-        <hashTree/>
-      </hashTree>
-      <ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true">
-        <boolProp name="ResultCollector.error_logging">false</boolProp>
-        <objProp>
-          <name>saveConfig</name>
-          <value class="SampleSaveConfiguration">
-            <time>true</time>
-            <latency>true</latency>
-            <timestamp>true</timestamp>
-            <success>true</success>
-            <label>true</label>
-            <code>true</code>
-            <message>true</message>
-            <threadName>true</threadName>
-            <dataType>true</dataType>
-            <encoding>false</encoding>
-            <assertions>true</assertions>
-            <subresults>true</subresults>
-            <responseData>false</responseData>
-            <samplerData>false</samplerData>
-            <xml>true</xml>
-            <fieldNames>false</fieldNames>
-            <responseHeaders>false</responseHeaders>
-            <requestHeaders>false</requestHeaders>
-            <responseDataOnError>false</responseDataOnError>
-            <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
-            <assertionsResultsToSave>0</assertionsResultsToSave>
-            <bytes>true</bytes>
-          </value>
-        </objProp>
-        <stringProp name="filename"></stringProp>
-      </ResultCollector>
-      <hashTree/>
-      <ResultCollector guiclass="SplineVisualizer" testclass="ResultCollector" testname="Spline Visualizer" enabled="true">
-        <boolProp name="ResultCollector.error_logging">false</boolProp>
-        <objProp>
-          <name>saveConfig</name>
-          <value class="SampleSaveConfiguration">
-            <time>true</time>
-            <latency>true</latency>
-            <timestamp>true</timestamp>
-            <success>true</success>
-            <label>true</label>
-            <code>true</code>
-            <message>true</message>
-            <threadName>true</threadName>
-            <dataType>true</dataType>
-            <encoding>false</encoding>
-            <assertions>true</assertions>
-            <subresults>true</subresults>
-            <responseData>false</responseData>
-            <samplerData>false</samplerData>
-            <xml>true</xml>
-            <fieldNames>false</fieldNames>
-            <responseHeaders>false</responseHeaders>
-            <requestHeaders>false</requestHeaders>
-            <responseDataOnError>false</responseDataOnError>
-            <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
-            <assertionsResultsToSave>0</assertionsResultsToSave>
-            <bytes>true</bytes>
-          </value>
-        </objProp>
-        <stringProp name="filename"></stringProp>
-      </ResultCollector>
-      <hashTree/>
-    </hashTree>
-  </hashTree>
-</jmeterTestPlan>

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/assembly/assembly.xml b/brooklyn-library/examples/simple-web-cluster/src/main/assembly/assembly.xml
deleted file mode 100644
index cbe7a08..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,74 +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.
--->
-<assembly>
-    <id>bin</id>
-    <!-- Generates an archive containing the needed files; 
-         can add e.g. zip to the following
-         (but executable bit is not preserved) -->
-    <formats>
-        <format>tar.gz</format>
-    </formats>
-
-    <!-- Adds dependencies to zip package under lib directory -->
-    <dependencySets>
-        <dependencySet>
-            <!--
-               Project artifact is not copied under library directory since
-               it is added to the root directory of the zip package.
-           -->
-            <useProjectArtifact>false</useProjectArtifact>
-            <outputDirectory>lib</outputDirectory>
-            <unpack>false</unpack>
-        </dependencySet>
-    </dependencySets>
-
-    <fileSets>
-        <!--
-           Adds startup scripts to the root directory of zip package. The startup
-           scripts are located to src/main/scripts directory as stated by Maven
-           conventions.
-       -->
-        <fileSet>
-            <directory>src/main/assembly/scripts</directory>
-            <outputDirectory></outputDirectory>
-            <fileMode>0755</fileMode>
-            <includes>
-                <include>*</include>
-            </includes>
-        </fileSet>
-	<!-- add additional files (but not marked executable -->
-        <fileSet>
-            <directory>src/main/assembly/files</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>*</include>
-            </includes>
-        </fileSet>
-        <!-- adds jar package to the root directory of zip package -->
-        <fileSet>
-            <directory>target</directory>
-            <outputDirectory></outputDirectory>
-            <includes>
-                <include>*.jar</include>
-            </includes>
-        </fileSet>
-    </fileSets>
-</assembly>
-

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/02abbab0/brooklyn-library/examples/simple-web-cluster/src/main/assembly/files/README.txt
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/assembly/files/README.txt b/brooklyn-library/examples/simple-web-cluster/src/main/assembly/files/README.txt
deleted file mode 100644
index cf49ea5..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/assembly/files/README.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-Brooklyn Example
-================
-
-To use, configure your cloud credentials then run  ./start.sh  in this directory.
-You can then access the management context in your browser, typically on  localhost:8081.
-
-
-### Cloud Credentials
-
-To run, you'll need to specify credentials for your preferred cloud.  This can be done 
-in `~/.brooklyn/brooklyn.properties`:
-
-    brooklyn.jclouds.aws-ec2.identity=AKXXXXXXXXXXXXXXXXXX
-    brooklyn.jclouds.aws-ec2.credential=secret01xxxxxxxxxxxxxxxxxxxxxxxxxxx
-
-Alternatively these can be set as shell environment parameters or JVM system properties.
-
-Many other clouds are supported also, as well as pre-existing machines ("bring your own nodes"),
-custom endpoints for private clouds, and specifying custom keys and passphrases.
-For more information see:
-
-    https://github.com/brooklyncentral/brooklyn/blob/master/docs/use/guide/defining-applications/common-usage.md#off-the-shelf-locations
-
-
-### Run
-
-Usage:
-
-    ./start.sh [--port 8081+] location
-
-Where location might be `localhost` (the defaul), or `aws-ec2:us-east-1`, `openstack:endpoint`, etc.
-
-----
-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.
\ 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/assembly/scripts/start.sh
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/assembly/scripts/start.sh b/brooklyn-library/examples/simple-web-cluster/src/main/assembly/scripts/start.sh
deleted file mode 100755
index ec4f110..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/assembly/scripts/start.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-if [ -z "$BROOKLYN_APP_CLASS" ] ; then 
-    BROOKLYN_APP_CLASS=org.apache.brooklyn.demo.WebClusterDatabaseExample
-fi
-
-if [ -z "$JAVA" ] ; then 
-    JAVA=`which java`
-fi
-if [ ! -z "$JAVA_HOME" ] ; then 
-    JAVA=$JAVA_HOME/bin/java
-else
-    JAVA=`which java`
-fi
-if [ ! -x "$JAVA" ] ; then
-  echo Cannot find java. Set JAVA_HOME or add java to path.
-  exit 1
-fi
-
-if [[ ! `ls *.jar 2> /dev/null` || ! `ls lib/*.jar 2> /dev/null` ]] ; then
-  echo Command must be run from the directory where it is installed.
-  exit 1
-fi
-
-$JAVA -Xms256m -Xmx1024m -XX:MaxPermSize=1024m -classpath "*:lib/*" $BROOKLYN_APP_CLASS "$@"

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/NodeJsTodoApplication.java
----------------------------------------------------------------------
diff --git a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/NodeJsTodoApplication.java b/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/NodeJsTodoApplication.java
deleted file mode 100644
index 086f390..0000000
--- a/brooklyn-library/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/NodeJsTodoApplication.java
+++ /dev/null
@@ -1,60 +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 org.apache.brooklyn.api.catalog.Catalog;
-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.StartableApplication;
-import org.apache.brooklyn.core.entity.trait.Startable;
-import org.apache.brooklyn.core.sensor.DependentConfiguration;
-import org.apache.brooklyn.entity.nosql.redis.RedisStore;
-import org.apache.brooklyn.entity.software.base.SoftwareProcess;
-import org.apache.brooklyn.entity.webapp.nodejs.NodeJsWebAppService;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Node.JS Todo Application
- */
-@Catalog(name="NodeJS Todo",
-        description="Node.js is a cross-platform runtime environment for server-side and networking applications. Node.js applications are written in JavaScript",
-        iconUrl="classpath://nodejs-logo.png")
-public class NodeJsTodoApplication extends AbstractApplication implements StartableApplication {
-
-    @Override
-    public void initApp() {
-        RedisStore redis = addChild(EntitySpec.create(RedisStore.class));
-
-        addChild(EntitySpec.create(NodeJsWebAppService.class)
-                .configure(NodeJsWebAppService.APP_GIT_REPOSITORY_URL, "https://github.com/grkvlt/nodejs-todo/")
-                .configure(NodeJsWebAppService.APP_FILE, "server.js")
-                .configure(NodeJsWebAppService.APP_NAME, "nodejs-todo")
-                .configure(NodeJsWebAppService.NODE_PACKAGE_LIST, ImmutableList.of("express", "ejs", "jasmine-node", "underscore", "method-override", "cookie-parser", "express-session", "body-parser", "cookie-session", "redis", "redis-url", "connect"))
-                .configure(SoftwareProcess.SHELL_ENVIRONMENT, ImmutableMap.<String, Object>of(
-                        "REDISTOGO_URL", DependentConfiguration.formatString("redis://%s:%d/",
-                                attributeWhenReady(redis, Attributes.HOSTNAME), attributeWhenReady(redis, RedisStore.REDIS_PORT))))
-                .configure(SoftwareProcess.LAUNCH_LATCH, attributeWhenReady(redis, Startable.SERVICE_UP)));
-    }
-
-}