Giter Club home page Giter Club logo

chef-cookbook-heka's Introduction

Build Status

Description

Installs Heka from package.

Requirements

Cookbooks

Logrotate

Platforms

  • Chef 0.11.x
  • Ubuntu 12.04
  • Ubuntu 14.04

Attributes

Default

node['heka']['download']['mirror'] = 'https://github.com/mozilla-services/heka/releases/download/v'
node['heka']['download']['version'] = '0.8.1'
node['heka']['download']['arch'] = 'amd64'
node['heka']['download']['extension'] = 'deb'

Usage

Add "heka" to a node's "run_list".

Read http://hekad.readthedocs.org/en/latest/ .

Add your TOML configuration files into the /etc/heka/ directory.

Custom Version

To override the default heka version, override the following attributes

override["heka"]["download"]["version"] = "0.7.0"
override["heka"]["download"]["remote_src"] = \
  "#{node["heka"]["download"]["mirror"]}#{node["heka"]["download"]["version"]
  }/heka_#{node["heka"]["download"]["version"]
  }_#{node["heka"]["download"]["arch"]
  }.#{node["heka"]["download"]["extension"]}"
override["heka"]["download"]["remote_file"] = ::File.join(
  "/tmp",
  "heka_#{node["heka"]["download"]["version"]}_#{
  node["heka"]["download"]["arch"]}.#{node["heka"]["download"]["extension"]}")

chef-cookbook-heka's People

Contributors

augieschwer avatar muskox avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

chef-cookbook-heka's Issues

Initial load of cookbook fails, subsequent runs succeed.

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)

Error executing action restart on resource 'service[heka]'

Chef::Exceptions::Exec

/sbin/start heka returned 1, expected 0

Resource Declaration:

In /srv/chef/file_store/cookbooks/heka/recipes/default.rb

25: service "heka" do
26: action [ :enable , :start ]
27: provider Chef::Provider::Service::Upstart
28: end

Compiled Resource:

Declared in /srv/chef/file_store/cookbooks/heka/recipes/default.rb:25:in `from_file'

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

The service consul is not present and restart fails

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

Update heka when the version in attributes is newer than the version installed.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.