Brooklyn Configuration and Options
Apache Brooklyn contains a number of configuration options managed across several files. Historically Brooklyn has been configured through a brooklyn.properties file, this changed to a brooklyn.cfg file when the Karaf release became the default in Brooklyn 0.12.0.
The configurations for persistence and high availability are described elsewhere in this manual.
Configuration of Apache Brooklyn when running under Karaf is largely done through standard Karaf mechanisms.
The Karaf “Configuration Admin” subsystem is used to manage configuration values loaded at first boot from the
.cfg
files in the etc
directory of the distribution. In the Karaf command line these can then be viewed
and manipulated by the config:
commands, see the Karaf documentation for full details.
Configuring Brooklyn Properties
To configure the Brooklyn runtime create an etc/brooklyn.cfg
file. If you have previously used brooklyn.properties
it follows the same
file format. Values can be viewed and managed dynamically via the OSGI configuration admin commands in Karaf,
e.g. config:property-set
. The global ~/.brooklyn/brooklyn.properties
is still supported and has higher
priority for duplicate keys, but it’s values can’t be manipulated with the Karaf commands, so its use is
discouraged.
You can use the standard ~/.brooklyn/brooklyn.properties
file to configure Brooklyn. Alternatively
create etc/brooklyn.cfg
inside the distribution folder (same file format). The keys in the former override
those in the latter.
Web console related configuration is done through the corresponding Karaf mechanisms:
- The port is set in
etc/org.ops4j.pax.web.cfg
, keyorg.osgi.service.http.port
. - For authentication the JAAS realm “webconsole” is used; by default it will use any
SecurityProvider implementations configured in Brooklyn falling back to auto generating
the password. To configure a custom JAAS realm see the
jetty.xml
file inbrooklyn-server/karaf/jetty-config/src/main/resources
and override it by creating a custom one inetc
folder. Point the “webconsole” login service to the JAAS realm you would like to use. - For other Jetty related configuration consult the Karaf and pax-web docs.
Memory Usage
The amount of memory required by Apache Brooklyn process depends on the usage - for example the number of entities/VMs under management.
For a standard Brooklyn deployment, the defaults are to start with 256m, and to grow to 2g of memory. These numbers can be overridden
by setting the JAVA_MAX_MEM
and JAVA_MAX_PERM_MEM
in the bin/setenv
script:
export JAVA_MAX_MEM="2G"
Apache Brooklyn stores a task history in-memory using soft references. This means that, once the task history is large, Brooklyn will continually use the maximum allocated memory. It will only expunge tasks from memory when this space is required for other objects within the Brooklyn process.
Authentication and Security
There are two areas of authentication used in Apache Brooklyn, these are as follows:
- Karaf authentication
Apache Brooklyn uses Apache Karaf as a core platform, this has user level security and groups which can be configured as detailed here.
- Apache Brooklyn authentication
Users and passwords for Brooklyn can be configured in the brooklyn.cfg as detailed here.
HTTPS Configuration
See HTTPS Configuration for general information on configuring HTTPS.