ol-infrastructure icon indicating copy to clipboard operation
ol-infrastructure copied to clipboard

Migrate CDN from CloudFront to Fastly

Open feoh opened this issue 3 years ago • 3 comments

User Story

Currently, Micromasters uses hand constructed CloudFront distributions. Building these is error prone and high risk.

Description/Context

We should move Micromasters to use Pulumi managed Fast.ly as its CDN like the right of our projects. This will reduce operational risk and technical debt.

Acceptance Criteria

  • [ ] All micromasters environments are fronted by Pulumi managed Fast.ly CDN

feoh avatar Apr 06 '23 17:04 feoh

Is the dependency on CloudFront hard-coded into the MicroMaster app anywhere? Does migrating from Cloudfront to Fastly require any code changes in MicroMasters?

pdpinch avatar Apr 18 '23 14:04 pdpinch

At a minimum, we should be removing the entry from pillar https://github.com/mitodl/salt-ops/blob/main/pillar/heroku/micromasters.sls#L179. As far as the micromasters codebase, without the value in the config, this code can be removed, but it's not a blocker https://github.com/mitodl/micromasters/blob/master/micromasters/settings.py#L299-L303

shaidar avatar Apr 18 '23 14:04 shaidar

Looking at its usage in the code it seems that we can remove the setting from Salt/Heroku and then set up Fastly in front of the app and no further code changes are required.

blarghmatey avatar Apr 21 '23 12:04 blarghmatey