Skip to content

Instantly share code, notes, and snippets.

View slyness's full-sized avatar
🏠
Working from home

Aaron Baer slyness

🏠
Working from home
View GitHub Profile
echo '{
"handlers": ["debug"],
"name": "push_woot_test",
"output": "woot!",
"status": 0
}' | nc -w1 127.0.0.1 3030
@slyness
slyness / upgrade_script.md
Last active August 8, 2023 22:03
Chef 1.4 to Chef 11 single server instance upgrade script

Upgrade Procedure:

  • Chef system has enough resources to perform the upgrade. 8GB ram, 4 CPUs confirmed to work
  • private-chef must be version 1.4.6 and above. If 1.4.4 is still installed upgrade to 1.4.9
  • Log on to system
  • Create working directory
  • Download private-chef-11.1.3-1.el6.x86_64.rpm to working directory ** http://172.31.56.93/downloads/private-chef-11.1.3-1.el6.x86_64.rpm
  • Install Gems needed for system cleanup
@slyness
slyness / CONTRIBUTING.md
Last active August 29, 2015 14:00 — forked from dje/CONTRIBUTING.md
  1. Fork the repository using Github
  2. Checkout a named feature branch created from the develop branch
  3. Complete modifications or corrections, include tests to support your code
  4. Run the tests, ensuring they all pass
  5. Submit a Pull Request to the develop branch using Github
echo '{
"handlers": ["debug"],
"name": "push_woot_test",
"output": "woot!",
"status": 0
}' | nc -w1 127.0.0.1 3030
# -*- mode: ruby -*-
# vi: set ft=ruby :
guard :rspec, spec_paths: ["test/unit"] do
watch(%r{^test/unit/.+_spec\.rb$})
watch(%r{^(libraries|definitions|providers|recipes|resources)/(.+)\.rb$}) { |m| "test/unit/#{m[1]}/#{m[2]}_spec.rb" }
watch("test/unit/spec_helper.rb") { "test/unit" }
end
source "https://rubygems.org"
gem "chefspec"
gem "emeril"
gem "foodcritic", "~> 3.0"
gem "librarian-chef"
gem 'guard-rspec'
gem "ipaddr_extensions"
gem "builder"
#!/usr/bin/env rake
begin
require 'emeril/rake'
rescue LoadError
puts ">>>>> Emeril gem not loaded, omitting tasks" unless ENV['CI']
end
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:unit) do |t|
@slyness
slyness / -
Created June 24, 2014 17:26
spec_helper.rb
require 'chefspec'
require 'chefspec/librarian'
RSpec.configure do |config|
config.log_level = :fatal
end
require "chefspec"
require "chefspec/librarian"
at_exit { ChefSpec::Coverage.report! } if ENV['COVERAGE']
def load_resource(cookbook, lwrp)
require "chef/resource/lwrp_base"
name = class_name_for_lwrp(cookbook, lwrp)
unless Chef::Resource.const_defined?(name)
Chef::Resource::LWRPBase.build_from_file(
require "serverspec"
require "net/http"
require "uri"
include Serverspec::Helper::Exec
include Serverspec::Helper::DetectOS
RSpec.configure do |c|
c.before :all do
c.path = "/sbin:/usr/sbin"