brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From richardcloudsoft <...@git.apache.org>
Subject [GitHub] incubator-brooklyn-site pull request: BROOKLYN-55
Date Tue, 09 Sep 2014 15:16:14 GMT
Github user richardcloudsoft commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn-site/pull/6#discussion_r17306767
  
    --- Diff: quickstart/index.md ---
    @@ -1,179 +1,34 @@
     ---
    -title: Getting Started
     layout: normal
    -children:
    -- { path: quickstart/policies-and-catalogs.md }
    +title: Getting Started with Apache Brooklyn&reg;
     ---
     
    -This guide will walk you through deploying an application to a public cloud.
    -
    -We will be deploying an example 3-tier web application, described using this blueprint:

    -
    -{% highlight yaml %}
    -{% readj _my-web-cluster.yaml %}
    -{% endhighlight %}
    -
    -(This is written in YAML, following the [camp specification](https://www.oasis-open.org/committees/camp/).
)
    -
    -
    -## Install Brooklyn
    -
    -Download the [Brooklyn distribution]({{ site.data.brooklyn.url.dist.tgz }}) and expand
it to your home directory ( `~/` ), or in a location of your choice. (Other [download options]({{site.url}}/download.html)
are available.)
    -
    -{% if brooklyn_version contains 'SNAPSHOT' %}
    -Expand the `tar.gz` archive (note: as this is a -SNAPSHOT version, your filename will
be slightly different):
    -{% else %}
    -Expand the `tar.gz` archive:
    -{% endif %}
    -
    -{% if brooklyn_version contains 'SNAPSHOT' %}
    -{% highlight bash %}
    -$ tar -zxf brooklyn-dist-{{ site.data.brooklyn.version }}-timestamp-dist.tar.gz
    -{% endhighlight %}
    -{% else %}
    -{% highlight bash %}
    -$ tar -zxf brooklyn-dist-{{ site.data.brooklyn.version }}-dist.tar.gz
    -{% endhighlight %}
    -{% endif %}
    -
    -This will create a `brooklyn-{{ site.data.brooklyn.version }}` folder.
    -
    -Note: You'll need a Java JRE or SDK installed (version 6 or later), as Brooklyn is Java
under the covers.
    -
    -## Launch Brooklyn
    -
    -Let's setup some paths for easy commands.
    -
    -(Click the clipboard on these code snippets for easier c&p.)
    -
    -{% highlight bash %}
    -$ cd brooklyn-{{ site.data.brooklyn.version }}
    -$ BROOKLYN_DIR="$(pwd)"
    -$ export PATH=$PATH:$BROOKLYN_DIR/bin/
    -{% endhighlight %}
    -
    -We can do a quick test drive by launching Brooklyn:
    -
    -{% highlight bash %}
    -$ brooklyn launch
    -{% endhighlight %}
    -
    -Brooklyn will output the address of the management interface:
    -
    -
    -`INFO  Starting brooklyn web-console on loopback interface because no security config
is set`
    -
    -`INFO  Started Brooklyn console at http://127.0.0.1:8081/, running classpath://brooklyn.war
and []`
    -
    -But before we really use Brooklyn, we need to setup some Locations.
    - 
    -Stop Brooklyn with ctrl-c.
    -
    -## Configuring a Location
    -
    -Brooklyn deploys applications to Locations.
    -
    -Locations can be clouds, machines with fixed IPs or localhost (for testing).
    -
    -Brooklyn loads Location configuration  from `~/.brooklyn/brooklyn.properties`. 
    -
    -Create a `.brooklyn` folder in your home directory and download the template [brooklyn.properties](brooklyn.properties)
to that folder.
    -
    -{% highlight bash %}
    -$ mkdir ~/.brooklyn
    -$ cd ~/.brooklyn
    -$ wget {{site.url}}/quickstart/brooklyn.properties
    -{% endhighlight %}
    -
    -Open brooklyn.properties in a text editor and add your cloud credentials.
    -
    -If you would rather test Brooklyn on localhost, follow [these instructions]({{ site.data.brooklyn.url.userguide
}}/use/guide/locations/) to ensure that your Brooklyn can access your machine.
    -
    -Restart Brooklyn:
    -
    -{% highlight bash %}
    -$ brooklyn launch
    -{% endhighlight %}
    -
    -## Launching an Application
    -
    -There are several ways to deploy a YAML blueprint (including specifying the blueprint
on the command line or submitting it via the REST API).
    -
    -For now, we will simply copy-and-paste the raw YAML blueprint into the web console.
    -
    -Open the web console ([127.0.0.1:8081](http://127.0.0.1:8081)). As Brooklyn is not currently
managing any applications the 'Create Application' dialog opens automatically. Select the
YAML tab.
    -
    -![Brooklyn web console, showing the YAML tab of the Add Application dialog.](images/add-application-modal-yaml.png)
    -
    -
    -### Chose your Cloud / Location
    -
    -Edit the 'location' parameter in the YAML template (repeated below) to use the location
you configured.
    -
    -For example, replace:
    -{% highlight yaml %}
    -location: location
    -{% endhighlight %}
    -
    -with (one of):
    -{% highlight yaml %}
    -location: aws-ec2:us-east-1
    -location: rackspace-cloudservers-us:ORD
    -location: google-compute-engine:europe-west1-a
    -location: localhost
    -{% endhighlight %}
    -
    -**My Web Cluster Blueprint**
    -
    -{% highlight yaml %}
    -{% readj _my-web-cluster.yaml %}
    -{% endhighlight %}
    -
    -Paste the modified YAML into the dialog and 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.
    -
    -![My Web Cluster is STARTING.](images/my-web-cluster-starting.png)
    -
    -
    -## Monitoring and Managing Applications
    -
    -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 JBoss7 Servers (A `DynamicWebAppCluster`)
    -        * NginxController (An `NginxController`)
    -
    -
    -
    -Clicking on the 'My Web' entity will show the Summary tab. Here we can see if the cluster
is ready to serve and, when ready, grab the web address for the front of the loadbalancer.
    -
    -![Exploring My Web.](images/my-web.png)
    -
    -
    -The Activity tab allows us to drill down into what activities each entity is currently
doing or has recently done. It is possible to drill down to all child tasks, and view the
commands issued, and any errors or warnings that occured.
    -
    -Drill into the 'My DB' start operation. Working down through  'Start (processes)', then
'launch', we can discover the ssh command used including the stdin, stdout and stderr.
    -
    -[![My DB Activities.](images/my-db-activities.png)](images/my-db-activities-large.png)
    -
    -
    -## Stopping the Application
    -
    -To stop an application, select the application in the tree view (the top/root entity),
click on the Effectors tab, and invoke the 'Stop' effector. This will cleanly shutdown all
components in the application and return any cloud machines that were being used.
    -
    -[![My DB Activities.](images/my-web-cluster-stop-confirm.png)](images/my-web-cluster-stop-confirm-large.png)
    -
    -
    -### Next 
    -
    -So far we have touched on Brooklyn's ability to *deploy* an application blueprint to
a cloud provider, but this a very small part of Brooklyn's capabilities!
    -
    -Brooklyn's real power is in using Policies to automatically *manage* applications. There
is also the (very useful) ability to store a catalog of application blueprints, ready to go.
    -
    -[Getting Started - Policies and Catalogs](policies-and-catalogs.html)
    +<table class="table table-striped table-hover">
    +<tbody>
    +<tr>
    +    <td><span class="glyphicon glyphicon-cloud text-primary"></span>
    +    &nbsp;<a href="/what-is-brooklyn/">What is Brooklyn?</a></td>
    --- End diff --
    
    Avoid the use of links starting "/" - either use strictly relative links (`../what-is-brooklyn/`)
- or reference site.url (`{{site.url}}/what-is-brooklyn/`). Using a leading slash causes links
to break when the website is rendered to a non-root location, such as when testing using file:///
URLs or deploying to a temporary web server. (This would explain why you said that the `build-preview`
output was not working for you.)


---
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.
---

Mime
View raw message