Skip to content

Instantly share code, notes, and snippets.

View danielsdeleo's full-sized avatar

Dan DeLeo danielsdeleo

View GitHub Profile
@danielsdeleo
danielsdeleo / chef-11.6-rc-announce.md
Last active December 19, 2015 02:59
Chef 11.6 Release Candidate Announcement

Hi Chefs,

We've released a Chef 11.6.0 release candidate for testing.

How To Get It:

Use the installer script to fetch the appropriate package:

curl -L "https://www.opscode.com/chef/install.sh" | sudo bash -s -- -p
@danielsdeleo
danielsdeleo / ft-announce.md
Last active December 18, 2015 05:28
File Refactor Announcement

Hi Chefs,

We've recently merged a substantial rewrite of Chef's file provider family to master, and it will be released in 11.6.0. As part of these changes, we've standardized the way the different providers create files and update content, and added some cool improvements and features. But first, a word of caution:

Changes to Previously Undefined Behaviors

@danielsdeleo
danielsdeleo / deps.md
Created May 1, 2013 02:00
Deps in Chef 11 Solo
@danielsdeleo
danielsdeleo / chef-11-4-4-and-10-24-2-release.md
Created April 25, 2013 01:16
Chef 11.4.4 and 10.24.4 Release Announcement Draft

Chef 11.4.4 and 10.24.4 Released

We've released Chef 11.4.4 and 10.24.4 to fix some bugs introduced in the previous release:

  • CHEF-3432: Chef client was keeping references to "stale" LWRP classes, which caused a memory leak when running Chef as a daemon without the --fork option.
  • CHEF-4117: The patch for CHEF-3432 would cause Chef to fail if there was a constant defined on Object with the same name as a LWRP resource.
@danielsdeleo
danielsdeleo / proposal.md
Created March 15, 2013 16:54
CHEF-3694 Proposed Changes
@danielsdeleo
danielsdeleo / api.rb
Last active December 14, 2015 22:29
RSpec2 Style let bindings for Chef?
##
# binding definition API.
# Examples taken from nagios cookbook
bind(:nagios_service_name).to("nagios")
bind(:hostgroups) do
search(:role, "*:*").map {|r| r.name }
end
@danielsdeleo
danielsdeleo / Vagrantfile
Created February 17, 2013 03:10
Shortbus
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.define 'shortbus' do |c|
c.vm.box = "opscode-centos-5.5"
c.vm.box_url = "http://opscode-vm.s3.amazonaws.com/vagrant/boxes/opscode-centos-5.5.box"
c.vm.network :hostonly, "192.168.93.93"
@danielsdeleo
danielsdeleo / protip.md
Created January 20, 2013 18:01
Quick Chef Hacking

Quick Chef Hacking

chef-apply is coming in Chef 11. Until then, here's what I do.

solo.rb

cookbook_path "/tmp/cookbooks"

Cookbook Dir

mkdir -p /tmp/cookbooks/test/recipes/

@danielsdeleo
danielsdeleo / Chef-10.x.txt
Created October 16, 2012 20:30
Removing attribute surprises
chef > Chef::VERSION
=> "10.14.2"
### Hidden state
chef > i = node[:network][:interfaces] ; nil
=> nil
chef > i.en0.to_hash
=> {"addresses"=>{"20:c9:d0:45:45:63"=>{"family"=>"lladdr"}, "fe80::22c9:d0ff:fe45:4563"=>{"family"=>"inet6", "prefixlen"=>"64", "scope"=>"Link"}, "172.28.8.77"=>{"family"=>"inet", "netmask"=>"255.255.255.0", "broadcast"=>"172.28.8.255"}}, "mtu"=>"1500", "flags"=>["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"], "type"=>"en", "number"=>"0", "encapsulation"=>"Ethernet", "arp"=>{"169.254.255.255"=>"0:22:d:11:4b:48", "172.28.8.1"=>"0:22:d:11:4b:48", "172.28.8.255"=>"ff:ff:ff:ff:ff:ff"}}
chef > i.en0.to_hash
@danielsdeleo
danielsdeleo / gist:3252723
Created August 3, 2012 23:38
Sample output from the knife key check plugin
# See also: https://github.com/danielsdeleo/knife-plugins/blob/master/key_check.rb
ddeleo@boltzmann chef-oss-dev > knife key check chef-oss-dev-validator .chef/kallistec.pem
ERROR: Mismatch:
ERROR: /Users/ddeleo/opscode-ops/chef-oss-dev/.chef/kallistec.pem is not a valid key for client chef-oss-dev-validator
Public key extracted from private key:
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6tIhFprz5efiFF0zogxB
KBkn72n6x9aGbedzPnEG+ZiObyzrH5MeO7aYv51HfLBEozSMxiJxnADCN4Bus0Sr
8UHYZAKFLCkx67rpZHvl6xggEYHDSmMtUNNBHOQRIIbYi79JZeQTcKQNSzfyltiU