Skip to content

Commit

Permalink
allow custom path for ey binaries, closes #42
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed May 7, 2013
1 parent b34a356 commit ce270e4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions lib/eycap/recipes/backgroundrb.rb
Expand Up @@ -3,9 +3,9 @@
namespace :bdrb do
desc "After update_code you want to reindex"
task :reindex, :roles => [:app], :only => {:backgroundrb => true} do
run "/engineyard/bin/searchd #{application} reindex"
run "#{fetch(:engineyard_bin, "/engineyard/bin")}/searchd #{application} reindex"
end

desc "Start Backgroundrb"
task :start, :roles => [:app], :only => {:backgroundrb => true} do
sudo "/usr/bin/monit start all -g backgroundrb_#{application}"
Expand All @@ -17,7 +17,7 @@
desc "Restart Backgroundrb"
task :restart, :roles => [:app], :only => {:backgroundrb => true} do
sudo "/usr/bin/monit restart all -g backgroundrb_#{application}"
end
end
end

end
20 changes: 10 additions & 10 deletions lib/eycap/recipes/sphinx.rb
Expand Up @@ -3,12 +3,12 @@
namespace :sphinx do
desc "After update_code you want to configure, then reindex"
task :configure, :roles => [:app], :only => {:sphinx => true}, :except => {:no_release => true} do
run "/engineyard/bin/searchd #{application} configure"
run "#{fetch(:engineyard_bin, "/engineyard/bin")}/searchd #{application} configure"
end

desc "After configure you want to reindex"
task :reindex, :roles => [:app], :only => {:sphinx => true} do
run "/engineyard/bin/searchd #{application} reindex"
run "#{fetch(:engineyard_bin, "/engineyard/bin")}/searchd #{application} reindex"
end

desc "Start Sphinx Searchd"
Expand All @@ -29,25 +29,25 @@
task :symlink, :roles => [:app], :only => {:sphinx => true}, :except => {:no_release => true} do
run "if [ -d #{latest_release}/config/ultrasphinx ]; then mv #{latest_release}/config/ultrasphinx #{latest_release}/config/ultrasphinx.bak; fi"
run "ln -nfs #{shared_path}/config/ultrasphinx #{latest_release}/config/ultrasphinx"
end
end
end

namespace :acts_as_sphinx do
desc "After update_code you to to reindex"
task :reindex, :roles => [:app], :only => {:sphinx => true} do
run "/engineyard/bin/acts_as_sphinx_searchd #{application} reindex"
run "#{fetch(:engineyard_bin, "/engineyard/bin")}/acts_as_sphinx_searchd #{application} reindex"
end
end

namespace :thinking_sphinx do
desc "After update_code you want to configure, then reindex"
task :configure, :roles => [:app], :only => {:sphinx => true}, :except => {:no_release => true} do
run "/engineyard/bin/thinking_sphinx_searchd #{application} configure #{rails_env}"
run "#{fetch(:engineyard_bin, "/engineyard/bin")}/thinking_sphinx_searchd #{application} configure #{rails_env}"
end

desc "After configure you want to reindex"
task :reindex, :roles => [:app], :only => {:sphinx => true} do
run "/engineyard/bin/thinking_sphinx_searchd #{application} reindex #{rails_env}"
run "#{fetch(:engineyard_bin, "/engineyard/bin")}/thinking_sphinx_searchd #{application} reindex #{rails_env}"
end

task :symlink, :roles => [:app], :only => {:sphinx => true}, :except => {:no_release => true} do
Expand All @@ -60,17 +60,17 @@
namespace :ultrasphinx do
desc "After update_code you want to configure, then reindex"
task :configure, :roles => [:app], :only => {:sphinx => true}, :except => {:no_release => true} do
run "/engineyard/bin/ultrasphinx_searchd #{application} configure"
run "#{fetch(:engineyard_bin, "/engineyard/bin")}/ultrasphinx_searchd #{application} configure"
end

desc "After configure you want to reindex"
task :reindex, :roles => [:app], :only => {:sphinx => true} do
run "/engineyard/bin/ultrasphinx_searchd #{application} reindex"
end
run "#{fetch(:engineyard_bin, "/engineyard/bin")}/ultrasphinx_searchd #{application} reindex"
end

task :symlink, :roles => [:app], :only => {:sphinx => true}, :except => {:no_release => true} do
run "if [ -d #{latest_release}/config/ultrasphinx ]; then mv #{latest_release}/config/ultrasphinx #{latest_release}/config/ultrasphinx.bak; fi"
run "ln -nfs #{shared_path}/config/ultrasphinx #{latest_release}/config/ultrasphinx"
end
end
end
end
8 changes: 4 additions & 4 deletions lib/eycap/recipes/unicorn.rb
Expand Up @@ -27,28 +27,28 @@
Reloads the unicorn works gracefully - Use deploy task for deploys
DESC
task :reload, :roles => [:app], :except => {:unicorn => false} do
run "/engineyard/bin/unicorn #{application} reload"
run "#{fetch(:engineyard_bin, "/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
run "/engineyard/bin/unicorn #{application} aworker"
run "#{fetch(:engineyard_bin, "/engineyard/bin")}/unicorn #{application} aworker"
end

desc <<-DESC
Removes a unicorn worker (gracefully)
DESC
task :rworker, :roles => [:app], :except => {:unicorn => false} do
run "/engineyard/bin/unicorn #{application} rworker"
run "#{fetch(:engineyard_bin, "/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
run "/engineyard/bin/unicorn #{application} deploy"
run "#{fetch(:engineyard_bin, "/engineyard/bin")}/unicorn #{application} deploy"
end
end
end

0 comments on commit ce270e4

Please sign in to comment.