engineyard-eycap 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/lib/eycap.rb +1 -1
- data/lib/eycap/recipes/backgroundrb.rb +4 -4
- data/lib/eycap/recipes/ferret.rb +2 -2
- data/lib/eycap/recipes/juggernaut.rb +2 -2
- data/lib/eycap/recipes/memcached.rb +4 -4
- data/lib/eycap/recipes/mongrel.rb +3 -3
- data/lib/eycap/recipes/solr.rb +4 -4
- data/lib/eycap/recipes/sphinx.rb +45 -11
- data/lib/eycap/recipes/tomcat.rb +3 -3
- metadata +1 -1
data/History.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== 0.3.9 / 2008-09-29
|
2
|
+
* add reindex task for /engineyard/bin/acts_as_sphinx_searchd
|
3
|
+
* add reindex and configure task for /engineyard/bin/ultrasphinx_searchd
|
4
|
+
* add reindex and configure task for /engineyard/bin/thinking_sphinx_searchd
|
5
|
+
|
1
6
|
== 0.3.8 / 2008-09-22
|
2
7
|
* add PostgreSQL support to the database.rb recipe.
|
3
8
|
|
data/lib/eycap.rb
CHANGED
@@ -2,20 +2,20 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
2
2
|
|
3
3
|
namespace :bdrb do
|
4
4
|
desc "After update_code you want to reindex"
|
5
|
-
task :reindex, :roles => [:app
|
5
|
+
task :reindex, :roles => [:app], :only => {:backgroundrb => true} do
|
6
6
|
run "/engineyard/bin/searchd #{application} reindex"
|
7
7
|
end
|
8
8
|
|
9
9
|
desc "Start Backgroundrb"
|
10
|
-
task :start, :roles => [:app
|
10
|
+
task :start, :roles => [:app], :only => {:backgroundrb => true} do
|
11
11
|
sudo "/usr/bin/monit start all -g backgroundrb_#{application}"
|
12
12
|
end
|
13
13
|
desc "Stop Backgroundrb"
|
14
|
-
task :stop, :roles => [:app
|
14
|
+
task :stop, :roles => [:app], :only => {:backgroundrb => true} do
|
15
15
|
sudo "/usr/bin/monit stop all -g backgroundrb_#{application}"
|
16
16
|
end
|
17
17
|
desc "Restart Backgroundrb"
|
18
|
-
task :restart, :roles => [:app
|
18
|
+
task :restart, :roles => [:app], :only => {:backgroundrb => true} do
|
19
19
|
sudo "/usr/bin/monit restart all -g backgroundrb_#{application}"
|
20
20
|
end
|
21
21
|
end
|
data/lib/eycap/recipes/ferret.rb
CHANGED
@@ -2,7 +2,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
2
2
|
|
3
3
|
namespace :ferret do
|
4
4
|
desc "After update_code you want to symlink the index and ferret_server.yml file into place"
|
5
|
-
task :symlink_configs, :roles => [:app
|
5
|
+
task :symlink_configs, :roles => [:app], :except => {:no_release => true, :ferret => false} do
|
6
6
|
run <<-CMD
|
7
7
|
cd #{latest_release} &&
|
8
8
|
ln -nfs #{shared_path}/config/ferret_server.yml #{latest_release}/config/ferret_server.yml &&
|
@@ -12,7 +12,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
12
12
|
end
|
13
13
|
[:start,:stop,:restart].each do |op|
|
14
14
|
desc "#{op} ferret server"
|
15
|
-
task op, :roles => [:app
|
15
|
+
task op, :roles => [:app], :except => {:no_release => true, :ferret => false} do
|
16
16
|
sudo "/usr/bin/monit #{op} all -g ferret_#{application}"
|
17
17
|
end
|
18
18
|
end
|
@@ -2,7 +2,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
2
2
|
|
3
3
|
namespace :juggernaut do
|
4
4
|
desc "After update_code you want to symlink the juggernaut.yml file into place"
|
5
|
-
task :symlink_configs, :roles => [:app
|
5
|
+
task :symlink_configs, :roles => [:app], :except => {:no_release => true, :juggernaut => false} do
|
6
6
|
run <<-CMD
|
7
7
|
cd #{latest_release} &&
|
8
8
|
ln -nfs #{shared_path}/config/juggernaut.yml #{latest_release}/config/juggernaut.yml &&
|
@@ -11,7 +11,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
11
11
|
end
|
12
12
|
[:start,:stop,:restart].each do |op|
|
13
13
|
desc "#{op} juggernaut server"
|
14
|
-
task op, :roles => [:app
|
14
|
+
task op, :roles => [:app], :except => {:no_release => true, :juggernaut => false} do
|
15
15
|
sudo "/usr/bin/monit #{op} all -g juggernaut_#{application}"
|
16
16
|
end
|
17
17
|
end
|
@@ -1,19 +1,19 @@
|
|
1
1
|
Capistrano::Configuration.instance(:must_exist).load do
|
2
2
|
namespace :memcached do
|
3
3
|
desc "Start memcached"
|
4
|
-
task :start, :roles => [:app
|
4
|
+
task :start, :roles => [:app], :only => {:memcached => true} do
|
5
5
|
sudo "/etc/init.d/memcached start"
|
6
6
|
end
|
7
7
|
desc "Stop memcached"
|
8
|
-
task :stop, :roles => [:app
|
8
|
+
task :stop, :roles => [:app], :only => {:memcached => true} do
|
9
9
|
sudo "/etc/init.d/memcached stop"
|
10
10
|
end
|
11
11
|
desc "Restart memcached"
|
12
|
-
task :restart, :roles => [:app
|
12
|
+
task :restart, :roles => [:app], :only => {:memcached => true} do
|
13
13
|
sudo "/etc/init.d/memcached restart"
|
14
14
|
end
|
15
15
|
desc "Symlink the memcached.yml file into place if it exists"
|
16
|
-
task :symlink_configs, :roles => [:app
|
16
|
+
task :symlink_configs, :roles => [:app], :only => {:memcached => true }, :except => { :no_release => true } do
|
17
17
|
run "if [ -f #{shared_path}/config/memcached.yml ]; then ln -nfs #{shared_path}/config/memcached.yml #{latest_release}/config/memcached.yml; fi"
|
18
18
|
end
|
19
19
|
end
|
@@ -4,7 +4,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
4
4
|
Start Mongrel processes on the app server. This uses the :use_sudo variable to determine whether to use sudo or not. By default, :use_sudo is
|
5
5
|
set to true.
|
6
6
|
DESC
|
7
|
-
task :start, :roles => [:app
|
7
|
+
task :start, :roles => [:app], :except => {:mongrel => false} do
|
8
8
|
sudo "/usr/bin/monit start all -g #{monit_group}"
|
9
9
|
end
|
10
10
|
|
@@ -12,7 +12,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
12
12
|
Restart the Mongrel processes on the app server by starting and stopping the cluster. This uses the :use_sudo
|
13
13
|
variable to determine whether to use sudo or not. By default, :use_sudo is set to true.
|
14
14
|
DESC
|
15
|
-
task :restart, :roles => [:app
|
15
|
+
task :restart, :roles => [:app], :except => {:mongrel => false} do
|
16
16
|
sudo "/usr/bin/monit restart all -g #{monit_group}"
|
17
17
|
end
|
18
18
|
|
@@ -21,7 +21,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
21
21
|
variable to determine whether to use sudo or not. By default, :use_sudo is
|
22
22
|
set to true.
|
23
23
|
DESC
|
24
|
-
task :stop, :roles => [:app
|
24
|
+
task :stop, :roles => [:app], :except => {:mongrel => false} do
|
25
25
|
sudo "/usr/bin/monit stop all -g #{monit_group}"
|
26
26
|
end
|
27
27
|
end
|
data/lib/eycap/recipes/solr.rb
CHANGED
@@ -2,7 +2,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
2
2
|
|
3
3
|
namespace :solr do
|
4
4
|
desc "After update_code you want to symlink the index and ferret_server.yml file into place"
|
5
|
-
task :symlink_configs, :roles => [:app
|
5
|
+
task :symlink_configs, :roles => [:app], :except => {:no_release => true} do
|
6
6
|
run <<-CMD
|
7
7
|
cd #{latest_release} && ln -nfs #{shared_path}/config/solr.yml #{latest_release}/config/solr.yml
|
8
8
|
CMD
|
@@ -10,14 +10,14 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
10
10
|
|
11
11
|
[:start,:stop,:restart].each do |op|
|
12
12
|
desc "#{op} ferret server"
|
13
|
-
task op, :roles => [:app
|
13
|
+
task op, :roles => [:app], :only => {:solr => true} do
|
14
14
|
sudo "/usr/bin/monit #{op} all -g solr_#{application}"
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
namespace :tail do
|
19
19
|
desc "Tail the Solr logs this environment"
|
20
|
-
task :logs, :roles => [:app
|
20
|
+
task :logs, :roles => [:app], :only => {:solr => true} do
|
21
21
|
run "tail -f /var/log/engineyard/solr/#{application}.log" do |channel, stream, data|
|
22
22
|
puts # for an extra line break before the host name
|
23
23
|
puts "#{channel[:server]} -> #{data}"
|
@@ -25,7 +25,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
desc "Tail the Solr error logs this environment"
|
28
|
-
task :errors, :roles => [:app
|
28
|
+
task :errors, :roles => [:app], :only => {:solr => true} do
|
29
29
|
run "tail -f /var/log/engineyard/solr/#{application}.err.log" do |channel, stream, data|
|
30
30
|
puts # for an extra line break before the host name
|
31
31
|
puts "#{channel[:server]} -> #{data}"
|
data/lib/eycap/recipes/sphinx.rb
CHANGED
@@ -2,41 +2,75 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
2
2
|
|
3
3
|
namespace :sphinx do
|
4
4
|
desc "After update_code you want to configure, then reindex"
|
5
|
-
task :configure, :roles => [:app
|
5
|
+
task :configure, :roles => [:app], :only => {:sphinx => true}, :except => {:no_release => true} do
|
6
6
|
run "/engineyard/bin/searchd #{application} configure"
|
7
7
|
end
|
8
8
|
|
9
9
|
desc "After configure you want to reindex"
|
10
|
-
task :reindex, :roles => [:app
|
10
|
+
task :reindex, :roles => [:app], :only => {:sphinx => true} do
|
11
11
|
run "/engineyard/bin/searchd #{application} reindex"
|
12
12
|
end
|
13
13
|
|
14
14
|
desc "Start Sphinx Searchd"
|
15
|
-
task :start, :roles => [:app
|
15
|
+
task :start, :roles => [:app], :only => {:sphinx => true} do
|
16
16
|
sudo "/usr/bin/monit start all -g sphinx_#{application}"
|
17
17
|
end
|
18
|
+
|
18
19
|
desc "Stop Sphinx Searchd"
|
19
|
-
task :stop, :roles => [:app
|
20
|
+
task :stop, :roles => [:app], :only => {:sphinx => true} do
|
20
21
|
sudo "/usr/bin/monit stop all -g sphinx_#{application}"
|
21
22
|
end
|
23
|
+
|
22
24
|
desc "Restart Sphinx Searchd"
|
23
|
-
task :restart, :roles => [:app
|
25
|
+
task :restart, :roles => [:app], :only => {:sphinx => true} do
|
24
26
|
sudo "/usr/bin/monit restart all -g sphinx_#{application}"
|
25
|
-
end
|
26
|
-
|
27
|
+
end
|
28
|
+
|
29
|
+
task :symlink, :roles => [:app], :only => {:sphinx => true}, :except => {:no_release => true} do
|
27
30
|
run "if [ -d #{latest_release}/config/ultrasphinx ]; then mv #{latest_release}/config/ultrasphinx #{latest_release}/config/ultrasphinx.bak; fi"
|
28
31
|
run "ln -nfs #{shared_path}/config/ultrasphinx #{latest_release}/config/ultrasphinx"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
namespace :acts_as_sphinx do
|
36
|
+
desc "After update_code you to to reindex"
|
37
|
+
task :reindex, :roles => [:app], :only => {:sphinx => true} do
|
38
|
+
run "/engineyard/bin/acts_as_sphinx_searchd #{application} reindex"
|
29
39
|
end
|
30
|
-
|
31
40
|
end
|
32
41
|
|
33
42
|
namespace :thinking_sphinx do
|
34
|
-
desc "
|
35
|
-
task :
|
43
|
+
desc "After update_code you want to configure, then reindex"
|
44
|
+
task :configure, :roles => [:app], :only => {:sphinx => true}, :except => {:no_release => true} do
|
45
|
+
run "/engineyard/bin/thinking_sphinx_searchd #{application} configure"
|
46
|
+
end
|
47
|
+
|
48
|
+
desc "After configure you want to reindex"
|
49
|
+
task :reindex, :roles => [:app], :only => {:sphinx => true} do
|
50
|
+
run "/engineyard/bin/thinking_sphinx_searchd #{application} reindex"
|
51
|
+
end
|
52
|
+
|
53
|
+
task :symlink, :roles => [:app], :only => {:sphinx => true}, :except => {:no_release => true} do
|
36
54
|
run "if [ -d #{latest_release}/config/thinkingsphinx ]; then mv #{latest_release}/config/thinkingsphinx #{latest_release}/config/thinkingsphinx.bak; fi"
|
37
55
|
run "ln -nfs #{shared_path}/config/thinkingsphinx #{latest_release}/config/thinkingsphinx"
|
38
56
|
run "ln -nfs #{shared_path}/config/sphinx.yml #{latest_release}/config/sphinx.yml"
|
39
57
|
end
|
40
58
|
end
|
41
59
|
|
42
|
-
|
60
|
+
namespace :ultrasphinx do
|
61
|
+
desc "After update_code you want to configure, then reindex"
|
62
|
+
task :configure, :roles => [:app], :only => {:sphinx => true}, :except => {:no_release => true} do
|
63
|
+
run "/engineyard/bin/ultrasphinx_searchd #{application} configure"
|
64
|
+
end
|
65
|
+
|
66
|
+
desc "After configure you want to reindex"
|
67
|
+
task :reindex, :roles => [:app], :only => {:sphinx => true} do
|
68
|
+
run "/engineyard/bin/ultrasphinx_searchd #{application} reindex"
|
69
|
+
end
|
70
|
+
|
71
|
+
task :symlink, :roles => [:app], :only => {:sphinx => true}, :except => {:no_release => true} do
|
72
|
+
run "if [ -d #{latest_release}/config/ultrasphinx ]; then mv #{latest_release}/config/ultrasphinx #{latest_release}/config/ultrasphinx.bak; fi"
|
73
|
+
run "ln -nfs #{shared_path}/config/ultrasphinx #{latest_release}/config/ultrasphinx"
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
data/lib/eycap/recipes/tomcat.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
Capistrano::Configuration.instance(:must_exist).load do
|
2
2
|
namespace :tomcat do
|
3
3
|
desc "Start tomcat"
|
4
|
-
task :start, :roles => [:app
|
4
|
+
task :start, :roles => [:app], :only => {:tomcat => true} do
|
5
5
|
sudo "/etc/init.d/tomcat start"
|
6
6
|
end
|
7
7
|
desc "Stop tomcat"
|
8
|
-
task :stop, :roles => [:app
|
8
|
+
task :stop, :roles => [:app], :only => {:tomcat => true} do
|
9
9
|
sudo "/etc/init.d/tomcat stop"
|
10
10
|
end
|
11
11
|
desc "Restart tomcat"
|
12
|
-
task :restart, :roles => [:app
|
12
|
+
task :restart, :roles => [:app], :only => {:tomcat => true} do
|
13
13
|
sudo "/etc/init.d/tomcat restart"
|
14
14
|
end
|
15
15
|
end
|