Skip to content

Commit 12146ba

Browse files
authored
Remove AWS S3 from the service (#8594)
## Trello card URL Follow up on: https://trello.com/c/UtzBnbCV/2097-move-from-aws-s3-to-azure-storage ## Changes in this PR: - Remove S3 & Mirror Active Storage Services. - Remove already run rake tasks from migration to Azure. ## Checklists: ### Data & Schema Changes If this PR modifies data structures or validations, check the following: - [ ] Adds/removes model validations - [ ] Adds/removes database fields - [ ] Modifies Vacancy enumerables (phases, working patterns, job roles, key stages, etc.) <details> <summary>If any of the above options has changed then the author must check/resolve all of the following...</summary> ### Integration Impact Does this change affect any of these integrations? - [ ] DfE Analytics platform - [ ] Legacy imports mappings - [ ] DWP Find a Job export mappings - [ ] Publisher ATS API (may require mapping updates or API versioning) ### User Experience & Data Integrity Could this change impact: - [ ] Existing subscription alerts (will legacy subscription search filters break?) - [ ] Legacy vacancy copying (will copied vacancies fail new validations?) - [ ] In-progress drafts for Vacancies or Job Applications </details>
1 parent 21f879e commit 12146ba

File tree

10 files changed

+0
-392
lines changed

10 files changed

+0
-392
lines changed

.env.development

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
ATS_API_CLIENT_TESTING_API_KEY=a94272cb45956f2116f3026847ebb640dc60a2fe
22
DFE_SIGN_IN_REDIRECT_URL=http://localhost:3000/auth/dfe/callback
33
DISABLE_EMAILS=false
4-
DOCUMENTS_S3_BUCKET=test_bucket
54
DOMAIN=localhost:3000
65
LOCKBOX_MASTER_KEY=0000000000000000000000000000000000000000000000000000000000000000
76
RAILS_DEVELOPMENT_HOSTS=.app.github.dev
8-
SCHOOLS_IMAGES_LOGOS_S3_BUCKET=test_bucket
97
SECRET_KEY_BASE=352f2c2ccf5a9a77d8cc91fade3685dda45407f329c14ed0b8e4c2d6618d8475e4e4416bf20eeeec46558384ea9c9e2de97b85e20c47adb93d914576ed6b69d4
108
SENTRY_DSN=
119
SENTRY_FRONTEND_DSN=

.env.test

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ BIGQUERY_TABLE_NAME=test_events
1919
BIGQUERY_PROJECT_ID=teacher-vacancy-service
2020
BIGQUERY_DATASET=testing_dataset
2121
BIG_QUERY_API_JSON_KEY={}
22-
DOCUMENTS_S3_BUCKET=test_bucket
23-
SCHOOLS_IMAGES_LOGOS_S3_BUCKET=test_bucket
2422
SECRET_KEY_BASE=a5cf81cfe4f58f3b177301038681edc63bb0ae35912ed7e6d35ba911275e53efdf05fb05d5c87095519bb09021c39e3b561bd242fe7d6a75982d8f0150cdca60
2523
PARALLEL_TEST_FIRST_IS_1=true
2624
SKYLIGHT_ENABLED=false

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ COPY . .
3434
# configuring it using the ENV variables we provide in storage.yml. However, at this point, these ENV vars have not been loaded,
3535
# causing the error. Below we define two throaway ENV vars to prevent the error from being thrown. These are then later overwritten,
3636
# when all of the ENV vars are loaded.
37-
38-
ENV DOCUMENTS_S3_BUCKET=throwaway_value
39-
ENV SCHOOLS_IMAGES_LOGOS_S3_BUCKET=throwaway_value
4037
ENV DOCUMENTS_AZURE_STORAGE_ACCESS_KEY=throwaway_value
4138
ENV IMAGES_LOGOS_AZURE_STORAGE_ACCESS_KEY=throwaway_value
4239

app/jobs/active_storage/mirror_job.rb

Lines changed: 0 additions & 20 deletions
This file was deleted.

config/storage/development.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
amazon_s3_documents:
2-
service: Disk
3-
root: <%= Rails.root.join("storage") %>
4-
5-
amazon_s3_images_and_logos:
6-
service: Disk
7-
root: <%= Rails.root.join("storage") %>
8-
91
azure_storage_documents:
102
service: Disk
113
root: <%= Rails.root.join("tmp/storage") %>
@@ -14,14 +6,6 @@ azure_storage_images_and_logos:
146
service: Disk
157
root: <%= Rails.root.join("tmp/storage") %>
168

17-
mirror_documents:
18-
service: Disk
19-
root: <%= Rails.root.join("tmp/storage") %>
20-
21-
mirror_images_and_logos:
22-
service: Disk
23-
root: <%= Rails.root.join("tmp/storage") %>
24-
259
local:
2610
service: Disk
2711
root: <%= Rails.root.join("storage") %>

config/storage/production.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
amazon_s3_documents:
2-
service: S3
3-
access_key_id: <%= ENV["DOCUMENTS_ACCESS_KEY_ID"] %>
4-
secret_access_key: <%= ENV["DOCUMENTS_ACCESS_KEY_SECRET"] %>
5-
bucket: <%= ENV["DOCUMENTS_S3_BUCKET"] %>
6-
region: eu-west-2
7-
8-
amazon_s3_images_and_logos:
9-
service: S3
10-
access_key_id: <%= ENV["SCHOOLS_IMAGES_LOGOS_ACCESS_KEY_ID"] %>
11-
secret_access_key: <%= ENV["SCHOOLS_IMAGES_LOGOS_ACCESS_KEY_SECRET"] %>
12-
bucket: <%= ENV["SCHOOLS_IMAGES_LOGOS_S3_BUCKET"] %>
13-
region: eu-west-2
14-
151
azure_storage_documents:
162
service: AzureBlob
173
storage_account_name: <%= ENV["DOCUMENTS_AZURE_STORAGE_ACCOUNT_NAME"] %>
@@ -23,15 +9,3 @@ azure_storage_images_and_logos:
239
storage_account_name: <%= ENV["IMAGES_LOGOS_AZURE_STORAGE_ACCOUNT_NAME"] %>
2410
storage_access_key: <%= ENV["IMAGES_LOGOS_AZURE_STORAGE_ACCESS_KEY"] %>
2511
container: images-logos
26-
27-
mirror_documents:
28-
service: Mirror
29-
primary: amazon_s3_documents
30-
mirrors:
31-
- azure_storage_documents
32-
33-
mirror_images_and_logos:
34-
service: Mirror
35-
primary: amazon_s3_images_and_logos
36-
mirrors:
37-
- azure_storage_images_and_logos

config/storage/test.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
amazon_s3_documents:
2-
service: Disk
3-
root: <%= Rails.root.join("tmp/storage") %>
4-
5-
amazon_s3_images_and_logos:
6-
service: Disk
7-
root: <%= Rails.root.join("tmp/storage") %>
8-
91
azure_storage_documents:
102
service: Disk
113
root: <%= Rails.root.join("tmp/storage") %>
@@ -14,15 +6,6 @@ azure_storage_images_and_logos:
146
service: Disk
157
root: <%= Rails.root.join("tmp/storage") %>
168

17-
mirror_documents:
18-
service: Disk
19-
root: <%= Rails.root.join("tmp/storage") %>
20-
21-
mirror_images_and_logos:
22-
service: Disk
23-
root: <%= Rails.root.join("tmp/storage") %>
24-
259
test:
2610
service: Disk
2711
root: <%= Rails.root.join("tmp/storage") %>
28-

lib/tasks/point_existing_attachments_to_azure_storage.rake

Lines changed: 0 additions & 37 deletions
This file was deleted.

spec/jobs/active_storage/mirror_job_spec.rb

Lines changed: 0 additions & 103 deletions
This file was deleted.

0 commit comments

Comments
 (0)