Sha256: ded108a54479fd132b231e1d296d1aa7cb6cb7635777031730cdb184da01a9de

Contents?: true

Size: 1.96 KB

Versions: 11

Compression:

Stored size: 1.96 KB

Contents

Capistrano::Configuration.instance(:must_exist).load do
  namespace :unicorn do
    desc <<-DESC
    Start the Unicorn Master.  This uses the :use_sudo variable to determine whether to use sudo or not. By default, :use_sudo is set to true.
    DESC
    task :start, :roles => [:app], :except => {:unicorn => false} do
      sudo "/usr/bin/monit start all -g #{monit_group}"
    end

    desc <<-DESC
    Restart the Unicorn processes on the app server by starting and stopping the master. This uses the :use_sudo variable to determine whether to use sudo or not. By default, :use_sudo is set to true.
    DESC
    task :restart, :roles => [:app], :except => {:unicorn => false} do
      sudo "/usr/bin/monit restart all -g #{monit_group}"
    end

    desc <<-DESC
    Stop the Unicorn processes on the app server.  This uses the :use_sudo
    variable to determine whether to use sudo or not. By default, :use_sudo is
    set to true.
    DESC
    task :stop, :roles => [:app], :except => {:unicorn => false} do
      sudo "/usr/bin/monit stop all -g #{monit_group}"
    end

    desc <<-DESC
    Reloads the unicorn works gracefully - Use deploy task for deploys
    DESC
    task :reload, :roles => [:app], :except => {:unicorn => false} do
      sudo "/engineyard/bin/unicorn #{application} reload"
    end

    desc <<-DESC
    Adds a Unicorn worker - Beware of causing your host to swap, this setting isn't permanent
    DESC
    task :aworker, :roles => [:app], :except => {:unicorn => false} do
      sudo "/engineyard/bin/unicorn #{application} aworker"
    end

    desc <<-DESC
    Removes a unicorn worker (gracefully)
    DESC
    task :rworker, :roles => [:app], :except => {:unicorn => false} do
      sudo "/engineyard/bin/unicorn #{application} rworker"
    end

    desc <<-DESC
    Deploys app gracefully with USR2 and unicorn.rb combo
    DESC
    task :deploy, :roles => [:app], :except => {:unicorn => false} do
      sudo "/engineyard/bin/unicorn #{application} deploy"
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
eycap-0.6.1 lib/eycap/recipes/unicorn.rb
eycap-0.6.0 lib/eycap/recipes/unicorn.rb
eycap-0.5.23 lib/eycap/recipes/unicorn.rb
eycap-0.5.22 lib/eycap/recipes/unicorn.rb
eycap-0.5.21 lib/eycap/recipes/unicorn.rb
eycap-0.5.20 lib/eycap/recipes/unicorn.rb
eycap-0.5.19 lib/eycap/recipes/unicorn.rb
eycap-0.5.18 lib/eycap/recipes/unicorn.rb
g5cap-0.1.2 recipes/unicorn.rb
g5cap-0.1.1 recipes/unicorn.rb
g5cap-0.1.0 recipes/unicorn.rb