You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by dr...@apache.org on 2017/01/19 10:59:58 UTC
[1/2] brooklyn-docs git commit: Use full configkey name in docs
rather than the shorter version
Repository: brooklyn-docs
Updated Branches:
refs/heads/master 5f1500dd1 -> c3621e20d
Use full configkey name in docs rather than the shorter version
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/2c9663ab
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/2c9663ab
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/2c9663ab
Branch: refs/heads/master
Commit: 2c9663aba5b945a6e4e6f647b83652b0d6698671
Parents: 625b046
Author: Thomas Bouron <th...@cloudsoftcorp.com>
Authored: Tue Jan 17 09:06:21 2017 +0000
Committer: Thomas Bouron <th...@cloudsoftcorp.com>
Committed: Wed Jan 18 16:00:46 2017 +0000
----------------------------------------------------------------------
.../webcluster/webcluster.include.md | 2 +-
_extra/list-of-blueprints.md | 2 +-
.../example_files/tomcat_multi-location.java | 6 +--
.../example_files/tomcat_nginx.java | 4 +-
guide/ops/locations/_special-locations.md | 12 +++---
guide/start/example_yaml/mycluster.yaml | 4 +-
guide/start/policies.md | 10 ++---
guide/yaml/clusters-and-policies.md | 2 +-
guide/yaml/clusters.md | 4 +-
guide/yaml/entity-configuration.md | 2 +-
.../appserver-clustered-w-db-concise.yaml | 2 +-
.../example_yaml/appserver-clustered-w-db.yaml | 21 +++++-----
guide/yaml/example_yaml/appserver-w-policy.yaml | 23 +++++------
guide/yaml/example_yaml/cluster-vm.yaml | 19 ++++-----
.../fabric-with-multiple-locations.yaml | 4 +-
...est-app-with-enrichers-slightly-simpler.yaml | 41 ++++++++++----------
.../vanilla-bash-netcat-cluster.yaml | 15 +++----
guide/yaml/yaml-reference.md | 4 +-
18 files changed, 91 insertions(+), 86 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/_extra/big_examples/webcluster/webcluster.include.md
----------------------------------------------------------------------
diff --git a/_extra/big_examples/webcluster/webcluster.include.md b/_extra/big_examples/webcluster/webcluster.include.md
index e135998..13ce4d8 100644
--- a/_extra/big_examples/webcluster/webcluster.include.md
+++ b/_extra/big_examples/webcluster/webcluster.include.md
@@ -91,7 +91,7 @@ public class WebClusterDatabaseExample extends AbstractApplication {
.configure("creationScriptUrl", DB_SETUP_SQL_URL));
ControlledDynamicWebAppCluster web = addChild(EntitySpec.create(ControlledDynamicWebAppCluster.class)
- .configure("memberSpec", EntitySpec.create(JBoss7Server.class)
+ .configure("dynamiccluster.memberspec", EntitySpec.create(JBoss7Server.class)
.configure("httpPort", "8080+")
.configure("war", WAR_PATH)
.configure(javaSysProp("brooklyn.example.db.url"),
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/_extra/list-of-blueprints.md
----------------------------------------------------------------------
diff --git a/_extra/list-of-blueprints.md b/_extra/list-of-blueprints.md
index 95a602c..e1d6a26 100644
--- a/_extra/list-of-blueprints.md
+++ b/_extra/list-of-blueprints.md
@@ -22,7 +22,7 @@ Web
The class ``ControlledDynamicWebAppCluster`` creates a load-balanced cluster of web servers.
It defaults to Nginx and JBoss 7, but this is configurable with the ``controller`` or ``controllerSpec``, and
-the ``memberSpec`` configuration options.
+the ``dynamiccluster.memberspec`` configuration options.
Most web app server processes, and some clusters and PaaS implementations,
support the interface ``WebAppService`` which defines many sensors including requests per second.
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/_extra/simple_java_examples/example_files/tomcat_multi-location.java
----------------------------------------------------------------------
diff --git a/_extra/simple_java_examples/example_files/tomcat_multi-location.java b/_extra/simple_java_examples/example_files/tomcat_multi-location.java
index cb92766..6cfb52a 100644
--- a/_extra/simple_java_examples/example_files/tomcat_multi-location.java
+++ b/_extra/simple_java_examples/example_files/tomcat_multi-location.java
@@ -6,9 +6,9 @@ public class TomcatFabricApp extends AbstractApplication {
.configure("displayName", "WebFabric")
.configure("displayNamePrefix", "")
.configure("displayNameSuffix", " web cluster")
- .configure("memberSpec", EntitySpec.create(ControlledDynamicWebAppCluster.class)
- .configure("initialSize", 2)
- .configure("memberSpec", : EntitySpec.create(TomcatServer.class)
+ .configure("dynamiccluster.memberspec", EntitySpec.create(ControlledDynamicWebAppCluster.class)
+ .configure("cluster.initial.size", 2)
+ .configure("dynamiccluster.memberspec", : EntitySpec.create(TomcatServer.class)
.configure("httpPort", "8080+")
.configure("war", "/path/to/booking-mvc.war"))));
}
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/_extra/simple_java_examples/example_files/tomcat_nginx.java
----------------------------------------------------------------------
diff --git a/_extra/simple_java_examples/example_files/tomcat_nginx.java b/_extra/simple_java_examples/example_files/tomcat_nginx.java
index 20db33d..db5a20e 100644
--- a/_extra/simple_java_examples/example_files/tomcat_nginx.java
+++ b/_extra/simple_java_examples/example_files/tomcat_nginx.java
@@ -9,9 +9,9 @@ public class TomcatClusterWithNginxApp extends AbstractApplication {
addChild(EntitySpec.create(ControlledDynamicWebAppCluster.class)
.configure("controller", nginxController)
- .configure("memberSpec", : EntitySpec.create(TomcatServer.class)
+ .configure("dynamiccluster.memberspec", : EntitySpec.create(TomcatServer.class)
.configure("httpPort", "8080+")
.configure("war", "/path/to/booking-mvc.war"))
- .configure("initialSize", 2));
+ .configure("cluster.initial.size", 2));
}
}
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/guide/ops/locations/_special-locations.md
----------------------------------------------------------------------
diff --git a/guide/ops/locations/_special-locations.md b/guide/ops/locations/_special-locations.md
index deed209..32f628b 100644
--- a/guide/ops/locations/_special-locations.md
+++ b/guide/ops/locations/_special-locations.md
@@ -46,8 +46,8 @@ location:
services:
- type: org.apache.brooklyn.entity.group.DynamicCluster
brooklyn.config:
- initialSize: 3
- memberSpec:
+ cluster.initial.size: 3
+ dynamiccluster.memberspec:
$brooklyn:entitySpec:
type: org.apache.brooklyn.entity.machine.MachineEntity
{% endhighlight %}
@@ -78,8 +78,8 @@ services:
- type: org.apache.brooklyn.entity.group.DynamicCluster
brooklyn.config:
dynamiccluster.zone.enable: true
- initialSize: 3
- memberSpec:
+ cluster.initial.size: 3
+ dynamiccluster.memberspec:
$brooklyn:entitySpec:
type: org.apache.brooklyn.entity.machine.MachineEntity
{% endhighlight %}
@@ -97,8 +97,8 @@ services:
- type: org.apache.brooklyn.entity.group.DynamicCluster
brooklyn.config:
dynamiccluster.zone.enable: true
- initialSize: 3
- memberSpec:
+ cluster.initial.size: 3
+ dynamiccluster.memberspec:
$brooklyn:entitySpec:
type: org.apache.brooklyn.entity.machine.MachineEntity
{% endhighlight %}
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/guide/start/example_yaml/mycluster.yaml
----------------------------------------------------------------------
diff --git a/guide/start/example_yaml/mycluster.yaml b/guide/start/example_yaml/mycluster.yaml
index 0252c3f..35641be 100644
--- a/guide/start/example_yaml/mycluster.yaml
+++ b/guide/start/example_yaml/mycluster.yaml
@@ -15,8 +15,8 @@ services:
name: Cluster
id: cluster
brooklyn.config:
- initialSize: 1
- memberSpec:
+ cluster.initial.size: 1
+ dynamiccluster.memberspec:
$brooklyn:entitySpec:
type: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
name: Tomcat Server
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/guide/start/policies.md
----------------------------------------------------------------------
diff --git a/guide/start/policies.md b/guide/start/policies.md
index 6e1059d..96a8ddf 100644
--- a/guide/start/policies.md
+++ b/guide/start/policies.md
@@ -35,8 +35,8 @@ services:
name: Cluster
id: cluster
brooklyn.config:
- initialSize: 1
- memberSpec:
+ cluster.initial.size: 1
+ dynamiccluster.memberspec:
$brooklyn:entitySpec:
type: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
name: Tomcat Server
@@ -144,8 +144,8 @@ services:
name: Cluster
id: cluster
brooklyn.config:
- initialSize: 1
- memberSpec:
+ cluster.initial.size: 1
+ dynamiccluster.memberspec:
$brooklyn:entitySpec:
type: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
name: Tomcat Server
@@ -283,7 +283,7 @@ The `DynamicCluster` can dynamically increase or decrease the number of members.
cluster can either be carried out manually via effectors or automatically by attaching an
`AutoScalerPolicy`.
-It is configured with a `memberSpec`, which defines the type and configurtion of members
+It is configured with a `dynamiccluster.memberspec`, which defines the type and configurtion of members
in the cluster. In our example, each is a Tomcat server with a WAR deployed at the root URL.
Deploy the app:
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/guide/yaml/clusters-and-policies.md
----------------------------------------------------------------------
diff --git a/guide/yaml/clusters-and-policies.md b/guide/yaml/clusters-and-policies.md
index fc65179..d40c97f 100644
--- a/guide/yaml/clusters-and-policies.md
+++ b/guide/yaml/clusters-and-policies.md
@@ -9,7 +9,7 @@ Now let's bring the concept of the "cluster" back in.
We could wrap our appserver in the same `DynamicCluster` we used earlier,
although then we'd need to define and configure the load balancer.
But another blueprint, the `ControlledDynamicWebAppCluster`, does this for us.
-It takes the same `memberSpec`, so we can build a fully functional elastic 3-tier
+It takes the same `dynamiccluster.memberspec`, so we can build a fully functional elastic 3-tier
deployment of our `hello-world-sql` application as follows:
{% highlight yaml %}
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/guide/yaml/clusters.md
----------------------------------------------------------------------
diff --git a/guide/yaml/clusters.md b/guide/yaml/clusters.md
index 78b1df9..4c1312c 100644
--- a/guide/yaml/clusters.md
+++ b/guide/yaml/clusters.md
@@ -23,12 +23,12 @@ At runtime you can restart and stop these instances as a group (on the `DynamicC
individually. You can resize the cluster, attach enrichers which aggregate sensors across the cluster,
and attach policies which, for example, replace failed members or resize the cluster dynamically.
-The specification is defined in the `memberSpec` key. As you can see it looks very much like the
+The specification is defined in the `dynamiccluster.memberspec` key. As you can see it looks very much like the
previous blueprint, with one extra line. Entries in the blueprint which start with `$brooklyn:`
refer to the Brooklyn DSL and allow a small amount of logic to be embedded
(if there's a lot of logic, it's recommended to write a blueprint YAML plugin or write the blueprint itself
as a plugin, in Java or a JVM-supported language).
-In this case we want to indicate that the parameter to `memberSpec` is an entity specification
+In this case we want to indicate that the parameter to `dynamiccluster.memberspec` is an entity specification
(`EntitySpec` in the underlying type system); the `entitySpec` DSL command will do this for us.
The example above thus gives us 5 VMs identical to the one we created in the previous section.
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/guide/yaml/entity-configuration.md
----------------------------------------------------------------------
diff --git a/guide/yaml/entity-configuration.md b/guide/yaml/entity-configuration.md
index b6bef47..b8e4625 100644
--- a/guide/yaml/entity-configuration.md
+++ b/guide/yaml/entity-configuration.md
@@ -140,7 +140,7 @@ services:
- type: org.apache.brooklyn.entity.group.DynamicCluster
brooklyn.config:
wars.root: http://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-webapp/0.9.0/brooklyn-example-hello-world-webapp-0.9.0.war
- memberSpec:
+ dynamiccluster.memberspec:
$brooklyn:entitySpec:
type: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
{% endhighlight %}
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/guide/yaml/example_yaml/appserver-clustered-w-db-concise.yaml
----------------------------------------------------------------------
diff --git a/guide/yaml/example_yaml/appserver-clustered-w-db-concise.yaml b/guide/yaml/example_yaml/appserver-clustered-w-db-concise.yaml
index 2199be3..64ed9a0 100644
--- a/guide/yaml/example_yaml/appserver-clustered-w-db-concise.yaml
+++ b/guide/yaml/example_yaml/appserver-clustered-w-db-concise.yaml
@@ -1,8 +1,8 @@
name: appserver-clustered-w-db-concise
services:
- type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
- initialSize: 2
brooklyn.config:
+ cluster.initial.size: 2
wars.root: http://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.8.0-incubating/brooklyn-example-hello-world-sql-webapp-0.8.0-incubating.war
http.port: 8080+
java.sysprops:
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/guide/yaml/example_yaml/appserver-clustered-w-db.yaml
----------------------------------------------------------------------
diff --git a/guide/yaml/example_yaml/appserver-clustered-w-db.yaml b/guide/yaml/example_yaml/appserver-clustered-w-db.yaml
index 003a4af..a3fa749 100644
--- a/guide/yaml/example_yaml/appserver-clustered-w-db.yaml
+++ b/guide/yaml/example_yaml/appserver-clustered-w-db.yaml
@@ -1,16 +1,17 @@
name: appserver-clustered-w-db
services:
- type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
- initialSize: 2
- memberSpec:
- $brooklyn:entitySpec:
- type: org.apache.brooklyn.entity.webapp.jboss.JBoss7Server
- brooklyn.config:
- wars.root: http://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.8.0-incubating/brooklyn-example-hello-world-sql-webapp-0.8.0-incubating.war
- http.port: 8080+
- java.sysprops:
- brooklyn.example.db.url: $brooklyn:formatString("jdbc:%s%s?user=%s\\&password=%s",
- component("db").attributeWhenReady("datastore.url"), "visitors", "brooklyn", "br00k11n")
+ brooklyn.config:
+ cluster.initial.size: 2
+ dynamiccluster.memberspec:
+ $brooklyn:entitySpec:
+ type: org.apache.brooklyn.entity.webapp.jboss.JBoss7Server
+ brooklyn.config:
+ wars.root: http://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.8.0-incubating/brooklyn-example-hello-world-sql-webapp-0.8.0-incubating.war
+ http.port: 8080+
+ java.sysprops:
+ brooklyn.example.db.url: $brooklyn:formatString("jdbc:%s%s?user=%s\\&password=%s",
+ component("db").attributeWhenReady("datastore.url"), "visitors", "brooklyn", "br00k11n")
- type: org.apache.brooklyn.entity.database.mysql.MySqlNode
id: db
name: DB HelloWorld Visitors
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/guide/yaml/example_yaml/appserver-w-policy.yaml
----------------------------------------------------------------------
diff --git a/guide/yaml/example_yaml/appserver-w-policy.yaml b/guide/yaml/example_yaml/appserver-w-policy.yaml
index 2d3d0db..4b10f59 100644
--- a/guide/yaml/example_yaml/appserver-w-policy.yaml
+++ b/guide/yaml/example_yaml/appserver-w-policy.yaml
@@ -1,18 +1,19 @@
name: appserver-w-policy
services:
- type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
- initialSize: 1
- memberSpec:
- $brooklyn:entitySpec:
- type: org.apache.brooklyn.entity.webapp.jboss.JBoss7Server
- brooklyn.config:
- wars.root: http://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.8.0-incubating/brooklyn-example-hello-world-sql-webapp-0.8.0-incubating.war
- http.port: 8080+
- java.sysprops:
- brooklyn.example.db.url: $brooklyn:formatString("jdbc:%s%s?user=%s\\&password=%s",
- component("db").attributeWhenReady("datastore.url"), "visitors", "brooklyn", "br00k11n")
+ brooklyn.config:
+ cluster.initial.size: 1
+ dynamiccluster.memberspec:
+ $brooklyn:entitySpec:
+ type: org.apache.brooklyn.entity.webapp.jboss.JBoss7Server
+ brooklyn.config:
+ wars.root: http://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.8.0-incubating/brooklyn-example-hello-world-sql-webapp-0.8.0-incubating.war
+ http.port: 8080+
+ java.sysprops:
+ brooklyn.example.db.url: $brooklyn:formatString("jdbc:%s%s?user=%s\\&password=%s",
+ component("db").attributeWhenReady("datastore.url"), "visitors", "brooklyn", "br00k11n")
brooklyn.policies:
- - policyType: org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy
+ - type: org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy
brooklyn.config:
metric: $brooklyn:sensor("brooklyn.entity.webapp.DynamicWebAppCluster", "webapp.reqs.perSec.windowed.perNode")
metricLowerBound: 10
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/guide/yaml/example_yaml/cluster-vm.yaml
----------------------------------------------------------------------
diff --git a/guide/yaml/example_yaml/cluster-vm.yaml b/guide/yaml/example_yaml/cluster-vm.yaml
index 2b57f4e..e21977a 100644
--- a/guide/yaml/example_yaml/cluster-vm.yaml
+++ b/guide/yaml/example_yaml/cluster-vm.yaml
@@ -1,12 +1,13 @@
name: cluster-vm
services:
- type: org.apache.brooklyn.entity.group.DynamicCluster
- initialSize: 5
- memberSpec:
- $brooklyn:entitySpec:
- type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
- name: VM
- provisioning.properties:
- minRam: 8g
- minCores: 4
- minDisk: 100g
+ brooklyn.config:
+ cluster.initial.size: 5
+ dynamiccluster.memberspec:
+ $brooklyn:entitySpec:
+ type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
+ name: VM
+ provisioning.properties:
+ minRam: 8g
+ minCores: 4
+ minDisk: 100g
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/guide/yaml/example_yaml/fabric-with-multiple-locations.yaml
----------------------------------------------------------------------
diff --git a/guide/yaml/example_yaml/fabric-with-multiple-locations.yaml b/guide/yaml/example_yaml/fabric-with-multiple-locations.yaml
index 83aae74..d923025 100644
--- a/guide/yaml/example_yaml/fabric-with-multiple-locations.yaml
+++ b/guide/yaml/example_yaml/fabric-with-multiple-locations.yaml
@@ -5,11 +5,11 @@ locations:
services:
- type: org.apache.brooklyn.entity.group.DynamicFabric
brooklyn.config:
- memberSpec:
+ dynamiccluster.memberspec:
$brooklyn:entitySpec:
type: org.apache.brooklyn.entity.group.DynamicCluster
brooklyn.config:
cluster.initial.size: 3
- memberSpec:
+ dynamiccluster.memberspec:
$brooklyn:entitySpec:
type: org.apache.brooklyn.entity.webapp.tomcat.Tomcat8Server
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/guide/yaml/example_yaml/test-app-with-enrichers-slightly-simpler.yaml
----------------------------------------------------------------------
diff --git a/guide/yaml/example_yaml/test-app-with-enrichers-slightly-simpler.yaml b/guide/yaml/example_yaml/test-app-with-enrichers-slightly-simpler.yaml
index 55d5b87..93b6795 100644
--- a/guide/yaml/example_yaml/test-app-with-enrichers-slightly-simpler.yaml
+++ b/guide/yaml/example_yaml/test-app-with-enrichers-slightly-simpler.yaml
@@ -6,27 +6,28 @@ description: Testing many enrichers
services:
- type: org.apache.brooklyn.entity.group.DynamicCluster
id: cluster
- initialSize: 3
location: localhost
- memberSpec:
- $brooklyn:entitySpec:
- type: org.apache.brooklyn.core.test.entity.TestEntity
- brooklyn.enrichers:
- - type: org.apache.brooklyn.enricher.stock.Transformer
- # transform "ip" (which we expect a feed, not shown here, to set) to a URL;
- # you can curl an address string to the sensors/ip endpoint an entity to trigger these enrichers
- brooklyn.config:
- enricher.sourceSensor: $brooklyn:sensor("ip")
- enricher.targetSensor: $brooklyn:sensor("url")
- enricher.targetValue: $brooklyn:formatString("http://%s/", $brooklyn:attributeWhenReady("ip"))
- - type: org.apache.brooklyn.enricher.stock.Propagator
- # use propagator to duplicate one sensor as another, giving the supplied sensor mapping;
- # the other use of Propagator is where you specify a producer (using $brooklyn:entity(...) as below)
- # from which to take sensors; in that mode you can specify `propagate` as a list of sensors whose names are unchanged,
- # instead of (or in addition to) this map
- brooklyn.config:
- sensorMapping:
- $brooklyn:sensor("url"): $brooklyn:sensor("org.apache.brooklyn.core.entity.Attributes", "main.uri")
+ brooklyn.config:
+ cluster.initial.size: 3
+ dynamiccluster.memberspec:
+ $brooklyn:entitySpec:
+ type: org.apache.brooklyn.core.test.entity.TestEntity
+ brooklyn.enrichers:
+ - type: org.apache.brooklyn.enricher.stock.Transformer
+ # transform "ip" (which we expect a feed, not shown here, to set) to a URL;
+ # you can curl an address string to the sensors/ip endpoint an entity to trigger these enrichers
+ brooklyn.config:
+ enricher.sourceSensor: $brooklyn:sensor("ip")
+ enricher.targetSensor: $brooklyn:sensor("url")
+ enricher.targetValue: $brooklyn:formatString("http://%s/", $brooklyn:attributeWhenReady("ip"))
+ - type: org.apache.brooklyn.enricher.stock.Propagator
+ # use propagator to duplicate one sensor as another, giving the supplied sensor mapping;
+ # the other use of Propagator is where you specify a producer (using $brooklyn:entity(...) as below)
+ # from which to take sensors; in that mode you can specify `propagate` as a list of sensors whose names are unchanged,
+ # instead of (or in addition to) this map
+ brooklyn.config:
+ sensorMapping:
+ $brooklyn:sensor("url"): $brooklyn:sensor("org.apache.brooklyn.core.entity.Attributes", "main.uri")
brooklyn.enrichers:
- type: org.apache.brooklyn.enricher.stock.Aggregator
# aggregate `url` sensors from children into a list
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/guide/yaml/example_yaml/vanilla-bash-netcat-cluster.yaml
----------------------------------------------------------------------
diff --git a/guide/yaml/example_yaml/vanilla-bash-netcat-cluster.yaml b/guide/yaml/example_yaml/vanilla-bash-netcat-cluster.yaml
index 70b69af..813445f 100644
--- a/guide/yaml/example_yaml/vanilla-bash-netcat-cluster.yaml
+++ b/guide/yaml/example_yaml/vanilla-bash-netcat-cluster.yaml
@@ -2,10 +2,11 @@ name: Netcat Cluster Example
location: localhost
services:
- type: org.apache.brooklyn.entity.group.DynamicCluster
- memberSpec:
- $brooklyn:entitySpec:
- type: netcat-example
- message: hello from cluster member
- netcat.port: 8000+
- initialSize: 3
- restartMode: parallel
+ brooklyn.config:
+ dynamiccluster.memberspec:
+ $brooklyn:entitySpec:
+ type: netcat-example
+ message: hello from cluster member
+ netcat.port: 8000+
+ cluster.initial.size: 3
+ restartMode: parallel
http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/2c9663ab/guide/yaml/yaml-reference.md
----------------------------------------------------------------------
diff --git a/guide/yaml/yaml-reference.md b/guide/yaml/yaml-reference.md
index 35a42f0..8b8ca8f 100644
--- a/guide/yaml/yaml-reference.md
+++ b/guide/yaml/yaml-reference.md
@@ -218,7 +218,7 @@ concise DSL defined here:
and either `object.fields` or `brooklyn.config` to supply bean/constructor/flags to create an instance
* `$brooklyn:entitySpec(Map)` returns a new `ServiceSpecification` as defined by the given `Map`,
but as an `EntitySpec` suitable for setting as the value of `ConfigKey<EntitySpec>` config items
- (such as `memberSpec` in `DynamicCluster`)
+ (such as `dynamiccluster.memberspec` in `DynamicCluster`)
<!-- TODO examples for object and entitySpec -->
@@ -237,6 +237,6 @@ elements for more information:
* **Chef** in `ChefSoftwareProcess`: makes it easy to use Chef cookbooks to build entities,
either with recipes following conventions or with configuration in the `ServiceSpecification`
to use artibitrary recipes
-* `DynamicCluster`: provides resizable clusters given a `memberSpec` set with `$brooklyn.entitySpec(Map)` as described above
+* `DynamicCluster`: provides resizable clusters given a `dynamiccluster.memberspec` set with `$brooklyn.entitySpec(Map)` as described above
* `DynamicFabric`: provides a set of homogeneous instances started in different locations,
with an effector to `addLocation`, i.e. add a new instance in a given location, at runtime
[2/2] brooklyn-docs git commit: This closes #138
Posted by dr...@apache.org.
This closes #138
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/c3621e20
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/c3621e20
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/c3621e20
Branch: refs/heads/master
Commit: c3621e20da15b044197667008c9505e64d0da1ed
Parents: 5f1500d 2c9663a
Author: Duncan Godwin <dr...@googlemail.com>
Authored: Thu Jan 19 10:59:34 2017 +0000
Committer: Duncan Godwin <dr...@googlemail.com>
Committed: Thu Jan 19 10:59:34 2017 +0000
----------------------------------------------------------------------
.../webcluster/webcluster.include.md | 2 +-
_extra/list-of-blueprints.md | 2 +-
.../example_files/tomcat_multi-location.java | 6 +--
.../example_files/tomcat_nginx.java | 4 +-
guide/ops/locations/_special-locations.md | 12 +++---
guide/start/example_yaml/mycluster.yaml | 4 +-
guide/start/policies.md | 10 ++---
guide/yaml/clusters-and-policies.md | 2 +-
guide/yaml/clusters.md | 4 +-
guide/yaml/entity-configuration.md | 2 +-
.../appserver-clustered-w-db-concise.yaml | 2 +-
.../example_yaml/appserver-clustered-w-db.yaml | 21 +++++-----
guide/yaml/example_yaml/appserver-w-policy.yaml | 23 +++++------
guide/yaml/example_yaml/cluster-vm.yaml | 19 ++++-----
.../fabric-with-multiple-locations.yaml | 4 +-
...est-app-with-enrichers-slightly-simpler.yaml | 41 ++++++++++----------
.../vanilla-bash-netcat-cluster.yaml | 15 +++----
guide/yaml/yaml-reference.md | 4 +-
18 files changed, 91 insertions(+), 86 deletions(-)
----------------------------------------------------------------------