orchestration 0.4.20 → 0.4.21
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 +4 -4
- data/README.md +1 -1
- data/lib/orchestration/services/listener/configuration.rb +1 -1
- data/lib/orchestration/services/mixins/configuration_base.rb +14 -5
- data/lib/orchestration/services/mixins/healthcheck_base.rb +2 -1
- data/lib/orchestration/templates/orchestration.mk.erb +1 -1
- data/lib/orchestration/version.rb +1 -1
- data/lib/tasks/orchestration.rake +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5364dca18181a903cf48ab9e3f41a09e1701644a4761a44a4df14ae0d967840
|
4
|
+
data.tar.gz: '0930a75b039913e18f4fa921edaaaf42937cfd66564336cfe2068403e1ca18e5'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 281d9cb2713d9e172847b495702541e82a1396281a29553b820988ea5f5f66c8e772b01ee138158e73d84c719b8317167903fcbc446e746ddb6d3ede4e7568c3
|
7
|
+
data.tar.gz: 041ebd73730d0531d4ffd649bf2b68125b84aea3a4bfd1b5027c3c68d3451437fddd2126bec0c7958e54906ba7f9ef2cfeb388bfeec95230dc69aa39028707d6
|
data/README.md
CHANGED
@@ -29,6 +29,7 @@ module Orchestration
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def host
|
32
|
+
return @service_name if @env.environment == 'test' && @options[:sidecar]
|
32
33
|
return '127.0.0.1' if %w[test development].include?(@env.environment)
|
33
34
|
|
34
35
|
@service_name
|
@@ -42,15 +43,23 @@ module Orchestration
|
|
42
43
|
false
|
43
44
|
end
|
44
45
|
|
46
|
+
def image
|
47
|
+
service['image']
|
48
|
+
end
|
49
|
+
|
45
50
|
def port
|
46
51
|
return @env.app_port if @service_name == 'app'
|
47
52
|
|
48
|
-
|
49
|
-
|
50
|
-
|
53
|
+
local, remote = parse_port(service).map(&:to_i)
|
54
|
+
return remote if @env.environment == 'test' && @options[:sidecar]
|
55
|
+
|
56
|
+
(@env.environment == 'production' ? remote : local)
|
57
|
+
end
|
51
58
|
|
52
|
-
|
53
|
-
|
59
|
+
def service
|
60
|
+
@service ||= @env.docker_compose_config
|
61
|
+
.fetch('services')
|
62
|
+
.fetch(@service_name)
|
54
63
|
end
|
55
64
|
|
56
65
|
def parse_port(service)
|
@@ -37,7 +37,8 @@ module Orchestration
|
|
37
37
|
|
38
38
|
def initialize(env, service_name = nil, options = {})
|
39
39
|
@options = options
|
40
|
-
@
|
40
|
+
@options[:sidecar] = options[:sidecar] && !options[:sidecar].empty?
|
41
|
+
@configuration = configuration_class.new(env, service_name, @options)
|
41
42
|
end
|
42
43
|
|
43
44
|
def service_name
|
@@ -309,7 +309,7 @@ endif
|
|
309
309
|
## Generic Listener healthcheck for TCP services ##
|
310
310
|
|
311
311
|
wait-listener:
|
312
|
-
@${rake} orchestration:listener:wait service=${service}
|
312
|
+
@${rake} orchestration:listener:wait service=${service} sidecar=${sidecar}
|
313
313
|
|
314
314
|
## Test/development wait commands
|
315
315
|
|
@@ -55,7 +55,8 @@ namespace :orchestration do
|
|
55
55
|
desc I18n.t('orchestration.rake.listener.wait')
|
56
56
|
task :wait do
|
57
57
|
Orchestration::Services::Listener::Healthcheck.start(
|
58
|
-
nil, nil, service_name: ENV.fetch('service')
|
58
|
+
nil, nil, service_name: ENV.fetch('service'),
|
59
|
+
sidecar: ENV['sidecar']
|
59
60
|
)
|
60
61
|
end
|
61
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orchestration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Farrell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: database_url
|