Skip to content

Commit

Permalink
Merge pull request #117 from alphagov/add-overview-of-s3-migration
Browse files Browse the repository at this point in the history
Add an overview of the migration of assets to S3
  • Loading branch information
chrisroos authored Aug 9, 2017
2 parents 543ed6a + 1552b67 commit 4a282d0
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ bundle exec rake jobs:work

### Assets on S3

See the ["Migrating Asset Manager assets to S3" document](docs/migrating-assets-to-s3.md) for an overview of this project.

This functionality is *very* experimental and should not be switched on in production until performance tests have been carried out to ensure there has been no degradation in performance.

As long as the S3 bucket is configured, all assets are uploaded to the S3 bucket via a separate `Delayed::Job` triggered if virus scanning succeeds. Assets are still saved to the NFS mount as per the original behaviour.
Expand Down
43 changes: 43 additions & 0 deletions docs/migrating-assets-to-s3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Migrating Asset Manager assets to S3

Our goal is to host GOV.UK assets on S3 instead of NFS.

The aim of this document is to provide a high level overview of our progress.


## Current status

We've modified Asset Manager to upload assets to S3 in addition to storing them on NFS.

We've tested the performance of proxying requests from Asset Manager to S3 but it's not good enough.

We now want to try redirecting requests from Asset Manager to S3. We have code in Asset Manager to support this but we need objects within our assets bucket to be publicly readable in order for us to test it.


## Plan

| Task | Integration | Staging | Production |
| ----------------------------------- | ----------- | ------- | ---------- |
| Create IAM User | Y | Y | Y |
| Create S3 Bucket | Y | Y | Y |
| Upload assets to S3 | Y | Y | Y |
| Optionally proxy to assets on S3 | Y | Y | Y |
| Public-read on S3 bucket | | | |
| Optionally redirect to assets on S3 | | | |
| S3 access logging | | | |
| S3 CNAME | | | |
| S3 CDN | NA | | |
| Migrate existing assets | | | |
| Redirect to assets on S3 | | | |
| Remove NFS | | | |


## History

### Mon 7 Aug

* Assets can be proxied from S3 in all environments.

### Wed 2 Aug

* Assets are being uploaded to S3 (as well as being stored on NFS) in all environments.

0 comments on commit 4a282d0

Please sign in to comment.