快速入門:建立 Azure CDN 設定檔和端點Quickstart: Create an Azure CDN profile and endpoint

在此快速入門中,您會藉由建立新的 CDN 設定檔 (此為一或多個 CDN 端點的集合),來啟用 Azure 內容傳遞網路 (CDN)。In this quickstart, you enable Azure Content Delivery Network (CDN) by creating a new CDN profile, which is a collection of one or more CDN endpoints. 在建立設定檔和端點後,您即可開始將內容傳遞給您的客戶。After you have created a profile and an endpoint, you can start delivering content to your customers.

PrerequisitesPrerequisites

登入 Azure 入口網站Sign in to the Azure portal

使用您的 Azure 帳戶登入 Azure 入口網站Sign in to the Azure portal with your Azure account.

建立新的 CDN 設定檔Create a new CDN profile

CDN 設定檔是 CDN 端點的容器,會指定定價層。A CDN profile is a container for CDN endpoints and specifies a pricing tier.

  1. 在 Azure 入口網站中,選取 [建立資源] (位於左上方)。In the Azure portal, select Create a resource (on the upper left). [新增] 窗格隨即出現。The New pane appears.

  2. 搜尋並選取 [CDN],然後選取 [建立]:Search for and select CDN, then select Create:

    選取 CDN 資源

    此時會顯示 [CDN 設定檔] 窗格。The CDN profile pane appears.

  3. 輸入下列值:Enter the following values:

    設定Setting Value
    名稱Name 輸入 cdn-profile-123 作為設定檔名稱。Enter cdn-profile-123 for your profile name.
    訂用帳戶Subscription 從下拉式清單中,選取 Azure 訂用帳戶。Select an Azure subscription from the drop-down list.
    資源群組Resource group 選取 [新建],並輸入 CDNQuickstart-rg 作為您的資源群組名稱,或選取 [使用現有項目],然後選擇 [CDNQuickstart-rg] (如果您已有群組)。Select Create new and enter CDNQuickstart-rg for your resource group name, or select Use existing and choose CDNQuickstart-rg if you have the group already.
    資源群組位置Resource group location 從下拉式清單中選取您附近的位置。Select a location near you from the drop-down list.
    定價層Pricing tier 從下拉式清單中選取 [標準 Akamai] 選項。Select a Standard Akamai option from the drop-down list. (Akamai 層的部署時間約為一分鐘。(Deployment time for the Akamai tier is about one minute. 部署 Microsoft 層大約需要 10 分鐘,而 Verizon 層大約需要 30 分鐘。)The Microsoft tier takes about 10 minutes and the Verizon tiers take about 30 minutes.)
    立即建立新的 CDN 端點Create a new CDN endpoint now 保留為未選取。Leave unselected.

    新增 CDN 設定檔

  4. 選取 [建立] 以建立設定檔。Select Create to create the profile.

建立新的 CDN 端點Create a new CDN endpoint

在您建立 CDN 設定檔後,可以使用此設定檔來建立端點。After you've created a CDN profile, you use it to create an endpoint.

  1. 在 Azure 入口網站中,從儀表板中選取您所建立的 CDN 設定檔。In the Azure portal, select in your dashboard the CDN profile that you created. 如果您找不到此設定檔,可以開啟其建立所在的資源群組,或使用入口網站頂端的搜尋列,輸入設定檔名稱,然後從結果中選取設定檔。If you can't find it, you can either open the resource group in which you created it, or use the search bar at the top of the portal, enter the profile name, and select the profile from the results.

  2. 在 [CDN 設定檔] 頁面上,選取 [+ 端點]。On the CDN profile page, select + Endpoint.

    CDN 設定檔

    此時會顯示 [新增端點] 窗格。The Add an endpoint pane appears.

  3. 輸入下列設定值:Enter the following setting values:

    設定Setting Value
    名稱Name 輸入 cdn-endpoint-123 作為您的端點主機名稱。Enter cdn-endpoint-123 for your endpoint hostname. 此名稱在整個 Azure 中必須是唯一的;如果已在使用中,您可以輸入不同的名稱。This name must be globally unique across Azure; if it's already in use, enter a different name. 此名稱可用來存取網域 <endpoint-name> .azureedge.net 上的快取資源。This name is used to access your cached resources at the domain <endpoint-name>.azureedge.net.
    原始類型Origin type 選取 [儲存體] 。Select Storage.
    原始主機名稱Origin hostname 從下拉式清單中選取您要使用之 Azure 儲存體帳戶的主機名稱,例如 cdnstorageacct123.blob.core.windows.netSelect the host name of the Azure Storage account you're using from the drop-down list, such as cdnstorageacct123.blob.core.windows.net.
    原始路徑Origin path 保留空白。Leave blank.
    原始主機標頭Origin host header 保留預設值 (這是儲存體帳戶的主機名稱)。Leave the default value (which is the host name for the storage account).
    通訊協定Protocol 保留已選取的預設值 HTTPHTTPS 選項。Leave the default HTTP and HTTPS options selected.
    原始連接埠Origin port 保留預設的連接埠值。Leave the default port values.
    最佳化對象Optimized for 保留預設選項 [一般 Web 傳遞]。Leave the default selection, General web delivery.

    新增端點窗格

  4. 選取 [新增] 來建立新的端點。Select Add to create the new endpoint. 端點建立之後,即會出現在設定檔的端點清單中。After the endpoint is created, it appears in the list of endpoints for the profile.

    CDN 端點

    端點傳播所需的時間取決於您在建立設定檔時選取的定價層。The time it takes for the endpoint to propagate depends on the pricing tier selected when you created the profile. 標準 Akamai 通常會在一分鐘內完成,標準 Microsoft 需要 10 分鐘,而 標準 Verizon進階 Verizon 最多需要 30 分鐘。Standard Akamai usually completes within one minute, Standard Microsoft in 10 minutes, and Standard Verizon and Premium Verizon in up to 30 minutes.

清除資源Clean up resources

在前述步驟中,您在資源群組中建立了 CDN 設定檔和端點。In the preceding steps, you created a CDN profile and an endpoint in a resource group. 如果您想移至後續步驟並了解如何將自訂網域新增至您的端點,請儲存這些資源。Save these resources if you want to go to Next steps and learn how to add a custom domain to your endpoint. 不過,如果您認為未來不需要使用這些資源,可以藉由刪除資源群組的方式將其刪除,以避免額外的費用:However, if you don't expect to use these resources in the future, you can delete them by deleting the resource group, thus avoiding additional charges:

  1. 從 Azure 入口網站的左側功能表中,依序選取 [資源群組] 和 [CDNQuickstart-rg]。From the left-hand menu in the Azure portal, select Resource groups and then select CDNQuickstart-rg.

  2. 在 [資源群組] 頁面上選取 [刪除資源群組],在文字方塊中輸入 CDNQuickstart-rg,然後選取 [刪除]。On the Resource group page, select Delete resource group, enter CDNQuickstart-rg in the text box, then select Delete. 此動作將會刪除資源群組、設定檔,以及您在此快速入門中建立的端點。This action delete the resource group, profile, and endpoint that you created in this quickstart.

後續步驟Next steps