This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include at least one source and the rails gem | |
source :gemcutter | |
gem 'rails', '~> 2.3.5', :require => nil | |
group :development do | |
# bundler requires these gems in development | |
gem 'rails-footnotes' | |
end | |
group :test do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (1) copy the newrelic rpm java client into #{RAILS_ROOT}/solr/newrelic | |
# (2) add a newrelic.yml in that directory with you API key | |
# (3) add this monkey patch in an initializer to load newrelic with the solr server | |
Sunspot::Server.class_eval do | |
def run | |
command = ['java'] | |
command << "-Xms#{min_memory}" if min_memory | |
command << "-Xmx#{max_memory}" if max_memory | |
command << "-Djetty.port=#{port}" if port | |
command << "-Dsolr.data.dir=#{solr_data_dir}" if solr_data_dir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sunspot' | |
require 'sunspot/session_proxy/abstract_session_proxy' | |
require 'resque' | |
require 'resque-retry' | |
class SunspotResqueSessionProxy < Sunspot::SessionProxy::AbstractSessionProxy | |
attr_reader :session | |
delegate :config, :delete_dirty?, :dirty?, | |
:new_search, :search, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if salt['pkg.version']('apache2') %} | |
poodle apache server restart: | |
service.running: | |
- name: apache2 | |
{% for foundfile in salt['cmd.run']('rgrep -m 1 SSLProtocol /etc/apache*').split('\n') %} | |
{% if 'No such file' not in foundfile and 'bak' not in foundfile and foundfile.strip() != '' and not salt['cmd.run_all']('test -L '+foundfile.split(':')[0])['retcode'] == 0 %} | |
poodle {{ foundfile.split(':')[0] }}: | |
file.replace: | |
- name : {{ foundfile.split(':')[0] }} | |
- pattern: "SSLProtocol all -SSLv2[ ]*$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Manages Icinga Passive Check delivery | |
''' | |
import logging | |
import logging.handlers | |
import os | |
import signal | |
LOG_LEVELS = (logging.WARNING, logging.INFO, logging.DEBUG) |