Single Node Orchestrator Deployment In Azure

Single Node Orchestrator Deployment in Azure

Single Node Orchestrator Deployment in Azure

Introduction: UiPath Orchestrator is a web application and can be installed in the Azure WebApp. Create an Azure WebApp and deploy the application in the WebApp. Go through the Azure App Service Installation guide for pre-requisites.

It requires the below components
  • Azure WebApp with windows server
  • SQL server instance

Creating a SQL Server instance: Follow the below steps to create the database in Azure

  1. Open the Azure Portal
  2. Select the SQL database from the favorites (search for this after clicking the Create a Resource)
  1. Click on Add to create a new database
  1. Provide the details requested
Create a new database server or use an existing one
Select an existing resource group or create a new one
Select a subscription
A valid custom database name
  1. Creating the DB server- click on the Create a new server and provide the required details
These details will be used to create the DB connection string
  1. Click on select, and then click on Create button to create the database


The database has been created. Now copy the connection string from the database properties,
  1. Go to the database and from properties click on the Connection String then select the ADO.NET and copy the connection string
  1. Provide the username and password which has setup earlier as part of creating the DB server. The connection string is ready to use
  2. Creating the Azure WebAppGoto the Azure portal homepage and select App Services from favorites
  1. Click on Add
  1. Select WebApp
  1. Create a new WebApp
  1. Provide the required details and create the WebApp
Use the existing plan or create a new by clicking on the arrow and following the steps in next point
It is good to have the DB and WebApp in same RG
  1. Creating a new service plan - Select the App Service plan and click on create new
  1. Provide the required details and click on OK to create the service plan.

Now the WebApp has been created.


Add the Connection String(which has been created in the 2nd Step) to the Application settings of the WebApp
  1. Goto the WebApp and select Application settings from the properties
  1. Add the connection string in the WebApp as given below and save it



Allowing the WebApp IP in SQL Firewall
  1. Goto WebApp properties-> Custom Domain and copy the IP address
  1. Go to the database -> Overview-> Set server firewall
  1. Add a IP range which contains the WebApp IP
  1. Download the publish settings, and Place it in the local machine.
  • Goto the WebApp-> overview-> Get Publish Profile


Installation

Sample Script
Script execution
PS C:\WINDOWS\system32> set-executionpolicy unrestricted
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A
.\Publish-Orchestrator.ps1 -action Deploy -hostAdminPassword "pwd" -isHostPassOneTime -defaultTenantAdminPassword "pwd" -isDefaultTenantPassOn
eTime -package "C:\Users\userXXX\Documents\AzureInstallation\UiPathOrchestrator\UiPath.Web.zip" -activitiesPackagePath "C:\Users\USerXXX\Documents\AzureInstallation\UiPathOrchestrator\UiPathActivities.zip" -publishSettingsPath
"C:\Users\ UserXXX Documents\AzureInstallation\UiPathOrchestrator\Orch2019.PublishSettings" -nugetRepositoryType "Composite" -storageType "FileSystem" -storageLocation "RootPath=D:\home\data\NuGet "
And the installation has been completed and the services are available for now. Visit the next page for come common issues while installing the Orchestrator in Azure.
  • Issue 1: publishSettingPath is not recognized as the name of script, cmdlet…….. or if included then verify the path is correct.
This error generally comes when there will be an extra character in the installation command or the publish setting path is not correct. Verify the same and try again.
  • Issue 2: Database will not be created and while browsing the website it will throw an error as “Invalid object name dbo.setting”


Root Cause
  • Scenario 1: This error generally comes when there has been an issue in database migration. Please verify that the firewall rules has been set correctly and try again.
  • Scenario 2: The web deploy has been completed successfully but there was an error while downloading the web.config file and hence the database has not been created,
Error- Exception calling ‘DownloadFile’ with 2 arguments: “The operation has timed out”

Resolution: Verify the FTP account mentioned in the PublishSettings file and make sure that is accessible from the system where you are running the script. Try to access the path using FileZilla or any other tool and make sure that the path is accessible.
  • If it is accessible from the FileZilla but still the error occurs, follow the below workaround
Remove the lines that downloading Web.Config from FTP from the installation script (attached Screenshot). Instead, manually download the Web.config file from FTP and drop it in the folder where scripts are placed and Re run the script.