Last active
August 29, 2015 14:22
-
-
Save xrl/d1fdf7765d3ade15dad3 to your computer and use it in GitHub Desktop.
How I build a heka deb with my custom plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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