Skip to content

Instantly share code, notes, and snippets.

@xrl
Last active August 29, 2015 14:22
Show Gist options
  • Save xrl/d1fdf7765d3ade15dad3 to your computer and use it in GitHub Desktop.
Save xrl/d1fdf7765d3ade15dad3 to your computer and use it in GitHub Desktop.
How I build a heka deb with my custom plugin
user = "xavierlange"
heka_dir = "#{Chef::Config[:file_cache_path]}/heka"
%w(cmake mercurial fakeroot debhelper libgeoip-dev).each do |pkg|
package pkg
end
directory heka_dir do
owner user
group user
end
git heka_dir do
repository "https://github.com/mozilla-services/heka.git"
user user
notifies :run, "bash[build-heka]"
end
file "#{heka_dir}/cmake/plugin_loader.cmake" do
content "add_external_plugin(git https://github.com/tureus/heka-redis blpop)"
owner "xavierlange"
end
bash "build-heka" do
code <<-EOH
set -e
source env.sh
go get github.com/garyburd/redigo/redis
sh build.sh
cd build && make deb
EOH
cwd heka_dir
user user
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment