augieschwer / chef-cookbook-heka Goto Github PK
View Code? Open in Web Editor NEWA Chef cookbook to deploy hekad as an agent.
A Chef cookbook to deploy hekad as an agent.
Increment default install version to 0.8 -- and test.
Add a way for this cookbook to update a version of heka on an already existing deploy.
The version can be obtained via a package manager, or via "hekad -version" and then compared to what is in default['heka']['download']['version'] -- if the version installed is older than the one specified in the cookbook, then we should download and update heka.
Initial load of cookbook fails, subsequent runs succeed.
[2013-08-09T10:07:11-07:00] INFO: Processing template[/etc/hekad.toml] action create (heka::default line 6)
[2013-08-09T10:07:12-07:00] INFO: template[/etc/hekad.toml] updated content
[2013-08-09T10:07:12-07:00] INFO: template[/etc/hekad.toml] owner changed to 0
[2013-08-09T10:07:12-07:00] INFO: template[/etc/hekad.toml] group changed to 0
[2013-08-09T10:07:12-07:00] INFO: template[/etc/hekad.toml] sending restart action to serviceheka
[2013-08-09T10:07:12-07:00] INFO: Processing service[heka] action restart (heka::default line 25)
restart
on resource 'service[heka]'/sbin/start heka returned 1, expected 0
25: service "heka" do
26: action [ :enable , :start ]
27: provider Chef::Provider::Service::Upstart
28: end
service("heka") do
provider Chef::Provider::Service::Upstart
action [:enable, :start]
supports {:restart=>false, :reload=>false, :status=>false}
retries 0
retry_delay 2
service_name "heka"
pattern "heka"
startup_type :automatic
cookbook_name "heka"
recipe_name "default"
end
[2013-08-09T10:07:12-07:00] ERROR: Running exception handlers
[2013-08-09T10:07:12-07:00] FATAL: Saving node information to /srv/chef/file_store/failed-run-data.json
[2013-08-09T10:07:12-07:00] ERROR: Exception handlers complete
[2013-08-09T10:07:12-07:00] FATAL: Stacktrace dumped to /srv/chef/file_store/chef-stacktrace.out
[2013-08-09T10:07:12-07:00] FATAL: Chef::Exceptions::Exec: service[heka](heka::default line 25) had an error: Chef::Exceptions::Exec: /sbin/start heka returned 1, expected 0
It would be cool to add some travis tests.
Will require using the RPM to install heka.
The error
resource file[/etc/consul.d/service-consul.json] is configured to notify resource service[consul] with action reload, but service[consul] cannot be found in the resource collection. file[/etc/consul.d/service-consul.json] is defined in /var/chef/cache/cookbooks/consul/providers/service_def.rb:27:in `block (2 levels) in class_from_file'
My code:
node['sensiolabs_consul']['services'].each do |name, definition|
consul_service_def name do
id definition['id'] unless definition['id'].nil?
port definition['port'] unless definition['port'].nil?
tags definition['tags'] unless definition['tags'].nil?
check definition['check'] unless definition['check'].nil?
end
end
I used init
for service configuration
Heka 0.5.2 is out:
https://github.com/mozilla-services/heka/blob/v0.5.2/CHANGES.txt
Update the cookbook to install the new version.
Could NOT find Go (missing: GO_EXECUTABLE GO_VERSION GO_PLATFORM GO_ARCH)
Add a conditional to check if Heka is already installed, and don't download the package if it is.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.