You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2016/02/01 18:28:53 UTC

[19/50] brooklyn-docs git commit: Update examples documentation to use the CLI instead of scripts

Update examples documentation to use the CLI instead of scripts


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

Branch: refs/heads/0.4.0
Commit: ba98a956205521eac7bac1eb019112fb9ec99bc1
Parents: 082fd78
Author: Cosmin Dumitrache <co...@cloudsoftcorp.com>
Authored: Tue Jul 24 18:04:08 2012 +0100
Committer: Cosmin Dumitrache <co...@cloudsoftcorp.com>
Committed: Wed Jul 25 18:31:30 2012 +0100

----------------------------------------------------------------------
 docs/use/examples/global-web-fabric/index.md         |  4 ++--
 docs/use/examples/messaging/index.md                 |  8 ++++----
 docs/use/examples/portable-cloudfoundry/index.md     |  4 ++--
 docs/use/examples/webcluster/webcluster.include.md   | 12 ++++++------
 docs/use/examples/whirrhadoop/whirrhadoop.include.md | 10 +++++-----
 5 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ba98a956/docs/use/examples/global-web-fabric/index.md
----------------------------------------------------------------------
diff --git a/docs/use/examples/global-web-fabric/index.md b/docs/use/examples/global-web-fabric/index.md
index 1f42239..aa2270e 100644
--- a/docs/use/examples/global-web-fabric/index.md
+++ b/docs/use/examples/global-web-fabric/index.md
@@ -279,8 +279,8 @@ Now let's run this example.  You will need to specify increased heap size and me
 as well as the appropriate classpath.
 
 {% highlight bash %}
