escualo 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/commands/artifact.rb +1 -1
- data/lib/escualo/artifact.rb +3 -2
- data/lib/escualo/bootstrap.rb +3 -3
- data/lib/escualo/env.rb +6 -1
- data/lib/escualo/version.rb +1 -1
- data/lib/templates/monit.conf.erb +5 -6
- 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: 5446d3c1f0bdafa1c8a866f41b52b90964a28c9f
|
4
|
+
data.tar.gz: fd2a635ebd0d6a171ef3573a2b4d7d42b0499bf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 801cec7433ec4dc70fe695f58ae5eb7181b7ca9ad9e9b5cf6744779577f7a3ddedf20b25cad535ae8f46652e8b3a223014e9859a3263151db7b65b7cb42ed98b
|
7
|
+
data.tar.gz: 184a0ce50ccbfb7ae7c2abecd4b1040ac6915ae03056d1c03a37c5e3c24f030d379be3fc42ad661c74d7a91f2f5fa0c9bc13925b2acd83ec7d8fdfcb8a5a755b
|
data/lib/commands/artifact.rb
CHANGED
data/lib/escualo/artifact.rb
CHANGED
@@ -53,9 +53,10 @@ module Escualo
|
|
53
53
|
ssh.exec! "chmod +x #{hook_file}"
|
54
54
|
end
|
55
55
|
|
56
|
-
def self.configure_monit(ssh,
|
56
|
+
def self.configure_monit(ssh, options)
|
57
|
+
name = options[:name]
|
57
58
|
ssh.exec! 'mkdir -p /etc/monit/conf.d/'
|
58
|
-
ssh.upload_template! "/etc/monit/conf.d/escualo-#{name}", 'monit.conf',
|
59
|
+
ssh.upload_template! "/etc/monit/conf.d/escualo-#{name}", 'monit.conf', options
|
59
60
|
ssh.exec! 'monit reload'
|
60
61
|
end
|
61
62
|
|
data/lib/escualo/bootstrap.rb
CHANGED
@@ -43,9 +43,9 @@ module Escualo
|
|
43
43
|
cp monit-#{options.monit_version}/bin/monit /usr/bin/monit
|
44
44
|
ln -s /etc/monit/monitrc /etc/monitrc
|
45
45
|
service monit start
|
46
|
-
'set httpd port 2812 and' > /etc/monit/conf.d/web-server
|
47
|
-
' allow 0.0.0.0/0.0.0.0' >> /etc/monit/conf.d/web-server
|
48
|
-
' allow admin:#{options.monit_password}' >> /etc/monit/conf.d/web-server
|
46
|
+
echo 'set httpd port 2812 and' > /etc/monit/conf.d/web-server
|
47
|
+
echo ' allow 0.0.0.0/0.0.0.0' >> /etc/monit/conf.d/web-server
|
48
|
+
echo ' allow admin:#{options.monit_password}' >> /etc/monit/conf.d/web-server
|
49
49
|
monit reload
|
50
50
|
}, options
|
51
51
|
end
|
data/lib/escualo/env.rb
CHANGED
@@ -26,7 +26,12 @@ module Escualo
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def self.present?(ssh, variable)
|
29
|
-
ssh
|
29
|
+
value = get(ssh, variable)
|
30
|
+
value.present? && !value.include?('No such file or directory')
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.get(ssh, variable)
|
34
|
+
ssh.exec!("cat ~/.escualo/vars/#{variable}")
|
30
35
|
end
|
31
36
|
|
32
37
|
def self.set(ssh, variables)
|
data/lib/escualo/version.rb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
check host escualo-<%=
|
2
|
-
start "/sbin/start <%=
|
3
|
-
stop "/sbin/stop <%=
|
1
|
+
check host escualo-<%= name %> with address localhost
|
2
|
+
start "/sbin/start <%= name %>"
|
3
|
+
stop "/sbin/stop <%= name %>"
|
4
4
|
if failed
|
5
|
-
port
|
5
|
+
port <%= port %>
|
6
6
|
protocol HTTP
|
7
7
|
request "/"
|
8
8
|
status > 199
|
9
9
|
with timeout 30 seconds
|
10
|
-
then restart
|
11
|
-
EOF
|
10
|
+
then restart
|