escualo 1.0.2 → 1.0.3

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: cb5a4cd7987f7f538d8d6dbb31efe78bdda4e58a
4
- data.tar.gz: ac12b60c463fbb7cc2412b740367f6277f19f915
3
+ metadata.gz: c809f160a9a7a6ada7701ad6ff2caa6aebe94738
4
+ data.tar.gz: 2782155da8b03c01acf3f79291b406f62cfcb92c
5
5
  SHA512:
6
- metadata.gz: c454b54e8282ba622911aa03bc5176ce1b355b89828005c8099b4749029498e24852557a02cdc42e04196eed07b9797cbc53acec76b81338ec51d75d920de877
7
- data.tar.gz: 31f36d47f87e163b3996f90180de12c2b5e1fdb28e036bcae25ff125f89f9ce8dd43e3b7141bf90a254dde2d9bcc4f7221fcb383d64362a94517c1c5cba2eaae
6
+ metadata.gz: 9b613bec310b5a1e7f723a17c861b845f98ee18e8b2ca721df7cb214a5972f642559656fb6102cfcc2eb867e5627082919a5140e1109f5f82f6bb4491c78053e
7
+ data.tar.gz: 5303602c1b75568956a8883607118d23596cbe2192c39e2e0d876d0fb6828cc87a5a231bad5bc8850ac4e0e1376b3ab77f084df0d7d832e633666dc57e8d6854
@@ -17,6 +17,7 @@ command 'bootstrap' do |c|
17
17
 
18
18
  step 'Configuring variables...' do
19
19
  Escualo::Env.setup ssh
20
+ Escualo::Env.set_locale ssh, options
20
21
  Escualo::Env.set_builtins ssh, options
21
22
  end
22
23
 
@@ -2,6 +2,7 @@ command 'script' do |c|
2
2
  c.syntax = 'escualo script <FILE>'
3
3
  c.description = 'Runs a escualo configuration'
4
4
  c.option '--dockerized', TrueClass, 'Create a Dockerfile instead of running commands'
5
+ c.option '--development', TrueClass, 'Use local escualo gemspec instead of fetching from internet'
5
6
  c.option '--base-image BASE_IMAGE', String, 'Default base image. Only for dockerized runs'
6
7
 
7
8
  c.action do |args, options|
@@ -2,7 +2,7 @@ module Escualo
2
2
  module Artifact
3
3
  def self.setup(ssh)
4
4
  ssh.exec! %q{
5
- mkdir -p/var/repo/ && \
5
+ mkdir -p /var/repo/ && \
6
6
  mkdir -p /var/scripts/
7
7
  }
8
8
  end
data/lib/escualo/env.rb CHANGED
@@ -10,6 +10,10 @@ module Escualo
10
10
  }
11
11
  end
12
12
 
13
+ def self.set_locale(ssh, options)
14
+ ssh.perform! "locale-gen #{locale} && update-locale LANG=#{locale}", options
15
+ end
16
+
13
17
  def self.set_builtins(ssh, options)
14
18
  set ssh, ESCUALO_BASE_VERSION: Escualo::BASE_VERSION
15
19
  set ssh, Escualo::Env.locale_variables
@@ -55,10 +59,14 @@ module Escualo
55
59
 
56
60
  def self.locale_variables
57
61
  %w{LANG LC_ALL LC_NAME LC_IDENTIFICATION LC_PAPER LC_ADDRESS LC_TIME LC_NUMERIC LC_MONETARY LC_TELEPHONE LC_MEASUREMENT}.map do |it|
58
- [it, 'en_US.UTF-8']
62
+ [it, locale]
59
63
  end.to_h
60
64
  end
61
65
 
66
+ def self.locale
67
+ 'en_US.UTF-8'
68
+ end
69
+
62
70
  def self.environment_variables(environment)
63
71
  %w{RAILS_ENV NODE_ENV RACK_ENV}.map do |it|
64
72
  [it, environment]
@@ -5,7 +5,7 @@ module Escualo::Plugin
5
5
  end
6
6
 
7
7
  def check(ssh, _options)
