luban-rack 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/luban/deployment/applications/rack/base.rb +1 -1
- data/lib/luban/deployment/applications/rack/controller.rb +2 -2
- data/lib/luban/deployment/applications/rack/templates/puma/puma.monitrc.erb +2 -2
- data/lib/luban/deployment/applications/rack/templates/thin/thin.monitrc.erb +2 -2
- data/lib/luban/deployment/applications/rack/version.rb +1 -1
- data/lib/luban/deployment/applications/rack/web_servers/puma.rb +4 -4
- data/lib/luban/deployment/applications/rack/web_servers/thin.rb +4 -4
- data/luban-rack.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5db2c3cf756af8c21ed8770721c1b72e286ad866
|
4
|
+
data.tar.gz: 1a8cc08f561ed98bff57bc805f935b3237de2dd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed6cbca820f68ec611d7c653cb181aa1b5fbb8317966711bf95fa8e576ed4269252e50f2b727a72f5f2df6ee8f9bbdb6b884c38107776896334cd64678d85e63
|
7
|
+
data.tar.gz: 9d5e8a1b8f621f1c0a7a428d3ffa6398dab9d3123efd60b5a27f8c63e9b97f2f80fd6237bf5077ba3295e6721f2cb5471574b68d6c6ac062a12b1e64e4e391ec
|
data/CHANGELOG.md
CHANGED
@@ -38,11 +38,11 @@ module Luban
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def restart_process!
|
41
|
-
capture(
|
41
|
+
capture(compose_command(restart_command))
|
42
42
|
end
|
43
43
|
|
44
44
|
def phased_restart_process!
|
45
|
-
capture(
|
45
|
+
capture(compose_command(phased_restart_command))
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
@@ -4,8 +4,8 @@
|
|
4
4
|
check process <%= service_entry %>
|
5
5
|
with pidfile <%= pid_file_path %>
|
6
6
|
onreboot laststate
|
7
|
-
start program = "/bin/bash -c 'sleep 1; <%= start_command %>'"
|
8
|
-
stop program = "/bin/bash -c '<%= stop_command %>'"
|
7
|
+
start program = "/bin/bash -c 'sleep 1; <%= compose_command(start_command) %>'"
|
8
|
+
stop program = "/bin/bash -c '<%= compose_command(stop_command) %>'"
|
9
9
|
if totalmem is greater than 150.0 MB for 40 cycles then alert
|
10
10
|
<%- if tcp_socket? -%>
|
11
11
|
if failed port <%= opts[:port] %> for 4 times within 8 cycles then restart
|
@@ -6,8 +6,8 @@ check process <%= service_entry %>.<%= current_web_server %>.<%= n %>
|
|
6
6
|
with pidfile <%= pid_file_path(n) %>
|
7
7
|
group <%= service_entry %>
|
8
8
|
onreboot laststate
|
9
|
-
start program = "/bin/bash -c 'sleep 1; <%= start_command %> -o <%=n %>'"
|
10
|
-
stop program = "/bin/bash -c '<%= stop_command %> -o <%=n %>'"
|
9
|
+
start program = "/bin/bash -c 'sleep 1; <%= compose_command(start_command) %> -o <%=n %>'"
|
10
|
+
stop program = "/bin/bash -c '<%= compose_command(stop_command) %> -o <%=n %>'"
|
11
11
|
if totalmem is greater than 150.0 MB for 40 cycles then alert
|
12
12
|
<%- if tcp_socket? -%>
|
13
13
|
if failed port <%= opts[:port] + n %> for 4 times within 8 cycles then restart
|
@@ -61,11 +61,11 @@ module Luban
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def start_command
|
64
|
-
@start_command ||= "
|
64
|
+
@start_command ||= "#{puma_command} start"
|
65
65
|
end
|
66
66
|
|
67
67
|
def stop_command
|
68
|
-
@stop_command ||= "
|
68
|
+
@stop_command ||= "#{puma_command} stop"
|
69
69
|
end
|
70
70
|
|
71
71
|
def process_pattern
|
@@ -143,11 +143,11 @@ module Luban
|
|
143
143
|
include Common
|
144
144
|
|
145
145
|
def restart_command
|
146
|
-
@restart_command ||= "
|
146
|
+
@restart_command ||= "#{puma_command} restart"
|
147
147
|
end
|
148
148
|
|
149
149
|
def phased_restart_command
|
150
|
-
@phased_restart_command ||= "
|
150
|
+
@phased_restart_command ||= "#{puma_command} phased-restart"
|
151
151
|
end
|
152
152
|
end
|
153
153
|
end
|
@@ -118,11 +118,11 @@ module Luban
|
|
118
118
|
end
|
119
119
|
|
120
120
|
def start_command
|
121
|
-
@start_command ||= "
|
121
|
+
@start_command ||= "#{thin_command} start"
|
122
122
|
end
|
123
123
|
|
124
124
|
def stop_command
|
125
|
-
@stop_command ||= "
|
125
|
+
@stop_command ||= "#{thin_command} stop"
|
126
126
|
end
|
127
127
|
|
128
128
|
def process_pattern
|
@@ -148,11 +148,11 @@ module Luban
|
|
148
148
|
include Common
|
149
149
|
|
150
150
|
def restart_command
|
151
|
-
@restart_command ||= "
|
151
|
+
@restart_command ||= "#{thin_command} restart"
|
152
152
|
end
|
153
153
|
|
154
154
|
def phased_restart_command
|
155
|
-
@phased_restart_command ||= "
|
155
|
+
@phased_restart_command ||= "#{thin_command} restart --onebyone"
|
156
156
|
end
|
157
157
|
end
|
158
158
|
end
|
data/luban-rack.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.required_ruby_version = ">= 2.1.0"
|
23
|
-
spec.add_dependency 'luban', ">= 0.
|
23
|
+
spec.add_dependency 'luban', ">= 0.7.0"
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.12"
|
26
26
|
spec.add_development_dependency "rake", "~> 10.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: luban-rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rubyist Chi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: luban
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.7.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.7.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|