Lab 2: Configure Content Delivery Network and endpoints

Task 1: Open Azure Cloud Shell

  1. In the Azure portal, select the Cloud Shell icon Cloud Shell icon to open a new Bash session. If Cloud Shell defaults to a PowerShell session, select PowerShell, and in the drop-down menu, select Bash.

    Note: If this is the first time you're starting Cloud Shell, when prompted to select either Bash or PowerShell, select Bash. When you're presented with the You have no storage mounted message, select the subscription you're using in this lab, and select Create storage.

  2. In the Azure portal, at the Cloud Shell command prompt, run the following command to get the version of the Azure Command-Line Interface (Azure CLI) tool:

     az --version
    

Task 2: Register the Microsoft.CDN provider

  1. At the Cloud Shell command prompt in the portal, perform the following actions:

    a. Enter the following command to check if the Microsoft.CDN has been registered. Proceed to step 2. if the Microsoft.CDN has already been registered:

     az provider show --namespace Microsoft.CDN --query "registrationState"
    

    b. If the Microsoft.CDN has not been registered. Enter the following command, and then select Enter to register the Microsoft.CDN namespace with your current subscription:

     az provider register --namespace Microsoft.CDN
    
  2. Close the Cloud Shell pane in the portal.

Task 3: Create a Content Delivery Network profile

  1. On the Azure portal's navigation pane, select Create a resource.

  2. On the Create a resource blade, in the Search services and marketplace text box, enter CDN, and then select Enter.

  3. On the Marketplace search results blade, select the Front Door and CDN profiles result, and then select Create.

  4. On the Compare offerings page, select Explore other offerings and then select Azure CDN Standard from Microsoft (classic), and then select Continue.

  5. On the CDN profile blade, on the Basics tab, perform the following actions, and then select Review + create:

    | Setting | Action | | -- | -- | | Subscription drop-down list | Retain the default value | | Resource group drop-down list | Select MarketingContent in the list | | Name text box | Enter contentdeliverynetwork | | Region text box | Retain the default value (Global) | | Pricing tier drop-down list | Select Microsoft CDN (classic) | | Create a new CDN endpoint now check box | Not selected |

    The following screenshot displays the configured settings on the CDN profile blade.

    Screenshot displaying the configured settings on the Create CDN profile blade.

  6. On the Review + create tab, review the options that you selected during the previous steps.

  7. Select Create to create the CDN profile by using your specified configuration.

    Note: Wait for Azure to finish creating the CDN profile before you move forward with the lab. You'll receive a notification when the app is created.

Task 4: Configure Storage containers

  1. On the Azure portal's navigation pane, select Resource groups.

  2. On the Resource groups blade, select the MarketingContent resource group that you created previously in this lab.

  3. On the MarketingContent blade, select the contenthost[yourname] storage account that you created previously in this lab.

  4. On the Storage account blade, select the Containers link in the Data storage section.

  5. In the Containers section, select + Container.

  6. In the New container pop-up window, perform the following actions, and then select Create:

    | Setting | Action | | -- | -- | | Name text box | Enter media | | Public access level drop-down list | Select Blob (anonymous read access for blobs only) |

  7. In the Containers section, select + Container again.

  8. In the New container pop-up window, perform the following actions, and then select Create:

    | Setting | Action | | -- | -- | | Name text box | Enter video | | Public access level drop-down list | Select Blob (anonymous read access for blobs only) |

  9. Observe the updated list of containers and confirm that both the media and video containers are listed.

Task 5: Create Content Delivery Network endpoints

  1. On the Azure portal's navigation pane, select the Resource groups link.

  2. On the Resource groups blade, select the MarketingContent resource group that you created previously in this lab.

  3. On the MarketingContent blade, select the contentdeliverynetwork CDN profile that you created previously in this lab.

  4. On the CDN profile blade, select + Endpoint.

  5. In the Add an endpoint pop-up dialog box, perform the following actions, and then select Add:

    | Setting | Action | | -- | -- | | Name text box | Enter cdnmedia[yourname] | | Origin type drop-down list | Select Storage | | Origin hostname drop-down list | Select the contenthost[yourname].blob.core.windows.net option for the Storage account that you created previously in this lab | | Origin path text box | Enter /media | | Origin host header text box | Retain the default value | | Protocol and Origin port sections | Retain the default values | | Optimized for drop-down list | Select General web delivery |

    The following screenshot displays the configured settings in the Add an endpoint dialog box.

    Screenshot displaying the configured settings in the Add an endpoint dialog box.

  6. On the CDN profile blade, select + Endpoint again.

  7. In the Add an endpoint pop-up dialog box, perform the following actions, and then select Add:

    | Setting | Action | | -- | -- | | Name text box | Enter cdnvideo[yourname] | | Origin type drop-down list | Select Storage | | Origin hostname drop-down list | Select the contenthost[yourname].blob.core.windows.net option for the Storage account that you created previously in this lab | | Origin path text box | Enter /video | | Origin host header text box | Retain the default value | | Protocol and Origin port sections | Retain the default values | | Optimized for drop-down list | Select General web delivery |

    The following screenshot displays the configured settings in the Add an endpoint dialog box.

    Screenshot displaying the configured settings in the Add an endpoint dialog box.

  8. On the CDN profile blade, select + Endpoint again.

  9. In the Add an endpoint pop-up dialog box, perform the following actions, and then select Add:

    | Setting | Action | | -- | -- | | Name text box | Enter cdnweb[yourname] | | Origin type drop-down list | Select Web App | | Origin hostname drop-down list | Select the landingpage[yourname].azurewebsites.net option for the web app that you created previously in this lab | | Origin path text box | Retain the default value | | Origin host header text box | Retain the default value | | Protocol and Origin port sections | Retain the default values | | Optimized for drop-down list | Select General web delivery |

    The following screenshot displays the configured settings in the Add an endpoint dialog box.

    Screenshot displaying the configured settings in the Add an endpoint dialog box.

Review

In this exercise, you registered the resource provider for Content Delivery Network (CDN), and then used the provider to create both a CDN profile and endpoint resources.

results matching ""

    No results matching ""