et_full_system 6.0.0.pre.rc46 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 149cf23b6584c7eabf2d71a7329ea33f1ffbda6a416b4508c21b3c04749bb911
4
- data.tar.gz: db5b64ce61844cbb84d58091e4b072b06344dde3fa4a69a0c165255d084bb6f3
3
+ metadata.gz: bbfe3a02539b7acf289a8d885375ec10a931edb8e473e0c0a64d358b838315bd
4
+ data.tar.gz: c77cc0d1a2906f57f3707e6940223d1962c056d4482fdb6c636a5eec6d081b83
5
5
  SHA512:
6
- metadata.gz: ea827a399ee0e3ba6eda954753c6590da39b57e13464b30a98bdab199cdd784be946143d0a46b036ada178dc94cd7dcac6fc2617178fa4a50fb5c57626d4bc0b
7
- data.tar.gz: 9849f962c42dd42df8866cdebdd886b668af2f4d0c1efe5c63095a84a05a02b857dc4448884224f9bd4098ddb017c42fa7bf0a3e2a5c1f3dd6ed427d0b4d164b
6
+ metadata.gz: ad635e631aec27b5e2286724b6cb55592ddd4165723d04cfa18c90db2d6a52dcaaf963adf8056a00cf6bed89d5580d07631ef2aa2bd4632fa45c23c0db4d1b3f
7
+ data.tar.gz: 0e950ed0c1c129f717cc85e08684fb2b2195b3931473ba909e815037e55075632ddf8c5b952fa58e2e39f88ba7915e9c35dbc69062cc03d94ace0149a3118ce5
data/Gemfile.lock CHANGED
@@ -1,8 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- et_full_system (6.0.0.pre.rc46)
5
- aws-sdk-s3 (~> 1.9)
4
+ et_full_system (6.0.1)
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.4.4)
17
- activesupport (= 6.1.4.4)
18
- activesupport (6.1.4.4)
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.9)
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.4)
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.8.11)
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,12 @@ 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)
72
+ mini_portile2 (2.8.0)
91
73
  minitest (5.15.0)
92
74
  multi_xml (0.6.0)
93
75
  multipart-post (2.1.1)
94
- nokogiri (1.13.0)
95
- mini_portile2 (~> 2.7.0)
76
+ nokogiri (1.13.3)
77
+ mini_portile2 (~> 2.8.0)
96
78
  racc (~> 1.4)
97
79
  pastel (0.8.0)
98
80
  tty-color (~> 0.5)
@@ -100,7 +82,7 @@ GEM
100
82
  racc (1.6.0)
101
83
  rack (2.2.3)
102
84
  rake (13.0.1)
103
- roda (3.51.0)
85
+ roda (3.54.0)
104
86
  rack
105
87
  roda-enhanced_logger (0.4.0)
106
88
  roda (>= 3.19.0)
@@ -113,7 +95,7 @@ GEM
113
95
  pastel (~> 0.8)
114
96
  tzinfo (2.0.4)
115
97
  concurrent-ruby (~> 1.0)
116
- zeitwerk (2.5.3)
98
+ zeitwerk (2.5.4)
117
99
 
118
100
  PLATFORMS
119
101
  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)
@@ -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
@@ -155,20 +151,6 @@ services:
155
151
  - et_full_system
156
152
  volumes:
157
153
  - redis_data:/data
158
- minio:
159
- image: minio/minio
160
- labels:
161
- - traefik.http.routers.s3-router.rule=Host(`s3.et.127.0.0.1.nip.io`)
162
- - traefik.http.routers.s3-router.service=s3-service
163
- - traefik.http.services.s3-service.loadbalancer.server.port=9000
164
- command:
165
- - server
166
- - /data
167
- networks:
168
- - et_full_system
169
- environment:
170
- MINIO_ACCESS_KEY: accessKey1
171
- MINIO_SECRET_KEY: verySecretKey1
172
154
  mailhog:
173
155
  image: mailhog/mailhog:v1.0.1
174
156
  labels:
@@ -194,13 +176,11 @@ volumes:
194
176
  global_node_modules:
195
177
  et1_node_modules:
196
178
  et3_node_modules:
