Skip to content

Instantly share code, notes, and snippets.

View metaxis's full-sized avatar
💭
FMFMS

Aaron Peterson metaxis

💭
FMFMS
View GitHub Profile
@jtimberman
jtimberman / gist:548261
Created August 24, 2010 20:32
preseed.cfg for automated installations with chef from apt.opscode.com
# This is the entire preseed config file used on an example Lucid system. See the preseed
# documentation for more information on the options here. This will use US English by default.
#
# https://help.ubuntu.com/10.04/installation-guide/amd64/preseed-contents.html
#
# This preseed will automatically install Ubuntu 10.04 with default options. Understand what
# it is doing before you use it.
#
# Boot Options line:
#
#!/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)
@schisamo
schisamo / definition.rb
Created January 4, 2011 20:52
veewee definition for creating a Vagrant box that mirrors the ubuntu10.04-gems knife bootstrap template
Veewee::Session.declare( {
:cpu_count => '1',
:memory_size=> '256',
:disk_size => '10140',
:disk_format => 'VDI',
:disk_size => '10240' ,
:os_type_id => 'Ubuntu',
:iso_file => "ubuntu-10.04.1-server-i386.iso",
:iso_src => "http://releases.ubuntu.com/10.04.1/ubuntu-10.04.1-server-i386.iso",
:iso_md5 => "01f72c846845e4e19aec8a45912e5dda",
@jtimberman
jtimberman / gist:821820
Created February 11, 2011 02:26
ruby_block to store a data bag item
ruby_block "data bag item thing" do
block do
item = {
"id" => "thing",
"key" => "value"
}
Chef::Log.info "Storing volume_id #{item.inspect}"
databag_item = Chef::DataBagItem.new
databag_item.data_bag("bagname")
databag_item.raw_data = item
@jtimberman
jtimberman / gist:953420
Created May 3, 2011 14:26
switch nodes from environment roles to Chef 0.10 environments
# Author:: Joshua Timberman (<[email protected]>)
#
# Copyright 2011, Joshua Timberman
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@jtimberman
jtimberman / gist:991401
Created May 25, 2011 17:16
setting spaces for specific apps on my workstation
{
"id": "workstation"
"space_bindings": {
"com.adiumx.adiumx": 4,
"com.apple.itunes": 3,
"com.googlecode.iterm2": 2,
"com.skype.skype": 4,
"com.sparrowmailapp.sparrow": 4,
"macirssi": 4,
"org.gnu.emacs": 2,
#
# Cookbook Name:: mac_os_x
# Recipe:: lion_ical
#
# Copyright 2011, Joshua Timberman
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@apsoto
apsoto / chef-ec2.rake
Created September 5, 2011 05:20
Chef EC2 Node Cleanup task
namespace :ec2 do
# setup chef config
#
config = File.join(File.dirname(__FILE__), '..', '.chef', 'knife.rb')
Chef::Config.from_file(config)
load_gem_or_report(%w{aws})
desc 'Delete any ec2-based chef nodes that no longer exist'
task :cleanup_nodes do
@jedi4ever
jedi4ever / gist:1216529
Created September 14, 2011 13:20
Quick gist on getting vsphere and vcenter and fog/vsphere going
Quick gist on getting vsphere and vcenter and fog/vsphere going
# Things to download
- Download free evaluation version of window 2008
- Download free evaluation of esxi v5
- Download free evaluation of esxi vsphere (control center) iso
# Install esxi in vmware fusion
1)Install esxi in vmware (select vmware/esx as host)
create a user root/pipopopo
@jtimberman
jtimberman / gist:1302749
Created October 21, 2011 00:00
bootstrap template that uses an encrypted data bag secret key
bash -c '
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>
if [ ! -f /usr/bin/chef-client ]; then
apt-get update
apt-get install -y ruby ruby1.8-dev build-essential wget libruby-extras libruby1.8-extras
cd /tmp
wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz
tar zxf rubygems-1.6.2.tgz
cd rubygems-1.6.2