You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2015/09/11 17:10:48 UTC

[1/3] incubator-brooklyn git commit: Documentation updates

Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master e92dd1ef4 -> 5c9153e85


Documentation updates

Various documentation updates


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

Branch: refs/heads/master
Commit: 315576669bfa9f239174b4eb39ca8b4a494ab2e5
Parents: e92dd1e
Author: Graeme-Miller <gr...@Graemes-MacBook-Pro.local>
Authored: Thu Sep 10 13:47:31 2015 +0100
Committer: Graeme-Miller <gr...@Graemes-MacBook-Pro.local>
Committed: Thu Sep 10 13:47:31 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/brooklyn/camp/spi/resolve/PdpProcessor.java   | 2 +-
 docs/guide/yaml/multiple-services.md                              | 2 +-
 .../org/apache/brooklyn/policy/autoscaling/AutoScalerPolicy.java  | 3 +++
 3 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/31557666/camp/camp-base/src/main/java/org/apache/brooklyn/camp/spi/resolve/PdpProcessor.java
----------------------------------------------------------------------
diff --git a/camp/camp-base/src/main/java/org/apache/brooklyn/camp/spi/resolve/PdpProcessor.java b/camp/camp-base/src/main/java/org/apache/brooklyn/camp/spi/resolve/PdpProcessor.java
index 49e7ee1..8716aa5 100644
--- a/camp/camp-base/src/main/java/org/apache/brooklyn/camp/spi/resolve/PdpProcessor.java
+++ b/camp/camp-base/src/main/java/org/apache/brooklyn/camp/spi/resolve/PdpProcessor.java
@@ -163,7 +163,7 @@ public class PdpProcessor {
                     return;
             }
         }
-        throw new IllegalArgumentException("Deployment plan item "+deploymentPlanItem+" cannot be matched");
+        throw new IllegalArgumentException("Deployment plan item cannot be matched. Please check your YAML. Item: "+deploymentPlanItem);
     }
 
     // ----------------------------

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/31557666/docs/guide/yaml/multiple-services.md
----------------------------------------------------------------------
diff --git a/docs/guide/yaml/multiple-services.md b/docs/guide/yaml/multiple-services.md
index 0f443dd..81ddf07 100644
--- a/docs/guide/yaml/multiple-services.md
+++ b/docs/guide/yaml/multiple-services.md
@@ -59,7 +59,7 @@ All quote characters must be plain ASCII, not fancy left-double-quotes and right
 
 There are as many ways to do dependency injection as there are developers,
 it sometimes seems; our aim in Brooklyn is not to say this has to be done one way,
