Code Structure
The Basics
Brooklyn is available at GitHub brooklyncentral/brooklyn. Check it out using:
git clone git@github.com:brooklyncentral/brooklyn.git
You'll find versions in branches, and examples in the examples sub-dir. These examples are pushed to the brooklyn-examples GitHub project when a version is released.
Project Structure
Brooklyn is split into the following projects and subprojects:
api
: the pure-Java interfaces for interacting with the systemcore
: the base class implementations for entities and applications, entity traits, locations, policies, sensor and effector support, tasks, and morepolicies
: collection of useful policies for automating entity activitysoftware
: entities which are mainly launched by launched software processes on machines, and collections thereofbase
: software process lifecycle abstract classes and drivers (e.g. SSH)webapp
: web servers (JBoss, Tomcat), load-balancers (Nginx), and DNS (Geoscaling)database
: relational databases (SQL)nosql
: datastores other than RDBMS/SQL (often better in distributed environments)messaging
: messaging systems, including Qpid, Apache MQ- ...
systems
: entities which are mainly created or managed by other systems, where Brooklyn integrates with those (multi-machine) systems and is removed from the processeswhirr
:base
Whirr integration, and entities built on Whirr such as the configurablehadoop
deploymentopenshift
: entity for deploying and managing OpenShift webapps- ...
usage
: projects which make Brooklyn easier to use, either for end-users or Brooklyn developers- all: maven project to supply a shaded JAR (containing all dependencies) for convenience
- cli: backing implementation for Brooklyn's command line interface
- dist: builds brooklyn as a downloadable .zip and .tar.gz
- jsgui: Javascript web-app for the brooklyn management web console (builds a WAR)
- launcher: for launching brooklyn, either using a main method or invoked from the cli project
- qa: longevity and stress tests
- rest: implementation of brooklyn's REST api
- scripts: various scripts useful for building, updating, etc. (see comments in the scripts)
- test-support: provides support for tests, used by nearly all projects in scope
test
docs
: the markdown source code for this documentation, as described hereexamples
: some canonical examples, as listed heresandbox
: various projects, entities, and policies which the Brooklyn Project is incubating
Next Steps
If you're interested in building and editing the code, check out:
If you want to start writing your own policies and entities, have a look at:
- Writing a Brooklyn Policy
- Writing a Brooklyn Entity
- Or see the User Guide on policies and entities
Where things aren't documented please ask us at brooklyn-dev@googlegroups.com so we can remedy this!