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
# mongo_template.rb | |
# remove unneeded defaults | |
run "rm public/index.html" | |
run "rm public/images/rails.png" | |
run "rm public/javascripts/controls.js" | |
run "rm public/javascripts/dragdrop.js" | |
run "rm public/javascripts/effects.js" | |
run "rm public/javascripts/prototype.js" |
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
# Guide | |
# Configure the essential configurations below and do the following: | |
# | |
# Repository Creation: | |
# cap deploy:repository:create | |
# git add . | |
# git commit -am "initial commit" | |
# git push origin master | |
# | |
# Initial Deployment: |
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
# 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
# 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
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
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
i = gem_package "sys-proctable" do | |
action :nothing | |
end | |
i.run_action(:install) | |
require 'rubygems' | |
Gem.clear_paths | |
require 'sys/proctable' | |
Rackspace.is_proc("deployment.*sh", 300) |
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
provides "gamespy" | |
require_plugin "kernel" | |
require_plugin "network" | |
def get_ip_address(name, eth) | |
network[:interfaces][eth][:addresses].each do |key, info| | |
gamespy[name] = key if info['family'] == 'inet' | |
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
knife ec2 server create -G default -I ami-61be7908 -f m1.small \ | |
-S schisamo -x ubuntu -d ubuntu10.04-ruby192 |
OlderNewer