-but to support the various mechanisms people might need to do, for whatever reasons.
+but to support the various mechanisms people might need, for whatever reasons.
 (We each have our opinions about what works well, of course;
 the one thing we do want to call out is that being able to dynamically update
 the injection is useful in a modern agile application -- so we are definitively **not**

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/31557666/policy/src/main/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicy.java
----------------------------------------------------------------------
diff --git a/policy/src/main/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicy.java b/policy/src/main/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicy.java
index d297828..b596a52 100644
--- a/policy/src/main/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicy.java
+++ b/policy/src/main/java/org/apache/brooklyn/policy/autoscaling/AutoScalerPolicy.java
@@ -266,17 +266,20 @@ public class AutoScalerPolicy extends AbstractPolicy {
     @SetFromFlag("entityWithMetric")
     public static final ConfigKey<Entity> ENTITY_WITH_METRIC = BasicConfigKey.builder(Entity.class)
             .name("autoscaler.entityWithMetric")
+            .description("The Entity with the metric that will be monitored")
             .build();
     
     @SetFromFlag("metricLowerBound")
     public static final ConfigKey<Number> METRIC_LOWER_BOUND = BasicConfigKey.builder(Number.class)
             .name("autoscaler.metricLowerBound")
+            .description("The lower bound of the monitored metric. Below this the policy will resize down")
             .reconfigurable(true)
             .build();
     
     @SetFromFlag("metricUpperBound")
     public static final ConfigKey<Number> METRIC_UPPER_BOUND = BasicConfigKey.builder(Number.class)
             .name("autoscaler.metricUpperBound")
+            .description("The upper bound of the monitored metric. Above this the policy will resize up")
             .reconfigurable(true)
             .build();
     


[2/3] incubator-brooklyn git commit: Documentation Update

Posted by al...@apache.org.
Documentation Update

Updated the policy getting started guide


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/1d60da63
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/1d60da63
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/1d60da63

Branch: refs/heads/master
Commit: 1d60da6378d2ae72bc6c34f6861c1ff3c7b4f74a
Parents: 3155766
Author: Graeme-Miller <gr...@Graemes-MacBook-Pro.local>
Authored: Thu Sep 10 15:43:22 2015 +0100
Committer: Graeme-Miller <gr...@Graemes-MacBook-Pro.local>
Committed: Thu Sep 10 15:43:22 2015 +0100

----------------------------------------------------------------------
 docs/guide/start/_my-web-cluster2.yaml          |  31 +++++++++++++++++++
 .../images/jboss7-cluster-policies-large.png    | Bin 157883 -> 0 bytes
 .../start/images/jboss7-cluster-policies.png    | Bin 94056 -> 0 bytes
 docs/guide/start/policies.md                    |  16 +++++-----
 4 files changed, 39 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/1d60da63/docs/guide/start/_my-web-cluster2.yaml
----------------------------------------------------------------------
diff --git a/docs/guide/start/_my-web-cluster2.yaml b/docs/guide/start/_my-web-cluster2.yaml
new file mode 100644
index 0000000..33723ab
--- /dev/null
+++ b/docs/guide/start/_my-web-cluster2.yaml
@@ -0,0 +1,31 @@
+name: My Web Cluster
+
+location: localhost
+
+services:
+
+- type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
+  name: My Web
+  brooklyn.config:
+    wars.root: http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0/brooklyn-example-hello-world-sql-webapp-0.6.0.war
+    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:
+  - type: org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy
+    brooklyn.config:
+      metric: webapp.reqs.perSec.windowed.perNode
+      metricLowerBound: 0.1
+      metricUpperBound: 10
+      minPoolSize: 1
+      maxPoolSize: 4
+      resizeUpStabilizationDelay: 10s
+      resizeDownStabilizationDelay: 1m
+
+- type: org.apache.brooklyn.entity.database.mysql.MySqlNode
+  id: db
+  name: My DB
+  brooklyn.config:
+    creationScriptUrl: https://bit.ly/brooklyn-visitors-creation-script

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/1d60da63/docs/guide/start/images/jboss7-cluster-policies-large.png
----------------------------------------------------------------------
diff --git a/docs/guide/start/images/jboss7-cluster-policies-large.png b/docs/guide/start/images/jboss7-cluster-policies-large.png
deleted file mode 100644
index 3d84477..0000000
Binary files a/docs/guide/start/images/jboss7-cluster-policies-large.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/1d60da63/docs/guide/start/images/jboss7-cluster-policies.png
----------------------------------------------------------------------
diff --git a/docs/guide/start/images/jboss7-cluster-policies.png b/docs/guide/start/images/jboss7-cluster-policies.png
deleted file mode 100644
index 2f85328..0000000
Binary files a/docs/guide/start/images/jboss7-cluster-policies.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/1d60da63/docs/guide/start/policies.md
----------------------------------------------------------------------
diff --git a/docs/guide/start/policies.md b/docs/guide/start/policies.md
index 612aa83..b1029b2 100644
--- a/docs/guide/start/policies.md
+++ b/docs/guide/start/policies.md
@@ -6,22 +6,22 @@ layout: website-normal
 
 ### Exploring and Testing Policies
 
-The Demo Web Cluster with DB application is pre-configured with two policies.
+To see an example of policy based management, please deploy the following blueprint:
 
-The app server cluster has an `AutoScalerPolicy`, and the loadbalancer has a `targets` policy.
-
-Use the Applications tab in the web console to drill down into the Policies section of the ControlledDynamicWebAppCluster's Cluster of JBoss7Servers.
+{% highlight yaml %}
+{% readj _my-web-cluster2.yaml %}
+{% endhighlight %}
 
-You will see that the `AutoScalerPolicy` is running.
+The app server cluster has an `AutoScalerPolicy`, and the loadbalancer has a `targets` policy.
 
-[![Inspecting the jboss7 cluster policies.](images/jboss7-cluster-policies.png)](images/jboss7-cluster-policies-large.png)
+Use the Applications tab in the web console to drill down into the Policies section of the ControlledDynamicWebAppCluster. You will see that the `AutoScalerPolicy` is running.
 
 
-This policy automatically scales the cluster up or down to be the right size for the cluster's current load. (One server is the minimum size allowed by the policy.)
+This policy automatically scales the cluster up or down to be the right size for the cluster's current load. One server is the minimum size allowed by the policy.
 
 The loadbalancer's `targets` policy ensures that the loadbalancer is updated as the cluster size changes.
 
-Sitting idle, this cluster will only contain one server, but you can use a tool like [jmeter](http://jmeter.apache.org/) pointed at the nginx endpoint to create load on the cluster. (Download a [jmeter test plan](https://github.com/apache/incubator-brooklyn/blob/master/examples/simple-web-cluster/resources/jmeter-test-plan.jmx).)
+Sitting idle, this cluster will only contain one server, but you can use a tool like [jmeter](http://jmeter.apache.org/) pointed at the nginx endpoint to create load on the cluster. Download a jmeter test plan [here](https://github.com/apache/incubator-brooklyn/blob/master/examples/simple-web-cluster/resources/jmeter-test-plan.jmx).
 
 As load is added, Apache Brooklyn requests a new cloud machine, creates a new app server, and adds it to the cluster. As load is removed, servers are removed from the cluster, and the infrastructure is handed back to the cloud.
 


[3/3] incubator-brooklyn git commit: This closes #889

Posted by al...@apache.org.
This closes #889


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/5c9153e8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/5c9153e8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/5c9153e8

Branch: refs/heads/master
Commit: 5c9153e855f4bb7dbe41b4cf7fbb96a48eb6c79e
Parents: e92dd1e 1d60da6
Author: Aled Sage <al...@gmail.com>
Authored: Fri Sep 11 16:10:36 2015 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Fri Sep 11 16:10:36 2015 +0100

----------------------------------------------------------------------
 .../brooklyn/camp/spi/resolve/PdpProcessor.java |   2 +-
 docs/guide/start/_my-web-cluster2.yaml          |  31 +++++++++++++++++++
 .../images/jboss7-cluster-policies-large.png    | Bin 157883 -> 0 bytes
 .../start/images/jboss7-cluster-policies.png    | Bin 94056 -> 0 bytes
 docs/guide/start/policies.md                    |  16 +++++-----
 docs/guide/yaml/multiple-services.md            |   2 +-
 .../policy/autoscaling/AutoScalerPolicy.java    |   3 ++
 7 files changed, 44 insertions(+), 10 deletions(-)
----------------------------------------------------------------------