跳转到主要内容
本页内容仅适用于 Azure AKS 部署。对于虚拟机部署,请参阅 Installation 安装指南。

概述

本指南将引导您使用 Azure CLI 和 ARM 模板,为 ABBYY Vantage 创建所需的 Azure 基础结构。该基础结构是在 Vantage 安装程序容器中创建的。

先决条件

在开始之前,请确保已具备:
  • 一个拥有创建和管理资源权限的 Azure 订阅
  • 在本地计算机上安装 Docker
  • 可访问互联网以下载容器镜像
  • 对于高可用配置:在虚拟机上部署的 Redis 集群(参见 系统要求
在创建基础架构的同时即可开始下载容器镜像,因为这一操作耗时较长。

基础架构组件

将创建以下 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 订阅 ID。

步骤 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

获取存储帐户密钥

获取访问密钥和私密密钥,用于在 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 服务器

预览部署

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 是用于访问数据库的凭据。请将它们保存起来,用于 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 静态 IPv4),或者将现有的 Public IP 移到该资源组中。
  2. 记录该 IP 地址,用于 env_specific.yml 配置:
    loadbalancer:
      external_ip: <your_public_ip_address>
    
  3. 创建一个 DNS A 记录,将您的域名指向此 IP 地址。

步骤 11:安装 GPU 驱动程序(可选)

如果您计划部署用于基于深度学习训练 Skill 的 GPU worker:
ansible-playbook -i inventories/azure -v \
  playbooks/infrastructure/azure/02_install_gpu_driver.yml
有关 GPU 部署的要求,请参阅系统要求

已创建资源概览

完成这些步骤后,您将拥有:
ResourcePurpose
Resource Group用于容纳所有 Vantage 资源的容器
AKS Cluster用于运行 Vantage 的 Kubernetes 集群
Services Node Pool运行 Vantage 平台服务的节点池
Workers Node Pool运行文档处理工作负载的节点池
Skills Storage Account存储 Skill 定义和配置信息
Processing Storage Account在处理期间存储文档
Temporary Storage Account用于临时存储处理事务
Shared Folders Storage Account用于访问导入/导出的共享文件夹
Archive Storage Account文档的长期归档存储
Azure SQL Server数据库服务器
Azure SQL DatabaseVantage 运营数据库
Public IP Address用于从外部访问 Vantage 的公共 IP 地址

后续步骤

在完成基础架构创建之后:
  1. 配置 env_specific.yml - 按照本指南提供的取值进行配置。完整的配置格式请参见 安装
  2. 下载容器镜像 - 将 Vantage 镜像同步到您的容器镜像注册表。
  3. 运行安装 - 使用 playbooks 完成安装。
请继续参阅 安装 以了解完整的安装流程。

故障排除

部署因权限错误失败

请确保你的 Azure 帐户具有以下权限:
  • 对订阅或资源组的“参与者 (Contributor)”访问权限
  • 创建 AKS 群集、存储帐户和 SQL 数据库的权限

群集名称过长

群集名称长度不能超过 15 个字符。请使用更短的名称。

存储帐户名称已存在

Azure 存储帐户名称在全局范围内必须唯一。ARM 模板会根据您的集群名称生成帐户名称。如果发生冲突,请尝试使用不同的集群名称。

无法连接到 SQL 数据库

请确保 Azure SQL Database 的防火墙规则允许来自 AKS 集群的出站 IP 地址的连接。您可能需要添加虚拟网络规则或允许来自 Azure 服务的访问。