Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

With this to change the CSP for storage, just copy the data from the existing CSP Storage to the new CSP Storage in the same structure and update the CNAME with the new CSP Storage base path. There is no data migration required for the existing data in databases.

Object Storage URL format for different CSP’s:

CSP

URL Format

Azure

https://{storageaccountname}.blob.core.windows.net/{container-name}/{file/path}

AWS

https://{bucketname}.s3.{aws-region}.amazonaws.com/{file/path} OR

https://s3.{aws-region}.amazonaws.com/{bucketname}/{file/path}

GCP

https://storage.cloud.google.com/{cloud-bucket}/{file/path}

OCI

https://objectstorage.{oci-region}.oraclecloud.com/n/{storage-namespace}/b/{Bucketname}/o/{file/path}

Referencing the objects from the Object store/Cloud storage using custom URL is done using the CNAME approach.

Mapping Custom domain to Azure storage account: https://learn.microsoft.com/en-us/azure/storage/blobs/storage-custom-domain-name?tabs=azure-portal

Below are the example CNAME record configuration for us to understand.

Info

Sample CNAME : https://obj.dev.sunbirded.org

CSP

Value of CNAME Record

Azure

https://{storageaccountname}.blob.core.windows.net

GCP

https://storage.cloud.google.com

AWS

https://s3.ap-south-1.amazonaws.com

OCI

It is not possible to define a CNAME record directly for OCI. We need to use API-Gateway or a Proxy to handle it. Need to conclude on the final design.

The respective code changes for using CNAME in data will be implemented in cloud-storage-sdk. The Microservices should update the version of cloud-storage-sdk and might make minimal code changes to support this.