Microsoft Azure

How to Integrate Azure Storage with Azure CDN

In this blog, I will show you how to integrate Azure Storage with Azure CDN. I will enable CDN (Azure content delivery) to cache content from Azure Storage. Azure CDN provides developers a global solving for delivering high-bandwidth content.

Integrate Azure Storage with Azure CDN

Sign in Azure portal with your Azure account.

Create a storage account

A storage account provides access to Azure Storage services. The storage account constitutes the highest level of the name-space for accessing every of the Azure Storage service components:
To create a storage account, you should be either the service administrator or a co-administrator for the associated subscription.

1- In the Azure portal, Search for Storage account and select Storage account.

azure search bar

2- Click on + Add button.

azure add storage account

3- Select your Subscription
I am using an existing resource group (rg-cdn) already I have created.

azure create storage account

4- Instance details

Storage account name – Enter a name for the account using (storagecdn2)
Location – Central US
Performance – Standard
Account kind – StorageV2 (general purpose v2)
Replication Locally-redundant storage (LRS)
Access tier – cool
Click Next : Networking > and then Next : Data Protection >

azure create storage account

5- Advance tab
Security – Secure transfer required and blob public access select enabled.

Select Review + create.

azure create storage account advanced

6- Then select Create.

azure create storage account create

7- Storage account successfully created.

azure add storage account

How to create a blob container.

1- Click on storage account, under blob service select containers and then + Container.

azure add container

2- New container wizard, enter a container name (containercdn)
Public access level – choose container (anonymous read access …..)
Click create.

azure new container name

3- Container successfully created.

azure successfully created storage container

Upload Images to Container

1- Choose Containers (containdercdn), choose Upload tab, and then click on folder icon next to file.

azure container upload blob

2- Select images and then click Open.

windows explorer

3- Advanced

Under upload to folder type a folder name (images) and then click upload.

azure container upload blob

4- Now you can see folder and click on it.

azure container upload

5- Click on image.

azure container uploaded blob

6- Here you can find the URL copy it.

azure container cdn image url

7- Paste in notepad.

notepad

Create a New CDN Profile

CDN profile is a container for CDN endpoints and a specifies pricing tier.

1- In the Azure portal search bar type CDN profile and then select it.

azure search cdn profile

2- Select + Add

azure create cdn profile

3- Enter the following values:

Name – cdnprofile
Subscription –
Resource group – rg-cdn
Resource group location – East US
Pricing tier – choose one
Leave unselected – Create a new CDN endpoint now
Click on Create to create the profile.

azure create cdn profile name

4- CDN profile.

azure cdn profile

Create a new CDN Endpoint

After creating a CDN profile, you use it to create an endpoint.
1- In the Azure portal, select the CDN profile that you created in your dashboard.
On the CDN profile Overview, select + Endpoint.

azure cdn profile endpoint

2- Add an endpoint wizard

Name – endpointcdn3
Origin type – Select Storage
hostname – Choose the hostname of the Azure Storage account
Origin path – Leave blank
Origin host header – Leave the default
Protocol – HTTP and HTTPS
Select Add to create the new endpoint

azure add an endpoint

3- After the endpoint successfully created, it appears in the list of endpoints for the profile.

azure endpoint homename

It takes the time for the endpoint to circulate depends on the pricing tier chooses when you created the profile.

Access CDN Content

1- To access cached content on the CDN (Content Delivery Network), use the CDN URL provided in the portal. The endpoint address for a cached blob has the following format.

azure endpoint hostname

2- Storage blob image URL.

internet explorer

3- Links blob storage and CDN.

notepad

4- Blob Storage

internet explorer storage

5- CDN storage URL

internet explorer endpoint

Jamil Parvez

Jamil Pervez works as a Network Administrator, based in Kuwait with a Primary focus on Microsoft technologies. Microsoft Certified MCSE, MCTP, MCITP, CCNP, CCIP, CCVP with 20 years of experience in administering Windows Servers, Exchange, VMWare, Veeam B&R, Veritas BackupExec.

Related Articles

Leave a Reply

Back to top button