Giter VIP home page Giter VIP logo

chef-elasticsearch-curator's Introduction

elasticsearch-curator Cookbook Version Build Status

Chef cookbook to install and configure elasticsearch-curator from version 4.

Tested Platforms

  • ubuntu 16.04
  • centos 7

Usage

This cookbook can be used by including elasticsearch-curator::default in your run list and settings attributes as needed. Alternatively, you can use the custom resources directly.

If you are using elasticsearch-curator < 5 you might want to use the cookbook version v0.2.8.

Attributes

Key Type Description Default
node['elasticsearch-curator']['version'] String Version of elasticsearch-curator to install, nil = latest nil
node['elasticsearch-curator']['repository_url'] String URL of elasticsearch-curator package repository 'http://packages.elastic.co/curator/4/debian'
node['elasticsearch-curator']['repository_key'] String elasticsearch-curator repository key 'https://packages.elastic.co/GPG-KEY-elasticsearch'
node['elasticsearch-curator']['bin_path'] String bin path for elasticsearch-curator '/usr/bin'
node['elasticsearch-curator']['username'] String user for running curator 'curator'
node['elasticsearch-curator']['config_file_path'] String path to direct curator config file "/home/#{node['elasticsearch-curator']['username']}/.curator"
node['elasticsearch-curator']['action_file_path'] String path to direct action config file "/home/#{node['elasticsearch-curator']['username']}/.curator"
node['elasticsearch-curator']['cron_minute'] String Minute to run the curator cron job '0'
node['elasticsearch-curator']['cron_hour'] String Hour to run the curator cron job '*'
node['elasticsearch-curator']['config'] Hash config elasticsearch-curator {
  'client' => {
    'hosts' => ['127.0.0.1'],
    'port' => 9200,
    'use_ssl' => false,
    'ssl_no_validate' => false,
    'timeout' => 30,
    'master_only' => false
  },
  'logging' => {
    'loglevel' => 'INFO',
    'logformat' => 'default'
  }
}

This cookbook ships with custom resources for install elasticsearch-curator and managing the configuration file:

Custom Resources

elasticsearch_curator_install

Installs elasticsearch-curator. Optionally specifies a version, otherwise the latest available is installed

elasticsearch_curator_install 'curator' do
  install_method node['elasticsearch-curator']['install_method']
  action :install
end

elasticsearch_curator_config

Writes out the elasticsearch-curator configuration file.

elasticsearch_curator_config 'default' do
  config node['elasticsearch-curator']['config']
  action :configure
end

This method also supports a http_auth property to allow passing a string with this format : "username:password". This allows retrieving the credentials from the wrapper cookbook (for example using chef-vault) and not store this sensitive information in the attributes.

elasticsearch_curator_action

This will setup a cron job and create action.yaml file for elasticsearch-curator.

elasticsearch_curator_action 'action' do
  config node['elasticsearch-curator']['action_config']
  minute '0'
  hour '*'
  action :create
end

Tests

To run tests, install all dependencies with bundler:

bundle install
bundle exec cookstyle
bundle exec foodcritic .

chef-elasticsearch-curator's People

Contributors

codylewandowski avatar cyberflow avatar dpattmann avatar emfl avatar gravitystorm avatar kovyrin avatar kri5 avatar smelchior avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chef-elasticsearch-curator's Issues

Support for RHEL

Hi, Thank you for the cookbook, really appreciate it. Any plans to support RHEL (amazon AMI)? looks like it only supports debian for now. Thank you

No matchers found

Can you please add matchers?
I wanna add rspec tests but can't.

Thanks in advance!

Version is only used for pip installs

I tried to set a specific version when doing an rpm install and it wasn't working. I took a look at the code and noticed that you only use the version on the pip install and not on the package install.

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.