Azure Service deployment
Deployment steps
- Add the following to the WebRole project and set their "Copy to Output" property to "Copy Always".
a. .NET agent Installer (apminsight-dotnetagent.msi),
b. The "apminsight.conf" file, containing license key and other configuration options, and,
c. The batch file, "deploy-apminsight.cmd". -
Add a startup task in the service definition (.csdef) file as follows :
<ServiceDefinition>
<WebRole>
<Startup>
<Task commandLine="deploy-apminsight.cmd configfile=apminsight.conf
appfilterconfigfile=appfilter.conf multimonitor=true/false"
executionContext="elevated" taskType="background"/>
</Startup>
</WebRole>
</ServiceDefinition>
Known issues and workarounds
In Azure machines, the "W3SVC" service (World Wide Web Publishing Service) has its startup type as "Manual" by default. This might cause a "Service Unavailable" issue when visiting websites after .NET agent is installed (IIS reset happens during installation). Set this startup type to "Automatic" to workaround this issue. This can be achieved by adding the following line in the batch file before the installation command, sc config w3svc start= auto.
Copy and paste the below script in a new text file and name it as deploy-apminsight.cmd.
deploy-apminsight.cmd
REM Install the ApmInsight agent on Windows Azure
SETLOCAL EnableExtensions
REM Bypass the installation if already installed
IF DEFINED COR_PROFILER GOTO :ENDIF NOT EXIST apminsight-dotnetagent.msi GOTO :ENDREM set the w3svc IIS worker process startup service to autosc config w3svc start= autoREM Install the agentapminsight-dotnetagent.msi /quiet /log %windir%\ApmInsightInstall.log editconfig=false %*:ENDEXIT /B %ERRORLEVEL%
-
On this page
- Deployment steps
- Known issues and workarounds