8
- ssh.exec!('docker -v').include? 'Docker version'
8
+ ssh.exec!('docker -v').include? 'Docker version' rescue false
9
9
  end
10
10
  end
11
11
  end
@@ -5,7 +5,7 @@ module Escualo::Plugin
5
5
  end
6
6
 
7
7
  def check(ssh, _options)
8
- ssh.exec!('ghc --version').include? 'The Glorious Glasgow Haskell Compilation System'
8
+ ssh.exec!('ghc --version').include? 'The Glorious Glasgow Haskell Compilation System' rescue false
9
9
  end
10
10
  end
11
11
  end
@@ -11,7 +11,7 @@ module Escualo::Plugin
11
11
  end
12
12
 
13
13
  def check(ssh, _options)
14
- ssh.shell.exec!('mongod --version').include? 'db version v3.2'
14
+ ssh.shell.exec!('mongod --version').include? 'db version v3.2' rescue false
15
15
  end
16
16
  end
17
17
  end
@@ -18,7 +18,7 @@ module Escualo::Plugin
18
18
  end
19
19
 
20
20
  def check(ssh, options)
21
- ssh.shell.exec!('monit --version').include? 'This is Monit version 5'
21
+ ssh.shell.exec!('monit --version').include? 'This is Monit version 5' rescue false
22
22
  end
23
23
  end
24
24
  end
@@ -13,7 +13,7 @@ module Escualo::Plugin
13
13
  end
14
14
 
15
15
  def check(ssh, _options)
16
- ssh.exec!('nginx -v').include? 'nginx version: nginx/1'
16
+ ssh.exec!('nginx -v').include? 'nginx version: nginx/1' rescue false
17
17
  end
18
18
  end
19
19
  end
@@ -9,7 +9,7 @@ module Escualo::Plugin
9
9
  end
10
10
 
11
11
  def check(ssh, _options)
12
- ssh.shell.exec!('nvm use node').include? 'Now using node v4.2.4'
12
+ ssh.shell.exec!('nvm use node').include? 'Now using node v4.2.4' rescue false
13
13
  end
14
14
  end
15
15
  end
@@ -17,7 +17,7 @@ EOF
17
17
  end
18
18
 
19
19
  def check(ssh, options)
20
- ssh.shell.exec!('psql --version').include? "psql (PostgreSQL) #{options.pg_version}"
20
+ ssh.shell.exec!('psql --version').include? "psql (PostgreSQL) #{options.pg_version}" rescue false
21
21
  end
22
22
  end
23
23
  end
@@ -16,7 +16,7 @@ module Escualo::Plugin
16
16
  end
17
17
 
18
18
  def check(ssh, _options)
19
- ssh.exec!('rabbitmq-server').include? 'node with name "rabbit" already running'
19
+ ssh.exec!('rabbitmq-server').include? 'node with name "rabbit" already running' rescue false
20
20
  end
21
21
  end
22
22
  end
@@ -43,8 +43,17 @@ module Escualo
43
43
  FROM #{base_image options}
44
44
  MAINTAINER #{ENV['USER']}
45
45
  RUN apt-get update && apt-get install ruby ruby-dev build-essential -y
46
- RUN gem install escualo -v #{Escualo::VERSION}
47
- "
46
+ #{escualo_install options}"
47
+ end
48
+
49
+ def escualo_install(options)
50
+ if options.development
51
+ "
52
+ COPY escualo-#{Escualo::VERSION}.gem escualo-#{Escualo::VERSION}.gem
53
+ RUN gem install escualo-#{Escualo::VERSION}.gem\n"
54
+ else
55
+ "RUN gem install escualo -v #{Escualo::VERSION}\n"
56
+ end
48
57
  end
49
58
 
50
59
  def base_image(options)
@@ -1,4 +1,4 @@
1
1
  module Escualo
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  BASE_VERSION = '3.2'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: escualo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli
@@ -112,16 +112,16 @@ dependencies:
112
112
  name: docker-api
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '1.22'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: '1.22'
125
125
  description: |-
126
126
  escualo.rb is command-line tools that implements of the escualo provisioning format used by Mumuki Platform.
127
127
  It allows to deploy mumuki artifacts to any host