Skip to content

Commit

Permalink
Merge pull request #24 from AutomationSupport/issue_22
Browse files Browse the repository at this point in the history
Issue 22
  • Loading branch information
martinb3 committed Aug 29, 2014
2 parents 8283e3c + b1f23b9 commit 8cd9b47
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Berksfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ cookbook 'elasticsearch', '~> 0.3', git:'[email protected]:racker/cookbook-elastics
cookbook 'logstash', '~> 0.9', git:'[email protected]:racker/chef-logstash.git'

# until https://github.com/poise/python/pull/120
cookbook 'python', git:'[email protected]:racker/python.git'
cookbook 'python', git: '[email protected]:racker/python.git'

cookbook 'logstash_stack', git: '[email protected]:rackspace-cookbooks/logstash_stack.git'
cookbook 'rackspace_iptables', git: '[email protected]:rackspace-cookbooks/rackspace_iptables.git'
cookbook 'rackspacecloud', git: '[email protected]:rackspace-cookbooks/rackspacecloud.git'
cookbook 'rackspace_gluster', git: '[email protected]:rackspace-cookbooks/rackspace_gluster.git'
cookbook 'rackops_rolebook', git: '[email protected]:rackops/rackops_rolebook.git'

# override community cron
cookbook 'cron', git:'[email protected]:rackspace-cookbooks/cron.git'
Expand Down
2 changes: 1 addition & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

default['elasticsearch']['discovery']['search_query'] = "tags:elkstack_cluster
AND chef_environment:#{node.chef_environment}
AND elasticsearch_cluster_name:#{node[:elasticsearch][:cluster][:name]}
AND elasticsearch_cluster_name:#{node['elasticsearch']['cluster']['name']}
AND NOT name:#{node.name}"

default['elasticsearch']['discovery']['zen']['ping']['multicast']['enabled'] = false
1 change: 1 addition & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
depends 'python'
depends 'rsyslog'
depends 'platformstack'
depends 'newrelic_meetme_plugin'
2 changes: 2 additions & 0 deletions recipes/elasticsearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
tag('elkstack')
tag('elkstack_cluster') unless should_cluster.nil? || !should_cluster

include_recipe 'elkstack::newrelic'

# Cloud monitoring currently doesn't provide a hook to push in files from git, just from the cookbook.
# Push the file ourselves and configure the monitor.

Expand Down
33 changes: 33 additions & 0 deletions recipes/newrelic.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Encoding: utf-8
#
# Cookbook Name:: elkstack
# Recipe:: newrelic
#
# Copyright 2014, Rackspace
#

unless node['newrelic']['license'].nil?
node.default['newrelic_meetme_plugin']['license'] = node['newrelic']['license']
if tagged?('elkstack') || tagged?('elkstack_cluster')
node.override['newrelic_meetme_plugin']['services'] = {
'elasticsearch' => {
'name' => node['elasticsearch']['cluster']['name'],
'host' => 'localhost',
'port' => '9200',
'scheme' => 'http'
}
}
end

node.default['newrelic_meetme_plugin']['package_name'] = 'newrelic-plugin-agent'

include_recipe 'python::package'
include_recipe 'python::pip'
python_pip 'setuptools' do
action :upgrade
version node['python']['setuptools_version']
end

include_recipe 'python'
include_recipe 'newrelic_meetme_plugin'
end

0 comments on commit 8cd9b47

Please sign in to comment.