Azure Installation
This page shows the Hdiv agent installation options in the Azure Cloud services, like Azure Virtual Machines, Cloud Services or Azure App Services.
The installation file for Azure Virtual Machines is an msi file and for Azure App Services is a NuGet package.
Azure Virtual Machines or Cloud Services¶
The installation steps for Azure Virtual Machines or Cloud Services are the same as onpremise installation. It is necessary to open a remote desktop session and install the provided msi file.
Steps for the onpremise installation.
Azure App Services¶
In order to install the agent in an application deployed in Azure App Services, a new NuGet dependency is included in the application.
Packages to include:
- Full Framework applications: Hdiv.AST.Profiler
- NetCore applications: Hdiv.AST.NetCore.Profiler
Azure App Services Limitations
Azure installation has some limitations compared to the onpremise installation. .Net agent does not support framework 3.5 or lower and CLR2. Check the general requirements.
Step 1¶
Hdiv provides a repository to access these packages. It is necessary to setup the NuGet repository using the credentials provided by the Hdiv support team. Repository configuration steps.
Step 2¶
Once the repository is configured, build the application to check the Hdiv agent package is installed properly.
Step 3¶
Deploy the application on Azure App Services as usual. Check Hdiv agent installation is correct reviewing a new folder 'hdivsecurity' exists in the application root folder.
Step 4¶
It is necessary to add some environment variables to setup the Agent.
Add them from Azure portal application settings page.
It is necesary to restart the application to apply the changes.
Step 5¶
Once application restart, there are two ways to check the agent is running properly:
- Check server and application are registed in the Hdiv Console.
- Review agent logs, for example using Kudu. Find log files in
D:\home\site\wwwroot\hdivsecurity\logs
.
To disable the agent, just modify CLR_ENABLE_PROFILING
or CORECLR_ENABLE_PROFILING
property from 1 to 0.
Azure App Services Environment Variables¶
Environment variables to use in Full framework or NetCore applications:
Full Framework¶
Name | Default Value |
---|---|
COR_ENABLE_PROFILING | 1 |
COR_PROFILER | {1adbf8d7-8774-4733-aa10-4376ba3bd37a} |
COR_PROFILER_PATH_32 | D:\Home\site\wwwroot\hdivsecurity\agent\x86\Hdiv.AST.Clr.Profiler.dll |
COR_PROFILER_PATH_64 | D:\Home\site\wwwroot\hdivsecurity\agent\x64\Hdiv.AST.Clr.Profiler.dll |
HDIV_AGENT_HOME | D:\Home\site\wwwroot\hdivsecurity\agent |
HDIV_AGENT_PROFILER_PLATFORM | 327680 |
HDIV_LICENSE_DATA | text_mode_license |
NetCore¶
Name | Default Value |
---|---|
CORECLR_ENABLE_PROFILING | 1 |
CORECLR_PROFILER | {1adbf8d7-8774-4733-aa10-4376ba3bd37a} |
CORECLR_PROFILER_PATH_32 | D:\Home\site\wwwroot\hdivsecurity\agent\x86\Hdiv.AST.Clr.Profiler.dll |
CORECLR_PROFILER_PATH_64 | D:\Home\site\wwwroot\hdivsecurity\agent\x64\Hdiv.AST.Clr.Profiler.dll |
HDIV_AGENT_HOME | D:\Home\site\wwwroot\hdivsecurity\agent |
HDIV_AGENT_PROFILER_PLATFORM | 327680 |
HDIV_LICENSE_DATA | text_mode_license |
HDIV_LICENSE_DATA
Find the license in text mode in the provided package in the license/license.txt file.
env.properties configuration values
Add any property included in the env.properties configuration in a onpremise installation using the environment variables. For example console configuration properties.
Hdiv NuGet Configuration¶
Agent packages are published in the Hdiv repository: https://artifacts.hdivsecurity.com/nexus/service/local/nuget/nuget/.
Add the new source from VS NuGet settings configuration window. Use provided credentials to access the repository.
Alternativelly, add it from the command line:
nuget sources add -name "Hdiv NuGet" -source https://artifacts.hdivsecurity.com/nexus/service/local/nuget/nuget/ -username username -password password
General instalation & configuration details
Find general agent configuration details in the installation page.