This file contains hidden or 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
| nagios_command "generic_queue_size" do | |
| command "/path/to/check_rabbitmq_queue_size.pl" | |
| arg_one {"queue_name" => String} | |
| arg_two {"warning_size" => Integer} | |
| arg_three {"critical_size" => Integer} | |
| end | |
| nagios_service "generic_queue_size" do | |
| nagios_command_generic_queue_size do | |
| queue_name "random_queue" |
This file contains hidden or 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
| # This knife plugin provides the capability to set an attribute | |
| # value in a data bag item. By default the 'versions' data bag | |
| # is used, but that can be overridden with the -b option. | |
| # Copy this file to ~/.chef/plugins/knife to install the plugin. | |
| module KnifePlugins | |
| class DataBagVersionSet < Chef::Knife | |
| deps do | |
| require 'chef/data_bag' | |
| end |
This file contains hidden or 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
| bash -c ' | |
| <%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%> | |
| if [ ! -f /usr/bin/chef-client ]; then | |
| apt-get update | |
| apt-get install -y ruby ruby1.8-dev build-essential wget libruby-extras libruby1.8-extras | |
| cd /tmp | |
| wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz | |
| tar zxf rubygems-1.6.2.tgz | |
| cd rubygems-1.6.2 |
This file contains hidden or 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 "chef/config" | |
| require "chef/knife" | |
| require "chef/log" | |
| require "chef/mixin/convert_to_class_name" | |
| module DataBagCommon | |
| def self.included(base) | |
| base.module_eval do | |
| def read_secret |
This file contains hidden or 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
| # Knife Configuration File. | |
| # | |
| # This is a Ruby DSL to set configuration parameters for Knife's | |
| # general options. The default location for this file is | |
| # ~/.chef/knife.rb. If multiple Chef repositories are used, | |
| # per-repository configuration files can be created. A per repository | |
| # configuration file must be .chef/knife.rb in the base directory of | |
| # the Chef repository. For example, | |
| # | |
| # ~/Development/chef-repo/.chef/knife.rb |
This file contains hidden or 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
| #!/bin/bash | |
| NODENAME="%farm_name%-%friendly_name%-%instance_id%" | |
| LOG=/var/log/chef-bootstrap.log | |
| DIRECTORY=/etc/chef | |
| CLIENT_RB=$DIRECTORY/client.rb | |
| CHEF_JSON=$DIRECTORY/chef.default.json | |
| PRIVATE_KEY=$HOME/.ssh/id_rsa | |
| PUBLIC_KEY=$PRIVATE_KEY.pub | |
| function say_start { |
This file contains hidden or 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
| cluster_type = 'Grover' | |
| differentiator = 'test' | |
| # cluster_name = "#{cluster_type}_#{differentiator}" | |
| cluster_name = "Grover" | |
| require "Chef" | |
| data = Chef::DataBagItem.load('cluster_template_values', cluster_type)['default'] | |
| ClusterChef.cluster cluster_name do | |
| recipe "tuning" |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| $:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) | |
| require 'rubygems' | |
| require 'thor' | |
| require 'chef' | |
| require 'chef/node' | |
| require 'chef/role' | |
| require 'chef/data_bag' |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'debsfromrepos' | |
| require 'chef/config' | |
| require 'chef/data_bag' | |
| Chef::Config.from_file('./.chef/knife.rb') | |
| data_bag = 'sources_list' |
This file contains hidden or 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
| { | |
| "id": "my_app", | |
| "server_roles": [ | |
| "my_app" | |
| ], | |
| "type": { | |
| "my_app": [ | |
| "rails", | |
| "unicorn" |