Skip to content

Instantly share code, notes, and snippets.

View 7hunderbird's full-sized avatar
👶
Since 1976.

Tyler Bird 7hunderbird

👶
Since 1976.
View GitHub Profile
set :staging_database, "app_name_staging"
set :staging_dbhost, "mysql50-staging-1"
set :production_database, "app_name_production"
set :production_dbhost, "mysql50-production-1"
task :staging do
role :web, "1.2.3.4"
role :app, "1.2.3.4"
role :db , "1.2.3.4", :primary => true
# a quick and easy way to to multi-stage deployments
# the basics
set :keep_releases, 5
set :application, "app_name"
set :user, "deploy_user"
set :password, "the_one_you_use"
set :deploy_to, "/data/#{application}"
# if using git, otherwise substitute your scm
namespace :deploy do
desc "Link the database.yml file into the current release path."
task :symlink_config do
run <<-CMD
cd #{latest_release} &&
ln -nfs #{shared_path}/config/database.yml #{latest_release}/config/database.yml
CMD
end
end
@7hunderbird
7hunderbird / gist:91641
Created April 8, 2009 04:48
sphinx.app_name.monitrc
check process sphinx_<app_name>_3312
with pidfile /var/run/sphinx/<app_name>.pid
start program = "/engineyard/bin/thinking_sphinx_searchd <appname> start" as uid <user_name> and gid <user_group>
stop program = "/engineyard/bin/thinking_sphinx_searchd <appname> stop" as uid <user_name> and gid <user_group>
group sphinx_<appname>
# Please install the Engine Yard Capistrano gem
# gem install engineyard-eycap --source=http://gems.github.com
require "eycap/recipes"
set :keep_releases, 5
set :application, 'ssbev6docs'
set :repository, 'git@github.com:absperf/ssbe6-docs.git'
set :deploy_to, "/data/#{application}"
set :deploy_via, :remote_cache
set :monit_group, "#{application}"
@7hunderbird
7hunderbird / gist:95932
Created April 15, 2009 18:13
deploy.rb
# a quick and easy way to to multi-stage deployments
# the basics
set :keep_releases, 5
set :application, "app_name"
set :user, "deploy_user"
set :password, "the_one_you_use"
set :deploy_to, "/data/#{application}"
# if using git, otherwise substitute your scm
marty:osx-window-sizing tbird$ sudo rake install
Password:
(in /Users/tbird/code/osx-window-sizing)
Compiling at-menu-center.applescript...
Compiling at-menu.applescript...
Compiling center.applescript...
Compiling center800.applescript...
Compiling front-half-left.applescript...
Compiling front-half-right.applescript...
Compiling front-natural-left.applescript...
desc <<-DESC
[internal] Removes the most recently deployed release.
This is called by the rollback sequence, and should rarely
(if ever) need to be called directly.
DESC
task :cleanup, :except => { :no_release => true } do
run "if [ `readlink #{current_path}` != #{current_release} ]; then rm -rf #{current_release}; fi"
end
INFO: [Begin] Chef converge of Amazon instance: i-4f6a7e26
INFO: Removing cookbooks
INFO: Installing main recipes
INFO: Getting instance's json dna
INFO: Writing json dna to file system
INFO: Running Chef solo
INFO: Starting Chef Solo Run
INFO: Gem: rails:2.3.3 already installed, skipping
INFO: Applying Recipe: nginx
INFO: Applying Recipe: memcached