eycap 0.5.17 → 0.5.18

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,10 @@
1
+ == 0.5.18 / 2011-05-24
2
+ * Added task to tail apache logs. (lightcap)
3
+ * Using --binstubs to put executables in app_root/bin. (lightcap)
4
+ * Added unicorn recipe to stop/start/restart. (timo3377)
5
+ * Fix for eylogger and ruby 1.9.x. (atavistock)
6
+ * Changed resque restart to sudo instead of run. (mdolian)
7
+
1
8
  == 0.5.17 / 2011-04-13
2
9
  * Fixed it so resque:restart is not called for any deploy.
3
10
 
@@ -8,25 +8,27 @@ lib/eycap.rb
8
8
  lib/eycap/lib/ey_logger.rb
9
9
  lib/eycap/lib/ey_logger_hooks.rb
10
10
  lib/eycap/recipes.rb
11
- lib/eycap/recipes/backgroundrb.rb
12
- lib/eycap/recipes/database.rb
13
- lib/eycap/recipes/bundler.rb
14
- lib/eycap/recipes/deploy.rb
15
- lib/eycap/recipes/delayed_job.rb
16
- lib/eycap/recipes/ferret.rb
17
- lib/eycap/recipes/juggernaut.rb
18
- lib/eycap/recipes/memcached.rb
19
- lib/eycap/recipes/mongrel.rb
20
- lib/eycap/recipes/monit.rb
21
- lib/eycap/recipes/nginx.rb
22
- lib/eycap/recipes/slice.rb
23
- lib/eycap/recipes/solr.rb
24
- lib/eycap/recipes/sphinx.rb
25
- lib/eycap/recipes/templates/maintenance.rhtml
26
- lib/eycap/recipes/tomcat.rb
27
- lib/eycap/recipes/passenger.rb
28
- lib/eycap/recipes/apache.rb
29
- lib/eycap/recipes/ssl.rb
30
- lib/eycap/recipes/resque.rb
11
+ lib/eycap/lib/ey_logger
12
+ lib/eycap/lib/ey_logger_hooks
13
+ lib/eycap/recipes/apache
14
+ lib/eycap/recipes/backgroundrb
15
+ lib/eycap/recipes/bundler
16
+ lib/eycap/recipes/database
17
+ lib/eycap/recipes/delayed_job
18
+ lib/eycap/recipes/deploy
19
+ lib/eycap/recipes/ferret
20
+ lib/eycap/recipes/juggernaut
21
+ lib/eycap/recipes/memcached
22
+ lib/eycap/recipes/mongrel
23
+ lib/eycap/recipes/monit
24
+ lib/eycap/recipes/nginx
25
+ lib/eycap/recipes/passenger
26
+ lib/eycap/recipes/resque
27
+ lib/eycap/recipes/slice
28
+ lib/eycap/recipes/solr
29
+ lib/eycap/recipes/sphinx
30
+ lib/eycap/recipes/ssl
31
+ lib/eycap/recipes/tomcat
32
+ lib/eycap/recipes/unicorn
31
33
  test/test_eycap.rb
32
34
  test/test_helper.rb
data/README.txt CHANGED
@@ -14,8 +14,6 @@ Also included is a deployment strategy, :filtered_remote_cache, which speeds up
14
14
 
15
15
  == INSTALL:
16
16
 
17
- $ gem install gemcutter # installs the gemcutter gem
18
- $ gem tumble # puts gemcutter as your top source
19
17
  $ gem install eycap # installs the latest eycap version
20
18
 
21
19
  == SOURCE:
@@ -1,3 +1,3 @@
1
1
  module Eycap
2
- VERSION = '0.5.13'
2
+ VERSION = '0.5.18'
3
3
  end
@@ -41,7 +41,7 @@ module Capistrano
41
41
  @_deploy_log_file = File.open(@_log_file_path, "w") if @_deploy_log_file.nil?
42
42
 
43
43
  indent = "%*s" % [Logger::MAX_LEVEL, "*" * (Logger::MAX_LEVEL - level)]
44
- message.each do |line|
44
+ message.each_line do |line|
45
45
  if line_prefix
46
46
  @_deploy_log_file << "#{indent} [#{line_prefix}] #{line.strip}\n"
47
47
  else
@@ -1,24 +1,25 @@
1
1
  require 'eycap/lib/ey_logger'
2
2
  require 'eycap/lib/ey_logger_hooks'
3
+ require 'eycap/recipes/apache'
4
+ require 'eycap/recipes/backgroundrb'
5
+ require 'eycap/recipes/bundler'
3
6
  require 'eycap/recipes/database'
7
+ require 'eycap/recipes/delayed_job'
8
+ require 'eycap/recipes/deploy'
4
9
  require 'eycap/recipes/ferret'
10
+ require 'eycap/recipes/juggernaut'
11
+ require 'eycap/recipes/memcached'
5
12
  require 'eycap/recipes/mongrel'
13
+ require 'eycap/recipes/monit'
6
14
  require 'eycap/recipes/nginx'
15
+ require 'eycap/recipes/passenger'
16
+ require 'eycap/recipes/resque'
7
17
  require 'eycap/recipes/slice'
8
- require 'eycap/recipes/deploy'
9
- require 'eycap/recipes/sphinx'
10
- require 'eycap/recipes/backgroundrb'
11
- require 'eycap/recipes/memcached'
12
18
  require 'eycap/recipes/solr'
13
- require 'eycap/recipes/monit'
14
- require 'eycap/recipes/tomcat'
15
- require 'eycap/recipes/juggernaut'
16
- require 'eycap/recipes/passenger'
17
- require 'eycap/recipes/apache'
18
- require 'eycap/recipes/bundler'
19
+ require 'eycap/recipes/sphinx'
19
20
  require 'eycap/recipes/ssl'