-% cd $EXAMPLES_DIR/global-web-fabric/brooklyn-example-global-web-fabric/bin
-% ./demo.sh
+% BROOKLYN_CLASSPATH=$BROOKLYN_EXAMPLES/global-web-fabric/target/brooklyn-example-global-web-fabric-0.4.0-SNAPSHOT.jar
+% $BROOKLYN_HOME/bin/brooklyn -v launch --app brooklyn.demo.GlobalWebFabricExample --location locahost
 {% endhighlight %}
 
 The management web console will start,

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ba98a956/docs/use/examples/messaging/index.md
----------------------------------------------------------------------
diff --git a/docs/use/examples/messaging/index.md b/docs/use/examples/messaging/index.md
index fba5dd0..a2e4f96 100644
--- a/docs/use/examples/messaging/index.md
+++ b/docs/use/examples/messaging/index.md
@@ -69,8 +69,8 @@ out the Brooklyn [repository](https://www.github.com/brooklyncentral/brooklyn)
 as follows:
 
 {% highlight bash %}
-% cd $EXAMPLES_DIR/simple-messaging-pubsub/brooklyn-example-simple-messaging-pubsub/bin
-% ./broker.sh
+% BROOKLYN_CLASSPATH=$EXAMPLES_HOME/simple-messaging-pubsub/target/brooklyn-example-simple-messaging-pubsub-0.4.0-SNAPSHOT.jar
+% $BROOKLYN_HOME/bin/brooklyn -v launch --app brooklyn.demo.StandaloneBrokerExample --location localhost
 {% endhighlight %}
 
 Now, visit the the Brooklyn web console on port 8081 using credentials
@@ -139,8 +139,8 @@ this can also be deployed to your favourite cloud, let's pretend
 it's Amazon Ireland, as follows:
 
 {% highlight bash %}
-% cd $EXAMPLES_DIR/simple-messaging-pubsub/brooklyn-example-simple-messaging-pubsub/bin
-$ ./broker.sh aws-ec2:eu-west-1
+% BROOKLYN_CLASSPATH=$BROOKLYN_EXAMPLES/simple-messaging-pubsub/target/brooklyn-example-simple-messaging-pubsub-0.4.0-SNAPSHOT.jar
+% $BROOKLYN_HOME/bin/brooklyn -v launch --app brooklyn.demo.StandaloneBrokerExample --location aws-ec2:eu-west-1
 {% endhighlight %}
 
 If you encounter any difficulties, please

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ba98a956/docs/use/examples/portable-cloudfoundry/index.md
----------------------------------------------------------------------
diff --git a/docs/use/examples/portable-cloudfoundry/index.md b/docs/use/examples/portable-cloudfoundry/index.md
index d0e6a36..6cb2aa3 100644
--- a/docs/use/examples/portable-cloudfoundry/index.md
+++ b/docs/use/examples/portable-cloudfoundry/index.md
@@ -287,8 +287,8 @@ And finally, we'll define ``move``, as the sequence of the three effectors above
 You can run the application using the provided shell script:
 
 {% highlight bash %}
-% cd $EXAMPLES_DIR/portable-cloudfoundry/brooklyn-example-portable-cloudfoundry/bin
-% ./demo.sh
+% BROOKLYN_CLASSPATH=$BROOKLYN_EXAMPLES/portable-cloudfoundry/target/brooklyn-example-portable-cloudfoundry-0.4.0-SNAPSHOT.jar
+% $BROOKLYN_HOME/bin/brooklyn -v launch --app brooklyn.example.cloudfoundry.MovableCloudFoundryClusterExample --location localhost
 {% endhighlight %}
 
 Note that we have our webapp running in Cloud Foundry, and we have the effectors we've introduced exposed in the web console:

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ba98a956/docs/use/examples/webcluster/webcluster.include.md
----------------------------------------------------------------------
diff --git a/docs/use/examples/webcluster/webcluster.include.md b/docs/use/examples/webcluster/webcluster.include.md
index 8835f79..becefef 100644
--- a/docs/use/examples/webcluster/webcluster.include.md
+++ b/docs/use/examples/webcluster/webcluster.include.md
@@ -26,8 +26,8 @@ public class SingleWebServerExample extends AbstractApplication {
 You can run this (on *nix or Mac) as follows:
 
 {% highlight bash %}
-% cd $EXAMPLES_DIR/simple-web-cluster/brooklyn-example-simple-web-cluster/bin
-% ./web-cluster.sh
+% BROOKLYN_CLASSPATH=$BROOKLYN_EXAMPLES/simple-web-cluster/target/brooklyn-example-simple-web-cluster-0.4.0-SNAPSHOT.jar
+% $BROOKLYN_HOME/bin/brooklyn launch --app brooklyn.demo.SingleWebServerExample --location localhost
 {% endhighlight %}
 
 
@@ -40,8 +40,8 @@ With appropriate setup (as described [here]({{ site.url }}/use/guide/management/
 this can also be deployed to your favourite cloud, let's pretend it's Amazon Ireland, as follows: 
 
 {% highlight bash %}
-% cd $EXAMPLES_DIR/simple-web-cluster/brooklyn-example-simple-web-cluster
-% ./web-server.sh aws-ec2:eu-west-1
+% BROOKLYN_CLASSPATH=$BROOKLYN_EXAMPLES/simple-web-cluster/target/brooklyn-example-simple-web-cluster-0.4.0-SNAPSHOT.jar
+% $BROOKLYN_HOME/bin/brooklyn launch --app brooklyn.demo.SingleWebServerExample --location aws-ec2:eu-west-1
 {% endhighlight %}
 
 
@@ -50,8 +50,8 @@ this can also be deployed to your favourite cloud, let's pretend it's Amazon Ire
 Ready for something more interesting?  Try this:
 
 {% highlight bash %}
-% cd $EXAMPLES_DIR/simple-web-cluster/brooklyn-example-simple-web-cluster
-% ./web-and-data.sh
+% BROOKLYN_CLASSPATH=$BROOKLYN_EXAMPLES/simple-web-cluster/target/brooklyn-example-simple-web-cluster-0.4.0-SNAPSHOT.jar
+% $BROOKLYN_HOME/bin/brooklyn launch --app brooklyn.demo.WebClusterDatabaseExample --location localhost
 {% endhighlight %}
 
 This launches the class ``WebClusterDatabaseExample`` (also described in the [walkthrough]({{ site.url }}/start/walkthrough/index.html))

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ba98a956/docs/use/examples/whirrhadoop/whirrhadoop.include.md
----------------------------------------------------------------------
diff --git a/docs/use/examples/whirrhadoop/whirrhadoop.include.md b/docs/use/examples/whirrhadoop/whirrhadoop.include.md
index ddd52cd..4510150 100644
--- a/docs/use/examples/whirrhadoop/whirrhadoop.include.md
+++ b/docs/use/examples/whirrhadoop/whirrhadoop.include.md
@@ -25,8 +25,8 @@ with an arbitrary size, with one line using the ``WhirrHadoopCluster`` entity.
 You can run this by running:
 
 {% highlight bash %}
-% cd $EXAMPLES_DIR/hadoop-and-whirr/brooklyn-example-hadoop-and-whirr/bin
-% ./hadoop.sh aws-ec2:eu-west-1
+% BROOKLYN_CLASSPATH=$BROOKLYN_EXAMPLES/hadoop-and-whirr/target/brooklyn-example-hadoop-and-whirr-0.4.0-SNAPSHOT.jar
+% $BROOKLYN_HOME/bin/brooklyn launch --app brooklyn.extras.whirr.WhirrHadoopExample --stopOnKeyPress --location aws-ec2:eu-west-1
 {% endhighlight %}
 
 This targets ``aws-ec2:eu-west-1``,
@@ -58,13 +58,13 @@ whirr.instance-templates= 1 noop, 1 elasticsearch
 This can be launched by running:
 
 {% highlight bash %}
-% cd $EXAMPLES_DIR/hadoop-and-whirr/brooklyn-example-hadoop-and-whirr/bin
-% ./whirr-recipe.sh aws-ec2:eu-west-1
+% BROOKLYN_CLASSPATH=$BROOKLYN_EXAMPLES/hadoop-and-whirr/target/brooklyn-example-hadoop-and-whirr-0.4.0-SNAPSHOT.jar
+% $BROOKLYN_HOME/bin/brooklyn launch --app brooklyn.extras.whirr.WhirrExample --stopOnKeyPress --location aws-ec2:eu-west-1
 {% endhighlight %} 
 
 In the provided example this will deploy to AWS.
 
-If you would like to deploy to localhost, you can do this by running ``./whirr-recipe.sh localhost``. However, please note that currently there are some limitations when deploying to localhost:
+If you would like to deploy to localhost, you can do this by running the same command and replacing ``aws-ec2:eu-west-1`` with ``localhost``. However, please note that currently there are some limitations when deploying to localhost:
 
 *	You can not deploy more than one server (noop doesn't count in the above case).
 *	This has only been tested on Ubuntu 10.04 and might cause problems on other operating systems.