Running Multiple Enterprise Instances Within Single Azure Web App

<< Click to Display Table of Contents >>

 >Enterprise > Installation and Configuration > New Installation >

Running Multiple Enterprise Instances Within Single Azure Web App

The instructions in this article are similar to the on-premise IIS “Single Folder Method” article, but adapted to Azure Web App.

 

Step 1: Deploy the Enterprise PCP Files

 

Follow Steps 1-3 of the “Azure Installation” instructions to deploy the PCP files into D:/home/site/wwwroot.

 

Step 2: Configure Sites

In the Azure Portal, go to your Web App blade.

Click Configuration.

Click Path mappings.

Click New virtual application or directory.

Add the first application:

Set the “Virtual path” to the desired name (e.g., “/db1”).

Set the “Physical Path” to “site\wwwroot”.

Uncheck the Directory box.

Check the Preload enabled box.

Click OK.

Repeat the previous step for each desired Enterprise instance with its own, unique virtual path (the “Physical Path” should be “site\wwwroot” for all instances).

Edit the root application (“Virtual path” of “/”) so the “Physical Path” is just “site\”. (This step is important— the application will not work if you skip this step.)

Click the Save button to save the settings.

Ent-Azure_Portal

Step 3: Configure Connection Strings

 

For a single instance Web App, the connection string can be entered directly into the “Configuration” section of the Web App. However, for a multi-instance Web App, each connection string should be entered into the D:/home/site/wwwroot/bin/connectionStrings.config file as follows:

In the Azure Portal, go to your Web App blade.

Click Advanced Tools, then click Go (Advanced Tools opens in a new browser tab).

On the “Debug console” menu, click CMD.

Browse to the “site” folder, then the “wwwroot” folder, and then the “bin” folder  (i.e., D:/home/site/wwwroot/bin).

Scroll to connectionString.config and click the edit button.

Add a connection string for each Enterprise site to be configured:

“name” is the baseUri (including the virtual path from Step 2).

“connectionString” is the properly configured database connection string for that site.

Click Save to save the file.

Ent-ConnectionStrings_Config

Step 4: Apply Licenses

 

If your EQuIS licenses have not already been configured, follow the typical process to apply/configure licenses (see the Enterprise 7 Azure Installation article).

 

Step 5: Create Multiple WebJobs

 

To use the EQuIS Enterprise automated processing functionality (e.g., Enterprise EDP, EIAs, webhooks, etc.), ensure that each site has a WebJob configured. Deploying the Enterprise PCP files will automatically create a single WebJob. Create a separate WebJob for each additional site as follows:

In the Azure Portal, go to your Web App blade.

Click Advanced Tools, then click Go (Advanced Tools opens in a new browser tab).

On the “Debug console” menu, click CMD.

Browse to the “site” folder, then the “wwwroot” folder, and then the “App_Data” folder (i.e., D:/home/site/wwwroot/App_Data).

Continue browsing into the “jobs” folder and then to the “continuous” folder (i.e., D:/home/site/wwwroot/App_Data/jobs/continuous).

 

In the D:/home/site/wwwroot/App_Data/jobs/continuous folder, you should see a single folder called “Workflow”; this is the default WebJob that was created during deployment. Create a new WebJob for each site by repeating these steps:

In the command window (at the bottom of the page), run the following command using a specific destination folder name that includes the virtual path for the site (e.g., “db1”): xcopy Workflow workflow-db1 /S /I.

Browse to the newly created folder and verify that two files were created:

settings.job

Workflow.ps1

Click the edit button to edit Workflow.ps1. 

On the second line, prepend the connection string name (exactly as entered into connectionStrings.config) as the “-cn” parameter as follows:

$args = '-cn mjw-app.azurewebsites.net/db1 -agents *'

Click Save to save the changes to the file.

 

After repeating the previous steps for each site, delete the original Workflow folder.

 

Before using any of the newly configured Enterprise sites, restart the Web App.