CNAME: CNAME records can be used to alias one name to another. CNAME stands for Canonical Name.
All the Data in the DB & response should be CSP agnostic.
Presently the data stored in DB & API response is having the CSP provider details. Presently we are storing the absolute URL of the the assest in the DB & the same is sending in the response.
Impact areas:
Plugins loading in editors & packing as part of ECAR.
Generation of pre-signed URL used by Editors
ECAR files will be having absolute paths (Need discussion on how to solve)
Data stored in the DB’s
streamingUrl
downloadUrl
variants
----------------
previewUrl
appIcon
posterImage
artifactUrl
toc_url
thumbnail
assetMap
Example:
Data for CSP migration:
https://docs.google.com/spreadsheets/d/13DaXCx8uToOwinlAPxvTat8NELxiPgG4KXATcKaJm_c/edit?usp=sharing
CSP flow diagram to migrate the data:
https://drive.google.com/file/d/1HzUob6a9_TrVWhcoo1nWoKPVN0PKzpmQ/view?usp=share_link
Solution:
Don’t store the absolute paths in the DB’s. Always store the path with CNAME as prefix.
example:
CNAME/content/assets/do_31329674183946240014126/a-boy-animation-1.mp4
Configure the service with CNAME value as shown below
CNAME: https://ntpproductionall.blob.core.windows.net/ntp-content-production
While sending the response, replace all the properties values which has CNAME with actual value configured for microservice. So there wont be any difference in the API response.
Challenges:
If service has to point to different containers then it will be a challenge.