197
- s3_node_modules:
198
179
  api_node_modules:
199
180
  admin_node_modules:
200
181
  et1_assets:
201
182
  et3_assets:
202
183
  admin_assets:
203
- s3_data:
204
184
  azure_storage_data:
205
185
  et1_bundle:
206
186
  et3_bundle:
@@ -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
@@ -1,3 +1 @@
1
- S3_UPLOAD_BUCKET='etapibucket'
2
- S3_DIRECT_UPLOAD_BUCKET='etapidirectbucket'
3
1
  DB_NAME='et_api_production'
data/foreman/ports.env CHANGED
@@ -1,4 +1,3 @@
1
1
  ET1_PORT=3003
2
2
  ETAPI_PORT=3000
3
- S3_PORT=3002
4
- ET_ADMIN_PORT=3001
3
+ ET_ADMIN_PORT=3001
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, s3_web, azure_blob_web, fake_acas_web, fake_ccd_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, s3, azure blob, fake_acas, fake_ccd)'
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 S3 or Azure Blob storage"
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"`
@@ -6,6 +6,7 @@ module EtFullSystem
6
6
  require 'httparty'
7
7
  require 'et_full_system/cli/local/file_storage'
8
8
  require 'dotenv'
9
+ require 'tmpdir'
9
10
 
10
11
  class LocalCommand < Thor
11
12
  DEFAULT_BASE_URL="http://localhost:3200"
@@ -15,7 +16,7 @@ module EtFullSystem
15
16
 
16
17
  class RestProviderNotConfigured < RuntimeError; end
17
18
  class ServiceUrlIncorrect < RuntimeError; end
18
- desc "boot", "Sets up the server - traefik frontends and backends, along with initial data in local s3 and azure storage"
19
+ desc "boot", "Sets up the server - traefik frontends and backends, along with initial data in local azure storage"
19
20
  method_option :base_url, type: :string, default: DEFAULT_BASE_URL
20
21
  def boot
21
22
  STDERR.puts "boot - base_url is #{options[:base_url]}"
@@ -79,12 +80,10 @@ module EtFullSystem
79
80
 
80
81
 
81
82
  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, s3_web, azure_blob_web, fake_acas_web"
83
+ 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
84
  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
85
  method_option :rails_env, type: :string, default: ENV.fetch('RAILS_ENV', 'production')
86
- method_option :cloud_provider, type: :string, default: ENV.fetch('CLOUD_PROVIDER', 'amazon')
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)'
86
+ 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
87
  method_option :in_docker_compose, type: :boolean, default: false, desc: 'Set to true to assume certain services are in docker compose'
89
88
  def server
90
89
  puts "Scheduling traefik config and file storage config"
@@ -101,9 +100,9 @@ module EtFullSystem
101
100
  without = ['et1', 'et3', 'admin', 'api', 'ccd_export', 'atos_api']
102
101
  end
103
102
  if options.in_docker_compose?
104
- cmd = "CLOUD_PROVIDER=#{options[:cloud_provider]} 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"
103
+ 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
104
  else
106
- cmd = "CLOUD_PROVIDER=#{options[:cloud_provider]} RAILS_ENV=#{options[:rails_env]} AZURITE_STORAGE_PATH=\"#{options[:azurite_storage_path]}\" MINIO_STORAGE_PATH=\"#{options[:minio_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"
105
+ 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
106
  end
108
107
  STDERR.puts cmd
109
108
  unless without.empty?
@@ -129,7 +128,6 @@ module EtFullSystem
129
128
 
130
129
  desc "setup", "Sets up everything ready for first run"
131
130
  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
131
  method_option :in_docker_compose, type: :boolean, default: false, desc: 'Set to true to assume certain services are in docker compose'
134
132
  def setup
135
133
  setup_depencencies
@@ -351,7 +349,7 @@ module EtFullSystem
351
349
 
352
350
  def setup_et1_service
353
351
  puts "------------------------------------------------ SETTING UP ET1 SERVICE ---------------------------------------------------"
354
- cmd = "bash --login -c \"cd #{PROJECT_PATH}/systems/et1 && CLOUD_PROVIDER=#{options[:cloud_provider]} 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]}\""
352
+ 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
353
  puts cmd
