deploy_mate 0.16 → 0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14882d055c45f84057957cb143d5126ee0c12006
4
- data.tar.gz: b78d5446177e2e0e24ad63714a42185c6cf3c786
3
+ metadata.gz: ae6895fb5acfee39aecb5dd14ff231ff47891840
4
+ data.tar.gz: 6f2c7602e56dfbc5e41220711678e471b7a96cb8
5
5
  SHA512:
6
- metadata.gz: be7b2f88daea3077d8db2f78e45a88108e3e894802ae5aeab5e23b778df467d32cbeb0765184a630a2fa99dc2c25119717e511e345c6e88fc5c62af1dde856ba
7
- data.tar.gz: 90a21e17e5d3ffce0571495c7b4abb48a98ca3429c9dd7db18f2920233c7cfa71234331bb2b4cc26a6f030c1d1d72853df4a8e6951091c4a6967a3fcdad42e4d
6
+ metadata.gz: 322fdd71820287f568da9d662424ec22fe7720ca5f40e0ebf00de52e07cb8b4b838019220ced1f07beb1cfe6450310e5d1faaf1dccb2e6c8b57e5fa6ec1f6536
7
+ data.tar.gz: 8761dbedb7b643e8baadf76555a23a8ee8a33376c47ed2b2a5f9a73d6474b6ece3fa05abdf1d226c9af83d40d945a8aeb7efe699dbf5ac33e78bac5001a1c632
data/README.md CHANGED
@@ -29,6 +29,7 @@ It uses the following Capistrano-roles to divide the installed components:
29
29
  - **cronjobs**: [OPTIONAL] For environments where `whenever` should manage/run cronjobs
30
30
 
31
31
  ## Changelog
32
+ * **2015-08-06**: Support for optional Sidekiq
32
33
  * **2015-06-23**: Support for optional ElasticSearch
33
34
  * **2015-06-23**: Support for optional `whenever`
34
35
  * **2015-06-23**: Support for optional `imagemagick`
data/deploy-mate.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "deploy_mate"
3
- s.version = "0.16"
3
+ s.version = "0.17"
4
4
 
5
5
  s.authors = ["Tim Adler"]
6
6
  s.date = %q{2015-06-23}
@@ -28,12 +28,11 @@ Bluepill.application("<%= fetch(:application) %>", :log_file => "#{shared_path}/
28
28
  <% if fetch(:sidekiq) %>
29
29
  app.process("sidekiq") do |process|
30
30
  process.pid_file = "#{shared_path}/system/pids/sidekiq.pid"
31
-
32
- process.start_command = "/home/ubuntu/.rvm/wrappers/default/bundle exec sidekiq -e <%= fetch(:environment) %> -C #{current_path}/config/sidekiq.yml -i 0 -P #{shared_path}/pids/sidekiq.pid"
33
- process.stop_command = "kill -QUIT {{PID}}"
34
-
35
- process.start_grace_time = 10.seconds
36
- process.stop_grace_time = 10.seconds
31
+ process.start_command = "/home/ubuntu/.rvm/wrappers/default/bundle exec sidekiq -e <%= fetch(:environment) %> -P #{process.pid_file} -d -i 0 -L #{shared_path}/log/sidekiq.log -C #{current_path}/config/sidekiq.yml"
32
+ process.start_grace_time = 30.seconds
33
+ process.stop_command = "/home/ubuntu/.rvm/wrappers/default/bundle exec sidekiqctl stop #{process.pid_file}"
34
+ process.stop_grace_time = 15.seconds
35
+ process.restart_grace_time = 45.seconds
37
36
  end
38
37
  <% end %>
39
38
 
@@ -23,7 +23,7 @@ namespace :deploy do
23
23
  desc 'Restart application'
24
24
  task :restart do
25
25
  on roles(:app), in: :sequence, wait: 5 do
26
- invoke "unicorn:phased_restart"
26
+ invoke "bluepill:restart"
27
27
  end
28
28
  end
29
29
 
@@ -22,6 +22,21 @@ namespace :bluepill do
22
22
  end
23
23
  end
24
24
 
25
-
25
+ desc "Restarts/Reloads app gracefully"
26
+ task :restart do
27
+ on roles(:app) do
28
+ if bluepill_running?
29
+ if pill_running?(:unicorn)
30
+ execute :rvmsudo, :bluepill, fetch(:application), :restart
31
+ else
32
+ execute :rvmsudo, :bluepill, fetch(:application), :start
33
+ end
34
+ else
35
+ invoke "bluepill:start"
36
+ invoke "nginx:reload"
37
+ end
38
+ end
39
+ end
40
+ before :restart, 'rvm:hook'
26
41
  end
27
42
 
@@ -1,3 +1,5 @@
1
+ set_default(:elasticsearch_version, "1.7")
2
+
1
3
  namespace :elasticsearch do
2
4
  include Aptitude
3
5
  task :install do
@@ -5,11 +7,12 @@ namespace :elasticsearch do
5
7
  unless is_package_installed?("elasticsearch")
6
8
  apt_get_install("openjdk-7-jre-headless") unless is_package_installed?("openjdk-7-jre-headless")
7
9
  execute "wget -qO - https://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -"
8
- sudo 'add-apt-repository "deb http://packages.elasticsearch.org/elasticsearch/1.5/debian stable main"'
9
- apt_get_install("elasticsearch")
10
+ sudo "add-apt-repository 'deb http://packages.elasticsearch.org/elasticsearch/#{fetch(:elasticsearch_version)}/debian stable main'"
11
+ apt_get_update
12
+ apt_get_install("elasticsearch")
10
13
  sudo "update-rc.d elasticsearch defaults 95 10"
11
14
  sudo :service, :elasticsearch, :start
12
15
  end
13
16
  end
14
17
  end
15
- end
18
+ end
@@ -13,21 +13,4 @@ namespace :unicorn do
13
13
  end
14
14
  end
15
15
 
16
- desc "Gracefully restarts unicorn"
17
- task :phased_restart do
18
- on roles(:app) do
19
- if bluepill_running?
20
- if pill_running?(:unicorn)
21
- execute :rvmsudo, :bluepill, :restart, :unicorn
22
- else
23
- execute :rvmsudo, :bluepill, :start, :unicorn
24
- end
25
- else
26
- invoke "bluepill:start"
27
- invoke "nginx:reload"
28
- end
29
- end
30
- end
31
- before :phased_restart, 'rvm:hook'
32
-
33
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deploy_mate
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.16'
4
+ version: '0.17'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Adler