Take the 2008 Git User's Survey and help out! [ hide ]

public
Rubygem
Description: Engine Yard specific capistrano recipes
Clone URL: git://github.com/engineyard/eycap.git
Search Repo:
commit  3eb18fd346390eda2c3d966bbb04f925180f2e77
tree    c2ada33df18cc11f5d62db1e914d6eae1bb9bdd0
parent  c4543b9bb5f013d72556ce4e5876f4718a9f1c16
eycap / lib / eycap / recipes / juggernaut.rb
100644 18 lines (17 sloc) 0.649 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Capistrano::Configuration.instance(:must_exist).load do
 
  namespace :juggernaut do
    desc "After update_code you want to symlink the juggernaut.yml file into place"
    task :symlink_configs, :roles => :app, :except => {:no_release => true} do
      run <<-CMD
cd #{latest_release} &&
ln -nfs #{shared_path}/config/juggernaut.yml #{latest_release}/config/juggernaut.yml
CMD
    end
    [:start,:stop,:restart].each do |op|
      desc "#{op} juggernaut server"
      task op, :roles => :app, :except => {:no_release => true} do
        sudo "/usr/bin/monit #{op} all -g juggernaut_#{application}"
      end
    end
  end
end