Repository: brooklyn-docs Updated Branches: refs/heads/master 68ec56c37 -> 3772c2158
Update outdated blueprint examples Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/70811077 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/70811077 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/70811077 Branch: refs/heads/master Commit: 70811077055ff64af1cfe233980c900c34d25dde Parents: ba01df1 Author: Thomas Bouron <[email protected]> Authored: Wed Nov 8 17:56:09 2017 +0000 Committer: Thomas Bouron <[email protected]> Committed: Wed Nov 8 18:14:28 2017 +0000 ---------------------------------------------------------------------- .../appserver-clustered-w-db-concise.yaml | 2 +- .../example_yaml/appserver-clustered-w-db.yaml | 2 +- .../example_yaml/appserver-configured.yaml | 2 +- .../example_yaml/appserver-w-db-other-flavor.yaml | 2 +- guide/blueprints/example_yaml/appserver-w-db.yaml | 2 +- .../blueprints/example_yaml/appserver-w-policy.yaml | 2 +- .../example_yaml/brooklyn-elk-catalog.bom | 2 +- .../example_yaml/entities/testeffector-entity.yaml | 2 +- .../testcases/effector-test-snippet.yaml | 2 +- .../testcases/getting-started-test-example.yaml | 4 ++-- guide/blueprints/test/usage-examples.md | 16 ++++++++-------- guide/ops/gui/_my-web-cluster.yaml | 2 +- guide/ops/gui/_my-web-cluster2.yaml | 2 +- guide/start/_my-web-cluster.yaml | 4 ++-- guide/start/_my-web-cluster2.yaml | 2 +- guide/start/example_yaml/mycluster.yaml | 2 +- 16 files changed, 25 insertions(+), 25 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/blueprints/example_yaml/appserver-clustered-w-db-concise.yaml ---------------------------------------------------------------------- diff --git a/guide/blueprints/example_yaml/appserver-clustered-w-db-concise.yaml b/guide/blueprints/example_yaml/appserver-clustered-w-db-concise.yaml index 1905352..f4176fa 100644 --- a/guide/blueprints/example_yaml/appserver-clustered-w-db-concise.yaml +++ b/guide/blueprints/example_yaml/appserver-clustered-w-db-concise.yaml @@ -3,7 +3,7 @@ services: - type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster 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 + wars.root: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION 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", $brooklyn:external("brooklyn-demo-sample", "hidden-brooklyn-password")) http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/blueprints/example_yaml/appserver-clustered-w-db.yaml ---------------------------------------------------------------------- diff --git a/guide/blueprints/example_yaml/appserver-clustered-w-db.yaml b/guide/blueprints/example_yaml/appserver-clustered-w-db.yaml index 04c8519..024cc4d 100644 --- a/guide/blueprints/example_yaml/appserver-clustered-w-db.yaml +++ b/guide/blueprints/example_yaml/appserver-clustered-w-db.yaml @@ -7,7 +7,7 @@ services: $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 + wars.root: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION http.port: 8080+ java.sysprops: brooklyn.example.db.url: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/blueprints/example_yaml/appserver-configured.yaml ---------------------------------------------------------------------- diff --git a/guide/blueprints/example_yaml/appserver-configured.yaml b/guide/blueprints/example_yaml/appserver-configured.yaml index 5d85edd..85cd193 100644 --- a/guide/blueprints/example_yaml/appserver-configured.yaml +++ b/guide/blueprints/example_yaml/appserver-configured.yaml @@ -2,5 +2,5 @@ name: appserver-configured services: - 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 + wars.root: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION http.port: 8080 http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/blueprints/example_yaml/appserver-w-db-other-flavor.yaml ---------------------------------------------------------------------- diff --git a/guide/blueprints/example_yaml/appserver-w-db-other-flavor.yaml b/guide/blueprints/example_yaml/appserver-w-db-other-flavor.yaml index 14d9f44..fe4013c 100644 --- a/guide/blueprints/example_yaml/appserver-w-db-other-flavor.yaml +++ b/guide/blueprints/example_yaml/appserver-w-db-other-flavor.yaml @@ -3,7 +3,7 @@ services: - type: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer name: AppServer HelloWorld 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 + wars.root: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION http.port: 8080+ java.sysprops: brooklyn.example.db.url: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/blueprints/example_yaml/appserver-w-db.yaml ---------------------------------------------------------------------- diff --git a/guide/blueprints/example_yaml/appserver-w-db.yaml b/guide/blueprints/example_yaml/appserver-w-db.yaml index 768ba64..5510ba7 100644 --- a/guide/blueprints/example_yaml/appserver-w-db.yaml +++ b/guide/blueprints/example_yaml/appserver-w-db.yaml @@ -3,7 +3,7 @@ services: - type: org.apache.brooklyn.entity.webapp.jboss.JBoss7Server name: AppServer HelloWorld 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 + wars.root: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION http.port: 8080+ java.sysprops: brooklyn.example.db.url: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/blueprints/example_yaml/appserver-w-policy.yaml ---------------------------------------------------------------------- diff --git a/guide/blueprints/example_yaml/appserver-w-policy.yaml b/guide/blueprints/example_yaml/appserver-w-policy.yaml index 4e193c6..6ebe087 100644 --- a/guide/blueprints/example_yaml/appserver-w-policy.yaml +++ b/guide/blueprints/example_yaml/appserver-w-policy.yaml @@ -7,7 +7,7 @@ services: $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 + wars.root: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION http.port: 8080+ java.sysprops: brooklyn.example.db.url: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/blueprints/example_yaml/brooklyn-elk-catalog.bom ---------------------------------------------------------------------- diff --git a/guide/blueprints/example_yaml/brooklyn-elk-catalog.bom b/guide/blueprints/example_yaml/brooklyn-elk-catalog.bom index c3c3e60..c67fca7 100644 --- a/guide/blueprints/example_yaml/brooklyn-elk-catalog.bom +++ b/guide/blueprints/example_yaml/brooklyn-elk-catalog.bom @@ -49,7 +49,7 @@ brooklyn.catalog: id: tomcat latch.customize: $brooklyn:entity("es").attributeWhenReady("service.isUp") 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" + wars.root: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION children.startable.mode: background_late provisioning.properties: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/blueprints/test/example_yaml/entities/testeffector-entity.yaml ---------------------------------------------------------------------- diff --git a/guide/blueprints/test/example_yaml/entities/testeffector-entity.yaml b/guide/blueprints/test/example_yaml/entities/testeffector-entity.yaml index 2905806..980116c 100644 --- a/guide/blueprints/test/example_yaml/entities/testeffector-entity.yaml +++ b/guide/blueprints/test/example_yaml/entities/testeffector-entity.yaml @@ -5,5 +5,5 @@ effector: deploy timeout: 5m params: - url: 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 + url: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION targetName: newcontext \ No newline at end of file http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/blueprints/test/example_yaml/testcases/effector-test-snippet.yaml ---------------------------------------------------------------------- diff --git a/guide/blueprints/test/example_yaml/testcases/effector-test-snippet.yaml b/guide/blueprints/test/example_yaml/testcases/effector-test-snippet.yaml index ad8659a..84dfa09 100644 --- a/guide/blueprints/test/example_yaml/testcases/effector-test-snippet.yaml +++ b/guide/blueprints/test/example_yaml/testcases/effector-test-snippet.yaml @@ -16,7 +16,7 @@ effector: deploy timeout: 5m params: - url: 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 + url: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION targetName: newcontext - type: org.apache.brooklyn.test.framework.TestHttpCall name: Check Deployed Webapp Status Code http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/blueprints/test/example_yaml/testcases/getting-started-test-example.yaml ---------------------------------------------------------------------- diff --git a/guide/blueprints/test/example_yaml/testcases/getting-started-test-example.yaml b/guide/blueprints/test/example_yaml/testcases/getting-started-test-example.yaml index 9b2ab89..788dabf 100644 --- a/guide/blueprints/test/example_yaml/testcases/getting-started-test-example.yaml +++ b/guide/blueprints/test/example_yaml/testcases/getting-started-test-example.yaml @@ -10,7 +10,7 @@ services: name: My Web id: webappcluster 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 + wars.root: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION java.sysprops: brooklyn.example.db.url: > $brooklyn:formatString("jdbc:%s%s?user=%s&password=%s", @@ -62,7 +62,7 @@ services: effector: deploy timeout: 5m params: - url: 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 + url: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION targetName: newcontext - type: org.apache.brooklyn.test.framework.TestHttpCall name: Check Deployed Webapp Status Code http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/blueprints/test/usage-examples.md ---------------------------------------------------------------------- diff --git a/guide/blueprints/test/usage-examples.md b/guide/blueprints/test/usage-examples.md index 11302aa..91951a0 100644 --- a/guide/blueprints/test/usage-examples.md +++ b/guide/blueprints/test/usage-examples.md @@ -19,14 +19,6 @@ Demonstrates the following sensor assertion: !CODEFILE "example_yaml/testcases/sensor-test-snippet.yaml" -### HTTP Call Tests -Demonstrates the following HTTP Call assertions against the specified `url`, which in these examples are being built from the `webappcluster` entities `host.address` and `proxy.http.port` sensors (the tester having flexibility in how the test URL is to be constructed): - -- asserts the response status code is 200 within 10 minutes of the blueprint being deployed. -- asserts the response body matches the regex `(?s).*Br[o]{2}klyn Deployed.*` within 10 minutes of the blueprint being deployed. Note the presence of the `(?s)` dotall flag to test a multiline response. - -!CODEFILE "example_yaml/testcases/http-test-snippet.yaml" - ### Effector Test (via TestCase entity) This `TestEffector` example demonstrates the use of the `TestCase` and `TestSensor` entities to ensure the service has started before invoking an effector using the `TestEffector` entity. @@ -38,6 +30,14 @@ This `TestEffector` example demonstrates the use of the `TestCase` and `TestSens !CODEFILE "example_yaml/testcases/effector-test-snippet.yaml" +### HTTP Call Tests +Demonstrates the following HTTP Call assertions against the specified `url`, which in these examples are being built from the `webappcluster` entities `host.address` and `proxy.http.port` sensors (the tester having flexibility in how the test URL is to be constructed): + +- asserts the response status code is 200 within 10 minutes of the blueprint being deployed. +- asserts the response body matches the regex `(?s).*Br[o]{2}klyn Deployed.*` within 10 minutes of the blueprint being deployed. Note the presence of the `(?s)` dotall flag to test a multiline response. + +!CODEFILE "example_yaml/testcases/http-test-snippet.yaml" + ### Full Example A sample blueprint containing all the tests described above is available [here](./example_yaml/testcases/getting-started-test-example.yaml). http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/ops/gui/_my-web-cluster.yaml ---------------------------------------------------------------------- diff --git a/guide/ops/gui/_my-web-cluster.yaml b/guide/ops/gui/_my-web-cluster.yaml index a00949e..65e01c1 100644 --- a/guide/ops/gui/_my-web-cluster.yaml +++ b/guide/ops/gui/_my-web-cluster.yaml @@ -10,7 +10,7 @@ services: name: My Web id: webappcluster 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 + wars.root: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION java.sysprops: brooklyn.example.db.url: > $brooklyn:formatString("jdbc:%s%s?user=%s&password=%s", http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/ops/gui/_my-web-cluster2.yaml ---------------------------------------------------------------------- diff --git a/guide/ops/gui/_my-web-cluster2.yaml b/guide/ops/gui/_my-web-cluster2.yaml index bef8d1a..fd0fef5 100644 --- a/guide/ops/gui/_my-web-cluster2.yaml +++ b/guide/ops/gui/_my-web-cluster2.yaml @@ -7,7 +7,7 @@ services: - type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster name: My Web 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 + wars.root: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION java.sysprops: brooklyn.example.db.url: > $brooklyn:formatString("jdbc:%s%s?user=%s&password=%s", http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/start/_my-web-cluster.yaml ---------------------------------------------------------------------- diff --git a/guide/start/_my-web-cluster.yaml b/guide/start/_my-web-cluster.yaml index a00949e..6cccedd 100644 --- a/guide/start/_my-web-cluster.yaml +++ b/guide/start/_my-web-cluster.yaml @@ -10,7 +10,7 @@ services: name: My Web id: webappcluster 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 + wars.root: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION java.sysprops: brooklyn.example.db.url: > $brooklyn:formatString("jdbc:%s%s?user=%s&password=%s", @@ -21,4 +21,4 @@ services: id: db brooklyn.config: creation.script.password: $brooklyn:external("brooklyn-demo-sample", "hidden-brooklyn-password") - datastore.creation.script.url: https://bit.ly/brooklyn-visitors-creation-script \ No newline at end of file + datastore.creation.script.url: https://bit.ly/brooklyn-visitors-creation-script http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/start/_my-web-cluster2.yaml ---------------------------------------------------------------------- diff --git a/guide/start/_my-web-cluster2.yaml b/guide/start/_my-web-cluster2.yaml index bef8d1a..fd0fef5 100644 --- a/guide/start/_my-web-cluster2.yaml +++ b/guide/start/_my-web-cluster2.yaml @@ -7,7 +7,7 @@ services: - type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster name: My Web 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 + wars.root: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.12.0/brooklyn-example-hello-world-sql-webapp-0.12.0.war # BROOKLYN_VERSION java.sysprops: brooklyn.example.db.url: > $brooklyn:formatString("jdbc:%s%s?user=%s&password=%s", http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/70811077/guide/start/example_yaml/mycluster.yaml ---------------------------------------------------------------------- diff --git a/guide/start/example_yaml/mycluster.yaml b/guide/start/example_yaml/mycluster.yaml index 35641be..98509dd 100644 --- a/guide/start/example_yaml/mycluster.yaml +++ b/guide/start/example_yaml/mycluster.yaml @@ -21,7 +21,7 @@ services: type: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer name: Tomcat Server brooklyn.config: - wars.root: http://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-webapp/0.8.0-incubating/brooklyn-example-hello-world-webapp-0.8.0-incubating.war + wars.root: https://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-webapp/0.12.0/brooklyn-example-hello-world-webapp-0.12.0.war # BROOKLYN_VERSION brooklyn.policies: - type: org.apache.brooklyn.policy.ha.ServiceRestarter
