0.0
No commit activity in last 3 years
No release in over 3 years
Allows storing reports of Chef Exceptions to S3.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Description

A Chef Exception & Reporting Handler for storing reports at S3.

The gem install a exception/report handler for Chef that create a local simplified JSON report and then upload it to a S3 bucket.

This Chef Exception & Reporting Handler gem is heavily based on the Campfire's one and the Chef's JsonFile handler.

Usage

  1. Create a Amazon S3 account.
  2. Retrieve your ACCESS_KEY_ID and your SECRET_ACCESS_KEY.
  3. Create a bucket.
  4. Download the chef_handler Cookbook.
  5. Given you've retrieved your S3 ACCESS_KEY_ID as :access_key_id, your SECRET_ACCESS_KEY as :secret_access_key and the bucket name as :bucket_name, add a Recipe similar to the example below:
include_recipe "chef_handler::default"

%w{libxml2-dev libxslt1-dev}.each do |pkg|
  package pkg do
    action :nothing
  end.run_action(:install)
end

chef_gem 'aws-sdk'
chef_gem "chef-handler-s3"
gem "chef-handler-s3"

chef_handler 'Chef::Handler::S3' do
  source 'chef/handler/s3'
  arguments :access_key_id     => 'XXXXXXXXXXXXX',
            :secret_access_key => 'XXXXXXXXXXXXX',
            :bucket_name       => 'some_bucket_name',
            :folder            => 'some_bucket_folder_name'
  action :enable
end

The argument :folder is optional. This will store the file inside of a folder with that name at the pointed bucket.

See also: Enable Chef Handler with LWRP

Authors

  1. Juanje Ojeda

Copyright

Copyright 2012 Wantudu

License

Apache License 2.0