跳轉到主要內容
本頁面僅適用於 Azure AKS 部署。若為虛擬機器部署,請參閱 Installation 指南。

概述

本指南將逐步說明如何使用 Azure CLI 和 ARM 範本,為 ABBYY Vantage 建立所需的 Azure 基礎結構。此基礎結構會在 Vantage 安裝程式容器內建立。

先決條件

在開始之前,請確認您已具備:
  • 具有建立與管理資源權限的 Azure 訂用帳戶
  • 已在本機電腦上安裝 Docker
  • 可連線至網際網路以下載容器映像檔
  • 若為高可用性 (Highly Available) 組態:已在 VM 上部署的 Redis 叢集(請參閱 System Requirements
由於這是一項耗時的作業,您可以在建立基礎結構的同時開始下載容器映像檔。

基礎結構元件

將建立下列 Azure 資源:
Azure Subscription
└── Resource Group
    ├── AKS Cluster
    │   ├── Services Node Pool (Standard_D8as_v5)
    │   └── Workers Node Pool (Standard_D16as_v5)
    ├── Storage Accounts (5)
    │   ├── Skills (Premium/Hot)
    │   ├── Processing (Standard/Hot)
    │   ├── Temporary (Standard/Hot)
    │   ├── Shared Folders (Premium FileStorage)
    │   └── Archive (Standard/Cool)
    ├── Azure SQL Server
    │   └── Elastic Pool Database
    └── Public IP Address

步驟 1:下載安裝程式映像檔

首先,下載 Vantage 安裝程式映像檔,並將其推送至您的容器登錄庫。
# 登入 Vantage Docker 登錄檔
docker login abyvtgonprm27.azurecr.io -u <username> -p <password>

# Pull the installer image
docker pull abyvtgonprm27.azurecr.io/vantage-azure:2.7.1

# Tag for your registry
docker tag abyvtgonprm27.azurecr.io/vantage-azure:2.7.1 \
  registry.yourdomain.tld/vantage/vantage-azure:2.7.1

# Push to your registry
docker push registry.yourdomain.tld/vantage/vantage-azure:2.7.1
<username><password> 替換為在採購時提供給您的認證資訊。

步驟 2:執行安裝程式容器

啟動安裝程式容器。接下來本指南中的所有指令都將在此容器內執行。
docker run -it registry.yourdomain.tld/vantage/vantage-azure:2.7.1

步驟 3:登入 Azure

在容器內登入您的 Azure 帳戶:
# 登入 Azure(開啟瀏覽器進行身分驗證)
az login

# Set the subscription
az account set --subscription <subscription_id>
請將 <subscription_id> 替換為您的 Azure 訂用帳戶識別碼。

步驟 4:建立資源群組

在您想要的 Azure 區域中建立一個資源群組:
az group create --location <location> --resource-group <resource_group_name>
範例:
az group create --location eastus --resource-group vantage-prod-rg
常用的 Azure 區域:eastuseastus2westus2westeuropenortheurope

步驟 5:建立 AKS 叢集

預覽部署

首先,檢查將會建立的資源:
az deployment group what-if --name aks-cluster \
  --resource-group <resource_group_name> \
  --template-file files/infrastructure/azure/arms/Cluster.Manual.json \
  --parameters kubernetesClusterName=<cluster_name>
叢集名稱長度不得超過 15 個字元

建立叢集

az deployment group create --name aks-cluster \
  --resource-group <resource_group_name> \
  --template-file files/infrastructure/azure/arms/Cluster.Manual.json \
  --parameters kubernetesClusterName=<cluster_name> \
  --parameters enableFIPS=false
此命令會在未啟用高可用性的設定下建立一個叢集,該叢集可在 8 小時內處理 50,000 頁面。若需使用其他設定,請在建立叢集後,使用效能指南調整節點集區設定。
若要進行符合 FIPS 的部署,請設定 enableFIPS=true。如需其他組態設定,請參閱 FIPS 相容性

步驟 6:建立儲存體帳戶

預覽部署

az deployment group what-if --name storage \
  --resource-group <resource_group_name> \
  --template-file files/infrastructure/azure/arms/StorageAccounts.Template.json

建立儲存體帳戶

az deployment group create --name storage \
  --resource-group <resource_group_name> \
  --template-file files/infrastructure/azure/arms/StorageAccounts.Template.json \
  --parameters kubernetesClusterName=<cluster_name> \
  --parameters enableFIPS=false

取得 Storage Account 金鑰

取得 access key 和 secret key,以便填入 env_specific.yml 中的 s3storage 區段:
az deployment group show --name storage \
  --resource-group <resource_group_name> \
  --query properties.outputs -o yaml
將輸出結果儲存起來,因為在設定 env_specific.yml 組態檔時會用到這些值。

步驟 7:建立 Azure SQL Server

預覽部署

az deployment group what-if --name dbservers \
  --resource-group <resource_group_name> \
  --template-file files/infrastructure/azure/arms/Databases/DB.Server.Template.json \
  --parameters serverBaseName=<cluster_name> \
  --parameters dbAdminLogin=<db_username> \
  --parameters dbAdminPassword=<db_password>

建立 SQL 伺服器

az deployment group create --name dbservers \
  --resource-group <resource_group_name> \
  --template-file files/infrastructure/azure/arms/Databases/DB.Server.Template.json \
  --parameters serverBaseName=<cluster_name> \
  --parameters dbAdminLogin=<db_username> \
  --parameters dbAdminPassword=<db_password>
dbAdminLogindbAdminPassword 這兩個 Parameter 是用來存取資料庫的認證資訊。請將它們的值保存起來,以便用於 env_specific.yml 組態檔。

步驟 8:建立 Azure SQL 資料庫

預覽部署

az deployment group what-if --name databases \
  --resource-group <resource_group_name> \
  --template-file files/infrastructure/azure/arms/Databases/SQL.Databases.Template.json \
  --parameters serverBaseName=<cluster_name>

建立資料庫

az deployment group create --name databases \
  --resource-group <resource_group_name> \
  --template-file files/infrastructure/azure/arms/Databases/SQL.Databases.Template.json \
  --parameters serverBaseName=<cluster_name>

步驟 9:取得節點資源群組

取得 AKS 叢集的節點資源群組名稱:
az aks show --name <cluster_name> -g <resource_group_name> \
  --query nodeResourceGroup -o tsv
請先記下此值,之後您會在這個資源群組中建立公用 IP 位址。

步驟 10:設定公用 IP 位址

  1. 在第 9 步的節點資源群組中建立 Azure 公用 IP(Standard Static IPv4),或將現有的公用 IP 移到該資源群組。
  2. 針對 env_specific.yml 組態檔記下該 IP 位址
    loadbalancer:
      external_ip: <your_public_ip_address>
    
  3. 建立 DNS A 記錄,將您的網域指向此 IP 位址。

步驟 11:安裝 GPU 驅動程式(選用)

如果您打算部署 GPU worker 來訓練使用 Deep Learning 的技能:
ansible-playbook -i inventories/azure -v \
  playbooks/infrastructure/azure/02_install_gpu_driver.yml
關於 GPU 部署的需求,請參閱系統需求

已建立資源摘要

完成這些步驟之後,您將擁有:
資源用途
資源群組所有 Vantage 資源的容器
AKS 叢集用於執行 Vantage 的 Kubernetes 叢集
服務節點集區用於執行 Vantage 平台服務
工作節點集區用於執行文件處理工作程序
技能儲存體帳戶儲存技能定義與設定
處理儲存體帳戶在處理期間儲存文件
暫存儲存體帳戶處理作業的暫存儲存空間
共用資料夾儲存體帳戶用於存取匯入/匯出的共用資料夾
封存儲存體帳戶長期文件封存
Azure SQL 伺服器資料庫伺服器
Azure SQL 資料庫Vantage 作業資料庫
公用 IP 位址供從外部存取 Vantage 使用

後續步驟

建立完成基礎架構之後:
  1. 設定 env_specific.yml - 將本指南中提供的數值填入該檔案中。完整的設定格式請參閱 Installation
  2. 下載容器映像檔 - 將 Vantage 映像檔同步到您的容器登錄庫。
  3. 執行安裝 - 使用 playbooks 完成安裝。
請前往 Installation 以了解完整的安裝流程。

疑難排解

部署失敗並顯示權限錯誤

請確保您的 Azure 帳戶具有以下權限:
  • 對訂用帳戶或資源群組的參與者 (Contributor) 存取權
  • 建立 AKS 叢集、儲存體帳戶與 SQL 資料庫的權限

叢集名稱過長

叢集名稱長度不得超過 15 個字元。請使用較短的名稱。

儲存體帳戶名稱已存在

Azure Storage 帳戶名稱在全域範圍內必須是唯一的。ARM 範本會根據你的叢集名稱產生帳戶名稱。如果發生衝突,請嘗試使用不同的叢集名稱。

無法連線至 SQL 資料庫

請確保 Azure SQL Database 的防火牆規則允許來自 AKS 叢集出站 IP 位址的連線。您可能需要新增虛擬網路規則,或啟用允許 Azure 服務存取的設定。