This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Veewee::Session.declare( { | |
:cpu_count => '1', | |
:memory_size=> '384', | |
:disk_size => '10140', | |
:disk_format => 'VDI', | |
:disk_size => '10240' , | |
:os_type_id => 'RedHat', | |
:iso_file => "CentOS-5.5-i386-netinstall.iso", | |
:iso_src => "http://mirror.bytemark.co.uk/centos/5.5/isos/i386/CentOS-5.5-i386-netinstall.iso", | |
:iso_md5 => "0172883a3039772165db073693debae5", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'timeout' | |
include Rackspace::Proc | |
define :wait_on_proc, :timeout_sec => 60 do | |
include_recipe "rackspace" | |
begin | |
Timeout::timeout(params[:timeout_sec]) do | |
while getProcPid(params[:name]) | |
sleep(5) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include_recipe "git" | |
node.run_state[:applications] = [] | |
search(:apps) do |app| | |
(app["server_roles"] & node.run_list.roles).each do |app_role| | |
node.run_state[:applications] << {:app => app, :recipes => app["type"][app_role]} | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this file is controlled by Chef | |
# feel free to copy it to your ~/.tmux.conf | |
unbind C-a | |
set -g prefix C-a | |
bind C-a send-prefix | |
set -g default-terminal screen-256color | |
setw -g xterm-keys on | |
set -g status-utf8 on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Before running vagrant, export the shell variable for the organization on the platform and make sure | |
# the validator certificate is in ~/.chef. | |
# | |
# export ORGNAME=your_platform_organization | |
Vagrant::Config.run do |config| | |
config.vm.box = "lucid64" | |
config.vm.provisioner = :chef_server | |
# Set up some organization specific values based on environment variable above. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: haproxy | |
# Recipe:: default | |
# | |
# Copyright 2009, Opscode, Inc. | |
# | |
# 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 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hot deploy Rails apps (rolling restart) with Capistrano, Haproxy, and cluster of Passengers | |
# Capistrano config | |
namespace :passenger do | |
task :disable_load_balancing, :roles => :app do | |
run "rm -f #{current_path}/public/http-check.txt" | |
end | |
task :enable_load_balancing, :roles => :app do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'json' | |
require 'chef' | |
hosts = "# Host File generated from Chef Search on #{Time.now}\n" | |
# perform search via knife and loop through results | |
JSON.parse(%x(knife list_nodes)).each do |n| | |
# parse result as Chef::Node..uses the result json_type | |
node = JSON.parse(%x(knife show_node --node=#{n})) |