brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [01/10] incubator-brooklyn git commit: Updates following Scott's comments.
Date Tue, 05 Jan 2016 11:16:23 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 1cd62c618 -> 286448623


Updates following Scott's comments.


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

Branch: refs/heads/master
Commit: a5a7d26685eb289d04495d67ad0e7d08d15721ff
Parents: 5262d47
Author: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Authored: Tue Dec 22 23:11:03 2015 +0000
Committer: Geoff Macartney <geoff.macartney@cloudsoftcorp.com>
Committed: Wed Dec 23 12:24:56 2015 +0000

----------------------------------------------------------------------
 docs/guide/start/blueprints-cli.md |  6 +++-
 docs/guide/start/managing-cli.md   | 56 +++++++++++++++++++++++++++------
 docs/guide/start/policies-cli.md   |  6 ++--
 3 files changed, 56 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/a5a7d266/docs/guide/start/blueprints-cli.md
----------------------------------------------------------------------
diff --git a/docs/guide/start/blueprints-cli.md b/docs/guide/start/blueprints-cli.md
index 8df9d0d..79cd1bb 100644
--- a/docs/guide/start/blueprints-cli.md
+++ b/docs/guide/start/blueprints-cli.md
@@ -77,4 +77,8 @@ you can monitor the progress of the application deployment and verify its
succes
 
 
 ## Launching from the Catalog
-TODO
\ No newline at end of file
+Instead of pasting the YAML blueprint each time, it can be added to Brooklyns Catalog where
it will be accessible 
+for use in any blueprint that you want to deploy.
+
+See __[Catalog](../ops/catalog/)__ in the Operations section of the User Guide for instructions
on creating a new 
+Catalog entry from your Blueprint YAML.

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/a5a7d266/docs/guide/start/managing-cli.md
----------------------------------------------------------------------
diff --git a/docs/guide/start/managing-cli.md b/docs/guide/start/managing-cli.md
index fba463c..94c2a82 100644
--- a/docs/guide/start/managing-cli.md
+++ b/docs/guide/start/managing-cli.md
@@ -16,16 +16,39 @@ children:
 So far we have touched on Brooklyn's ability to *deploy* an application blueprint to a cloud
provider, but this just 
 the beginning. The sections below outline how to manage the application that has been deployed.
 
+
+## Scopes in CLI commands
+Many commands require a "scope" expression to indicate the target on which they operate.
The scope expressions are
+as follows (values in brackets are aliases for the scope):
+   - application APP-ID   (app, a)  
+     Selects an application, e.g. "br app myapp"
+   - entity      ENT-ID   (ent, e)  
+     Selects an entity within an application scope, e.g. "br app myapp ent myserver"
+   - effector    EFF-ID   (eff, f)  
+     Selects an effector of an entity or application, e.g. "br a myapp e myserver eff xyz"
+   - config      CONF-KEY (conf, con, c)  
+     Selects a configuration key of an entity e.g. "br a myapp e myserver config jmx.agent.mode"
+   - activity    ACT-ID   (act, v)  
+     Selects an activity of an entity e.g. "br a myapp e myserver act iHG7sq1"
+
+
 ## Applications
 
 Having created the application we can query its status.  We can find a summary of all deployed
apps:
 {% highlight bash %}
+$ br application
+ Id         Name     Status    Location   
+ hTPAF19s   Tomcat   RUNNING   ajVVAhER  
+{% endhighlight %}
+
+"application" can be shortened to one of the aliases "app" or just "a", for example:
+{% highlight bash %}
 $ br app
  Id         Name     Status    Location   
  hTPAF19s   Tomcat   RUNNING   ajVVAhER  
 {% endhighlight %}
 
-or the details of a given app.  The ID, hTPAF19s, can also be used instead of the name "Tomcat".
+You can find the details of a given application, using its name or ID.
 {% highlight bash %}
 $ br app Tomcat
   Id:              hTPAF19s   
@@ -46,7 +69,8 @@ to create an alias for the commonly used application scope:
 alias tom="br app Tomcat"
 {% endhighlight %}
 
