augieschwer/chef-cookbook-heka — pull request #11 by MathYourLife (2014-09-04 19:46:43+00:00)
Title: Build and install from source

Running into the use case where kafka needs to be compiled from source for additional plugins.

> Heka is written in [Go](http://golang.org/), but Heka plugins can be written
> in either Go or [Lua](http://lua.org). The easiest way to compile Heka is by
> sourcing (see below) the build script in the root directory of the project,
> which will set up a Go environment, verify the prerequisites, and install all
> required dependencies. The build process also provides a mechanism for easily
> integrating external plug-in packages into the generated `hekad`. For more
> details and additional installation options see
> [Installing](https://hekad.readthedocs.org/en/latest/installing.html).

source: https://github.com/mozilla-services/heka

The manual build/install instructions include essentially a git checkout and sourcing the `build.sh` file which sets a few environmental variables and runs make. The process is mimicked in a bash resource.

The `heka::source` builds into a binary path `/usr/local/heka/[version]/build/heka/bin/hekad` which is supplied to the upstart process. Allowing for changes in versions to have non conflicting directories. Config toml's are still referenced in `/etc/heka/*.toml` and heka log is `/var/log/hekad.log` as with the packaged heka install.

Recipe converges in ubuntu 12.04 and 14.04 (assumes pre-existance of golang > 1.3).

Additional Info: [Building hekad with External Plugins](http://hekad.readthedocs.org/en/latest/installing.html#build-include-externals)