et_full_system 1.0.0.pre35 → 1.0.0.pre44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +13 -11
- data/docker/docker-compose.yml +79 -1
- data/lib/et_full_system/cli/docker.rb +95 -16
- data/lib/et_full_system/cli/docker/server.rb +24 -3
- data/lib/et_full_system/cli/local.rb +1 -1
- data/lib/et_full_system/version.rb +1 -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: cf35411960bdb0f229d00ca9f7b3643267748c79575f61c968504853b9e9a91e
|
4
|
+
data.tar.gz: 297eb0c8f4eff759d622c2056cf33c43a615ba5f706f402d80c143e12276ad47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab906c2b10b4aa36241ba1f77e2a01d926429f3b7b69cdcb55c48999bd93f0bb748bdc015d8c0ae51597027643ecf8e6a9c335420d3c41f09adb6d0bbdeaa200
|
7
|
+
data.tar.gz: bbbc699a6184b5750fef9ee326c7fd671bf0a55aa22473e3e7961d074ba54c4823bb675e767ce8c477c5f5b257087fcf6ac22a5ae0c816348a2e6f90923ff5da
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
et_full_system (1.0.0.
|
4
|
+
et_full_system (1.0.0.pre44)
|
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.261.0)
|
27
27
|
aws-sdk-core (3.86.0)
|
28
28
|
aws-eventstream (~> 1.0, >= 1.0.2)
|
29
29
|
aws-partitions (~> 1, >= 1.239.0)
|
@@ -65,7 +65,7 @@ GEM
|
|
65
65
|
rotp (~> 5.1)
|
66
66
|
thor (~> 0.20.3)
|
67
67
|
tilt (~> 2.0, >= 2.0.9)
|
68
|
-
faraday (0.17.
|
68
|
+
faraday (0.17.3)
|
69
69
|
multipart-post (>= 1.2, < 3)
|
70
70
|
faraday_middleware (0.13.1)
|
71
71
|
faraday (>= 0.7.4, < 1.0)
|
@@ -86,13 +86,14 @@ GEM
|
|
86
86
|
multi_json (1.14.1)
|
87
87
|
multi_xml (0.6.0)
|
88
88
|
multipart-post (2.1.1)
|
89
|
-
mustermann (1.
|
89
|
+
mustermann (1.1.1)
|
90
|
+
ruby2_keywords (~> 0.0.1)
|
90
91
|
nokogiri (1.10.7)
|
91
92
|
mini_portile2 (~> 2.4.0)
|
92
|
-
public_suffix (4.0.
|
93
|
+
public_suffix (4.0.3)
|
93
94
|
puma (3.12.2)
|
94
95
|
rack (2.0.8)
|
95
|
-
rack-protection (2.0.
|
96
|
+
rack-protection (2.0.8.1)
|
96
97
|
rack
|
97
98
|
rake (10.5.0)
|
98
99
|
roda (3.27.0)
|
@@ -100,17 +101,18 @@ GEM
|
|
100
101
|
rotp (5.1.0)
|
101
102
|
addressable (~> 2.5)
|
102
103
|
ruby-mcrypt (0.2.0)
|
103
|
-
|
104
|
+
ruby2_keywords (0.0.1)
|
105
|
+
sinatra (2.0.8.1)
|
104
106
|
mustermann (~> 1.0)
|
105
107
|
rack (~> 2.0)
|
106
|
-
rack-protection (= 2.0.
|
108
|
+
rack-protection (= 2.0.8.1)
|
107
109
|
tilt (~> 2.0)
|
108
|
-
sinatra-contrib (2.0.
|
110
|
+
sinatra-contrib (2.0.8.1)
|
109
111
|
backports (>= 2.8.2)
|
110
112
|
multi_json
|
111
113
|
mustermann (~> 1.0)
|
112
|
-
rack-protection (= 2.0.
|
113
|
-
sinatra (= 2.0.
|
114
|
+
rack-protection (= 2.0.8.1)
|
115
|
+
sinatra (= 2.0.8.1)
|
114
116
|
tilt (~> 2.0)
|
115
117
|
thor (0.20.3)
|
116
118
|
thread_safe (0.3.6)
|
data/docker/docker-compose.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
version: '3'
|
2
2
|
services:
|
3
3
|
et:
|
4
|
-
image: 'et_full_system
|
4
|
+
image: 'et_full_system:1.0.0.pre'
|
5
5
|
build:
|
6
6
|
context: ../
|
7
7
|
dockerfile: docker/Dockerfile
|
@@ -12,6 +12,8 @@ services:
|
|
12
12
|
- '${SERVER_PORT:-3100}:${SERVER_PORT:-3100}'
|
13
13
|
- '${TRAEFIX_PORT:-3200}:${TRAEFIK_PORT:-3200}'
|
14
14
|
- '${SMTP_PORT:-1025}:${SMTP_PORT:-1025}'
|
15
|
+
extra_hosts:
|
16
|
+
- "localhost.from.docker:${LOCALHOST_FROM_DOCKER_IP}"
|
15
17
|
volumes:
|
16
18
|
- rvm:/usr/local/rvm
|
17
19
|
- global_node_modules:/usr/lib/node_modules
|
@@ -90,6 +92,81 @@ services:
|
|
90
92
|
- et_full_system
|
91
93
|
volumes:
|
92
94
|
- redis_data:/data
|
95
|
+
selenium-hub:
|
96
|
+
image: selenium/hub:3.141.59-yttrium
|
97
|
+
container_name: selenium-hub
|
98
|
+
ports:
|
99
|
+
- "4444:4444"
|
100
|
+
networks:
|
101
|
+
- et_full_system
|
102
|
+
extra_hosts:
|
103
|
+
- "localhost.from.docker:${LOCALHOST_FROM_DOCKER_IP}"
|
104
|
+
chrome:
|
105
|
+
image: selenium/node-chrome:3.141.59-yttrium
|
106
|
+
volumes:
|
107
|
+
- /dev/shm:/dev/shm
|
108
|
+
depends_on:
|
109
|
+
- selenium-hub
|
110
|
+
environment:
|
111
|
+
- HUB_HOST=selenium-hub
|
112
|
+
- HUB_PORT=4444
|
113
|
+
extra_hosts:
|
114
|
+
- "localhost.from.docker:${LOCALHOST_FROM_DOCKER_IP}"
|
115
|
+
networks:
|
116
|
+
- et_full_system
|
117
|
+
firefox:
|
118
|
+
image: selenium/node-firefox:3.141.59-yttrium
|
119
|
+
volumes:
|
120
|
+
- /dev/shm:/dev/shm
|
121
|
+
depends_on:
|
122
|
+
- selenium-hub
|
123
|
+
environment:
|
124
|
+
- HUB_HOST=selenium-hub
|
125
|
+
- HUB_PORT=4444
|
126
|
+
extra_hosts:
|
127
|
+
- "localhost.from.docker:${LOCALHOST_FROM_DOCKER_IP:-127.255.255.255}"
|
128
|
+
networks:
|
129
|
+
- et_full_system
|
130
|
+
zalenium:
|
131
|
+
image: "dosel/zalenium"
|
132
|
+
container_name: zalenium
|
133
|
+
hostname: zalenium
|
134
|
+
tty: true
|
135
|
+
volumes:
|
136
|
+
- zalenium_videos:/home/seluser/videos
|
137
|
+
- /var/run/docker.sock:/var/run/docker.sock
|
138
|
+
ports:
|
139
|
+
- 4444:4444
|
140
|
+
extra_hosts:
|
141
|
+
- "localhost.from.docker:${LOCALHOST_FROM_DOCKER_IP}"
|
142
|
+
networks:
|
143
|
+
- et_full_system
|
144
|
+
command: >
|
145
|
+
start --desiredContainers 2
|
146
|
+
--maxDockerSeleniumContainers 8
|
147
|
+
--screenWidth 1024 --screenHeight 768
|
148
|
+
--timeZone "Europe/Berlin"
|
149
|
+
--videoRecordingEnabled false
|
150
|
+
--sauceLabsEnabled false
|
151
|
+
--browserStackEnabled false
|
152
|
+
--testingBotEnabled false
|
153
|
+
--cbtEnabled false
|
154
|
+
--lambdaTestEnabled false
|
155
|
+
--startTunnel false
|
156
|
+
environment:
|
157
|
+
- HOST_UID
|
158
|
+
- HOST_GID
|
159
|
+
- SAUCE_USERNAME
|
160
|
+
- SAUCE_ACCESS_KEY
|
161
|
+
- BROWSER_STACK_USER
|
162
|
+
- BROWSER_STACK_KEY
|
163
|
+
- TESTINGBOT_KEY
|
164
|
+
- TESTINGBOT_SECRET
|
165
|
+
- CBT_USERNAME
|
166
|
+
- CBT_AUTHKEY
|
167
|
+
- LT_USERNAME
|
168
|
+
- LT_ACCESS_KEY
|
169
|
+
- PULL_SELENIUM_IMAGE=true
|
93
170
|
volumes:
|
94
171
|
rvm:
|
95
172
|
global_node_modules:
|
@@ -110,6 +187,7 @@ volumes:
|
|
110
187
|
atos_bundle:
|
111
188
|
db_data:
|
112
189
|
redis_data:
|
190
|
+
zalenium_videos:
|
113
191
|
|
114
192
|
networks:
|
115
193
|
et_full_system:
|
@@ -22,7 +22,7 @@ module EtFullSystem
|
|
22
22
|
Bundler.with_original_env do
|
23
23
|
gem_root = File.absolute_path('../../..', __dir__)
|
24
24
|
cmd = "/bin/bash --login -c \"cd /home/app/full_system && et_full_system docker bootstrap && et_full_system local setup\""
|
25
|
-
compose_cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml run --rm et #{cmd}"
|
25
|
+
compose_cmd = "GEM_VERSION=#{EtFullSystem::VERSION} LOCALHOST_FROM_DOCKER_IP=#{host_ip} docker-compose -f #{gem_root}/docker/docker-compose.yml run --rm et #{cmd}"
|
26
26
|
puts compose_cmd
|
27
27
|
exec(compose_cmd)
|
28
28
|
end
|
@@ -32,19 +32,20 @@ module EtFullSystem
|
|
32
32
|
def compose(*args)
|
33
33
|
Bundler.with_original_env do
|
34
34
|
gem_root = File.absolute_path('../../..', __dir__)
|
35
|
-
cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml #{args.join(' ')}"
|
35
|
+
cmd = "GEM_VERSION=#{EtFullSystem::VERSION} LOCALHOST_FROM_DOCKER_IP=#{host_ip} docker-compose -f #{gem_root}/docker/docker-compose.yml #{args.join(' ')}"
|
36
36
|
puts cmd
|
37
37
|
exec(cmd)
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
41
|
desc "invoker", "Provides access to the invoker system running inside docker"
|
42
|
-
def invoker(*args)
|
42
|
+
def invoker(*args, show_output: true, show_command: true)
|
43
43
|
Bundler.with_original_env do
|
44
44
|
gem_root = File.absolute_path('../../..', __dir__)
|
45
45
|
cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml exec et bash -lc \"invoker #{args.join(' ')}\""
|
46
|
-
puts cmd
|
47
|
-
|
46
|
+
puts cmd if show_command
|
47
|
+
result = `#{cmd}`
|
48
|
+
puts result if show_output
|
48
49
|
end
|
49
50
|
end
|
50
51
|
|
@@ -52,10 +53,10 @@ module EtFullSystem
|
|
52
53
|
def reset
|
53
54
|
Bundler.with_original_env do
|
54
55
|
gem_root = File.absolute_path('../../..', __dir__)
|
55
|
-
cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml down -v"
|
56
|
+
cmd = "GEM_VERSION=#{EtFullSystem::VERSION} LOCALHOST_FROM_DOCKER_IP=#{host_ip} docker-compose -f #{gem_root}/docker/docker-compose.yml down -v"
|
56
57
|
puts cmd
|
57
58
|
next unless system(cmd)
|
58
|
-
cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml build --no-cache"
|
59
|
+
cmd = "GEM_VERSION=#{EtFullSystem::VERSION} LOCALHOST_FROM_DOCKER_IP=#{host_ip} docker-compose -f #{gem_root}/docker/docker-compose.yml build --no-cache"
|
59
60
|
puts cmd
|
60
61
|
next unless system(cmd)
|
61
62
|
self.class.start(['setup'])
|
@@ -67,9 +68,9 @@ module EtFullSystem
|
|
67
68
|
Bundler.with_original_env do
|
68
69
|
gem_root = File.absolute_path('../../..', __dir__)
|
69
70
|
cmd = "/bin/bash --login -c \"et_full_system local update_service_url #{service} #{url}\""
|
70
|
-
compose_cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml exec et #{cmd}"
|
71
|
+
compose_cmd = "GEM_VERSION=#{EtFullSystem::VERSION} LOCALHOST_FROM_DOCKER_IP=#{host_ip} docker-compose -f #{gem_root}/docker/docker-compose.yml exec et #{cmd}"
|
71
72
|
puts compose_cmd
|
72
|
-
|
73
|
+
`#{compose_cmd}`
|
73
74
|
end
|
74
75
|
end
|
75
76
|
|
@@ -81,24 +82,102 @@ module EtFullSystem
|
|
81
82
|
desc "local_et1 PORT", "Configures the reverse proxy and the invoker system to allow a developer to run the web server and sidekiq locally"
|
82
83
|
def local_et1(port)
|
83
84
|
local_service('et1', port)
|
84
|
-
invoker
|
85
|
-
invoker
|
86
|
-
puts "ET1 is now expected to be hosted on port #{port} on your machine. To configure your environment, run 'et_full_system docker
|
85
|
+
invoker 'remove', 'et1_web'
|
86
|
+
invoker 'remove', 'et1_sidekiq'
|
87
|
+
puts "ET1 is now expected to be hosted on port #{port} on your machine. To configure your environment, run 'et_full_system docker et1_env > .env.local'"
|
87
88
|
end
|
88
89
|
|
89
90
|
desc "reset_et1", "Configures the reverse proxy and invoker to use the internal systems instead of local"
|
90
91
|
def reset_et1
|
91
|
-
invoker
|
92
|
-
invoker
|
92
|
+
invoker 'add', 'et1_web'
|
93
|
+
invoker 'add', 'et1_sidekiq'
|
93
94
|
puts "ET1 is now being hosted from inside docker container"
|
94
95
|
end
|
95
96
|
|
97
|
+
desc "et1_env", "Shows et1's environment variables as they should be on a developers machine running locally"
|
98
|
+
def et1_env
|
99
|
+
service_env('et1')
|
100
|
+
end
|
101
|
+
|
102
|
+
desc "local_ccd_export", "Disables the sidekiq process in the invoker system to allow a developer to run it locally"
|
103
|
+
def local_ccd_export
|
104
|
+
invoker 'remove', 'et_ccd_export_sidekiq'
|
105
|
+
puts "ccd_export is now expected to be running on your machine. To configure your environment, run 'et_full_system docker ccd_export_env > .env.local'"
|
106
|
+
end
|
107
|
+
|
108
|
+
desc "reset_ccd_export", "Configures invoker to use the internal systems instead of local"
|
109
|
+
def reset_ccd_export
|
110
|
+
invoker 'add', 'et_ccd_export_sidekiq'
|
111
|
+
puts "ccd_export is now being run from inside docker container"
|
112
|
+
end
|
113
|
+
|
114
|
+
desc "ccd_export_env", "Shows ccd_export's environment variables as they should be on a developers machine running locally"
|
115
|
+
def ccd_export_env
|
116
|
+
service_env('et_ccd_export')
|
117
|
+
end
|
118
|
+
|
119
|
+
desc "local_api PORT", "Configures the reverse proxy and the invoker system to allow a developer to run the web server and sidekiq locally"
|
120
|
+
def local_api(port)
|
121
|
+
local_service('api', port)
|
122
|
+
invoker 'remove', 'api_web'
|
123
|
+
invoker 'remove', 'api_sidekiq'
|
124
|
+
puts "api is now expected to be hosted on port #{port} on your machine. Also, you must provide your own sidekiq. To configure your environment, run 'et_full_system docker api_env > .env.local'"
|
125
|
+
end
|
126
|
+
|
127
|
+
desc "reset_api", "Configures the reverse proxy and invoker to use the internal systems instead of local"
|
128
|
+
def reset_api
|
129
|
+
invoker 'add', 'api_web'
|
130
|
+
invoker 'add', 'api_sidekiq'
|
131
|
+
puts "api is now being hosted from inside docker container"
|
132
|
+
end
|
133
|
+
|
134
|
+
desc "api_env", "Shows api's environment variables as they should be on a developers machine running locally"
|
135
|
+
def api_env
|
136
|
+
service_env('api')
|
137
|
+
end
|
138
|
+
|
139
|
+
desc "local_admin PORT", "Configures the reverse proxy and the invoker system to allow a developer to run the admin web server locally"
|
140
|
+
def local_admin(port)
|
141
|
+
local_service('admin', port)
|
142
|
+
invoker 'remove', 'admin_web'
|
143
|
+
puts "Admin is now expected to be hosted on port #{port} on your machine. To configure your environment, run 'et_full_system docker admin_env > .env.local'"
|
144
|
+
end
|
145
|
+
|
146
|
+
desc "reset_admin", "Configures the reverse proxy and invoker to use the internal systems instead of local"
|
147
|
+
def reset_admin
|
148
|
+
invoker 'add', 'admin_web'
|
149
|
+
puts "Admin is now being hosted from inside docker container"
|
150
|
+
end
|
151
|
+
|
152
|
+
desc "admin_env", "Shows admin's environment variables as they should be on a developers machine running locally"
|
153
|
+
def admin_env
|
154
|
+
service_env('admin')
|
155
|
+
end
|
156
|
+
|
157
|
+
desc "local_et3 PORT", "Configures the reverse proxy and the invoker system to allow a developer to run the et3 web server locally"
|
158
|
+
def local_et3(port)
|
159
|
+
local_service('et3', port)
|
160
|
+
invoker 'remove', 'et3_web'
|
161
|
+
puts "ET3 is now expected to be hosted on port #{port} on your machine. To configure your environment, run 'et_full_system docker et3_env > .env.local'"
|
162
|
+
end
|
163
|
+
|
164
|
+
desc "reset_et3", "Configures the reverse proxy and invoker to use the internal systems instead of local"
|
165
|
+
def reset_et3
|
166
|
+
invoker 'add', 'et3_web'
|
167
|
+
puts "ET3 is now being hosted from inside docker container"
|
168
|
+
end
|
169
|
+
|
170
|
+
desc "et3_env", "Shows et3's environment variables as they should be on a developers machine running locally"
|
171
|
+
def et3_env
|
172
|
+
service_env('et3')
|
173
|
+
end
|
174
|
+
|
96
175
|
desc "service_env SERVICE", "Returns the environment variables configured for the specified service"
|
97
176
|
def service_env(service)
|
98
177
|
Bundler.with_original_env do
|
99
178
|
gem_root = File.absolute_path('../../..', __dir__)
|
100
179
|
cmd = "/bin/bash --login -c \"et_full_system local service_env #{service}\""
|
101
|
-
compose_cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml exec et #{cmd}"
|
180
|
+
compose_cmd = "GEM_VERSION=#{EtFullSystem::VERSION} LOCALHOST_FROM_DOCKER_IP=#{host_ip} docker-compose -f #{gem_root}/docker/docker-compose.yml exec et #{cmd}"
|
102
181
|
result = `#{compose_cmd}`
|
103
182
|
replace_db_host_port(result)
|
104
183
|
replace_redis_host_port(result)
|
@@ -112,7 +191,7 @@ module EtFullSystem
|
|
112
191
|
def run_compose_command(*args, silent: false)
|
113
192
|
Bundler.with_original_env do
|
114
193
|
gem_root = File.absolute_path('../../..', __dir__)
|
115
|
-
cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml #{args.join(' ')}"
|
194
|
+
cmd = "GEM_VERSION=#{EtFullSystem::VERSION} LOCALHOST_FROM_DOCKER_IP=#{host_ip} docker-compose -f #{gem_root}/docker/docker-compose.yml #{args.join(' ')}"
|
116
195
|
puts cmd unless silent
|
117
196
|
`#{cmd}`
|
118
197
|
end
|
@@ -10,11 +10,16 @@ module EtFullSystem
|
|
10
10
|
method_option :without, type: :array, default: [], banner: "service1 service2", desc: "If specified, disables the specified services from running. The services are et1_web, et1_sidekiq, et3_web, mail_web, api_web, api_sidekiq, admin_web, atos_api_web, s3_web, azure_blob_web, fake_acas_web, fake_ccd_web"
|
11
11
|
method_option :ccd_docker, type: :boolean, default: false, aliases: 'ccd-docker', desc: "If specified, instead of using the built in fake ccd server, the system will connect to your local machine (see ccd-docker-host option also)"
|
12
12
|
method_option :ccd_docker_host, type: :string, default: 'docker.for.mac.localhost', aliases: 'ccd-docker-host', desc: "Only used if ccd-docker=true. This specifies the host name of your machine when viewed from inside the docker container. This defaults to docker.for.mac.localhost which is suitable for mac OSX only. Consult docker documentation for other systems"
|
13
|
+
method_option :with_test, type: :boolean, default: false, aliases: 'with-test'
|
14
|
+
method_option :use_selenium, type: :boolean, default: true, aliases: 'use-selenium', desc: 'Only used if with_test is true - says to use selenium in preference to zalenium'
|
15
|
+
method_option :chrome_instances, type: :numeric, default: 1, aliases: 'chrome-instances', desc: 'Specify the number of chrome instances for selenium'
|
16
|
+
method_option :firefox_instances, type: :numeric, default: 1, aliases: 'firefox-instances', desc: 'Specify the number of firefox instances for selenium'
|
13
17
|
def up(*args)
|
14
18
|
Bundler.with_original_env do
|
15
19
|
server_args = []
|
16
20
|
server_args << "--without=#{options[:without].join(' ')}" unless options[:without].empty?
|
17
21
|
env_vars = ["SERVER_ARGS='#{server_args.join(' ')}'"]
|
22
|
+
env_vars << "LOCALHOST_FROM_DOCKER_IP=#{host_ip}"
|
18
23
|
if options.ccd_docker?
|
19
24
|
env_vars << "CCD_AUTH_BASE_URL=http://#{options.ccd_docker_host}:4502"
|
20
25
|
env_vars << "CCD_IDAM_BASE_URL=http://#{options.ccd_docker_host}:5000"
|
@@ -26,9 +31,18 @@ module EtFullSystem
|
|
26
31
|
env_vars << "CCD_SIDAM_PASSWORD=Pa55word11"
|
27
32
|
env_vars << "CCD_GENERATE_ETHOS_CASE_REFERENCE=true"
|
28
33
|
end
|
29
|
-
|
34
|
+
extra_args = []
|
35
|
+
if options.with_test? && options.use_selenium?
|
36
|
+
extra_args.concat(["--scale chrome=#{options.chrome_instances}"])
|
37
|
+
extra_args.concat(["--scale firefox=#{options.firefox_instances}"])
|
38
|
+
else
|
39
|
+
extra_args.concat(['--scale selenium-hub=0', '--scale chrome=0', '--scale firefox=0'])
|
40
|
+
end
|
41
|
+
unless options.with_test? && !options.use_selenium?
|
42
|
+
extra_args.concat(['--scale zalenium=0'])
|
43
|
+
end
|
30
44
|
gem_root = File.absolute_path('../../../..', __dir__)
|
31
|
-
cmd = "GEM_VERSION=#{EtFullSystem::VERSION} #{env_vars.join(' ')} docker-compose -f #{gem_root}/docker/docker-compose.yml up #{args.join(' ')}"
|
45
|
+
cmd = "GEM_VERSION=#{EtFullSystem::VERSION} #{env_vars.join(' ')} docker-compose -f #{gem_root}/docker/docker-compose.yml up #{(extra_args + args).join(' ')}"
|
32
46
|
puts cmd
|
33
47
|
exec(cmd)
|
34
48
|
end
|
@@ -38,13 +52,20 @@ module EtFullSystem
|
|
38
52
|
def down(*args)
|
39
53
|
::Bundler.with_original_env do
|
40
54
|
gem_root = File.absolute_path('../../../..', __dir__)
|
41
|
-
cmd = "GEM_VERSION=#{EtFullSystem::VERSION} docker-compose -f #{gem_root}/docker/docker-compose.yml down #{args.join(' ')}"
|
55
|
+
cmd = "GEM_VERSION=#{EtFullSystem::VERSION} LOCALHOST_FROM_DOCKER_IP=#{host_ip} docker-compose -f #{gem_root}/docker/docker-compose.yml down #{args.join(' ')}"
|
42
56
|
puts cmd
|
43
57
|
exec(cmd)
|
44
58
|
end
|
45
59
|
end
|
46
60
|
|
47
61
|
default_task :up
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
def host_ip
|
66
|
+
result = JSON.parse `docker network inspect \`docker network list | grep docker_et_full_system | awk '{print $1}'\``
|
67
|
+
result.first.dig('IPAM', 'Config').first['Gateway']
|
68
|
+
end
|
48
69
|
end
|
49
70
|
end
|
50
71
|
end
|
@@ -139,7 +139,7 @@ module EtFullSystem
|
|
139
139
|
'api' => :et_api,
|
140
140
|
'et1' => :et1,
|
141
141
|
'et3' => :et3,
|
142
|
-
'et_ccd_export' => :
|
142
|
+
'et_ccd_export' => :et_ccd_export
|
143
143
|
}
|
144
144
|
file = lookup.fetch(service)
|
145
145
|
parsed = Dotenv.parse("#{GEM_PATH}/foreman/.env", "#{GEM_PATH}/foreman/#{file}.env")
|
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: 1.0.0.
|
4
|
+
version: 1.0.0.pre44
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gary Taylor
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|