Skip to content

Install ARR on Azure PaaS VM

March 12, 2015

This article describes how to install ARR 3.0 on Azure cloud service VMs on startup. You may want to use ARR for different purpose like such as reverse proxy. Find more about ARR at http://www.iis.net/learn/extensions/planning-for-arr/using-the-application-request-routing-module

ARR comes as out of band module and can be installed via WEBPI with all dependencies. Even manual setups are also available for download. For download instructions refer http://www.iis.net/downloads/microsoft/application-request-routing

However installing ARR with all required dependencies on cloud service on startup is tricky. Its not just ARR which needs to be installed but the  dependencies like web farm framework and disk cache also needs to be installed.

Lets first list down all setup and there Microsoft download links.

1. Web farm framework : http://download.microsoft.com/download/5/7/0/57065640-4665-4980-A2F1-4D5940B577B0/webfarm_v1.1_amd64_en_US.msi

2.  ARR : http://download.microsoft.com/download/6/3/D/63D67918-483E-4507-939D-7F8C077F889E/requestRouter_x64.msi

3. Disk Cache : http://download.microsoft.com/download/1/1/a/11a5a75a-5ddc-4821-88ca-2abe02a32ed3/ExternalDiskCache_amd64_en-us.msi

4. Disk Cache Update Patch : http://download.microsoft.com/download/D/E/9/DE90D9BD-B61C-43F5-8B80-90FDC0B06144/ExternalDiskCachePatch_amd64.msp

The above downloads are listed as per the sequence in which they need to install. You need to download all the setups and then place it on your azure web application solution.

Lets create new web role application with asp.net MVC 4 using visual studio 2013. The solution explorer should look like

image

 

One more thing to notice is, I have also added command file InstallArr.cmd. In this article I assume that you know how to execute startup command on azure role start. Read more at https://msdn.microsoft.com/en-us/library/azure/hh974417.aspx

It is important to set the properties of individual setup file and InstallArr.cmd as Build Action = “Content” and Copy to Output Director = “Copy Always”, to make sure that when azure service definition tries to execute the command it is available in bin folder.

image

After this important task is to write the command file.

 

cls

msiexec /i ARRSetup\webfarm_v1.1_amd64_en_US.msi /qn /log C:\installWebFarmLog.txt  ping -n 5 127.0.0.1 > nul  msiexec /i ARRSetup\requestRouter_x64.msi /qn /log C:\installARRLog.txt  ping -n 15 127.0.0.1 > nul  msiexec /i ARRSetup\ExternalDiskCache_amd64_en-us.msi /qn /log C:\installDiskCacheLog.txt  ping -n 15 127.0.0.1 > nul  msiexec /p ARRSetup\ExternalDiskCachePatch_amd64.msp /qn /log C:\installDiskCachePatch.txt  ping -n 5 127.0.0.1 > nul %windir%\system32\inetsrv\appcmd.exe set config   -section:system.webServer/proxy /enabled:"True"   /commit:apphost >> C:\setProxyLog.txt exit /b 0

 

 

The above code installs all setups one by one. The code like like  ping -n 15 127.0.0.1 > nul ensure that there is enough delay between installation of two setups.  The command msiexec is used to install the any msi file. Point to note here is the last one, external disk cache patch is path and with extension msp. You need use msiexec with /p switch install patches.

The last line is option and basically makes use of arr as reverse proxy. Depnding on how you want to use the arr you may edit iis setting/applicationhost.config with appcmd.

 

Now go to the cloud service project and service definition file to call installarr.cmd file.

 <Startup >   <Task commandLine="InstallArr.cmd" executionContext="elevated" taskType="background" />   </Startup>

 

Build the solution and then create the package to deploy on the azure cloud service. You can always get trial azure subscription at http://azure.microsoft.com/en-us/pricing/free-trial/ 

Now once cloud service deployment is done you can take the remote access to the VM and check if ARR is installed or not.

In next article we will see possible scenarios of such ARR installations.

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: