et_full_system 6.0.0.pre.rc45 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +10 -30
- data/README.md +0 -2
- data/docker/docker-compose.yml +5 -23
- data/et_full_system.gemspec +1 -2
- data/foreman/.env +0 -6
- data/foreman/Procfile +0 -1
- data/foreman/et1.env +0 -7
- data/foreman/et_admin.env +0 -1
- data/foreman/et_api.env +0 -2
- data/foreman/et_atos.env +0 -2
- data/foreman/ports.env +1 -2
- data/foreman/traefik.json +0 -20
- data/lib/et_full_system/cli/docker/server.rb +2 -2
- data/lib/et_full_system/cli/local/file_storage.rb +1 -32
- data/lib/et_full_system/cli/local.rb +15 -18
- data/lib/et_full_system/version.rb +1 -1
- data/shell_scripts/run_foreman +0 -1
- metadata +4 -20
- data/foreman/minio.env +0 -2
- data/foreman/s3/.env +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a77bea1ee2f563453177a6870986039bfaf5ca10d719c119d82ae624877b5f50
|
4
|
+
data.tar.gz: 51e506e8f700c188855e067b98b0e2f145039e42d7dc040cbf34e8742fcd32d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a654aca1d710b7803697b83b36b42643c6da99444f54ba2f91adff1fd3ec7447272db0b7d0369702543ea079d9c025e3ae7da5ccff4dadf641041d6a3b438de5
|
7
|
+
data.tar.gz: 82a976c453f8b097b17b28894cde4f6783c415a92f293ab570f96570f45082b0a4cdb049d5ee1117850cd93389582bb56dfa6635b902515b3120ca376107c80a
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
et_full_system (6.0.0
|
5
|
-
aws-sdk-s3 (~> 1.9)
|
4
|
+
et_full_system (6.0.0)
|
6
5
|
azure-storage (~> 0.15.0.preview)
|
7
6
|
dotenv (~> 2.7, >= 2.7.2)
|
8
7
|
et_fake_ccd (~> 1.0)
|
@@ -13,9 +12,9 @@ PATH
|
|
13
12
|
GEM
|
14
13
|
remote: https://rubygems.org/
|
15
14
|
specs:
|
16
|
-
activemodel (6.1.
|
17
|
-
activesupport (= 6.1.
|
18
|
-
activesupport (6.1.
|
15
|
+
activemodel (6.1.5)
|
16
|
+
activesupport (= 6.1.5)
|
17
|
+
activesupport (6.1.5)
|
19
18
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
20
19
|
i18n (>= 1.6, < 2)
|
21
20
|
minitest (>= 5.1)
|
@@ -23,22 +22,6 @@ GEM
|
|
23
22
|
zeitwerk (~> 2.3)
|
24
23
|
addressable (2.8.0)
|
25
24
|
public_suffix (>= 2.0.2, < 5.0)
|
26
|
-
aws-eventstream (1.2.0)
|
27
|
-
aws-partitions (1.547.0)
|
28
|
-
aws-sdk-core (3.125.2)
|
29
|
-
aws-eventstream (~> 1, >= 1.0.2)
|
30
|
-
aws-partitions (~> 1, >= 1.525.0)
|
31
|
-
aws-sigv4 (~> 1.1)
|
32
|
-
jmespath (~> 1.0)
|
33
|
-
aws-sdk-kms (1.53.0)
|
34
|
-
aws-sdk-core (~> 3, >= 3.125.0)
|
35
|
-
aws-sigv4 (~> 1.1)
|
36
|
-
aws-sdk-s3 (1.111.1)
|
37
|
-
aws-sdk-core (~> 3, >= 3.125.0)
|
38
|
-
aws-sdk-kms (~> 1)
|
39
|
-
aws-sigv4 (~> 1.4)
|
40
|
-
aws-sigv4 (1.4.0)
|
41
|
-
aws-eventstream (~> 1, >= 1.0.2)
|
42
25
|
azure-core (0.1.15)
|
43
26
|
faraday (~> 0.9)
|
44
27
|
faraday_middleware (~> 0.10)
|
@@ -48,7 +31,7 @@ GEM
|
|
48
31
|
faraday (~> 0.9)
|
49
32
|
faraday_middleware (~> 0.10)
|
50
33
|
nokogiri (~> 1.6, >= 1.6.8)
|
51
|
-
concurrent-ruby (1.1.
|
34
|
+
concurrent-ruby (1.1.10)
|
52
35
|
dotenv (2.7.6)
|
53
36
|
et_fake_ccd (1.1.11)
|
54
37
|
activemodel (~> 6.1)
|
@@ -59,7 +42,7 @@ GEM
|
|
59
42
|
rotp (~> 6.2)
|
60
43
|
thor (~> 1.0)
|
61
44
|
tilt (~> 2.0, >= 2.0.9)
|
62
|
-
faraday (0.17.
|
45
|
+
faraday (0.17.5)
|
63
46
|
multipart-post (>= 1.2, < 3)
|
64
47
|
faraday_middleware (0.14.0)
|
65
48
|
faraday (>= 0.7.4, < 1.0)
|
@@ -74,10 +57,9 @@ GEM
|
|
74
57
|
httparty (0.20.0)
|
75
58
|
mime-types (~> 3.0)
|
76
59
|
multi_xml (>= 0.5.2)
|
77
|
-
i18n (1.
|
60
|
+
i18n (1.10.0)
|
78
61
|
concurrent-ruby (~> 1.0)
|
79
62
|
iodine (0.7.45)
|
80
|
-
jmespath (1.5.0)
|
81
63
|
json-schema (2.8.1)
|
82
64
|
addressable (>= 2.4)
|
83
65
|
jwt (2.3.0)
|
@@ -87,12 +69,10 @@ GEM
|
|
87
69
|
mime-types-data (~> 3.2015)
|
88
70
|
mime-types-data (3.2022.0105)
|
89
71
|
mini_mime (1.1.2)
|
90
|
-
mini_portile2 (2.7.1)
|
91
72
|
minitest (5.15.0)
|
92
73
|
multi_xml (0.6.0)
|
93
74
|
multipart-post (2.1.1)
|
94
|
-
nokogiri (1.13.
|
95
|
-
mini_portile2 (~> 2.7.0)
|
75
|
+
nokogiri (1.13.3-arm64-darwin)
|
96
76
|
racc (~> 1.4)
|
97
77
|
pastel (0.8.0)
|
98
78
|
tty-color (~> 0.5)
|
@@ -100,7 +80,7 @@ GEM
|
|
100
80
|
racc (1.6.0)
|
101
81
|
rack (2.2.3)
|
102
82
|
rake (13.0.1)
|
103
|
-
roda (3.
|
83
|
+
roda (3.54.0)
|
104
84
|
rack
|
105
85
|
roda-enhanced_logger (0.4.0)
|
106
86
|
roda (>= 3.19.0)
|
@@ -113,7 +93,7 @@ GEM
|
|
113
93
|
pastel (~> 0.8)
|
114
94
|
tzinfo (2.0.4)
|
115
95
|
concurrent-ruby (~> 1.0)
|
116
|
-
zeitwerk (2.5.
|
96
|
+
zeitwerk (2.5.4)
|
117
97
|
|
118
98
|
PLATFORMS
|
119
99
|
ruby
|
data/README.md
CHANGED
@@ -29,7 +29,6 @@ There are other services as well that are run - which are there for testing - th
|
|
29
29
|
|
30
30
|
* et-fake-acas-server (https://github.com/ministryofjustice/et_fake_acas_server) - Provides a fake ACAS server with predictable responses based on various special certificate numbers
|
31
31
|
* mailhog (https://github.com/mailhog/MailHog) - Captures all emails sent to allow the test suite or the developer to view them and check them
|
32
|
-
* minio (https://github.com/minio/minio) - A local amazon S3 server to avoid having S3 credentials for every environment
|
33
32
|
* azurite (https://github.com/Azure/Azurite) - A local azure blob server to avoid having azure credentials for every environment
|
34
33
|
|
35
34
|
|
@@ -49,7 +48,6 @@ To run without docker, you need a few tools
|
|
49
48
|
|
50
49
|
* Traefik (https://traefik.io)
|
51
50
|
* Mailhog (https://github.com/mailhog/MailHog)
|
52
|
-
* Minio (https://github.com/minio/minio)
|
53
51
|
* Azurite (https://github.com/Azure/Azurite)
|
54
52
|
* godotenv (https://github.com/joho/godotenv)
|
55
53
|
* freeport (https://github.com/phayes/freeport)
|
data/docker/docker-compose.yml
CHANGED
@@ -15,7 +15,6 @@ services:
|
|
15
15
|
networks:
|
16
16
|
et_full_system:
|
17
17
|
aliases:
|
18
|
-
- s3.${SERVER_DOMAIN:-et.127.0.0.1.nip.io}
|
19
18
|
- azure_blob_storage.${SERVER_DOMAIN:-et.127.0.0.1.nip.io}
|
20
19
|
- notify.${SERVER_DOMAIN:-et.127.0.0.1.nip.io}
|
21
20
|
- api.${SERVER_DOMAIN:-et.127.0.0.1.nip.io}
|
@@ -30,7 +29,6 @@ services:
|
|
30
29
|
links:
|
31
30
|
- db
|
32
31
|
- redis
|
33
|
-
- minio
|
34
32
|
- azurite
|
35
33
|
- mailhog
|
36
34
|
- et
|
@@ -45,7 +43,6 @@ services:
|
|
45
43
|
links:
|
46
44
|
- db
|
47
45
|
- redis
|
48
|
-
- minio
|
49
46
|
- azurite
|
50
47
|
- mailhog
|
51
48
|
depends_on:
|
@@ -53,7 +50,6 @@ services:
|
|
53
50
|
- redis
|
54
51
|
- azurite
|
55
52
|
- mailhog
|
56
|
-
- minio
|
57
53
|
extra_hosts:
|
58
54
|
- "localhost.from.docker:${LOCALHOST_FROM_DOCKER_IP}"
|
59
55
|
volumes:
|
@@ -67,7 +63,6 @@ services:
|
|
67
63
|
- et1_assets:/home/app/full_system/systems/et1/public/apply/assets
|
68
64
|
- et3_assets:/home/app/full_system/systems/et3/public/assets
|
69
65
|
- admin_assets:/home/app/full_system/systems/admin/public/assets
|
70
|
-
- s3_data:/home/app/minio_data
|
71
66
|
- et1_bundle:/home/app/full_system/systems/et1/.bundle
|
72
67
|
- et3_bundle:/home/app/full_system/systems/et3/.bundle
|
73
68
|
- api_bundle:/home/app/full_system/systems/api/.bundle
|
@@ -94,9 +89,7 @@ services:
|
|
94
89
|
REDIS_HOST: redis
|
95
90
|
SERVER_PORT: ${SERVER_PORT:-3100}
|
96
91
|
SERVER_DOMAIN: ${SERVER_DOMAIN:-et.127.0.0.1.nip.io}
|
97
|
-
CLOUD_PROVIDER: ${CLOUD_PROVIDER:-azure}
|
98
92
|
AZURITE_STORAGE_PATH: /home/app/azure_storage_data
|
99
|
-
MINIO_STORAGE_PATH: /home/app/minio_data
|
100
93
|
SHOW_DOWNTIME_BANNER:
|
101
94
|
CCD_AUTH_BASE_URL: ${CCD_AUTH_BASE_URL:-http://ccd.et.127.0.0.1.nip.io:3100/auth}
|
102
95
|
CCD_IDAM_BASE_URL: ${CCD_IDAM_BASE_URL:-http://ccd.et.127.0.0.1.nip.io:3100/idam}
|
@@ -107,6 +100,9 @@ services:
|
|
107
100
|
CCD_MICROSERVICE_SECRET: ${CCD_MICROSERVICE_SECRET:-AAAAAAAAAAAAAAAC}
|
108
101
|
CCD_SIDAM_USERNAME: ${CCD_SIDAM_USERNAME:-m@m.com}
|
109
102
|
CCD_SIDAM_PASSWORD: ${CCD_SIDAM_PASSWORD:-p}
|
103
|
+
MAINTENANCE_ENABLED:
|
104
|
+
MAINTENANCE_END:
|
105
|
+
MAINTENANCE_ALLOWED_IPS:
|
110
106
|
command: /bin/bash --login -c "cd /home/app/full_system && et_full_system local server --in-docker-compose ${SERVER_ARGS}"
|
111
107
|
networks:
|
112
108
|
- et_full_system
|
@@ -145,6 +141,8 @@ services:
|
|
145
141
|
- "${DB_PORT:-0}:5432"
|
146
142
|
volumes:
|
147
143
|
- db_data:/var/lib/postgresql/data
|
144
|
+
environment:
|
145
|
+
POSTGRES_HOST_AUTH_METHOD: trust
|
148
146
|
redis:
|
149
147
|
image: redis
|
150
148
|
ports:
|
@@ -153,20 +151,6 @@ services:
|
|
153
151
|
- et_full_system
|
154
152
|
volumes:
|
155
153
|
- redis_data:/data
|
156
|
-
minio:
|
157
|
-
image: minio/minio
|
158
|
-
labels:
|
159
|
-
- traefik.http.routers.s3-router.rule=Host(`s3.et.127.0.0.1.nip.io`)
|
160
|
-
- traefik.http.routers.s3-router.service=s3-service
|
161
|
-
- traefik.http.services.s3-service.loadbalancer.server.port=9000
|
162
|
-
command:
|
163
|
-
- server
|
164
|
-
- /data
|
165
|
-
networks:
|
166
|
-
- et_full_system
|
167
|
-
environment:
|
168
|
-
MINIO_ACCESS_KEY: accessKey1
|
169
|
-
MINIO_SECRET_KEY: verySecretKey1
|
170
154
|
mailhog:
|
171
155
|
image: mailhog/mailhog:v1.0.1
|
172
156
|
labels:
|
@@ -192,13 +176,11 @@ volumes:
|
|
192
176
|
global_node_modules:
|
193
177
|
et1_node_modules:
|
194
178
|
et3_node_modules:
|
195
|
-
s3_node_modules:
|
196
179
|
api_node_modules:
|
197
180
|
admin_node_modules:
|
198
181
|
et1_assets:
|
199
182
|
et3_assets:
|
200
183
|
admin_assets:
|
201
|
-
s3_data:
|
202
184
|
azure_storage_data:
|
203
185
|
et1_bundle:
|
204
186
|
et3_bundle:
|
data/et_full_system.gemspec
CHANGED
@@ -24,11 +24,10 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
spec.add_dependency 'thor', '~> 1.0'
|
26
26
|
spec.add_dependency 'httparty', '~> 0.16'
|
27
|
-
spec.add_dependency 'aws-sdk-s3', '~> 1.9'
|
28
27
|
spec.add_dependency 'azure-storage', '~> 0.15.0.preview'
|
29
28
|
spec.add_dependency 'dotenv', '~> 2.7', '>= 2.7.2'
|
30
29
|
spec.add_dependency 'et_fake_ccd', '~> 1.0'
|
31
30
|
spec.add_dependency 'gov_fake_notify', '~> 1.1'
|
32
|
-
|
31
|
+
|
33
32
|
spec.add_development_dependency "rake", "~> 13.0"
|
34
33
|
end
|
data/foreman/.env
CHANGED
@@ -9,11 +9,6 @@ WEB_CONCURRENCY=1
|
|
9
9
|
SECRET_KEY_BASE=sdlkjewfkjhfviuhduihenrjk435r89esfd7cv983qh2n4r3q27yh4u5rtfg
|
10
10
|
SMTP_HOSTNAME='mail.et.127.0.0.1.nip.io'
|
11
11
|
SMTP_PORT=1025
|
12
|
-
AWS_ACCESS_KEY_ID=accessKey1
|
13
|
-
AWS_SECRET_ACCESS_KEY=verySecretKey1
|
14
|
-
AWS_REGION='us-east-1'
|
15
|
-
AWS_ENDPOINT='http://s3.et.127.0.0.1.nip.io:3100'
|
16
|
-
AWS_S3_FORCE_PATH_STYLE='true'
|
17
12
|
RAILS_SERVE_STATIC_FILES='true'
|
18
13
|
ATOS_API_URL="http://atos.et.127.0.0.1.nip.io:3100"
|
19
14
|
ACAS_API_URL="http://api.et.127.0.0.1.nip.io:3100/et_acas_api"
|
@@ -21,7 +16,6 @@ ATOS_API_USERNAME='atos'
|
|
21
16
|
ATOS_API_PASSWORD='password'
|
22
17
|
RAILS_MAX_THREADS=5
|
23
18
|
AZURITE_STORAGE_PATH=${AZURITE_STORAGE_PATH}
|
24
|
-
MINIO_STORAGE_PATH=${MINIO_STORAGE_PATH}
|
25
19
|
DISABLE_CLOUDWATCH='true'
|
26
20
|
AZURE_STORAGE_BLOB_HOST='http://azure_blob_storage.et.127.0.0.1.nip.io:3100'
|
27
21
|
AZURE_STORAGE_BLOB_FORCE_PATH_STYLE='true'
|
data/foreman/Procfile
CHANGED
@@ -7,7 +7,6 @@ api_web: export FREEPORT=$(freeport) && godotenv -f ${FOREMAN_PATH}/.env godoten
|
|
7
7
|
api_sidekiq: bash --login -c "cd ${FS_ROOT_PATH} && et_full_system local wait_for_support && cd systems/api && godotenv -f ${FOREMAN_PATH}/.env godotenv -f ${FOREMAN_PATH}/et_api.env ./run_sidekiq.sh"
|
8
8
|
admin_web: export FREEPORT=$(freeport) && godotenv -f ${FOREMAN_PATH}/.env godotenv -f ${FOREMAN_PATH}/et_admin.env bash --login -c "cd ${FS_ROOT_PATH} && et_full_system local wait_for_support && et_full_system local update_service_url admin http://localhost:$FREEPORT && cd systems/admin && PORT=$FREEPORT ./run.sh"
|
9
9
|
atos_api_web: export FREEPORT=$(freeport) && godotenv -f ${FOREMAN_PATH}/.env godotenv -f ${FOREMAN_PATH}/et_atos.env bash --login -c "cd ${FS_ROOT_PATH} && et_full_system local wait_for_support && et_full_system local update_service_url atos_api http://localhost:$FREEPORT && cd systems/atos && PORT=$FREEPORT ./run.sh"
|
10
|
-
s3_web: bash --login -c "godotenv -f ${FOREMAN_PATH}/minio.env minio server ${MINIO_STORAGE_PATH}"
|
11
10
|
azure_blob_web: bash --login -c "azurite -l ${AZURITE_STORAGE_PATH} -d ${AZURITE_STORAGE_PATH}/debug.log"
|
12
11
|
fake_acas_web: export FREEPORT=$(freeport) && bash --login -c "cd ${FS_ROOT_PATH} && et_full_system local wait_for_support && et_full_system local update_service_url fake_acas http://localhost:$FREEPORT && rvm use && et_fake_acas_server -port $FREEPORT -threads=1 -workers=2"
|
13
12
|
fake_ccd_web: export FREEPORT=$(freeport) && bash --login -c "cd ${FS_ROOT_PATH} && et_full_system local wait_for_support && et_full_system local update_service_url fake_ccd http://localhost:$FREEPORT && rvm use && et_fake_ccd start --port=$FREEPORT --create_case_schema=./systems/et_ccd_export/spec/json_schemas/case_create.json"
|
data/foreman/et1.env
CHANGED
@@ -2,14 +2,7 @@ HTTP_OPEN_TIMEOUT_S=15
|
|
2
2
|
HTTP_READ_TIMEOUT_S=15
|
3
3
|
REDIS_DATABASE=5
|
4
4
|
DB_NAME=etdb
|
5
|
-
S3_UPLOAD_BUCKET='et1bucket'
|
6
5
|
RAVEN_DSN='https://1b78623c8bab4dfb9aeb6f5dbb31ae34:0f4a38359e7e47f99e7e69449b32ef2b@sentry.io/1355286'
|
7
|
-
AWS_ACCESS_KEY_ID=accessKey1
|
8
|
-
AWS_SECRET_ACCESS_KEY=verySecretKey1
|
9
|
-
S3_UPLOAD_BUCKET=et1bucket
|
10
|
-
AWS_REGION=us-east-1
|
11
|
-
AWS_ENDPOINT=http://s3.et.127.0.0.1.nip.io:3100
|
12
|
-
AWS_S3_FORCE_PATH_STYLE=true
|
13
6
|
ET_API_URL='http://api.et.127.0.0.1.nip.io:3100/api/v2'
|
14
7
|
SECURE_SESSION_COOKIE=false
|
15
8
|
SENDING_HOST=et1.et.127.0.0.1.nip.io
|
data/foreman/et_admin.env
CHANGED
@@ -3,6 +3,5 @@ REDIS_DATABASE=2
|
|
3
3
|
DB_NAME='et_api_production'
|
4
4
|
RAILS_SERVE_STATIC_FILES='true'
|
5
5
|
SEED_EXAMPLE_USERS='true'
|
6
|
-
S3_UPLOAD_BUCKET='etapibucket'
|
7
6
|
RAVEN_DSN='https://ff44444af15e43a287fa10eb4f3fd825:b5764132fc3a42e98d8a7f8ba3042a90@sentry.io/1389908'
|
8
7
|
ET_API_URL='http://api.et.127.0.0.1.nip.io:3100/api'
|
data/foreman/et_api.env
CHANGED
@@ -2,8 +2,6 @@ WEB_CONCURRENCY=1
|
|
2
2
|
SECRET_KEY_BASE=sdlkjewfkjhfviuhduihenrjk435r89esfd7cv983qh2n4r3q27yh4u5rtfg
|
3
3
|
REDIS_DATABASE=2
|
4
4
|
DB_NAME='et_api_production'
|
5
|
-
S3_UPLOAD_BUCKET='etapibucket'
|
6
|
-
S3_DIRECT_UPLOAD_BUCKET='etapidirectbucket'
|
7
5
|
RAVEN_DSN='https://929365547a42468fb521248a96100646:139af8327fa340b88088efeae059fca8@sentry.io/1254109'
|
8
6
|
ACAS_SERVICE_URL='http://acas.et.127.0.0.1.nip.io:3100/Lookup/ECService.svc'
|
9
7
|
DISABLE_SIDEKIQ_ALIVE=true
|
data/foreman/et_atos.env
CHANGED
data/foreman/ports.env
CHANGED
data/foreman/traefik.json
CHANGED
@@ -40,14 +40,6 @@
|
|
40
40
|
}
|
41
41
|
}
|
42
42
|
},
|
43
|
-
"s3": {
|
44
|
-
"servers": {
|
45
|
-
"web": {
|
46
|
-
"url": "http://localhost:9000",
|
47
|
-
"weight": 1
|
48
|
-
}
|
49
|
-
}
|
50
|
-
},
|
51
43
|
"mail": {
|
52
44
|
"servers": {
|
53
45
|
"web": {
|
@@ -152,18 +144,6 @@
|
|
152
144
|
}
|
153
145
|
}
|
154
146
|
},
|
155
|
-
"s3": {
|
156
|
-
"entryPoints": [
|
157
|
-
"http"
|
158
|
-
],
|
159
|
-
"backend": "s3",
|
160
|
-
"passHostHeader": true,
|
161
|
-
"routes": {
|
162
|
-
"test_1": {
|
163
|
-
"rule": "Host:s3.et.127.0.0.1.nip.io"
|
164
|
-
}
|
165
|
-
}
|
166
|
-
},
|
167
147
|
"mail": {
|
168
148
|
"entryPoints": [
|
169
149
|
"http"
|
@@ -7,10 +7,10 @@ module EtFullSystem
|
|
7
7
|
class ServerCommand < Thor
|
8
8
|
BEFORE_BOOT_SCRIPT =
|
9
9
|
desc "up", "Starts the full system server on docker"
|
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,
|
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, 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 :minimal, type: :boolean, default: false, desc: 'Set to true to only start the minimum (db, redis, mail,
|
13
|
+
method_option :minimal, type: :boolean, default: false, desc: 'Set to true to only start the minimum (db, redis, mail, azure blob, fake_acas, fake_ccd)'
|
14
14
|
def up(*args)
|
15
15
|
unbundled do
|
16
16
|
server_args = []
|
@@ -3,7 +3,6 @@ module EtFullSystem
|
|
3
3
|
# frozen_string_literal: true
|
4
4
|
require "rubygems"
|
5
5
|
require "thor"
|
6
|
-
require 'aws-sdk-s3'
|
7
6
|
require 'azure/storage'
|
8
7
|
|
9
8
|
module Cli
|
@@ -11,9 +10,8 @@ module EtFullSystem
|
|
11
10
|
class FileStorageCommand < Thor
|
12
11
|
GEM_PATH = File.absolute_path('../../../..', __dir__)
|
13
12
|
|
14
|
-
desc "setup", "Primes the storage account(s) for running locally - i.e. using local
|
13
|
+
desc "setup", "Primes the storage account(s) for running locally - i.e. using local Azure Blob storage"
|
15
14
|
def setup_storage
|
16
|
-
setup_s3_storage
|
17
15
|
setup_azure_storage
|
18
16
|
end
|
19
17
|
|
@@ -24,35 +22,6 @@ module EtFullSystem
|
|
24
22
|
Bundler.send(method, &block)
|
25
23
|
end
|
26
24
|
|
27
|
-
def setup_s3_storage
|
28
|
-
config = {
|
29
|
-
region: ENV.fetch('AWS_REGION', 'us-east-1'),
|
30
|
-
access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID', 'accessKey1'),
|
31
|
-
secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY', 'verySecretKey1'),
|
32
|
-
endpoint: ENV.fetch('AWS_ENDPOINT', 'http://s3.et.127.0.0.1.nip.io:3100/'),
|
33
|
-
force_path_style: ENV.fetch('AWS_S3_FORCE_PATH_STYLE', 'true') == 'true'
|
34
|
-
}
|
35
|
-
s3 = Aws::S3::Client.new(config)
|
36
|
-
retry_countdown = 10
|
37
|
-
begin
|
38
|
-
Aws::S3::Bucket.new(client: s3, name: 'et1bucket').tap do |bucket|
|
39
|
-
bucket.create unless bucket.exists?
|
40
|
-
end
|
41
|
-
Aws::S3::Bucket.new(client: s3, name: 'etapibucket').tap do |bucket|
|
42
|
-
bucket.create unless bucket.exists?
|
43
|
-
end
|
44
|
-
rescue Seahorse::Client::NetworkingError, Aws::S3::Errors::NotFound, Aws::S3::Errors::Http502Error, Aws::Errors::ServiceError
|
45
|
-
retry_countdown -= 1
|
46
|
-
if retry_countdown.zero?
|
47
|
-
fail "Could not connect to the S3 server after 10 retries"
|
48
|
-
else
|
49
|
-
STDERR.puts "Retrying connection to S3 server in 30 seconds"
|
50
|
-
sleep 30
|
51
|
-
retry
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
25
|
def setup_azure_storage
|
57
26
|
unbundled do
|
58
27
|
puts `bash --login -c "export RAILS_ENV=production && cd systems/api && godotenv -f \"#{GEM_PATH}/foreman/.env\" godotenv -f \"#{GEM_PATH}/foreman/et_api.env\" bundle exec rails configure_azure_storage_containers configure_azure_storage_cors"`
|
@@ -15,7 +15,7 @@ module EtFullSystem
|
|
15
15
|
|
16
16
|
class RestProviderNotConfigured < RuntimeError; end
|
17
17
|
class ServiceUrlIncorrect < RuntimeError; end
|
18
|
-
desc "boot", "Sets up the server - traefik frontends and backends, along with initial data in local
|
18
|
+
desc "boot", "Sets up the server - traefik frontends and backends, along with initial data in local azure storage"
|
19
19
|
method_option :base_url, type: :string, default: DEFAULT_BASE_URL
|
20
20
|
def boot
|
21
21
|
STDERR.puts "boot - base_url is #{options[:base_url]}"
|
@@ -79,12 +79,10 @@ module EtFullSystem
|
|
79
79
|
|
80
80
|
|
81
81
|
desc "server", "Starts the full system server"
|
82
|
-
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,
|
82
|
+
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, azure_blob_web, fake_acas_web"
|
83
83
|
method_option :azurite_storage_path, default: ENV.fetch('AZURITE_STORAGE_PATH', '/tmp/azurite_storage'), desc: "Where to store azurite data"
|
84
|
-
method_option :minio_storage_path, default: ENV.fetch('MINIO_STORAGE_PATH', '/tmp/minio_storage'), desc: "Where to store minio data"
|
85
84
|
method_option :rails_env, type: :string, default: ENV.fetch('RAILS_ENV', 'production')
|
86
|
-
method_option :
|
87
|
-
method_option :minimal, type: :boolean, default: false, desc: 'Set to true to only start the minimum (db, redis, mail, s3, azure blob, fake_acas, fake_ccd)'
|
85
|
+
method_option :minimal, type: :boolean, default: false, desc: 'Set to true to only start the minimum (db, redis, mail, azure blob, fake_acas, fake_ccd)'
|
88
86
|
method_option :in_docker_compose, type: :boolean, default: false, desc: 'Set to true to assume certain services are in docker compose'
|
89
87
|
def server
|
90
88
|
puts "Scheduling traefik config and file storage config"
|
@@ -101,9 +99,9 @@ module EtFullSystem
|
|
101
99
|
without = ['et1', 'et3', 'admin', 'api', 'ccd_export', 'atos_api']
|
102
100
|
end
|
103
101
|
if options.in_docker_compose?
|
104
|
-
cmd = "
|
102
|
+
cmd = "RAILS_ENV=#{options[:rails_env]} FS_ROOT_PATH=#{PROJECT_PATH} FOREMAN_PATH=#{GEM_PATH}/foreman godotenv -f #{GEM_PATH}/foreman/.env invoker start \"#{GEM_PATH}/foreman/ComposeProcfile\" --port=4000"
|
105
103
|
else
|
106
|
-
cmd = "
|
104
|
+
cmd = "RAILS_ENV=#{options[:rails_env]} AZURITE_STORAGE_PATH=\"#{options[:azurite_storage_path]}\" FS_ROOT_PATH=#{PROJECT_PATH} FOREMAN_PATH=#{GEM_PATH}/foreman godotenv -f #{GEM_PATH}/foreman/.env invoker start \"#{GEM_PATH}/foreman/Procfile\" --port=4000"
|
107
105
|
end
|
108
106
|
STDERR.puts cmd
|
109
107
|
unless without.empty?
|
@@ -129,7 +127,6 @@ module EtFullSystem
|
|
129
127
|
|
130
128
|
desc "setup", "Sets up everything ready for first run"
|
131
129
|
method_option :rails_env, type: :string, default: ENV.fetch('RAILS_ENV', 'production')
|
132
|
-
method_option :cloud_provider, type: :string, default: ENV.fetch('CLOUD_PROVIDER', 'amazon')
|
133
130
|
method_option :in_docker_compose, type: :boolean, default: false, desc: 'Set to true to assume certain services are in docker compose'
|
134
131
|
def setup
|
135
132
|
setup_depencencies
|
@@ -351,7 +348,7 @@ module EtFullSystem
|
|
351
348
|
|
352
349
|
def setup_et1_service
|
353
350
|
puts "------------------------------------------------ SETTING UP ET1 SERVICE ---------------------------------------------------"
|
354
|
-
cmd = "bash --login -c \"cd #{PROJECT_PATH}/systems/et1
|
351
|
+
cmd = "bash --login -c \"cd #{PROJECT_PATH}/systems/et1 RAILS_ENV=#{options[:rails_env]} godotenv -f \"#{GEM_PATH}/foreman/.env\" godotenv -f \"#{GEM_PATH}/foreman/et1.env\" gem install bundler:1.17.3 && bundle install --with=#{options[:rails_env]}\""
|
355
352
|
puts cmd
|
356
353
|
external_command cmd, 'et1 setup'
|
357
354
|
|
@@ -359,56 +356,56 @@ module EtFullSystem
|
|
359
356
|
puts cmd
|
360
357
|
external_command cmd, 'et1 setup'
|
361
358
|
|
362
|
-
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/et1
|
359
|
+
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/et1 RAILS_ENV=#{options[:rails_env]} godotenv -f \"#{GEM_PATH}/foreman/.env\" godotenv -f \"#{GEM_PATH}/foreman/et1.env\" bundle exec rake db:create db:migrate assets:precompile\""
|
363
360
|
puts cmd
|
364
361
|
external_command cmd, 'et1 setup'
|
365
362
|
end
|
366
363
|
|
367
364
|
def setup_et3_service
|
368
365
|
puts "------------------------------------------------ SETTING UP ET3 SERVICE ---------------------------------------------------"
|
369
|
-
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/et3
|
366
|
+
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/et3 RAILS_ENV=#{options[:rails_env]} godotenv -f \"#{GEM_PATH}/foreman/.env\" godotenv -f \"#{GEM_PATH}/foreman/et3.env\" gem install bundler:1.17.3 && bundle install --with=#{options[:rails_env]}\""
|
370
367
|
puts cmd
|
371
368
|
external_command cmd, 'et3 setup'
|
372
369
|
|
373
|
-
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/et3
|
370
|
+
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/et3 RAILS_ENV=#{options[:rails_env]} godotenv -f \"#{GEM_PATH}/foreman/.env\" godotenv -f \"#{GEM_PATH}/foreman/et3.env\" bundle exec rake db:create db:migrate assets:precompile\""
|
374
371
|
puts cmd
|
375
372
|
external_command cmd, 'et3 setup'
|
376
373
|
end
|
377
374
|
|
378
375
|
def setup_admin_service
|
379
376
|
puts "------------------------------------------------ SETTING UP ADMIN SERVICE ---------------------------------------------------"
|
380
|
-
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/admin
|
377
|
+
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/admin RAILS_ENV=#{options[:rails_env]} godotenv -f \"#{GEM_PATH}/foreman/.env\" godotenv -f \"#{GEM_PATH}/foreman/et_admin.env\" gem install bundler:1.17.3 && bundle install --with=#{options[:rails_env]}\""
|
381
378
|
puts cmd
|
382
379
|
external_command cmd, 'admin setup'
|
383
380
|
|
384
381
|
puts "| Admin | Running rake commands"
|
385
|
-
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/admin
|
382
|
+
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/admin RAILS_ENV=#{options[:rails_env]} godotenv -f \"#{GEM_PATH}/foreman/.env\" godotenv -f \"#{GEM_PATH}/foreman/et_admin.env\" bundle exec rake db:seed assets:precompile\""
|
386
383
|
puts cmd
|
387
384
|
external_command cmd, 'admin setup'
|
388
385
|
end
|
389
386
|
|
390
387
|
def setup_api_service
|
391
388
|
puts "------------------------------------------------ SETTING UP API SERVICE ---------------------------------------------------"
|
392
|
-
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/api
|
389
|
+
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/api RAILS_ENV=#{options[:rails_env]} godotenv -f \"#{GEM_PATH}/foreman/.env\" godotenv -f \"#{GEM_PATH}/foreman/et_api.env\" gem install bundler:1.17.3 && bundle install --with=#{options[:rails_env]}\""
|
393
390
|
puts cmd
|
394
391
|
external_command cmd, 'api setup'
|
395
392
|
|
396
393
|
puts "| API | Running rake commands"
|
397
|
-
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/api
|
394
|
+
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/api RAILS_ENV=#{options[:rails_env]} godotenv -f \"#{GEM_PATH}/foreman/.env\" godotenv -f \"#{GEM_PATH}/foreman/et_api.env\" bundle exec rake db:create db:migrate db:seed\""
|
398
395
|
puts cmd
|
399
396
|
external_command cmd, 'api setup'
|
400
397
|
end
|
401
398
|
|
402
399
|
def setup_atos_service
|
403
400
|
puts "------------------------------------------------ SETTING UP ATOS SERVICE ---------------------------------------------------"
|
404
|
-
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/atos
|
401
|
+
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/atos RAILS_ENV=#{options[:rails_env]} godotenv -f \"#{GEM_PATH}/foreman/.env\" godotenv -f \"#{GEM_PATH}/foreman/et_atos.env\" gem install bundler:1.17.3 && bundle install --with=#{options[:rails_env]}\""
|
405
402
|
puts cmd
|
406
403
|
external_command cmd, 'atos setup'
|
407
404
|
end
|
408
405
|
|
409
406
|
def setup_ccd_service
|
410
407
|
puts "------------------------------------------------ SETTING UP CCD EXPORT SERVICE ---------------------------------------------------"
|
411
|
-
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/et_ccd_export
|
408
|
+
cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/et_ccd_export RAILS_ENV=#{options[:rails_env]} godotenv -f \"#{GEM_PATH}/foreman/.env\" godotenv -f \"#{GEM_PATH}/foreman/et_ccd_export.env\" gem install bundler:1.17.3 && bundle install --with=#{options[:rails_env]}\""
|
412
409
|
puts cmd
|
413
410
|
external_command cmd, 'ccd setup'
|
414
411
|
end
|
data/shell_scripts/run_foreman
CHANGED
@@ -17,7 +17,6 @@ sudo chown app:app /home/app/full_system/systems/et3/.bundle
|
|
17
17
|
sudo chown app:app /home/app/full_system/systems/api/.bundle
|
18
18
|
sudo chown app:app /home/app/full_system/systems/admin/.bundle
|
19
19
|
sudo chown app:app /home/app/full_system/systems/atos/.bundle
|
20
|
-
sudo chown app:app /home/app/minio_data
|
21
20
|
sudo chown app:app /home/app/azure_storage_data
|
22
21
|
|
23
22
|
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
|
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: 6.0.0
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gary Taylor
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.16'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: aws-sdk-s3
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '1.9'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '1.9'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: azure-storage
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -169,9 +155,7 @@ files:
|
|
169
155
|
- foreman/fake_notify.env
|
170
156
|
- foreman/gov_fake_notify.yaml
|
171
157
|
- foreman/mailhog.env
|
172
|
-
- foreman/minio.env
|
173
158
|
- foreman/ports.env
|
174
|
-
- foreman/s3/.env
|
175
159
|
- foreman/traefik.json
|
176
160
|
- foreman/traefik.toml
|
177
161
|
- lib/et_full_system.rb
|
@@ -200,9 +184,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
200
184
|
version: '0'
|
201
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
186
|
requirements:
|
203
|
-
- - "
|
187
|
+
- - ">="
|
204
188
|
- !ruby/object:Gem::Version
|
205
|
-
version:
|
189
|
+
version: '0'
|
206
190
|
requirements: []
|
207
191
|
rubygems_version: 3.1.6
|
208
192
|
signing_key:
|
data/foreman/minio.env
DELETED