-However, for simplicity the examples below show the full command in all cases.
+To illustrate this we will assume the above alias for the rest of this section, but to avoid
confusion 
+the examples in other sections will show the full command in all cases.
 
 We can explore the management hierarchy of all applications, which will show us the entities
they are composed of.
 {% highlight bash %}
@@ -57,17 +81,15 @@ $ br tree
   +- org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
 {% endhighlight %}
 
-
-
 You can view the blueprint for the application again:
 {% highlight bash %}
-$ br app Tomcat spec
+$ tom spec
 "name: Tomcat\nlocation:\n  mylocation\nservices:\n- serviceType: brooklyn.entity.webapp.tomcat.TomcatServer\n"
 {% endhighlight %}
 
 You can view the config of the application:
 {% highlight bash %}
-$ br app Tomcat config
+$ tom config
 Key                    Value   
 camp.template.id       l67i25CM   
 brooklyn.wrapper_app   true   
@@ -83,10 +105,12 @@ Id         Name                Type
 Wx7r1C4e   TomcatServer:Wx7r   org.apache.brooklyn.entity.webapp.tomcat.TomcatServer    
 
 {% endhighlight %}
 
+"entity" has aliases "ent" or "e".
+
 You can get summary information for an entity by providing its name (or ID).
 
 {% highlight bash %}
-$ br app Tomcat entity TomcatServer:Wx7r
+$ br app Tomcat ent TomcatServer:Wx7r
 Id:              Wx7r1C4e   
 Name:            TomcatServer:Wx7r   
 Status:          RUNNING   
@@ -98,7 +122,7 @@ CatalogItemId:   null
 Also you can see the config of the entity with the "config" command.
 
 {% highlight bash %}
-$ br app Tomcat entity TomcatServer:Wx7r config
+$ br app Tomcat ent TomcatServer:Wx7r config
 Key                       Value   
 jmx.agent.mode            JMXMP_AND_RMI   
 brooklyn.wrapper_app      true   
@@ -111,7 +135,7 @@ install.unique_label      TomcatServer_7.0.65
 If an entity name is annoyingly long to type, the entity can be renamed:
 
 {% highlight bash %}
-$ br app Tomcat entity TomcatServer:Wx7r rename server
+$ br app Tomcat ent TomcatServer:Wx7r rename server
 {% endhighlight %}
 
 ## Sensors
@@ -307,3 +331,17 @@ BASE_DIR_RESULT:/home/vagrant/brooklyn-managed-processes:BASE_DIR_RESULT
 
 {% endhighlight %}
 
+
+To monitor progress on an application as it deploys, for example, one could use a shell loop:
+
+{% highlight bash %}
+$ while br app Tomcat ent TomcatServer:Wx7r activity | grep 'In progress' ; do 
+  sleep 1; echo ; date; 
+done
+{% endhighlight %}
+This loop will exit when the application has deployed successfully or has failed.  If it
fails then the 'stderr' 
+command may provide information about what happened in any activities that have associated
streams:
+
+{% highlight bash %}
+$ br app Tomcat ent TomcatServer:Wx7r act KLTxDkoa stderr
+{% endhighlight %}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/a5a7d266/docs/guide/start/policies-cli.md
----------------------------------------------------------------------
diff --git a/docs/guide/start/policies-cli.md b/docs/guide/start/policies-cli.md
index d5f1df4..482c5a0 100644
--- a/docs/guide/start/policies-cli.md
+++ b/docs/guide/start/policies-cli.md
@@ -27,7 +27,10 @@ You will need at least five machines for this example, one for the DB,
and four
 name: cluster
 
 location:
-  tbd
+  jclouds:aws-ec2:
+    identity: ABCDEFGHIJKLMNOPQRST
+    credential: s3cr3tsq1rr3ls3cr3tsq1rr3ls3cr3tsq1rr3l
+
 
 services:
 - serviceType: brooklyn.entity.webapp.ControlledDynamicWebAppCluster
@@ -51,7 +54,6 @@ services:
 - serviceType: brooklyn.entity.database.mysql.MySqlNode
   id: db
   name: mysql
-  location: localhost
   brooklyn.config:
     creationScriptUrl: https://bit.ly/brooklyn-visitors-creation-script
 {% endhighlight %}


Mime
View raw message