magic_recipes_two 0.0.25 → 0.0.26

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: 43bc60f12d2140102af07f14cf233f3d5a975203
4
- data.tar.gz: cb7eb36faa5db29025120f686360e59395bb132c
3
+ metadata.gz: b4f9505d5b722c1501903912e12ada771884aa03
4
+ data.tar.gz: 9320a6d1a5d8ebff1f57441517f540a74fe2f390
5
5
  SHA512:
6
- metadata.gz: 8039fbed053d5c12f08ad8372eb38220190b3838d7f2056944203847fc8eb37d197cce2c25833a32e05dc96d53c5b9fd3332737d088a32d2cd152a649347ead4
7
- data.tar.gz: b32d3fd401e82133d0779e64adafb0f69d8a4c55c39decc35bce654b181b046ac2fe875a7095a312aea5739549dc7036a01c4b33d475b6d172c7a2f132caa95b
6
+ metadata.gz: a0dbf4d5a541f8673c9acb39e085b3e4963cfb7e0649dd6895a3a0b45846a14a5d380a0d3d051c12982a6899a3b5fc0f6e5cfa630ca2b8d2f82b2d210136bdb2
7
+ data.tar.gz: ba065981aed2ad19f29f80721f4b78e4f577f10ba37c4279ebe9c331acc7f556821c79c16235fcdbd04cc7c9db82c2f1360b638eaeac2f0f4a1d1429a7846bf9
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module MagicRecipes
3
- VERSION = "0.0.25"
3
+ VERSION = "0.0.26"
4
4
  end
5
5
  end
@@ -3,30 +3,33 @@ include Capistrano::MagicRecipes::BaseHelpers
3
3
 
4
4
  namespace :load do
5
5
  task :defaults do
6
- set :monit_roles, -> { :web }
7
- set :monit_interval, -> { 30 }
8
- set :monit_bin, -> { '/usr/bin/monit' }
6
+ set :monit_roles, -> { :web }
7
+ set :monit_interval, -> { 30 }
8
+ set :monit_bin, -> { '/usr/bin/monit' }
9
+ set :monit_logfile, -> { '/var/log/monit.log' }
10
+ set :monit_idfile, -> { '/var/lib/monit/id' }
11
+ set :monit_statefile, -> { '/var/lib/monit/state' }
9
12
  ## Mailer
10
- set :monit_mail_server, -> { "smtp.gmail.com" }
11
- set :monit_mail_port, -> { 587 }
12
- set :monit_mail_authentication, -> { false } # SSLAUTO|SSLV2|SSLV3|TLSV1|TLSV11|TLSV12
13
- set :monit_mail_username, -> { "foo@example.com" }
14
- set :monit_mail_password, -> { "secret" }
15
- set :monit_mail_to, -> { "foo@example.com" }
16
- set :monit_mail_from, -> { "monit@foo.bar" }
17
- set :monit_mail_reply_to, -> { "support@foo.bar" }
13
+ set :monit_mail_server, -> { "smtp.gmail.com" }
14
+ set :monit_mail_port, -> { 587 }
15
+ set :monit_mail_authentication, -> { false } # SSLAUTO|SSLV2|SSLV3|TLSV1|TLSV11|TLSV12
16
+ set :monit_mail_username, -> { "foo@example.com" }
17
+ set :monit_mail_password, -> { "secret" }
18
+ set :monit_mail_to, -> { "foo@example.com" }
19
+ set :monit_mail_from, -> { "monit@foo.bar" }
20
+ set :monit_mail_reply_to, -> { "support@foo.bar" }
18
21
  ## Additional stuff for postrgres
19
- set :postgresql_roles, -> { :db }
20
- set :postgresql_pid, -> { "/var/run/postgresql/9.1-main.pid" }
22
+ set :postgresql_roles, -> { :db }
23
+ set :postgresql_pid, -> { "/var/run/postgresql/9.1-main.pid" }
21
24
  ## WebClient
22
- set :monit_http_client, -> { true }
23
- set :monit_http_domain, -> { false }
24
- set :monit_http_port, -> { 2812 }
25
- set :monit_http_use_ssl, -> { false }
25
+ set :monit_http_client, -> { true }
26
+ set :monit_http_domain, -> { false }
27
+ set :monit_http_port, -> { 2812 }
28
+ set :monit_http_use_ssl, -> { false }
26
29
  set :monit_http_allow_self_certification, -> { false }
27
- set :monit_http_pemfile, -> { "/etc/monit/monit.pem" }
28
- set :monit_http_username, -> { "admin" }
29
- set :monit_http_password, -> { "monitor" }
30
+ set :monit_http_pemfile, -> { "/etc/monit/monit.pem" }
31
+ set :monit_http_username, -> { "admin" }
32
+ set :monit_http_password, -> { "monitor" }
30
33
  ##v Website
