> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure Infrastructure Creation

> Create the Azure infrastructure required for ABBYY Vantage Self-Hosted on AKS using the installer container, Azure CLI, and ARM templates step by step.

<Warning>
  **Vantage 3.0 replaces this deployment model.** Vantage 2.7 and earlier required ABBYY's specified infrastructure, created by ABBYY-provided Ansible and Azure CLI scripts. That model is not supported in 3.0: you provision your own infrastructure, and ABBYY does not provide provisioning scripts or other infrastructure automation. This page applies to Vantage 2.7 only. See the [Vantage 3.0 overview](/vantage/self-hosted/v3.0/introduction) and [Migrate from Vantage 2.7](/vantage/self-hosted/v3.0/migration-from-2.7).
</Warning>

<Note>
  This page applies only to **Azure AKS** deployments. For Virtual Machine deployments, see the [Installation](/vantage/self-hosted/v2.7/installation) guide.
</Note>

## Overview

This guide walks you through creating the required Azure infrastructure for ABBYY Vantage using Azure CLI and ARM templates. The infrastructure is created from within the Vantage installer container.

## Prerequisites

Before starting, ensure you have:

* An Azure subscription with permissions to create and manage resources
* Docker installed on your local machine
* Internet access to download container images
* For Highly Available configuration: Redis cluster deployed on VMs (see [System Requirements](/vantage/self-hosted/v2.7/system-requirements#redis-cluster-azure-aks-only))

<Note>
  You can begin downloading container images while creating the infrastructure, as this is a lengthy operation.
</Note>

## Infrastructure Components

The following Azure resources will be created:

```
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
```

## Step 1: Download the Installer Image

First, download the Vantage installer image and push it to your container registry.

```bash theme={null}
# Login to Vantage Docker registry
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
```

<Note>
  Replace `<username>` and `<password>` with the credentials provided during procurement.
</Note>

## Step 2: Run the Installer Container

Start the installer container. All subsequent commands in this guide are run from within this container.

```bash theme={null}
docker run -it registry.yourdomain.tld/vantage/vantage-azure:2.7.1
```

## Step 3: Authenticate to Azure

Inside the container, log in to your Azure account:

```bash theme={null}
# Login to Azure (opens browser for authentication)
az login

# Set the subscription
az account set --subscription <subscription_id>
```

<Note>
  Replace `<subscription_id>` with your Azure subscription ID.
</Note>

## Step 4: Create Resource Group

Create a resource group in your desired Azure region:

```bash theme={null}
az group create --location <location> --resource-group <resource_group_name>
```

**Example:**

```bash theme={null}
az group create --location eastus --resource-group vantage-prod-rg
```

Common Azure regions: `eastus`, `eastus2`, `westus2`, `westeurope`, `northeurope`

## Step 5: Create AKS Cluster

### Preview the Deployment

First, check what resources will be created:

```bash theme={null}
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>
```

<Warning>
  Cluster names must not be longer than **15 characters**.
</Warning>

### Create the Cluster

```bash theme={null}
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
```

<Note>
  This command creates a cluster in the **Without high availability** configuration capable of processing 50,000 pages per 8 hours. For other configurations, modify the node pool settings using the [Performance Guide](/vantage/self-hosted/v2.7/performance-guide) after cluster creation.
</Note>

For FIPS-compliant deployments, set `enableFIPS=true`. See [FIPS Compliance](/vantage/self-hosted/v2.7/fips-compliance) for additional configuration.

## Step 6: Create Storage Accounts

### Preview the Deployment

```bash theme={null}
az deployment group what-if --name storage \
  --resource-group <resource_group_name> \
  --template-file files/infrastructure/azure/arms/StorageAccounts.Template.json
```

### Create Storage Accounts

```bash theme={null}
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
```

### Retrieve Storage Account Keys

Get the access keys and secret keys to populate the `s3storage` section in `env_specific.yml`:

```bash theme={null}
az deployment group show --name storage \
  --resource-group <resource_group_name> \
  --query properties.outputs -o yaml
```

Save the output - you will need these values for the `env_specific.yml` configuration file.

## Step 7: Create Azure SQL Server

### Preview the Deployment

```bash theme={null}
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>
```

### Create SQL Server

```bash theme={null}
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>
```

<Note>
  The `dbAdminLogin` and `dbAdminPassword` parameters are the credentials used to access the databases. Save these for the `env_specific.yml` configuration.
</Note>

## Step 8: Create Azure SQL Database

### Preview the Deployment

```bash theme={null}
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>
```

### Create Database

```bash theme={null}
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>
```

## Step 9: Get Node Resource Group

Retrieve the node resource group name for the AKS cluster:

```bash theme={null}
az aks show --name <cluster_name> -g <resource_group_name> \
  --query nodeResourceGroup -o tsv
```

Save this value - you will place the Public IP address in this resource group.

## Step 10: Configure Public IP Address

1. **Create an Azure Public IP** (Standard Static IPv4) in the node resource group from Step 9, or move an existing Public IP to that resource group.

2. **Note the IP address** for the `env_specific.yml` configuration:

   ```yaml theme={null}
   loadbalancer:
     external_ip: <your_public_ip_address>
   ```

3. **Create a DNS A record** pointing your domain to this IP address.

## Step 11: Install GPU Driver (Optional)

If you plan to deploy GPU workers for training skills with Deep Learning:

```bash theme={null}
ansible-playbook -i inventories/azure -v \
  playbooks/infrastructure/azure/02_install_gpu_driver.yml
```

For GPU deployment requirements, see [System Requirements](/vantage/self-hosted/v2.7/system-requirements).

## Summary of Created Resources

After completing these steps, you will have:

| Resource                       | Purpose                                     |
| ------------------------------ | ------------------------------------------- |
| Resource Group                 | Container for all Vantage resources         |
| AKS Cluster                    | Kubernetes cluster for running Vantage      |
| Services Node Pool             | Runs Vantage platform services              |
| Workers Node Pool              | Runs document processing workers            |
| Skills Storage Account         | Stores skill definitions and configurations |
| Processing Storage Account     | Stores documents during processing          |
| Temporary Storage Account      | Temporary transaction storage               |
| Shared Folders Storage Account | Import/export shared folder access          |
| Archive Storage Account        | Long-term document archive                  |
| Azure SQL Server               | Database server                             |
| Azure SQL Database             | Vantage operational database                |
| Public IP Address              | External access to Vantage                  |

## Next Steps

After creating the infrastructure:

1. **Configure env\_specific.yml** - Populate with the values from this guide. See [Installation](/vantage/self-hosted/v2.7/installation) for the full configuration format.

2. **Download container images** - Sync Vantage images to your container registry.

3. **Run the installation** - Complete the installation using the playbooks.

Continue to [Installation](/vantage/self-hosted/v2.7/installation) for the complete installation process.

## Troubleshooting

### Deployment Fails with Permission Error

Ensure your Azure account has the following permissions:

* Contributor access to the subscription or resource group
* Ability to create AKS clusters, storage accounts, and SQL databases

### Cluster Name Too Long

Cluster names must be 15 characters or fewer. Use a shorter name.

### Storage Account Name Already Exists

Azure Storage Account names must be globally unique. The ARM template generates names based on your cluster name. If there's a conflict, try a different cluster name.

### Cannot Connect to SQL Database

Ensure the Azure SQL Database firewall rules allow connections from the AKS cluster's outbound IP addresses. You may need to add a virtual network rule or allow Azure services.

## Related Documentation

* [System Requirements](/vantage/self-hosted/v2.7/system-requirements) - Full infrastructure requirements
* [Installation](/vantage/self-hosted/v2.7/installation) - Complete installation guide
* [FIPS Compliance](/vantage/self-hosted/v2.7/fips-compliance) - FIPS-enabled deployments
* [Performance Guide](/vantage/self-hosted/v2.7/performance-guide) - Scaling and performance tuning
