Skip to content

Instantly share code, notes, and snippets.

View nathenharvey's full-sized avatar

Nathen Harvey nathenharvey

View GitHub Profile
# This is a Chef recipe file. It can be used to specify resources which will
# apply configuration to a server.
log "Welcome to Chef, #{node["starter_name"]}!" do
level :info
cookbook_file "helloworld.txt" do
path "/Users/rossmohan/HELLOWORLD.TXT"
action :create_if_missing
end
end
@nathenharvey
nathenharvey / gist:8d2919cc8e375d8ed486
Created August 19, 2014 19:29
testing output for apache cookbook
➜ apache git:(master) rubocop .
Inspecting 5 files
.....
5 files inspected, no offenses detected
➜ apache git:(master) foodcritic .
➜ apache git:(master) rspec spec/unit/default.rb .............
Finished in 0.22822 seconds (files took 2.39 seconds to load)
@nathenharvey
nathenharvey / metadata.rb
Created November 4, 2014 09:44
Metadata for chef-sugar cookbook
name "chef-sugar"
version "2.4.1"
description "Installs chef-sugar. Please see the chef-sugar Ruby gem for more information."
long_description "Chef Sugar is a Gem & Chef Recipe that includes series of helpful syntactic\
sugars on top of the Chef core and other resources to make a cleaner, more lean\
recipe DSL, enforce DRY principles, and make writing Chef recipes an awesome and\
fun experience!\
\
For the most up-to-date information and documentation, please visit the [Chef\
Sugar project page on GitHub](https://github.com/sethvargo/chef-sugar)."
#! /bin/bash
# Required knife ec2, ec2 command line tools, and some AWS_ environment variables
# set-up some varirables
export JAVA_HOME=`/usr/libexec/java_home -v 1.7`
export NUM_INSTANCES=1
# security group
export SG=sg-29d3c14c
---
driver:
name: ec2
aws_ssh_key_id: <%= ENV['AWS_KEYPAIR_NAME'] %>
transport.ssh_key: <%= ENV['AWS_KEY_PATH'] %>
provisioner:
name: chef_zero
platforms:

2015-08-13 - Supermarket and berkshelf outage - CUSTOMER

Meeting

The post mortem meeting was held at 3:30PM EDT on Friday, August 14, 2015. The meeting was be held via a Google Hangout that was live streamed to YouTube. Internally, we used #_postmortem_20150814 to discuss the post mortem.

  1. This is a blameless Post Mortem.
  2. We will not focus on the past events as they pertain to "could've", "should've", etc.
  3. All follow up action items will be assigned to a team/individual before the end of the meeting. If the item is not going to be top priority leaving the meeting, don't make it a follow up item.
@nathenharvey
nathenharvey / build-deb-ruby-1.9.2-p320.sh
Created May 8, 2012 10:51 — forked from jacobat/build-deb-ruby-1.9.2-p290.sh
i can has ruby-1.9.2 package with fpm
#!/bin/sh
rubyversion=1.9.2-p320
rubysrc=ruby-$rubyversion.tar.bz2
checksum=b226dfe95d92750ee7163e899b33af00
destdir=/tmp/install-$rubyversion
sudo apt-get -y install libssl-dev
gem list -i fpm || sudo gem install fpm --no-ri --no-rdoc
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "bento-12.04"
config.vm.box_url = "https://opscode-vm.s3.amazonaws.com/vagrant/boxes/opscode-ubuntu-12.04.box"
config.vm.forward_port 80, 8080
config.vm.customize [
"modifyvm", :id,
2015-11-30_13:30:52.24030 [GIN] 2015/11/30 - 13:30:52 | 200 | 3.695145ms | 69.250.19.123 | GET /owners/nathenharvey/scans
2015-11-30_13:30:52.27626 [GIN] 2015/11/30 - 13:30:52 | 200 | 3.326383ms | 69.250.19.123 | GET /owners/nathenharvey/scans/6403d083-dbaa-4820-402c-adfa996e2ebc/nodes
2015-11-30_13:30:55.69568 [GIN] 2015/11/30 - 13:30:55 | 200 | 2.862087ms | 69.250.19.123 | POST /owners/nathenharvey/scans
2015-11-30_13:30:55.69582 13:30:55.695 DEB => execute job on worker 1
2015-11-30_13:30:55.69643 13:30:55.696 DEB => [nathenharvey/17dd9f92-2bc8-4fb6-7b47-35cd0c4e525e] Detect target nathenharvey/default/52.71.253.76:0
2015-11-30_13:30:55.69646 13:30:55.696 DEB => run inspec: PATH=/opt/chef-compliance/bin:/opt/chef-compliance/embedded/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin inspec detect --sudo --host 52.71.253.76 --user chef --key-files /var/opt/chef-compliance/core/runtime/.tmp/access_keys/17dd9f92-2bc8-4fb6-7b47-35cd0c4e525e/184db4c5-8b56-4553-577f-80601b

In the Chef Office Hours on December 20, 2012

Rob asked about getting chef installed on his server. We manually installed Chef there following the instructions at http://www.opscode.com/chef/install/ and then ran a knife bootstrap command. The easier way would have been to simply run the knife bootstrap command.

For example after launching a fresh instance on EC2, I can simply run:

$ knife bootstrap ec2-184-73-68-244.compute-1.amazonaws.com -x ubuntu -i ~/.aws/nharvey-aws.pem --sudo

-x is the username I'll login with: ubuntu
-i is the identify file I'll use when logging in: ~/.aws/nharvey-aws.pem