31
34
  end
32
35
  end
@@ -130,4 +130,14 @@ namespace :nginx do
130
130
  end
131
131
  end
132
132
  end
133
- end
133
+ end
134
+
135
+
136
+ namespace :deploy do
137
+ after 'deploy:finished', :restart_nginx_app do
138
+ invoke "nginx:site:add"
139
+ invoke "nginx:site:enable"
140
+ invoke "nginx:restart"
141
+ end
142
+ end
143
+
@@ -48,9 +48,19 @@ namespace :thin do
48
48
 
49
49
  end
50
50
 
51
- after 'deploy:published', nil do
52
- on release_roles fetch(:thin_roles) do
51
+
52
+ # => after 'deploy:published', nil do
53
+ # => on release_roles fetch(:thin_roles) do
54
+ # => invoke "thin:reconf"
55
+ # => invoke "thin:restart"
56
+ # => end
57
+ # => end
58
+
59
+
60
+ namespace :deploy do
61
+ before 'deploy:finished', :restart_thin_apps do
53
62
  invoke "thin:reconf"
54
63
  invoke "thin:restart"
55
64
  end
56
65
  end
66
+
@@ -1,8 +1,8 @@
1
1
  set daemon <%= fetch(:monit_interval) %>
2
2
 
3
- set logfile /var/log/monit.log
4
- set idfile /var/lib/monit/id
5
- set statefile /var/lib/monit/state
3
+ set logfile <%= fetch(:monit_logfile) %>
4
+ set idfile <%= fetch(:monit_idfile) %>
5
+ set statefile <%= fetch(:monit_statefile) %>
6
6
 
7
7
  set eventqueue
8
8
  basedir /var/lib/monit/events
@@ -26,9 +26,9 @@ set mail-format {
26
26
  M O N I T
27
27
 
28
28
  <% if fetch(:monit_http_client) %><% if fetch(:monit_http_domain) %>
29
- Web: <%= fetch(:monit_http_use_ssl) ? "https" : "http" %>://<%= fetch(:monit_http_domain) %>:2812/
29
+ Web: <%= fetch(:monit_http_use_ssl) ? "https" : "http" %>://<%= fetch(:monit_http_domain) %>:<%= fetch(:monit_http_port) %>/
30
30
  <% else %>
31
- Web: <%= fetch(:monit_http_use_ssl) ? "https" : "http" %>://<%= fetch(:app_server_ip) %>:2812/
31
+ Web: <%= fetch(:monit_http_use_ssl) ? "https" : "http" %>://<%= fetch(:app_server_ip) %>:<%= fetch(:monit_http_port) %>/
32
32
  <% end %><% end %>
33
33
  }
34
34
 
@@ -46,8 +46,6 @@ set httpd port <%= fetch(:monit_http_port) %>
46
46
  <% if fetch(:monit_http_domain) %>
47
47
  use address <%= fetch(:monit_http_domain) %>
48
48
  <% end %>
49
- # allow careagents.cloudapp.net
50
- # allow 191.233.74.184
51
49
  # allow 127.0.0.1
52
50
  <% if fetch(:monit_http_use_ssl) %>
53
51
  ssl enable
@@ -3,8 +3,8 @@
3
3
  check process <%= fetch(:application) %>_<%= fetch(:stage) %>_thin_<%= n %> with pidfile <%= deploy_to %>/shared/pids/thin_<%= fetch(:application) %>_<%= fetch(:stage) %>.<%= n %>.pid
4
4
  group thin-<%= fetch(:application) %>
5
5
  group thin-<%= fetch(:stage) %>
6
- start program = "/bin/su - <%= fetch(:user) %> -c 'cd <%= current_path %> ; bundle exec thin start -C config/thin_app_<%= fetch(:stage) %>.yml -o <%= n %>' "
7
- stop program = "/bin/su - <%= fetch(:user) %> -c 'cd <%= current_path %> ; bundle exec thin stop -C config/thin_app_<%= fetch(:stage) %>.yml -o <%= n %>' "
6
+ start program = "/bin/su - <%= @role.user %> -c 'cd <%= current_path %> ; bundle exec thin start -C config/thin_app_<%= fetch(:stage) %>.yml -o <%= n %>' "
7
+ stop program = "/bin/su - <%= @role.user %> -c 'cd <%= current_path %> ; bundle exec thin stop -C config/thin_app_<%= fetch(:stage) %>.yml -o <%= n %>' "
8
8
  if mem > 200.0 MB for 1 cycles then restart
9
9
  if cpu > 50% for 3 cycles then restart
10
10
  if 5 restarts within 5 cycles then timeout
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magic_recipes_two
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.25
4
+ version: 0.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Torsten Wetzel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-24 00:00:00.000000000 Z
11
+ date: 2016-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails