escualo 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/commands/plugin.rb +7 -4
- data/lib/escualo/plugin/docker.rb +1 -1
- data/lib/escualo/plugin/haskell.rb +1 -1
- data/lib/escualo/plugin/mongo.rb +1 -1
- data/lib/escualo/plugin/nginx.rb +1 -1
- data/lib/escualo/plugin/node.rb +1 -1
- data/lib/escualo/plugin/postgre.rb +3 -3
- data/lib/escualo/plugin/rabbit.rb +1 -1
- data/lib/escualo/version.rb +1 -1
- 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: 2311d5bcbd817cbed4b83e76cbf0186a48d10854
|
4
|
+
data.tar.gz: 51835791f32711753d833276c54c11ebc1bf700c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13c4f2ee302e8f8f1c61ce235d5df7e9a2661e230f07c24f527452c9c7057cce2cd7071062057ca9e66100f3eb1a9be792c80c711836bf45c60ba4d11396911e
|
7
|
+
data.tar.gz: b6c2495418d878d3f722316acbe8710f92ea264eb44c497fd8ed84449c1366580ae4b79d64fc07000215ce286835744978f21f8dbd700a75e3d0534741fc02db
|
data/lib/commands/plugin.rb
CHANGED
@@ -3,15 +3,18 @@ command 'plugin install' do |c|
|
|
3
3
|
c.description = "Install plugin on host. Valid plugins are #{Escualo::Plugin::PLUGINS.join(', ')}"
|
4
4
|
c.option '--nginx-conf FILENAME', String, 'ningix config file, only for nginx plugin'
|
5
5
|
c.option '--rabbit-admin-password PASSWORD', String, 'rabbitmq admin password, only for rabbit plugin'
|
6
|
-
c.option '-
|
6
|
+
c.option '--pg-version VERSION', String, 'PostgreSQL major and minor version. Default is 9.3, only for postgre plugin'
|
7
7
|
|
8
|
+
c.option '-f', '--force', TrueClass, 'Force reinstalling even if already done'
|
8
9
|
c.ssh_action do |args, options, ssh|
|
10
|
+
options.default pg_version: '9.3'
|
11
|
+
|
9
12
|
plugin = args.first
|
10
13
|
say "Installing #{plugin}"
|
11
14
|
|
12
15
|
installer = Escualo::Plugin.load plugin
|
13
16
|
|
14
|
-
do_unless installer.check(ssh),
|
17
|
+
do_unless installer.check(ssh, options),
|
15
18
|
"Plugin #{plugin} is already installed",
|
16
19
|
options do
|
17
20
|
|
@@ -19,10 +22,10 @@ command 'plugin install' do |c|
|
|
19
22
|
log = installer.run ssh, options
|
20
23
|
end
|
21
24
|
|
22
|
-
if installer.check ssh
|
25
|
+
if installer.check ssh, options
|
23
26
|
say 'Installed successfully!'
|
24
27
|
else
|
25
|
-
say "Something went wrong
|
28
|
+
say "Something went wrong"
|
26
29
|
end
|
27
30
|
end
|
28
31
|
end
|
data/lib/escualo/plugin/mongo.rb
CHANGED
data/lib/escualo/plugin/nginx.rb
CHANGED
data/lib/escualo/plugin/node.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Escualo::Plugin
|
2
2
|
class Postgre
|
3
3
|
def run(ssh, options)
|
4
|
-
pg_hba_conf =
|
4
|
+
pg_hba_conf = "/etc/postgresql/#{options.pg_version}/main/pg_hba.conf"
|
5
5
|
|
6
6
|
ssh.shell.perform! %Q{
|
7
7
|
apt-get install postgresql libpq-dev -y &&
|
@@ -16,8 +16,8 @@ EOF
|
|
16
16
|
}, options
|
17
17
|
end
|
18
18
|
|
19
|
-
def check(ssh)
|
20
|
-
ssh.shell.exec!('psql --version').include?
|
19
|
+
def check(ssh, options)
|
20
|
+
ssh.shell.exec!('psql --version').include? "psql (PostgreSQL) #{options.pg_version}"
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
data/lib/escualo/version.rb
CHANGED