Installing Brooklyn

Here we present two alternatives to install Brooklyn:

Running the Installation Script

There is a simple bash script available to help with the installation process.

Script prerequisites

The script assumes that the server is a recent RHEL/CentOS 6.x Linux or Ubuntu 12.04 installation, but other Linux variants have been tested successfully.

The script will install Java 7 and other required packages if they are not present. You must have root access over passwordless SSH to install brooklyn, but the service runs as an ordinary user once installed.

To manage the brooklyn service you must also be able to connect to port 8081 remotely.

Once the above prerequisites are satisfied, you should be able to run successfully:

$ curl -o brooklyn-install.sh -L https://github.com/apache/incubator-brooklyn/raw/master/brooklyn-install.sh
$ chmod +x ./brooklyn-install.sh
$ ./brooklyn-install.sh -s -r <your-server-ip>

Manual Installation

  1. Set up the prerequisites
  2. Download Brooklyn
  3. Configuring brooklyn.properties
  4. Configuring default.catalog.bom
  5. Test the installation

Set up the Prerequisites

Before installing Apache Brooklyn, it is recommented to configure the host as follows.

  • install Java JRE or SDK (version 6 or later)
  • install an SSH key, if not available
  • enable passwordless ssh login
  • create a ~/.brooklyn directory on the host with $ mkdir ~/.brooklyn
  • check your iptables or other firewall service, making sure that incoming connections on port 8443 is not blocked
  • check that the linux kernel entropy is sufficient

Download Brooklyn

Download Brooklyn and obtain a binary build as described on the download page.

Expand the tar.gz archive:

$ tar -zxf brooklyn-0.7.0-M2-incubating-dist.tar.gz

This will create a brooklyn-0.7.0-M2-incubating folder.

Let’s setup some paths for easy commands.

$ cd brooklyn-0.7.0-M2-incubating
$ BROOKLYN_DIR="$(pwd)"
$ export PATH=$PATH:$BROOKLYN_DIR/bin/

Configuring brooklyn.properties

Brooklyn deploys applications to Locations. Locations can be clouds, machines with fixed IPs or localhost (for testing).

By default Brooklyn loads configuration parameters (including credentials for any cloud accounts) from

~/.brooklyn/brooklyn.properties

The brooklyn.properties is the main configuration file for deployment locations. Contains the connection details and credentials for all public or on-premises cloud providers, as well as controlling some application startup and security options.

Create a .brooklyn folder in your home directory and download the template brooklyn.properties to that folder.

$ mkdir -p ~/.brooklyn
$ wget -O ~/.brooklyn/brooklyn.properties http://0.0.0.0:4000/v/0.7.0-incubating/start/brooklyn.properties
$ chmod 600 ~/.brooklyn/brooklyn.properties

You may need to edit ~/.brooklyn/brooklyn.properties to ensure that brooklyn can access cloud locations for application deployment.

Configuring the Catalog

By default Brooklyn loads the catalog of available application components and services from default.catalog.bom on the classpath. The initial catalog is in conf/brooklyn/ in the dist. If you have a preferred catalog, simply replace that file.

Confirm Installation

We can do a quick test drive by launching Brooklyn:

$ brooklyn launch

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 []

Stop Brooklyn with ctrl-c.