Install - Java 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
Installation Workflow
- Download the vFunction Controller Windows Installation ZIP
- Open the App from the Azure Portal
- From the left-hand sidebar, open the Development Tools > Advanced Tools > Go to launch the Kudu Console
- On the Menu Bar, open the Debug Console > PowerShell editor
- Drag-and-drop the vFunction Controller Windows Installation ZIP into
C:\home\
- Unzip the Installation ZIP
Expand-Archive -Path C:\\home\vfunction-controller-windows-installation.v3.8.1527.zip -DestinationPath C:\\home -Force
- In the Kudu PowerShell Console, navigate to and edit the
C:\home\vfunction\config\installation\instances\default-java\installation.yaml
- Modify the required settings
- In addition to the required settings, change the DB Tracking mechanism and disable Spring Tracking in the installation.yaml
agent:
### Optional application servers: weblogic, websphere85, websphere9, liberty, tomcat, wildfly, payara, jeus, other ###
application_server: tomcat
### Indicate the application java version when greater than 8. (optional - default to 8) ###
application_java_version: 17
override_properties:
- com.vfunction.runtime.config.tracking.classloaderresources.enabled=false
- com.vfunction.runtime.config.aop.xml.spring.singleton.tracking.enabled=false
- com.vfunction.runtime.config.aop.xml.spring.prototype.tracking.enabled=false
- com.vfunction.runtime.config.aop.xml.spring.session.tracking.enabled=false
- com.vfunction.runtime.config.aop.xml.spring.request.tracking.enabled=false
- com.vfunction.runtime.config.aop.xml.spring.globalsession.tracking.enabled=false
- com.vfunction.runtime.config.aop.xml.spring.application.tracking.enabled=false
- com.vfunction.runtime.config.aop.xml.spring.websocket.tracking.enabled=false
- com.vfunction.runtime.config.aop.xml.spring.unknown.tracking.enabled=false
- com.vfunction.runtime.config.aop.xml.db.tracking.enabled=true
- com.vfunction.runtime.config.aop.xml.db.tracking.jdbcdriver.enabled=false
- Save and close the file
- In PowerShell, set the Installation Files without starting the vFunction Processes
powershell -NoProfile -ExecutionPolicy unrestricted -Command "C:\home\vfunction\controller-installation\install.ps1 -instance default-dotnet -agentMode true -runAsServices false -scriptMode true -noServices true"
- Re-open the App from the Azure Portal
- From the left-hand sidebar, select Settings > Environment Variables
- Add a new Environment Variable
Name: JAVA_OPTS
Value: -agentpath:C:\\home\\vfunction\\agent\\JVMTIAgent.dll=conf=C:\\home\\vfunction\\config\\agent\\instances\\default-java\\native-conf.json -javaagent:C:\\home\\vfunction\\agent\\runtime-agent.jar=ConfigLocation=C:\\home\\vfunction\\config\\agent\\instances\\default-java\\vfunction-runtime-override.properties --add-opens java.base/java.lang=ALL-UNNAMED -Dcom.vfunction.runtime.shared.folder=C:\\home\\vfunction\\controller\\instances\\default-java\\temp\ -Dcom.vfunction.logging.logFile=C:\\home\\vfunction\\log\\instances\\default-java\\vfagent.log
- Save and apply the Environment Variable changes. This will automatically restart the Azure App Service’s instance
- Re-open the Kudu PowerShell Console
- Start the vFunction processes
powershell -NoProfile -ExecutionPolicy unrestricted -Command "C:\home\vfunction\controller-installation\restart-controller.ps1 -instance default-dotnet"
- In the vFunction Server UI, confirm that the Agent is Status: Up and Start Learning