You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by geomacy <gi...@git.apache.org> on 2015/12/17 18:29:59 UTC

[GitHub] incubator-brooklyn pull request: DO NOT MERGE - "Getting Started" ...

GitHub user geomacy opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116

    DO NOT MERGE - "Getting Started" with CLI documentation updates - for review.

    These are documentation updates for the "Getting Started" using the CLI.  
    
    At present they don't contain info on how to get the CLI.
    
    Also at present the pages don't replace the current Getting Started, but sit alongside them, for comparison purposes.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/geomacy/incubator-brooklyn cli-document-updates

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/1116.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1116
    
----
commit fd4637b1c2ff5715dc31c592bf0bd6a1bbfe410f
Author: Geoff Macartney <ge...@cloudsoftcorp.com>
Date:   2015-12-17T12:11:06Z

    Initial copy of cli docs.

commit f2fc5f85bf0abc9d9f98471a5d93a0fddb185f54
Author: Geoff Macartney <ge...@cloudsoftcorp.com>
Date:   2015-12-17T16:44:31Z

    Updated blueprint-cli and managing-cli.

commit 89f62ee2ee79c4b1b34d995c11c5eb24eaed6528
Author: Geoff Macartney <ge...@cloudsoftcorp.com>
Date:   2015-12-17T17:27:12Z

    Policy updates.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: "Getting Started" with CLI docume...