356
354
  external_command cmd, 'et1 setup'
357
355
 
@@ -359,56 +357,56 @@ module EtFullSystem
359
357
  puts cmd
360
358
  external_command cmd, 'et1 setup'
361
359
 
362
- cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/et1 && CLOUD_PROVIDER=#{options[:cloud_provider]} 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\""
360
+ 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
361
  puts cmd
364
362
  external_command cmd, 'et1 setup'
365
363
  end
366
364
 
367
365
  def setup_et3_service
368
366
  puts "------------------------------------------------ SETTING UP ET3 SERVICE ---------------------------------------------------"
369
- cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/et3 && CLOUD_PROVIDER=#{options[:cloud_provider]} 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]}\""
367
+ 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
368
  puts cmd
371
369
  external_command cmd, 'et3 setup'
372
370
 
373
- cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/et3 && CLOUD_PROVIDER=#{options[:cloud_provider]} 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\""
371
+ 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
372
  puts cmd
375
373
  external_command cmd, 'et3 setup'
376
374
  end
377
375
 
378
376
  def setup_admin_service
379
377
  puts "------------------------------------------------ SETTING UP ADMIN SERVICE ---------------------------------------------------"
380
- cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/admin && CLOUD_PROVIDER=#{options[:cloud_provider]} 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]}\""
378
+ 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
379
  puts cmd
382
380
  external_command cmd, 'admin setup'
383
381
 
384
382
  puts "| Admin | Running rake commands"
385
- cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/admin && CLOUD_PROVIDER=#{options[:cloud_provider]} 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\""
383
+ 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
384
  puts cmd
387
385
  external_command cmd, 'admin setup'
388
386
  end
389
387
 
390
388
  def setup_api_service
391
389
  puts "------------------------------------------------ SETTING UP API SERVICE ---------------------------------------------------"
392
- cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/api && CLOUD_PROVIDER=#{options[:cloud_provider]} 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]}\""
390
+ 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
391
  puts cmd
394
392
  external_command cmd, 'api setup'
395
393
 
396
394
  puts "| API | Running rake commands"
397
- cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/api && CLOUD_PROVIDER=#{options[:cloud_provider]} 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\""
395
+ 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
396
  puts cmd
399
397
  external_command cmd, 'api setup'
400
398
  end
401
399
 
402
400
  def setup_atos_service
403
401
  puts "------------------------------------------------ SETTING UP ATOS SERVICE ---------------------------------------------------"
404
- cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/atos && CLOUD_PROVIDER=#{options[:cloud_provider]} 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]}\""
402
+ 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
403
  puts cmd
406
404
  external_command cmd, 'atos setup'
407
405
  end
408
406
 
409
407
  def setup_ccd_service
410
408
  puts "------------------------------------------------ SETTING UP CCD EXPORT SERVICE ---------------------------------------------------"
411
- cmd ="bash --login -c \"cd #{PROJECT_PATH}/systems/et_ccd_export && CLOUD_PROVIDER=#{options[:cloud_provider]} 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]}\""
409
+ 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
410
  puts cmd
413
411
  external_command cmd, 'ccd setup'
414
412
  end
@@ -1,3 +1,3 @@
1
1
  module EtFullSystem
2
- VERSION = "6.0.0.pre.rc46"
2
+ VERSION = "6.0.1"
3
3
  end
@@ -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.pre.rc46
4
+ version: 6.0.1
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-01-12 00:00:00.000000000 Z
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: 1.3.1
189
+ version: '0'
206
190
  requirements: []
207
191
  rubygems_version: 3.1.6
208
192
  signing_key:
data/foreman/minio.env DELETED
@@ -1,2 +0,0 @@
1
- MINIO_ACCESS_KEY=accessKey1
2
- MINIO_SECRET_KEY=verySecretKey1
data/foreman/s3/.env DELETED
@@ -1,5 +0,0 @@
1
- cd ../..
2
- mkdir -p tmp/S3DataPath
3
- mkdir -p tmp/S3MetadataPath
4
- export S3DATAPATH="$(pwd)/tmp/S3DataPath"
5
- export S3METADATAPATH="$(pwd)/tmp/S3MetadataPath"