et_full_system 0.1.76 → 0.1.77
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/Gemfile.lock +4 -4
- data/lib/et_full_system/cli/docker.rb +25 -0
- data/lib/et_full_system/os.rb +21 -0
- data/lib/et_full_system/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a16e0ca10760de7de9c31a7879781c69d59627c823bf37971e1637e768480af7
|
4
|
+
data.tar.gz: e1efc5bd2df19588c97e0859942356bb6c39f201323dfc9406b3d02c76fd59e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3773ee1b5b09508bd30d94005d2bea58c425afab787aa7a156142f956e3f7da2eb8faa1fd81f79e2110a7552caf86f1c1a851f6ec9379ad3df2abbc49bb41dbc
|
7
|
+
data.tar.gz: 6191244bbdfca12aec71d26ccf182a476dde4ae83bc5d70a98c992e9612c802f06dc35062234819980014459ceb6570dfad7a3598e916906ba241833d703e96a
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
et_full_system (0.1.
|
4
|
+
et_full_system (0.1.77)
|
5
5
|
aws-sdk-s3 (~> 1.9)
|
6
6
|
azure-storage (~> 0.15.0.preview)
|
7
7
|
dotenv (~> 2.7, >= 2.7.2)
|
@@ -23,7 +23,7 @@ GEM
|
|
23
23
|
addressable (2.7.0)
|
24
24
|
public_suffix (>= 2.0.2, < 5.0)
|
25
25
|
aws-eventstream (1.0.3)
|
26
|
-
aws-partitions (1.
|
26
|
+
aws-partitions (1.218.0)
|
27
27
|
aws-sdk-core (3.68.0)
|
28
28
|
aws-eventstream (~> 1.0, >= 1.0.2)
|
29
29
|
aws-partitions (~> 1.0)
|
@@ -79,7 +79,7 @@ GEM
|
|
79
79
|
mime-types-data (~> 3.2015)
|
80
80
|
mime-types-data (3.2019.0904)
|
81
81
|
mini_portile2 (2.4.0)
|
82
|
-
minitest (5.
|
82
|
+
minitest (5.12.0)
|
83
83
|
multi_json (1.13.1)
|
84
84
|
multi_xml (0.6.0)
|
85
85
|
multipart-post (2.1.1)
|
@@ -111,7 +111,7 @@ GEM
|
|
111
111
|
tilt (~> 2.0)
|
112
112
|
thor (0.20.3)
|
113
113
|
thread_safe (0.3.6)
|
114
|
-
tilt (2.0.
|
114
|
+
tilt (2.0.10)
|
115
115
|
tzinfo (1.2.5)
|
116
116
|
thread_safe (~> 0.1)
|
117
117
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require_relative './docker/server'
|
2
|
+
require 'json'
|
2
3
|
module EtFullSystem
|
3
4
|
#!/usr/bin/env ruby
|
4
5
|
# frozen_string_literal: true
|
@@ -61,6 +62,11 @@ module EtFullSystem
|
|
61
62
|
end
|
62
63
|
end
|
63
64
|
|
65
|
+
desc "local_service SERVICE PORT", "Configures the reverse proxy to connect to a specific port on the host machine - the URL is calculated - otherwise it is the same as update_service_url"
|
66
|
+
def local_service(service, port)
|
67
|
+
update_service_url(service, local_service_url(port))
|
68
|
+
end
|
69
|
+
|
64
70
|
desc "service_env SERVICE", "Returns the environment variables configured for the specified service"
|
65
71
|
def service_env(service)
|
66
72
|
Bundler.with_original_env do
|
@@ -71,5 +77,24 @@ module EtFullSystem
|
|
71
77
|
exec(compose_cmd)
|
72
78
|
end
|
73
79
|
end
|
80
|
+
|
81
|
+
private
|
82
|
+
|
83
|
+
def host_ip
|
84
|
+
JSON.parse `docker network inspect \`docker network list | grep docker_et_full_system | awk '{print $1}'\``
|
85
|
+
end
|
86
|
+
|
87
|
+
def local_service_url(port)
|
88
|
+
case ::EtFullSystem.os
|
89
|
+
when :linux, :unix
|
90
|
+
"http://#{host_ip}:#{port}"
|
91
|
+
when :osx
|
92
|
+
"http://docker.for.mac.localhost"
|
93
|
+
when :windows
|
94
|
+
"http://docker.for.windows.localhost"
|
95
|
+
else
|
96
|
+
raise "Unknown host type - this tool only supports mac, linux and windows"
|
97
|
+
end
|
98
|
+
end
|
74
99
|
end
|
75
100
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'rbconfig'
|
2
|
+
|
3
|
+
module EtFullSystem
|
4
|
+
def self.os
|
5
|
+
@os ||= (
|
6
|
+
host_os = RbConfig::CONFIG['host_os']
|
7
|
+
case host_os
|
8
|
+
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
|
9
|
+
:windows
|
10
|
+
when /darwin|mac os/
|
11
|
+
:macosx
|
12
|
+
when /linux/
|
13
|
+
:linux
|
14
|
+
when /solaris|bsd/
|
15
|
+
:unix
|
16
|
+
else
|
17
|
+
raise "unknown os: #{host_os.inspect}"
|
18
|
+
end
|
19
|
+
)
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: et_full_system
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.77
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gary Taylor
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -175,6 +175,7 @@ files:
|
|
175
175
|
- lib/et_full_system/cli/local.rb
|
176
176
|
- lib/et_full_system/cli/local/file_storage.rb
|
177
177
|
- lib/et_full_system/cli/workspace.rb
|
178
|
+
- lib/et_full_system/os.rb
|
178
179
|
- lib/et_full_system/version.rb
|
179
180
|
- shell_scripts/docker_bootstrap.sh
|
180
181
|
- shell_scripts/run_foreman
|