20
- require 'eycap/recipes/delayed_job'
21
- require 'eycap/recipes/resque'
21
+ require 'eycap/recipes/tomcat'
22
+ require 'eycap/recipes/unicorn'
22
23
 
23
24
  Capistrano::Configuration.instance(:must_exist).load do
24
25
  default_run_options[:pty] = true if respond_to?(:default_run_options)
@@ -2,8 +2,9 @@ Capistrano::Configuration.instance(:must_exist).load do
2
2
  namespace :bundler do
3
3
  desc "Automatically installed your bundled gems if a Gemfile exists"
4
4
  task :bundle_gems do
5
- run "if [ -f #{release_path}/Gemfile ]; then cd #{release_path} && bundle install --without=test development --path /var/cache/engineyard/; fi"
5
+ run "mkdir -p #{shared_path}/bundled_gems"
6
+ run "if [ -f #{release_path}/Gemfile ]; then cd #{release_path} && bundle install --without=test,development --binstubs #{release_path}/bin --path #{shared_path}/bundled_gems; fi"
6
7
  end
7
8
  after "deploy:symlink_configs","bundler:bundle_gems"
8
9
  end
9
- end
10
+ end
@@ -3,7 +3,7 @@ Capistrano::Configuration.instance(:must_exist).load do
3
3
  namespace :resque do
4
4
  desc "After deploy:restart we want to restart the workers"
5
5
  task :restart, :roles => [:app], :only => {:resque => true} do
6
- run "monit restart all -g resque_#{application}"
6
+ sudo "monit restart all -g resque_#{application}"
7
7
  end
8
8
 
9
9
  desc "After update_code we want to symlink the resque.yml"
@@ -17,5 +17,13 @@ Capistrano::Configuration.instance(:must_exist).load do
17
17
  break if stream == :err
18
18
  end
19
19
  end
20
+ desc "Tail the apache logs for your environment"
21
+ task :tail_apache_logs, :roles => [:app, :web] do
22
+ run "tail -f /var/log/apache2/#{application}.*.access.log" do |channel, stream, data|
23
+ puts # line break
24
+ puts "#{channel[:server]} -> #{data}"
25
+ break if stream == :err
26
+ end
27
+ end
20
28
  end
21
29
  end
@@ -0,0 +1,54 @@
1
+ Capistrano::Configuration.instance(:must_exist).load do
2
+ namespace :unicorn do
3
+ desc <<-DESC
4
+ 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.
5
+ DESC
6
+ task :start, :roles => [:app], :except => {:unicorn => false} do
7
+ sudo "/usr/bin/monit start all -g #{monit_group}"
8
+ end
9
+
10
+ desc <<-DESC
11
+ 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.
12
+ DESC
13
+ task :restart, :roles => [:app], :except => {:unicorn => false} do
14
+ sudo "/usr/bin/monit restart all -g #{monit_group}"
15
+ end
16
+
17
+ desc <<-DESC
18
+ Stop the Unicorn processes on the app server. This uses the :use_sudo
19
+ variable to determine whether to use sudo or not. By default, :use_sudo is
20
+ set to true.
21
+ DESC
22
+ task :stop, :roles => [:app], :except => {:unicorn => false} do
23
+ sudo "/usr/bin/monit stop all -g #{monit_group}"
24
+ end
25
+
26
+ desc <<-DESC
27
+ Reloads the unicorn works gracefully - Use deploy task for deploys
28
+ DESC
29
+ task :reload, :roles => [:app], :except => {:unicorn => false} do
30
+ sudo "/engineyard/bin/unicorn #{application} reload"
31
+ end
32
+
33
+ desc <<-DESC
34
+ Adds a Unicorn worker - Beware of causing your host to swap, this setting isn't permanent
35
+ DESC
36
+ task :aworker, :roles => [:app], :except => {:unicorn => false} do
37
+ sudo "/engineyard/bin/unicorn #{application} aworker"
38
+ end
39
+
40
+ desc <<-DESC
41
+ Removes a unicorn worker (gracefully)
42
+ DESC
43
+ task :rworker, :roles => [:app], :except => {:unicorn => false} do
44
+ sudo "/engineyard/bin/unicorn #{application} rworker"
45
+ end
46
+
47
+ desc <<-DESC
48
+ Deploys app gracefully with USR2 and unicorn.rb combo
49
+ DESC
50
+ task :deploy, :roles => [:app], :except => {:unicorn => false} do
51
+ sudo "/engineyard/bin/unicorn #{application} deploy"
52
+ end
53
+ end
54
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eycap
3
3
  version: !ruby/object:Gem::Version
4
- hash: 41
5
- prerelease:
4
+ hash: 47
5
+ prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 17
10
- version: 0.5.17
9
+ - 18
10
+ version: 0.5.18
11
11
  platform: ruby
12
12
  authors:
13
13
  - Engine Yard
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-13 00:00:00 -06:00
18
+ date: 2011-05-24 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -87,6 +87,7 @@ files:
87
87
  - lib/eycap/recipes/ssl.rb
88
88
  - lib/eycap/recipes/templates/maintenance.rhtml
89
89
  - lib/eycap/recipes/tomcat.rb
90
+ - lib/eycap/recipes/unicorn.rb
90
91
  - lib/eycap/recipes/apache.rb
91
92
  - lib/eycap/recipes/delayed_job.rb
92
93
  - lib/eycap/recipes/bundler.rb
@@ -124,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
125
  requirements: []
125
126
 
126
127
  rubyforge_project: eycap
127
- rubygems_version: 1.6.2
128
+ rubygems_version: 1.3.7
128
129
  signing_key:
129
130
  specification_version: 2
130
131
  summary: Capistrano tasks for Engine Yard private cloud.