Posted by lloyddave <gi...@git.apache.org>.
Github user lloyddave commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#discussion_r48363153
  
    --- Diff: brooklyn-docs/guide/start/managing.md ---
    @@ -3,68 +3,357 @@ title: Monitoring and Managing Applications
     title_in_menu: Monitoring and Managing Applications
     layout: website-normal
     menu_parent: index.md
    +children:
    +- { section: Applications } 
    +- { section: Entities } 
    +- { section: Sensors  } 
    +- { section: Effectors  } 
    +- { section: Activities } 
     ---
     
    -Click on the application name, or open the Applications tab.
     
    -We can explore the management hierarchy of the application, which will show us the entities it is composed of.
     
    - * My Web Cluster (A `BasicApplication`)
    -     * My DB (A `MySqlNode`)
    -     * My Web (A `ControlledDynamicWebAppCluster`)
    -        * Cluster of TomcatServer (A `DynamicWebAppCluster`)
    -        * NginxController (An `NginxController`)
    +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
    --- End diff --
    
    I think that most of the occurences of "text" on this page would be better as \`text\`. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: "Getting Started" with CLI docume...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-brooklyn/pull/1116


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: "Getting Started" with CLI docume...

Posted by lloyddave <gi...@git.apache.org>.
Github user lloyddave commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#issuecomment-166960260
  
    No more comments.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: DO NOT MERGE - "Getting Started" ...

Posted by shartzel <gi...@git.apache.org>.
Github user shartzel commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#discussion_r48183573
  
    --- Diff: docs/guide/start/policies-cli.md ---
    @@ -0,0 +1,172 @@
    +---
    +title: Getting Started - Policies
    +title_in_menu: Policies
    +layout: website-normal
    +menu-parent: index-cli.md
    +---
    +
    +
    +
    +
    +## A Clustered Example
    +
    +We'll now look at a more complex example that better shows the capabilities of Brooklyn. 
    +
    +We'll start by deploying an application via YAML blueprint consisting of the following layers.
    +
    +- A dynamically scalable Web App Cluster
    +- A MySQL DB
    +
    +
    +Copy the blueprint below into a text file, "mycluster.yaml", in your workspace, but *before* you create an application 
    +with it, again modify the YAML to specify the location where the application will be deployed.  
    +You will need at least five machines for this example, one for the DB, and four for the tomcats 
    +(but you can reduce this by changing the "maxPoolSize" below.
    +
    +{% highlight yaml %}
    +name: cluster
    +
    +location:
    +  tbd
    +
    +services:
    +- serviceType: brooklyn.entity.webapp.ControlledDynamicWebAppCluster
    +  name: webcluster
    +  brooklyn.config:
    +    wars.root: http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0-M2/brooklyn-example-hello-world-sql-webapp-0.6.0-M2.war
    +    http.port: 9280+
    +    proxy.http.port: 9210+
    +    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:
    +  - policyType: brooklyn.policy.autoscaling.AutoScalerPolicy
    +    brooklyn.config:
    +      metric: $brooklyn:sensor("brooklyn.entity.webapp.DynamicWebAppCluster", "webapp.reqs.perSec.windowed.perNode")
    +      metricLowerBound: 10
    +      metricUpperBound: 100
    +      minPoolSize: 1
    +      maxPoolSize: 4
    +      
    +- serviceType: brooklyn.entity.database.mysql.MySqlNode
    +  id: db
    +  name: mysql
    +  location: localhost
    --- End diff --
    
    localhost or call it out as needing a user-specified location?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: DO NOT MERGE - "Getting Started" ...

Posted by shartzel <gi...@git.apache.org>.
Github user shartzel commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#discussion_r48180991
  
    --- Diff: docs/guide/start/managing-cli.md ---
    @@ -0,0 +1,309 @@
    +---
    +title: Monitoring and Managing Applications
    +title_in_menu: Monitoring and Managing Applications
    +layout: website-normal
    +menu_parent: index-cli.md
    +children:
    +- { section: Applications } 
    +- { section: Entities } 
    +- { section: Sensors  } 
    +- { section: Effectors  } 
    +- { section: Activities } 
    +---
    +
    +
    +
    +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.
    +
    +## Applications
    +
    +Having created the application we can query its status.  We can find a summary of all deployed apps:
    +{% 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".
    +{% highlight bash %}
    +$ br app Tomcat
    +  Id:              hTPAF19s   
    +  Name:            Tomcat   
    +  Status:          RUNNING   
    +  ServiceUp:       true   
    +  Type:            org.apache.brooklyn.entity.stock.BasicApplication   
    +  CatalogItemId:   null   
    +  LocationId:      ajVVAhER   
    +  LocationName:    FixedListMachineProvisioningLocation:ajVV   
    +  LocationSpec:    vagrantbyon   
    +  LocationType:    org.apache.brooklyn.location.byon.FixedListMachineProvisioningLocation  
    +{% endhighlight %}
    +
    +To ease management of multiple applications, or even to reduce the amount of typing required, it is convenient
    --- End diff --
    
    l43-49 can probably be dropped. It's a small digression from the flow that we don't revisit anywhere following. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: DO NOT MERGE - "Getting Started" ...

Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#discussion_r48308809
  
    --- Diff: docs/guide/start/policies-cli.md ---
    @@ -0,0 +1,172 @@
    +---
    +title: Getting Started - Policies
    +title_in_menu: Policies
    +layout: website-normal
    +menu-parent: index-cli.md
    +---
    +
    +
    +
    +
    +## A Clustered Example
    +
    +We'll now look at a more complex example that better shows the capabilities of Brooklyn. 
    +
    +We'll start by deploying an application via YAML blueprint consisting of the following layers.
    +
    +- A dynamically scalable Web App Cluster
    +- A MySQL DB
    +
    +
    +Copy the blueprint below into a text file, "mycluster.yaml", in your workspace, but *before* you create an application 
    +with it, again modify the YAML to specify the location where the application will be deployed.  
    +You will need at least five machines for this example, one for the DB, and four for the tomcats 
    +(but you can reduce this by changing the "maxPoolSize" below.
    +
    +{% highlight yaml %}
    +name: cluster
    +
    +location:
    +  tbd
    +
    +services:
    +- serviceType: brooklyn.entity.webapp.ControlledDynamicWebAppCluster
    +  name: webcluster
    +  brooklyn.config:
    +    wars.root: http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0-M2/brooklyn-example-hello-world-sql-webapp-0.6.0-M2.war
    +    http.port: 9280+
    +    proxy.http.port: 9210+
    +    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:
    +  - policyType: brooklyn.policy.autoscaling.AutoScalerPolicy
    +    brooklyn.config:
    +      metric: $brooklyn:sensor("brooklyn.entity.webapp.DynamicWebAppCluster", "webapp.reqs.perSec.windowed.perNode")
    +      metricLowerBound: 10
    +      metricUpperBound: 100
    +      minPoolSize: 1
    +      maxPoolSize: 4
    +      
    +- serviceType: brooklyn.entity.database.mysql.MySqlNode
    +  id: db
    +  name: mysql
    +  location: localhost
    --- End diff --
    
    This is a cut-and-paste error, it shouldn't have a location at all.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: DO NOT MERGE - "Getting Started" ...

Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#discussion_r48233928
  
    --- Diff: docs/guide/start/blueprints-cli.md ---
    @@ -0,0 +1,80 @@
    +---
    +title: Deploying Blueprints
    +layout: website-normal
    +menu_parent: index-cli.md
    +children:
    +- { section: Launching from a Blueprint, title: Blueprint } 
    +- { section: Launching from the Catalog, title: Catalog } 
    +---
    +
    +
    +## Launching from a Blueprint
    +
    +We'll start by deploying an application with a simple YAML blueprint containing a Tomcat server.
    +
    +Copy the blueprint below into a text file, "myapp.yaml", in your workspace, but *before* you create an application with 
    +it, modify the YAML to specify the location where the application will be deployed.  (Note, to copy the file you can
    +hover your mouse over the right side of the text box below to get a Javascript "copy" button.)
    +
    +{% highlight yaml %}
    +name: Tomcat
    +location:
    +  jclouds:aws-ec2:
    +    identity: ABCDEFGHIJKLMNOPQRST
    +    credential: s3cr3tsq1rr3ls3cr3tsq1rr3ls3cr3tsq1rr3l
    +services:
    +- serviceType: brooklyn.entity.webapp.tomcat.TomcatServer
    +{% endhighlight %}
    +
    +Replace the `location:` element with values for your chosen target environment, for example to use SoftLayer rather 
    +than AWS (updating with your own credentials): 
    +
    +{% highlight yaml %}
    +location:
    +  jclouds:softlayer:
    +    identity: ABCDEFGHIJKLMNOPQRST
    +    credential: s3cr3tsq1rr3ls3cr3tsq1rr3ls3cr3tsq1rr3l
    +{% endhighlight %}
    +
    +Or, if you already have machines provisioned, you can use the "bring your own nodes" (byon) approach. 
    +Of course, replace the identity and address values below with your own values.
    +{% highlight yaml %}
    +location:
    +  byon:
    +    user: myuser
    +    password: mypassword
    +    # or...
    +    #privateKeyFile: ~/.ssh/my.pem
    +    hosts:
    +    - 192.168.0.18
    +    - 192.168.0.19
    +{% endhighlight %}
    +
    +**Note**: See __[Locations](../ops/locations)__ in the Operations section of the User Guide for instructions on setting
    +up alternate cloud providers, bring-your-own-nodes, or localhost targets, and storing credentials/locations in a file 
    +on disk rather than in the blueprint.
    +(For the application above, if you are using a "Bring your own Nodes" location, you will need at least three nodes.)
    +
    +First you will have to log in to brooklyn:
    +{% highlight bash %}
    +$ br login http://localhost:8081/
    +{% endhighlight %}
    +
    +To secure the server you can add a username and password in Brooklyn's properties file, as described in the User Guide.  
    +Then the login command will require the additional parameters of the userid and password.
    +
    +Now you can create the application with the command below:
    +
    +{% highlight bash %}
    +$ br deploy myapp.yaml
    +Id:       hTPAF19s   
    +Name:     Tomcat   
    +Status:   In progress   
    +{% endhighlight %}
    +
    +Depending on your choice of location it may take some time for the application to start, the next page describes how 
    +you can monitor the progress of the application deployment and verify its successful deployment.
    +
    +
    +## Launching from the Catalog
    +TODO
    --- End diff --
    
    Yes, we'll have to provide the 'meat' to this section.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: "Getting Started" with CLI docume...

Posted by shartzel <gi...@git.apache.org>.
Github user shartzel commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#issuecomment-166973199
  
    LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: DO NOT MERGE - "Getting Started" ...

Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#discussion_r48238024
  
    --- Diff: docs/guide/start/managing-cli.md ---
    @@ -0,0 +1,309 @@
    +---
    +title: Monitoring and Managing Applications
    +title_in_menu: Monitoring and Managing Applications
    +layout: website-normal
    +menu_parent: index-cli.md
    +children:
    +- { section: Applications } 
    +- { section: Entities } 
    +- { section: Sensors  } 
    +- { section: Effectors  } 
    +- { section: Activities } 
    +---
    +
    +
    +
    +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.
    +
    +## Applications
    +
    +Having created the application we can query its status.  We can find a summary of all deployed apps:
    +{% 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".
    +{% highlight bash %}
    +$ br app Tomcat
    +  Id:              hTPAF19s   
    +  Name:            Tomcat   
    +  Status:          RUNNING   
    +  ServiceUp:       true   
    +  Type:            org.apache.brooklyn.entity.stock.BasicApplication   
    +  CatalogItemId:   null   
    +  LocationId:      ajVVAhER   
    +  LocationName:    FixedListMachineProvisioningLocation:ajVV   
    +  LocationSpec:    vagrantbyon   
    +  LocationType:    org.apache.brooklyn.location.byon.FixedListMachineProvisioningLocation  
    +{% endhighlight %}
    +
    +To ease management of multiple applications, or even to reduce the amount of typing required, it is convenient
    --- End diff --
    
    I think this is a useful hint, it's a simple and handy technique that gives us 90% of the behaviour we  discussed about "caching" ids.  Maybe I should illustrate its use in this section? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: DO NOT MERGE - "Getting Started" ...

Posted by shartzel <gi...@git.apache.org>.
Github user shartzel commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#discussion_r48184016
  
    --- Diff: docs/guide/start/policies-cli.md ---
    @@ -0,0 +1,172 @@
    +---
    +title: Getting Started - Policies
    +title_in_menu: Policies
    +layout: website-normal
    +menu-parent: index-cli.md
    +---
    +
    +
    +
    +
    +## A Clustered Example
    +
    +We'll now look at a more complex example that better shows the capabilities of Brooklyn. 
    +
    +We'll start by deploying an application via YAML blueprint consisting of the following layers.
    +
    +- A dynamically scalable Web App Cluster
    +- A MySQL DB
    +
    +
    +Copy the blueprint below into a text file, "mycluster.yaml", in your workspace, but *before* you create an application 
    +with it, again modify the YAML to specify the location where the application will be deployed.  
    +You will need at least five machines for this example, one for the DB, and four for the tomcats 
    +(but you can reduce this by changing the "maxPoolSize" below.
    +
    +{% highlight yaml %}
    +name: cluster
    +
    +location:
    +  tbd
    +
    +services:
    +- serviceType: brooklyn.entity.webapp.ControlledDynamicWebAppCluster
    +  name: webcluster
    +  brooklyn.config:
    +    wars.root: http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0-M2/brooklyn-example-hello-world-sql-webapp-0.6.0-M2.war
    +    http.port: 9280+
    +    proxy.http.port: 9210+
    +    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:
    +  - policyType: brooklyn.policy.autoscaling.AutoScalerPolicy
    +    brooklyn.config:
    +      metric: $brooklyn:sensor("brooklyn.entity.webapp.DynamicWebAppCluster", "webapp.reqs.perSec.windowed.perNode")
    +      metricLowerBound: 10
    +      metricUpperBound: 100
    +      minPoolSize: 1
    +      maxPoolSize: 4
    +      
    +- serviceType: brooklyn.entity.database.mysql.MySqlNode
    +  id: db
    +  name: mysql
    +  location: localhost
    +  brooklyn.config:
    +    creationScriptUrl: https://bit.ly/brooklyn-visitors-creation-script
    +{% endhighlight %}
    +
    +Explore this app using the 'application' and other commands from the previous section.
    +
    +## Configuring Dependencies
    +The App above illustrates how one component in a blueprint can be configured with information relating to one of the other 
    +components in the blueprint.  In this example the web cluster is configured with a URL for JDBC connections to the database.
    +{% highlight yaml %}
    +java.sysprops: 
    +      brooklyn.example.db.url: $brooklyn:formatString("jdbc:%s%s?user=%s\\&password=%s",
    +         component("db").attributeWhenReady("datastore.url"), "visitors", "brooklyn", "br00k11n")
    +{% endhighlight %}
    +
    +the syntax ```$brooklyn:formatString(...)``` is an example of the Brooklyn DSL (Domain Specific Language) which 
    +allows expressions referring to Brooklyn's management information to be embedded in blueprints.  The line above also illustrates the use of Brooklyn's ```component(...)``` and ```attributeWhenReady(...)``` to get an identified component from a deployment, and to wait until the component is fully deployed before reading one of its sensors ("datastore.url" in this case). 
    +
    +## Managing with Policies
    +
    +
    +The app server cluster has an `AutoScalerPolicy`and the loadbalancer has a `Controller targets tracker` policy.
    +
    +For example
    +{% highlight yaml %}
    +$ br app cluster ent webcluster policy
    +Id         Name                                                      State   
    +mMZngBnb   org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy   RUNNING   
    +{% endhighlight %}
    +
    +You can investigate the status of the `AutoScalerPolicy` with 
    +
    +{% highlight yaml %}
    +$ br app cluster ent webcluster policy org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy
    +"RUNNING"
    +{% endhighlight %}
    +
    +A more detailed description of the parameters of the policy can be obtained with
    +{% highlight yaml %}
    +$ br app cluster ent webcluster policy org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy
    --- End diff --
    
    should there be a PolicyID at the EOL here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: DO NOT MERGE - "Getting Started" ...

Posted by shartzel <gi...@git.apache.org>.
Github user shartzel commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#discussion_r48183457
  
    --- Diff: docs/guide/start/policies-cli.md ---
    @@ -0,0 +1,172 @@
    +---
    +title: Getting Started - Policies
    +title_in_menu: Policies
    +layout: website-normal
    +menu-parent: index-cli.md
    +---
    +
    +
    +
    +
    +## A Clustered Example
    +
    +We'll now look at a more complex example that better shows the capabilities of Brooklyn. 
    +
    +We'll start by deploying an application via YAML blueprint consisting of the following layers.
    +
    +- A dynamically scalable Web App Cluster
    +- A MySQL DB
    +
    +
    +Copy the blueprint below into a text file, "mycluster.yaml", in your workspace, but *before* you create an application 
    +with it, again modify the YAML to specify the location where the application will be deployed.  
    +You will need at least five machines for this example, one for the DB, and four for the tomcats 
    +(but you can reduce this by changing the "maxPoolSize" below.
    +
    +{% highlight yaml %}
    +name: cluster
    +
    +location:
    +  tbd
    --- End diff --
    
    Thoughts on changing this to a note reminding the reader to fill in the location details? Or the ec2 or softlayer ABCDE... style?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: "Getting Started" with CLI docume...

Posted by lloyddave <gi...@git.apache.org>.
Github user lloyddave commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#discussion_r48362460
  
    --- Diff: brooklyn-docs/guide/start/blueprints.md ---
    @@ -40,26 +43,54 @@ location:
         credential: s3cr3tsq1rr3ls3cr3tsq1rr3ls3cr3tsq1rr3l
     {% endhighlight %}
     
    -**Note**: See __[Locations](../ops/locations)__ in the Operations section of the User Guide for instructions on setting up alternate cloud providers, bring-your-own-nodes, or localhost targets, and storing credentials/locations in a file on disk rather than in the blueprint.
    +Or, if you already have machines provisioned, you can use the "bring your own nodes" (byon) approach. 
    +Of course, replace the identity and address values below with your own values.
    +{% highlight yaml %}
    +location:
    +  byon:
    +    user: myuser
    +    password: mypassword
    +    # or...
    +    #privateKeyFile: ~/.ssh/my.pem
    +    hosts:
    +    - 192.168.0.18
    +    - 192.168.0.19
    +{% endhighlight %}
    +
    +**Note**: See __[Locations](../ops/locations)__ in the Operations section of the User Guide for instructions on setting
    +up alternate cloud providers, bring-your-own-nodes, or localhost targets, and storing credentials/locations in a file 
    +on disk rather than in the blueprint.
    +(For the application above, if you are using a "Bring your own Nodes" location, you will need at least three nodes.)
    +
    +First you will have to log in to brooklyn:
    +{% highlight bash %}
    +$ br login http://localhost:8081/
    +{% endhighlight %}
     
    -With the modified YAML in the dialog, click "Finish". The dialog will close and Brooklyn will begin deploying your
    -application. Your application will be shown as "Starting" on the web console's front page.
    +To secure the server you can add a username and password in Brooklyn's properties file, as described in the User Guide. 
    +Then the login command will require the additional parameters of the userid and password.
     
    -Depending on your choice of location it may take some time for the application nodes to start, the next page describes how you can monitor the progress of the application deployment and verify its successful deployment.
    +Now you can create the application with the command below:
     
    -### Launching from the Catalog
    +{% highlight bash %}
    +$ br deploy myapp.yaml
    +Id:       hTPAF19s   
    +Name:     Tomcat   
    +Status:   In progress   
    +{% endhighlight %}
     
    -Instead of pasting the YAML blueprint each time, it can be added to Brooklyns Catalog where it will be accessible from the Catalog tab of the Create Application dialog.
    +Depending on your choice of location it may take some time for the application to start, the next page describes how 
    +you can monitor the progress of the application deployment and verify its successful deployment.
     
    -[![Viewing Catalog entries in Add Application dialog.](images/add-application-catalog-web-cluster-with-db.png)](images/add-application-catalog-web-cluster-with-db-large.png)
     
    -<!-- TODO: more detail for adding to catalog? but wait for persistence to be the default, 
    -     rather than extensively document default.catalog.bom.
    -     also need to include instructions on stopping (currently in help, including stopping apps) -->
    +## Launching from the Catalog
    --- End diff --
    
    I am not sure if this sub-section is really fits here anymore:
    - Using the deployy command, we are not doing a copy/paste operation each time a blueprint is deployed.
    - We don't handle deploying from a catalog entry using the CLI
    Options seem to be:
    - Remove this sub-section altogether; OR
    - For complex blueprints, it is preferable to store them as catalog items, so that they are available for multiple users and can be referenced by more complex blueprints.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: DO NOT MERGE - "Getting Started" ...

Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#discussion_r48308867
  
    --- Diff: docs/guide/start/blueprints-cli.md ---
    @@ -0,0 +1,80 @@
    +---
    +title: Deploying Blueprints
    +layout: website-normal
    +menu_parent: index-cli.md
    +children:
    +- { section: Launching from a Blueprint, title: Blueprint } 
    +- { section: Launching from the Catalog, title: Catalog } 
    +---
    +
    +
    +## Launching from a Blueprint
    +
    +We'll start by deploying an application with a simple YAML blueprint containing a Tomcat server.
    +
    +Copy the blueprint below into a text file, "myapp.yaml", in your workspace, but *before* you create an application with 
    +it, modify the YAML to specify the location where the application will be deployed.  (Note, to copy the file you can
    +hover your mouse over the right side of the text box below to get a Javascript "copy" button.)
    +
    +{% highlight yaml %}
    +name: Tomcat
    +location:
    +  jclouds:aws-ec2:
    +    identity: ABCDEFGHIJKLMNOPQRST
    +    credential: s3cr3tsq1rr3ls3cr3tsq1rr3ls3cr3tsq1rr3l
    +services:
    +- serviceType: brooklyn.entity.webapp.tomcat.TomcatServer
    +{% endhighlight %}
    +
    +Replace the `location:` element with values for your chosen target environment, for example to use SoftLayer rather 
    +than AWS (updating with your own credentials): 
    +
    +{% highlight yaml %}
    +location:
    +  jclouds:softlayer:
    +    identity: ABCDEFGHIJKLMNOPQRST
    +    credential: s3cr3tsq1rr3ls3cr3tsq1rr3ls3cr3tsq1rr3l
    +{% endhighlight %}
    +
    +Or, if you already have machines provisioned, you can use the "bring your own nodes" (byon) approach. 
    +Of course, replace the identity and address values below with your own values.
    +{% highlight yaml %}
    +location:
    +  byon:
    +    user: myuser
    +    password: mypassword
    +    # or...
    +    #privateKeyFile: ~/.ssh/my.pem
    +    hosts:
    +    - 192.168.0.18
    +    - 192.168.0.19
    +{% endhighlight %}
    +
    +**Note**: See __[Locations](../ops/locations)__ in the Operations section of the User Guide for instructions on setting
    +up alternate cloud providers, bring-your-own-nodes, or localhost targets, and storing credentials/locations in a file 
    +on disk rather than in the blueprint.
    +(For the application above, if you are using a "Bring your own Nodes" location, you will need at least three nodes.)
    +
    +First you will have to log in to brooklyn:
    +{% highlight bash %}
    +$ br login http://localhost:8081/
    +{% endhighlight %}
    +
    +To secure the server you can add a username and password in Brooklyn's properties file, as described in the User Guide.  
    +Then the login command will require the additional parameters of the userid and password.
    +
    +Now you can create the application with the command below:
    +
    +{% highlight bash %}
    +$ br deploy myapp.yaml
    +Id:       hTPAF19s   
    +Name:     Tomcat   
    +Status:   In progress   
    +{% endhighlight %}
    +
    +Depending on your choice of location it may take some time for the application to start, the next page describes how 
    +you can monitor the progress of the application deployment and verify its successful deployment.
    +
    +
    +## Launching from the Catalog
    +TODO
    --- End diff --
    
    Will just provide a link out to the Ops section rather than put distracting detail in here.  Note that the non "Getting Started" parts of the docs still need updated for the CLI.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: DO NOT MERGE - "Getting Started" ...

Posted by shartzel <gi...@git.apache.org>.
Github user shartzel commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#issuecomment-166403842
  
    Minor nits and questions. Looks good. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: DO NOT MERGE - "Getting Started" ...

Posted by shartzel <gi...@git.apache.org>.
Github user shartzel commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#discussion_r48182606
  
    --- Diff: docs/guide/start/managing-cli.md ---
    @@ -0,0 +1,309 @@
    +---
    +title: Monitoring and Managing Applications
    +title_in_menu: Monitoring and Managing Applications
    +layout: website-normal
    +menu_parent: index-cli.md
    +children:
    +- { section: Applications } 
    +- { section: Entities } 
    +- { section: Sensors  } 
    +- { section: Effectors  } 
    +- { section: Activities } 
    +---
    +
    +
    +
    +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.
    +
    +## Applications
    +
    +Having created the application we can query its status.  We can find a summary of all deployed apps:
    +{% highlight bash %}
    +$ br app
    --- End diff --
    
    Nitpick: Here and following, inconsistent use of the short version of commands etc. (EG "app" for "application"). I would say that the first use in any document should be the full version, and subsequent uses may or should be shortened. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: "Getting Started" with CLI docume...

Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#discussion_r48362587
  
    --- Diff: brooklyn-docs/guide/start/blueprints.md ---
    @@ -40,26 +43,54 @@ location:
         credential: s3cr3tsq1rr3ls3cr3tsq1rr3ls3cr3tsq1rr3l
     {% endhighlight %}
     
    -**Note**: See __[Locations](../ops/locations)__ in the Operations section of the User Guide for instructions on setting up alternate cloud providers, bring-your-own-nodes, or localhost targets, and storing credentials/locations in a file on disk rather than in the blueprint.
    +Or, if you already have machines provisioned, you can use the "bring your own nodes" (byon) approach. 
    +Of course, replace the identity and address values below with your own values.
    +{% highlight yaml %}
    +location:
    +  byon:
    +    user: myuser
    +    password: mypassword
    +    # or...
    +    #privateKeyFile: ~/.ssh/my.pem
    +    hosts:
    +    - 192.168.0.18
    +    - 192.168.0.19
    +{% endhighlight %}
    +
    +**Note**: See __[Locations](../ops/locations)__ in the Operations section of the User Guide for instructions on setting
    +up alternate cloud providers, bring-your-own-nodes, or localhost targets, and storing credentials/locations in a file 
    +on disk rather than in the blueprint.
    +(For the application above, if you are using a "Bring your own Nodes" location, you will need at least three nodes.)
    +
    +First you will have to log in to brooklyn:
    +{% highlight bash %}
    +$ br login http://localhost:8081/
    +{% endhighlight %}
     
    -With the modified YAML in the dialog, click "Finish". The dialog will close and Brooklyn will begin deploying your
    -application. Your application will be shown as "Starting" on the web console's front page.
    +To secure the server you can add a username and password in Brooklyn's properties file, as described in the User Guide. 
    +Then the login command will require the additional parameters of the userid and password.
     
    -Depending on your choice of location it may take some time for the application nodes to start, the next page describes how you can monitor the progress of the application deployment and verify its successful deployment.
    +Now you can create the application with the command below:
     
    -### Launching from the Catalog
    +{% highlight bash %}
    +$ br deploy myapp.yaml
    +Id:       hTPAF19s   
    +Name:     Tomcat   
    +Status:   In progress   
    +{% endhighlight %}
     
    -Instead of pasting the YAML blueprint each time, it can be added to Brooklyns Catalog where it will be accessible from the Catalog tab of the Create Application dialog.
    +Depending on your choice of location it may take some time for the application to start, the next page describes how 
    +you can monitor the progress of the application deployment and verify its successful deployment.
     
    -[![Viewing Catalog entries in Add Application dialog.](images/add-application-catalog-web-cluster-with-db.png)](images/add-application-catalog-web-cluster-with-db-large.png)
     
    -<!-- TODO: more detail for adding to catalog? but wait for persistence to be the default, 
    -     rather than extensively document default.catalog.bom.
    -     also need to include instructions on stopping (currently in help, including stopping apps) -->
    +## Launching from the Catalog
    --- End diff --
    
    I will remove this subsection, it distracts from the flow of the Getting Started, and we have yet to replace the Catalog section with appropriate commands for the CLI anyway.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: DO NOT MERGE - "Getting Started" ...

Posted by shartzel <gi...@git.apache.org>.
Github user shartzel commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1116#discussion_r48182162
  
    --- Diff: docs/guide/start/blueprints-cli.md ---
    @@ -0,0 +1,80 @@
    +---
    +title: Deploying Blueprints
    +layout: website-normal
    +menu_parent: index-cli.md
    +children:
    +- { section: Launching from a Blueprint, title: Blueprint } 
    +- { section: Launching from the Catalog, title: Catalog } 
    +---
    +
    +
    +## Launching from a Blueprint
    +
    +We'll start by deploying an application with a simple YAML blueprint containing a Tomcat server.
    +
    +Copy the blueprint below into a text file, "myapp.yaml", in your workspace, but *before* you create an application with 
    +it, modify the YAML to specify the location where the application will be deployed.  (Note, to copy the file you can
    +hover your mouse over the right side of the text box below to get a Javascript "copy" button.)
    +
    +{% highlight yaml %}
    +name: Tomcat
    +location:
    +  jclouds:aws-ec2:
    +    identity: ABCDEFGHIJKLMNOPQRST
    +    credential: s3cr3tsq1rr3ls3cr3tsq1rr3ls3cr3tsq1rr3l
    +services:
    +- serviceType: brooklyn.entity.webapp.tomcat.TomcatServer
    +{% endhighlight %}
    +
    +Replace the `location:` element with values for your chosen target environment, for example to use SoftLayer rather 
    +than AWS (updating with your own credentials): 
    +
    +{% highlight yaml %}
    +location:
    +  jclouds:softlayer:
    +    identity: ABCDEFGHIJKLMNOPQRST
    +    credential: s3cr3tsq1rr3ls3cr3tsq1rr3ls3cr3tsq1rr3l
    +{% endhighlight %}
    +
    +Or, if you already have machines provisioned, you can use the "bring your own nodes" (byon) approach. 
    +Of course, replace the identity and address values below with your own values.
    +{% highlight yaml %}
    +location:
    +  byon:
    +    user: myuser
    +    password: mypassword
    +    # or...
    +    #privateKeyFile: ~/.ssh/my.pem
    +    hosts:
    +    - 192.168.0.18
    +    - 192.168.0.19
    +{% endhighlight %}
    +
    +**Note**: See __[Locations](../ops/locations)__ in the Operations section of the User Guide for instructions on setting
    +up alternate cloud providers, bring-your-own-nodes, or localhost targets, and storing credentials/locations in a file 
    +on disk rather than in the blueprint.
    +(For the application above, if you are using a "Bring your own Nodes" location, you will need at least three nodes.)
    +
    +First you will have to log in to brooklyn:
    +{% highlight bash %}
    +$ br login http://localhost:8081/
    +{% endhighlight %}
    +
    +To secure the server you can add a username and password in Brooklyn's properties file, as described in the User Guide.  
    +Then the login command will require the additional parameters of the userid and password.
    +
    +Now you can create the application with the command below:
    +
    +{% highlight bash %}
    +$ br deploy myapp.yaml
    +Id:       hTPAF19s   
    +Name:     Tomcat   
    +Status:   In progress   
    +{% endhighlight %}
    +
    +Depending on your choice of location it may take some time for the application to start, the next page describes how 
    +you can monitor the progress of the application deployment and verify its successful deployment.
    +
    +
    +## Launching from the Catalog
    +TODO
    --- End diff --
    
    Will the "TODO" be done (or removed) before publication?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---