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:49 UTC

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

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.