Skip to content

Instantly share code, notes, and snippets.

View botchagalupe's full-sized avatar

John Willis botchagalupe

View GitHub Profile
#!/bin/sh
# Must have boot2docker installed if using Mac OS X
installMachineMac() {
sudo wget --no-check-certificate -O /usr/local/bin/docker-machine http://docker-machine-builds.evanhazlett.com/latest/docker-machine_darwin_amd64
sudo chmod +x /usr/local/bin/docker-machine
}
installDockerBinMac(){
sudo wget --no-check-certificate -O /usr/local/bin/docker https://get.docker.com/builds/Darwin/x86_64/docker-latest
#!/bin/sh
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
aptitude -y purge ri
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide
aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30
aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5
<html>
<body>
<h1>Welcome to <%= node['company'] %></h1>
<h2>We love <%= @site_name %></h2>
<%= node['ipaddress'] %>:<%= @port %>
</body>
</html>
#
# Cookbook Name:: apache
# Recipe:: default
#
# Copyright 2012, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
package "apache2" do
<% if @port != 80 -%>
Listen <%= @port %>
<% end -%>
<VirtualHost *:<%= @port %>>
ServerAdmin webmaster@localhost
DocumentRoot <%= @document_root %>
<Directory />
Options FollowSymLinks
Vagrant::Config.run do |config|
# Use the Opscode box that we downloaded.
config.vm.box = "chef-ubuntu"
# Let's give the box an IP that is accessible by the other nodes we
# will spin up.
config.vm.network "33.33.33.11"
# Forward the Riak HTTP and Protobufs ports so we can access them
# locally.
#!/usr/bin/env ruby
require 'rubygems'
require 'chef'
require 'chef/client'
require 'chef/run_context'
Chef::Config[:solo] = true
Chef::Config[:log_level] = :info
Chef::Log.level(:info)
# -*- ruby -*-
# Needs following parameters configured in rake.rb:
# DNS_DOMAIN: domain for which to set entries, including trailing dot
# (e.g. "example.com.")
# DNS_ATTRIBUTE: attribute containing hostname to CNAME to, defaults
# to 'fqdn'; for EC2, use "ec2.public_hostname"
# DNS_ENTRIES: hash mapping hostname to node search query,
# e.g. {'buildbot' => 'recipes:buildbot', 'monitoring' =>
# 'roles:monitoring'}
@botchagalupe
botchagalupe / report.rb
Created December 15, 2010 00:39 — forked from dje/report.rb
require 'rubygems'
require 'chef'
require 'fog'
require 'google_spreadsheet'
Chef::Config.from_file("~/.chef/knife.rb")
ec2 = Fog::AWS::EC2.new(:aws_access_key_id => ENV["AWS_KEY"],
:aws_secret_access_key => ENV["AWS_SECRET"] )