Apache Brooklyn#

Intro#

Apache Brooklyn is currently an incubating Apache project.

Use (yaml) blueprints to model your application (components) and describe the required infrastructure. But also deploy your app and manage (monitor) your application.

There is a Catalog with components to choose from, or write your own.

It has a nice web ui, but also everything available via REST interfaces.

Resources#

Installation#

Well, that is very easy:

tar -zxf brooklyn-0.7.0-incubating-dist.tar.gz
cd brooklyn-0.7.0-incubating
bin/brooklyn launch

It will log to 2 files in the current directory brooklyn.info.log brooklyn.debug.log. If you have not created a ~/.brooklyn/brooklyn.properties file with special settings, you will get anonymous admin access at http://localhost:8081, but only if you come from localhost. If you come from other hosts (like when you run it in a docker container then you get basic auth), the password is generated each time the server is started and is logged to the brooklyn.info.log file:

2015-08-08 19:12:56,404 INFO  b.r.s.p.BrooklynUserWithRandomPasswordSecurityProvider [brooklyn-jetty-server-8081-qtp1042232199-22]: Allowing access to web console from localhost or with brooklyn:m01u2ll1H2

I decided to run it in a Docker container, the Dockerfile and other stuff are in my private my gitblit.

I also have a Docker container for brooklyn nodes (so we can get very predictable targets for brooklyn).

Both Dockerfiles are "subclassed" from phusion/baseimage.

Using#

Get Started on localhost#

I first followed the get started and the deploying a blueprint, which deploys a MySQL DB, a Tomcat7 server and an nginx frontending webserver, all to localhost.

This went well, but make sure that the user brooklyn can ssh to localhost with pub/priv key, no password and no password phrase, and that this user can sudo su - to do all the necessary stuff (the main reason to run it in a Docker container).

So this went rather smooth, note that in the above example you can run all components (MySQL, Tomcat, nginx) on the same target (location), namely localhost.