快速入門:使用 Azure Resource Manager 範本部署 Foundry IQ(Azure AI 搜尋服務)

Note

Foundry IQ(Azure AI 搜尋服務)提供直接的索引與查詢 API,並搭配高階知識來源與知識庫 API 用於受控檢索。 使用 Azure 入口網站、REST API 或 Azure SDK 來設定這些功能,或將代理連線到 Microsoft Foundry 入口網站 中的知識庫。

在此快速入門中,請使用 Azure Resource Manager 範本在 Azure 入口網站部署 Foundry IQ(Azure AI 搜尋服務)服務。

Azure Resource Manager 範本是一個 JavaScript 物件標記法 (JSON) 檔案,會定義專案的基礎結構和設定。 範本使用宣告式語法。 您可以描述預期的部署,而不需要撰寫程式設計命令順序來建立部署。

部署僅使用範本中包含的屬性。 如果你需要更多客製化,例如 設定網路安全,可以在部署後更新服務。 若要使用最少的步驟自訂現有服務,請使用 Azure CLI 或 Azure PowerShell。 如果您正在評估預覽功能,請使用管理 REST API。

假如您的環境符合必要條件,而且您很熟悉 ARM 範本的使用方法,請選取 [部署至 Azure] 按鈕。 範本會在 Azure 入口網站中開啟。

按鈕用來部署 Resource Manager 範本到 Azure。

必要條件

如果您沒有 Azure 訂用帳戶,請在開始前建立免費帳戶。

檢閱範本

這個快速入門範本使用了 Azure 快速入門範本。

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "metadata": {
    "_generator": {
      "name": "bicep",
      "version": "0.5.6.12127",
      "templateHash": "11257266040777038564"
    }
  },
  "parameters": {
    "name": {
      "type": "string",
      "maxLength": 60,
      "minLength": 2,
      "metadata": {
        "description": "Service name must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and is limited between 2 and 60 characters in length."
      }
    },
    "sku": {
      "type": "string",
      "defaultValue": "standard",
      "metadata": {
        "description": "The pricing tier of the search service you want to create (for example, basic or standard)."
      },
      "allowedValues": [
        "free",
        "basic",
        "standard",
        "standard2",
        "standard3",
        "storage_optimized_l1",
        "storage_optimized_l2"
      ]
    },
    "replicaCount": {
      "type": "int",
      "defaultValue": 1,
      "maxValue": 12,
      "minValue": 1,
      "metadata": {
        "description": "Replicas distribute search workloads across the service. You need at least two replicas to support high availability of query workloads (not applicable to the free tier)."
      }
    },
    "partitionCount": {
      "type": "int",
      "defaultValue": 1,
      "allowedValues": [
        1,
        2,
        3,
        4,
        6,
        12
      ],
      "metadata": {
        "description": "Partitions allow for scaling of document count as well as faster indexing by sharding your index over multiple search units."
      }
    },
    "hostingMode": {
      "type": "string",
      "defaultValue": "default",
      "allowedValues": [
        "default",
        "highDensity"
      ],
      "metadata": {
        "description": "Applicable only for SKUs set to standard3. You can set this property to enable a single, high density partition that allows up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU."
      }
    },
    "location": {
      "type": "string",
      "defaultValue": "[resourceGroup().location]",
      "metadata": {
        "description": "Location for all resources."
      }
    }
  },
  "resources": [
    {
      "type": "Microsoft.Search/searchServices",
      "apiVersion": "2020-08-01",
      "name": "[parameters('name')]",
      "location": "[parameters('location')]",
      "sku": {
        "name": "[parameters('sku')]"
      },
      "properties": {
        "replicaCount": "[parameters('replicaCount')]",
        "partitionCount": "[parameters('partitionCount')]",
        "hostingMode": "[parameters('hostingMode')]"
      }
    }
  ]
}

該範本定義了以下 Azure 資源:

部署範本

選取以下影像來登入 Azure 並開啟範本。 範本會建立一個 Foundry IQ 資源。

按鈕用來部署 Resource Manager 範本到 Azure。

Azure 入口網站會顯示一個表單,方便你輕鬆提供參數值。 某些參數會預先填入範本中的預設值。 提供您的訂用帳戶、資源群組、位置和服務名稱。 如果您想在 AI 豐富化流程中使用 Microsoft Foundry,例如分析文字的二進位影像檔案,請選擇同時提供 Foundry IQ 與 Microsoft Foundry 的平台。 除非您使用無金鑰連線,否則 AI 強化工作負載時,您的 Foundry IQ 服務與 Microsoft Foundry 資源必須位於相同區域。 填寫表格後,同意條款與條件,然後選擇購買按鈕完成部署。

Azure 入口網站範本顯示

檢閱已部署的資源

部署完成後,您可以在 Azure 入口網站存取您的新資源群組及新的 Foundry IQ 服務。

清除資源

其他 Foundry IQ 快速入門與教學則是建立在這個快速入門基礎上。 如果你打算繼續使用後續的快速入門和教學,建議保留這個資源。 當你不再需要資源時,可以刪除資源群組。 刪除資源群組會刪除 Foundry IQ 服務及相關資源。

在本快速入門中,您使用 ARM 範本建立了 Foundry IQ 服務,然後驗證了部署。 欲進一步了解 Foundry IQ 與 Azure Resource Manager,請參閱以下文章: