This is the base layer for the Apache Flume charms. It will handle installing the Apache Flume libraries and any dependencies, and provides helpers to configure Flume.
To create a charm layer using this base layer, you need only include it in
a layer.yaml
file:
includes: ['layer:flume-base']
This will implicitly include the reactive base layer, which you can see for more information on using layers in charms.
This layer will set the following states:
-
flume-base.installed
This will be set when the Apache Flume libraries are installed. Once this is set, you can configure Flume using the method:configure_flume(template_data=None)
This will render the Flume config from the template filetemplates/flume.conf.j2
and will pass in the keys and values in thetemplate_data
dict, if given, along with aconfig
variable containing all of the charm config options.
An example using this layer:
from charmhelpers.core import hookenv
from jujubigdata.utils import DistConfig
from charms.layer.flume_base import Flume
@when('flume-base.installed', 'flume-sink.ready')
def configure(sink):
flume = Flume(DistConfig())
flume.configure_flume({
'agents': sink.agents(),
})
flume.start()
hookenv.status_set('active', 'Ready')
- Apache Flume home page
- Apache Flume bug tracker
- Apache Flume mailing lists
#juju
onirc.freenode.net