escualo 0.2.12 → 0.3.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/bootstrap.rb +5 -1
- data/lib/commands/script.rb +1 -1
- data/lib/escualo.rb +1 -0
- data/lib/escualo/bootstrap.rb +16 -2
- data/lib/escualo/script.rb +8 -0
- data/lib/escualo/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d93e2ffee46b1ffcb014f4051fffa207a496534c
|
4
|
+
data.tar.gz: 35e3379e10b51444dc50955b7f53e0c994ecf179
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f783d45a44dff3f86a903ce7e79304995589b597d437195d2b2b58c5bc3b8bab409275d5c80494aa5f45413d6ddd680ad930260150942a0431e7c8cb74aa19bc
|
7
|
+
data.tar.gz: c46b22123a40942bfbaacc46319fefa6f8f0f8b138d6fb3f3df909e8b711d79185501c81ba2098a5a7a75e88ab47c47dd915189ee643c24a6c2813c74a451eb1
|
data/lib/commands/bootstrap.rb
CHANGED
@@ -4,6 +4,9 @@ command 'bootstrap' do |c|
|
|
4
4
|
c.option '--swap', TrueClass, 'Setup swap?'
|
5
5
|
c.option '--monit-version VERSION', String, 'Monit version'
|
6
6
|
c.option '--monit-password PASSWORD', String, 'Monit password. Will be prompted otherwise'
|
7
|
+
c.option '--no-monit', TrueClass, 'Skip monit installation'
|
8
|
+
c.option '--with-rbenv', TrueClass, 'Use rbenv instead of native ruby installation'
|
9
|
+
|
7
10
|
c.option '-f', '--force', TrueClass, 'Force bootstrap even if already done?'
|
8
11
|
|
9
12
|
c.ssh_action do |_args, options, ssh|
|
@@ -23,11 +26,12 @@ command 'bootstrap' do |c|
|
|
23
26
|
|
24
27
|
step 'Installing base software...' do
|
25
28
|
Escualo::Bootstrap.install_base ssh, options
|
29
|
+
Escualo::Bootstrap.install_ruby ssh, options
|
26
30
|
end
|
27
31
|
|
28
32
|
step 'Installing and configuring monit...' do
|
29
33
|
Escualo::Bootstrap.setup_monit ssh, options
|
30
|
-
end
|
34
|
+
end unless options.no_monit
|
31
35
|
|
32
36
|
step 'Enabling swap...' do
|
33
37
|
Escualo::Bootstrap.enable_swap ssh
|
data/lib/commands/script.rb
CHANGED
data/lib/escualo.rb
CHANGED
@@ -12,6 +12,7 @@ require_relative './ssh'
|
|
12
12
|
require_relative './escualo/version'
|
13
13
|
require_relative './escualo/env'
|
14
14
|
require_relative './escualo/bootstrap'
|
15
|
+
require_relative './escualo/script'
|
15
16
|
require_relative './escualo/plugin'
|
16
17
|
require_relative './escualo/remote'
|
17
18
|
require_relative './escualo/artifact'
|
data/lib/escualo/bootstrap.rb
CHANGED
@@ -16,14 +16,28 @@ module Escualo
|
|
16
16
|
git \
|
17
17
|
monit \
|
18
18
|
libssl-dev \
|
19
|
-
ruby2.0 \
|
20
|
-
ruby2.0-dev \
|
21
19
|
zlib1g \
|
22
20
|
zlib1g-dev \
|
23
21
|
libreadline-dev
|
24
22
|
}, options
|
25
23
|
end
|
26
24
|
|
25
|
+
def self.install_ruby(ssh, options)
|
26
|
+
if options.with_rbenv
|
27
|
+
ssh.shell.perform! %q{
|
28
|
+
curl https://raw.githubusercontent.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash
|
29
|
+
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
|
30
|
+
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
|
31
|
+
}
|
32
|
+
else
|
33
|
+
ssh.shell.perform! %q{
|
34
|
+
apt-get install -y \
|
35
|
+
ruby2.0 \
|
36
|
+
ruby2.0-dev
|
37
|
+
}, options
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
27
41
|
def self.enable_swap(ssh)
|
28
42
|
ssh.exec! %q{ \
|
29
43
|
test -e /swapfile ||
|
data/lib/escualo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: escualo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|
@@ -143,6 +143,7 @@ files:
|
|
143
143
|
- lib/escualo/plugin/postgre.rb
|
144
144
|
- lib/escualo/plugin/rabbit.rb
|
145
145
|
- lib/escualo/remote.rb
|
146
|
+
- lib/escualo/script.rb
|
146
147
|
- lib/escualo/version.rb
|
147
148
|
- lib/ssh.rb
|
148
149
|
- lib/ssh/local_session.rb
|