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
SETLOCAL EnableExtensions
REM Bypass the installation if already installed