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 'rubygems' | |
require 'activesupport' | |
require 'aws' | |
require 'graphviz' | |
ec2 = Aws::Ec2.new(ENV["AMAZON_ACCESS_KEY_ID"], ENV["AMAZON_SECRET_ACCESS_KEY"]) | |
g = ec2.describe_security_groups | |
gv = GraphViz::new( "structs", "type" => "graph" ) |
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
#!/usr/bin/env ruby | |
require 'fog' | |
require 'graphviz' | |
ec2 = Fog::Compute.new(:provider => 'AWS') | |
graph = GraphViz::new("structs", "type" => "graph") | |
groups = ec2.security_groups | |
group_map = Hash[groups.collect { |g| [g.group_id, g.name] }] |
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 'chef/chef_fs/knife' | |
class Chef | |
class Knife | |
class Deps < Chef::ChefFS::Knife | |
banner "knife deps PATTERN1 [PATTERNn]" | |
category "path-based" | |
deps 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
<!-- note that this requires the rabbitmq management plugin --> | |
<!-- also requires collectd 5.1 with curl_json plugin support --> | |
<Plugin curl_json> | |
<URL "http://localhost:55672/api/overview"> | |
Instance "rabbitmq_overview" | |
User "guest" | |
Password "guest" | |
<Key "message_stats/publish"> | |
Type "counter" | |
</Key> |
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 'gsl' | |
require 'time' | |
module Diskalerter | |
class ThresholdEstimator | |
attr_reader :timestamps, :signal, :threshold, :now | |
# timestamps - a list of timestamps in epoch milliseconds | |
# signal - a list of values for the provided timestamps | |
# threshold - the "exhaustion" threshold (e.g., 100 for a percentage signal) |
Best talks day 1:
- Please, no More Minutes, Milliseconds, Monoliths... or Monitoring Tools! - Adrian Cockcroft
- gave 5 good rules for monitoring systems, showed what cloud / microservices monitoring looks like @ Netflix
- Simple math to get some signal out of your noisy sea of data - Toufic Boubez
- explains why static alert thresholds don't work and gave 3 techniques to use instead
Note: These work for us with Cobbler 2.2.3 and Chef 11.4.0 on CentOS
These are our install steps on CentOS 6:
mkdir -p ~/.chef/plugins/knife/
curl -o ~/.chef/plugins/knife/set_environment.rb https://gist.github.com/gmr/5339326/raw/5bd498d25bc2f4d17f029cdc4a34ed38e461fec2/set_environment.rb
curl -o /usr/lib/python2.6/site-packages/cobbler/modules/install_pre_chef.py https://gist.github.com/gmr/5339326/raw/0b248a8b40e5bac5673bd7df7cfd60185af778bc/install_pre_chef.py
curl -o /usr/lib/python2.6/site-packages/cobbler/modules/delete_post_chef.py https://gist.github.com/gmr/5339326/raw/ae71362ae721c0391f0be2f4b2166f3806e90a91/delete_post_chef.py
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
" Name: modified nofrils | |
" Author: adg | |
" URL: based on https://github.com/robertmeta/nofrils | |
" (see this url for latest release & screenshots) | |
" License: OSI approved MIT license | |
" Modified: 2016 Feb 26 | |
hi clear | |
if exists("syntax_on") | |
syntax reset |
This uses terraform's template_file
resource to generate a yaml properties file for serverspec to use.
- create the Rakefile in your terraform project root
- create a
spec
directory and putspec_helper.rb
in it - create the
templates/properties.tmpl.yml
file - create the
serverspec.tf
terraform apply
Tests will be matched based on roles defined for a given node.
OlderNewer