# Local Azure Resource Manager Deployment

> In this topic, you will learn how to deploy Test Manager locally as an Azure Resource Manager (ARM) template using the local deployment script.

In this topic, you will learn how to deploy Test Manager locally as an Azure Resource Manager (ARM) template using the local deployment script.

## Requirements

* [Azure CLI installed](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli).
* You need to be logged in and [have the subscription context in Azure set up correctly](https://docs.microsoft.com/en-us/powershell/module/az.accounts/set-azcontext?view=azps-8.0.0).
* Download the following packages next to the local deployment script ([TestManagerLocalDeploymentWrapper.ps1](https://download.uipath.com/TestManagerAzureMarketplaceArtifacts/24.10.6/TestManagerLocalDeploymentWrapper.ps1)):
  + [Deployment Script](https://download.uipath.com/TestManagerAzureMarketplaceArtifacts/24.10.6/deploymentScript.zip): package containing the MSDeploy package with the `Deploy-TestManager.ps1` script.
  + [Test Manager Provisioning Tool](https://download.uipath.com/TestManagerAzureMarketplaceArtifacts/24.10.6/TestManagerProvisioner.zip): package containing Test Manager CLI files stored inside the `TestManagerProvisioner` folder. For more information, see [Test Manager Provisioning Tool](https://docs.uipath.com/test-manager/standalone/2024.10/installation-guide/test-manager-command-line-parameters).
  + [Test Manager Local Deployment Script](https://download.uipath.com/TestManagerAzureMarketplaceArtifacts/24.10.6/web.zip): MSDeploy package containing `Test Manager Web App`.
  + [mainTemplate.json](https://download.uipath.com/TestManagerAzureMarketplaceArtifacts/24.10.6/mainTemplate.json)

To set up the deployment environment for Test Manager, create a folder named `arm` and place it next to all the artifacts downloaded under **Requirements**. Inside the `arm` folder, you need two files:

* an empty `params.json` file
* `mainTemplate.json` file

The folder location for your packages will look like in the screenshot below.

![docs image](https://dev-assets.cms.uipath.com/assets/images/test-manager/test-manager-docs-image-125421-e21d869b-2ed3dd8e.webp)

:::note
If you need to deploy the entire UiPath infrastructure, you will also need the following:
:::

* [UiPath Orchestrator set up in your environment](https://docs.uipath.com/orchestrator/standalone/2024.10/installation-guide/orchestrator-about-installation#installing-orchestrator).
* Access to Orchestrator Identity Management.

## Provision resources before Test Manager installation

To provision the resources for the Test Manager instance, you need to run the `TestManagerLocalDeploymentWrapper.ps1` script. You can use this procedure if you don't have the Test Manager resources already provisioned.

Open Windows PowerShell and run the `TestManagerLocalDeploymentWrapper.ps1` script with the `-Provision` flag and then supply the following parameters.

| Parameter | Description |
| --- | --- |
| **resourceGroupName** | The name of the Azure Resource Group where UiPath Test Manager resources will be provisioned. |
| **SQLServerAdminPassword** | The password for the admin credentials for the Azure SQL Server. |
| **SQLServerAdminLogin** | The username for the admin credentials for the Azure SQL Server. |
| **TMDBSize** | The database size for the Azure SQL Database resource which will be created. Available options: "Small", "Medium", "Large". |
| **TMDatabaseName** | The name for the Azure SQL Database resource which will be created. |
| **TMAppName** | The name for the Azure Web App resource which will be created. |
| **storageAccountName** | The name for the Azure Storage Account resource which will be created. |
| **SQLServerName** | The name for the Azure SQL Server resource which will be created. |
| **location** | The name of the Azure Region where the resource will be created. For example, `west_europe`. |
| **TMPAppServicePlan** | The name of the Azure App Service Plan resource which will be created. |
| **storageAccountType** | The type of the Azure Storage Resource which will be created. |
| **TMAppInsights** | The name of the App Insights resource which will be created. |

## Script example

In the following example, the local deployment script is executed to provision resources to Test Manager.

1. Use the `az login` to log in to your Azure environment.
2. Set the Azure context to the subscription where you are about to deploy Test Manager (e.g., to set it to `Dev-Test-SL-EA subscription` run the following: `az account set --subscription "DevTest-SL-EA"`.
3. Run the `TestManagerLocalDeploymentWrapper.ps1` script with the `-Provision` flag and then supply the following parameters.
   ```
   .\TestManagerLocalDeploymentWrapper.ps1
   -resourceGroupName "tmh-testing"
   -SQLServerAdminPassword: "password"
   -SQLServerAdminLogin: "sqladmin"
   -TMDBSize: "Small"
   -TMAppName: "tmh-test"
   -TMDatabaseName: "tmhtestsqldb"
   -SQLServerName: "tmhtestsql"
   -storageAccountName: "tmhtestst"
   -location: "northeurope"
   -TMAppServicePlan: "tmhtestasp"
   -storageAccountType: "Standard_LRS"
   -TMAppInsights: "tmhtestinsights"
   -provision
   ```
