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 +4 -4
- data/README.md +1 -0
- data/deploy-mate.gemspec +1 -1
- data/lib/capistrano/configs/application.pill.erb +5 -6
- data/lib/capistrano/deploy_mate_defaults.rb +1 -1
- data/lib/capistrano/tasks/bluepill.rake +16 -1
- data/lib/capistrano/tasks/elasticsearch.rake +6 -3
- data/lib/capistrano/tasks/unicorn.rake +0 -17
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae6895fb5acfee39aecb5dd14ff231ff47891840
|
4
|
+
data.tar.gz: 6f2c7602e56dfbc5e41220711678e471b7a96cb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
@@ -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.
|
33
|
-
process.stop_command = "
|
34
|
-
|
35
|
-
process.
|
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
|
|
@@ -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
|
9
|
-
|
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
|