Install - .NET Agent Controller on Azure App Services for Dynamic Analysis



Overview

The vFunction Dynamic Analysis Controller can be configured for a manual or automatic installation.

In a manual installation, the vFunction Dynamic Analysis Controller is always staged. But, it it only running when an Administrator runs the installation script in the Azure App Services Console. This means that, if a new version of the Application is deployed to Azure App Services or if the Application is restarted, the vFunction Dynamic Analysis Controller will need to be manually installed again.

In an automatic installation, the vFunction Controller process is added to the repository of the Application. As part of the Application’s startup process in Azure App Services, the vFunction Dynamic Analysis Controller is launched when the Application is deployed. This means that the vFunction Dynamic Analysis Controller will always be running with the Application in Azure App Services.


Manual Installation

Notes

The installation workflow below will require you to update the install-controller.ps1 if you do not want to use the default locations. You would want to do this if:

  • You want to use a different directory than C:\home\vfunction-stuff as the location for the vFunction Configuration Files
  • You want to use a different directory than C:\home\vfunction as the vFunction Installation location

Installation Workflow
  1. Ensure prerequisites are met
  2. Download the vFunction Controller Windows Installation ZIP
  3. Rename this ZIP to be 'vfunction-controller-windows-installation.zip'
  4. Download the vFunction Azure App Services Sample Installation Guide
  5. Untar the vFunction Azure App Services Sample Installation Guide

    tar xvf 'Installing vFunction Controller on Azure App Services_Version-2.tgz'
  6. Open the vfunction-controller-in-application-azure-app-services/config/installation.yaml in a text editor
  7. Modify the required settings as well as the instance_id and application_name
  8. Log into the Azure App Services Portal
  9. Navigate to the Application's Configuration > Application Settings
  10. Create six new Application Settings

    .NET Core 3.x and .NET 6 / 7 / 8 Applications
    • CORECLR_ENABLE_PROFILING = 1
    • DOTNET_TailCallOpt = 0
    • CORECLR_PROFILER = {cd7d4b53-96c8-4552-9c11-6e41df8eab8a}
    • CORECLR_PROFILER_PATH_32 = C:\\home\\vfunction\\agent\\vfagent.net.x86.dll
    • CORECLR_PROFILER_PATH_64 = C:\\home\\vfunction\\agent\\vfagent.net.dll
    • VF_AGENT_CONF_LOCATION = C:\\home\\vfunction\\config\\agent\\instances\\default-dotnet\\conf.json
    .NET Framework 4.x Applications
    • COR_ENABLE_PROFILING = 1
    • COMPlus_TailCallOpt = 0
    • COR_PROFILER = {cd7d4b53-96c8-4552-9c11-6e41df8eab8a}
    • COR_PROFILER_PATH_32 = C:\\home\\vfunction\\agent\\vfagent.net.x86.dll
    • COR_PROFILER_PATH_64 = C:\\home\\vfunction\\agent\\vfagent.net.dll
    • VF_AGENT_CONF_LOCATION = C:\\home\\vfunction\\config\\agent\\instances\\default-dotnet\\conf.json
  11. Save the Application Settings and wait for the Application to restart
  12. Open the Kudu Dashboard
  13. Create a folder named 'vfunction-stuff' in C:\home
  14. Into the folder, upload the:
    • vfunction-controller-in-application-azure-app-services/config/installation.yaml
    • vfunction-controller-in-application-azure-app-services/config/global.yaml
    • vfunction-controller-in-application-azure-app-services/files/install-controller.ps1
    • vfunction-controller-windows-installation.zip
  15. Open the PowerShell Debug Console in the Kudu Dashboard
  16. Install the vFunction Dynamic Analysis Controller by running the following command in PowerShell

    C:\home\vfunction-stuff\install-controller.ps1
  17. Confirm that the Application comes up and functions as expected
  18. If any issues arise:

Automatic Installation

Notes

The installation workflow below will require you to update the deploy.cmd if you do not want to use the default locations. You would want to do this if:

  • You want to use a different directory than ROOT/vfunction-stuff as the location for the vFunction Configuration Files
  • You want to use a different directory than ROOT/wwwroot as the vFunction Installation location

Installation Workflow
  1. Ensure prerequisites are met
  2. Download the vFunction Controller Windows Installation ZIP
  3. Rename this ZIP to be 'vfunction-controller-windows-installation.zip'
  4. Download the vFunction Azure App Services Sample Installation Guide
  5. Untar the vFunction Azure App Services Sample Installation Guide

    tar xvf 'Installing vFunction Controller on Azure App Services_Version-2.tgz'
  6. Open the vfunction-controller-in-application-azure-app-services/config/installation.yaml in a text editor
  7. Modify the required settings as well as the instance_id and application_name
  8. Log into the Azure App Services Portal
  9. Navigate to the Application's Configuration > Application Settings
  10. Create six new Application Settings

    .NET Core 3.x and .NET 6 / 7 / 8 Applications
    • CORECLR_ENABLE_PROFILING = 1
    • DOTNET_TailCallOpt = 0
    • CORECLR_PROFILER = {cd7d4b53-96c8-4552-9c11-6e41df8eab8a}
    • CORECLR_PROFILER_PATH_32 = C:\\home\\vfunction\\agent\\vfagent.net.x86.dll
    • CORECLR_PROFILER_PATH_64 = C:\\home\\vfunction\\agent\\vfagent.net.dll
    • VF_AGENT_CONF_LOCATION = C:\\home\\vfunction\\config\\agent\\instances\\default-dotnet\\conf.json
    .NET Framework 4.x Applications
    • COR_ENABLE_PROFILING = 1
    • COMPlus_TailCallOpt = 0
    • COR_PROFILER = {cd7d4b53-96c8-4552-9c11-6e41df8eab8a}
    • COR_PROFILER_PATH_32 = C:\\home\\vfunction\\agent\\vfagent.net.x86.dll
    • COR_PROFILER_PATH_64 = C:\\home\\vfunction\\agent\\vfagent.net.dll
    • VF_AGENT_CONF_LOCATION = C:\\home\\vfunction\\config\\agent\\instances\\default-dotnet\\conf.json
  11. Save the Application Settings and wait for the Application to restart
  12. Open your project's root directory for the Application in your code editor of choice
  13. Copy the following files into the project's root directory:
    • vfunction-controller-in-application-azure-app-services/files/.deployment
    • vfunction-controller-in-application-azure-app-services/files/deploy.cmd
  14. Create a folder named 'vfunction-stuff' in the project's root directory
  15. Into the folder, upload the:
    • vfunction-controller-in-application-azure-app-services/config/installation.yaml
    • vfunction-controller-in-application-azure-app-services/config/global.yaml
    • vfunction-controller-windows-installation.zip
  16. Deploy your application to Azure App Services
  17. Confirm that the Application comes up and functions as expected
  18. If any issues arise: