You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sj...@apache.org on 2016/05/23 09:58:58 UTC

[1/2] brooklyn-docs git commit: Improve multi-location docs

Repository: brooklyn-docs
Updated Branches:
  refs/heads/master 3b99db2da -> 74a25d1e5


Improve multi-location docs

In particular, how it can be used with the \u201cavailability zone\u201d extension
to round-robin across the targets.

Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/0fb32085
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/0fb32085
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/0fb32085

Branch: refs/heads/master
Commit: 0fb32085c074a2b51a246b8d8a66e86dce0e9457
Parents: 3b99db2
Author: Aled Sage <al...@gmail.com>
Authored: Sun May 22 21:51:48 2016 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Sun May 22 21:51:48 2016 +0100

----------------------------------------------------------------------
 guide/ops/locations/_special-locations.md | 53 +++++++++++++++++++++-----
 1 file changed, 43 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/0fb32085/guide/ops/locations/_special-locations.md
----------------------------------------------------------------------
diff --git a/guide/ops/locations/_special-locations.md b/guide/ops/locations/_special-locations.md
index 8f19fa4..df38d1f 100644
--- a/guide/ops/locations/_special-locations.md
+++ b/guide/ops/locations/_special-locations.md
@@ -15,10 +15,9 @@ provides a convenient syntax when specifying a single host.
 For example:
 
 {% highlight yaml %}
+location: host:(192.168.0.1)
 services:
 - type: org.apache.brooklyn.entity.webapp.jboss.JBoss7Server 
-  location:
-    host: 192.168.0.1
 {% endhighlight %}
 
 Or, in `brooklyn.properties`, set `brooklyn.location.named.host1=host:(192.168.0.1)`.
@@ -28,23 +27,57 @@ Or, in `brooklyn.properties`, set `brooklyn.location.named.host1=host:(192.168.0
 
 The spec `multi` allows multiple locations, specified as `targets`,
 to be combined and treated as one location.
-When the first target is full, the next is tried, and so on:
+
+In its simplest form, this will use the first target location where possible,
+and will then switch to the second and subsequent locations when there are no
+machine available.
+
+In the example below, it provisions the first node to `192.168.0.1`, then it provisions into AWS 
+us-east-1 region (because the bring-your-own-nodes region will have run out of nodes).
 
 {% highlight yaml %}
 location:
   multi:
     targets:
     - byon:(hosts=192.168.0.1)
-    - jclouds:aws-ec2:
-      identity: acct1
-    - jclouds:aws-ec2:
-      identity: acct2      
+    - jclouds:aws-ec2:us-east-1
+services:
+- type: org.apache.brooklyn.entity.group.DynamicCluster
+  brooklyn.config:
+    initialSize: 3
+    memberSpec:
+      $brooklyn:entitySpec:
+        type: org.apache.brooklyn.entity.machine.MachineEntity
 {% endhighlight %}
 
-The example above provisions the first node to `192.168.0.1`,
-then it provisions into `acct1` at Amazon if possible,
-and then to `acct2`.
+The `multi` location also supports the "availability zone" location extension: it presents each  
+target location as an "availability zone". This means that a cluster can be configured to
+round-robin across the targets.
 
+For example, in the blueprint below the cluster will request VMs round-robin across the three zones
+(where `zone1` etc are locations already added to the catalog, or defined in brooklyn.properties).
+The configuration option `dynamiccluster.zone.enable` on `DynamicCluster` tells it to query the 
+given location for the `AvailabilityZoneExtension`. If available, it will query for the list of  
+zones (in this case the list of targets), and then use them round-robin. Custom alternatives to 
+round-robin are also possible using the configuration option `dynamiccluster.zone.placementStrategy`
+on `DynamicCluster`.
+
+{% highlight yaml %}
+location:
+  multi:
+    targets:
+    - zone1
+    - zone2
+    - zone3
+services:
+- type: org.apache.brooklyn.entity.group.DynamicCluster
+  brooklyn.config:
+    dynamiccluster.zone.enable: true
+    initialSize: 4
+    memberSpec:
+      $brooklyn:entitySpec:
+        type: org.apache.brooklyn.entity.machine.MachineEntity
+{% endhighlight %}
 
 
 #### The Server Pool


[2/2] brooklyn-docs git commit: This closes #70

Posted by sj...@apache.org.
This closes #70

Improve multi-location docs


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/74a25d1e
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/74a25d1e
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/74a25d1e

Branch: refs/heads/master
Commit: 74a25d1e5a3cf1dfde4c541772dd8cd6f368d24b
Parents: 3b99db2 0fb3208
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Mon May 23 10:58:45 2016 +0100
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Mon May 23 10:58:45 2016 +0100

----------------------------------------------------------------------
 guide/ops/locations/_special-locations.md | 53 +++++++++++++++++++++-----
 1 file changed, 43 insertions(+), 10 deletions(-)
----------------------------------------------------------------------