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
- Download the vFunction Controller Windows Installation ZIP
- Retrieve the vFunction UI’s Application UUIDs:
- Log into the vFunction Server’s UI in a browser
- In the top-left corner, click the dropdown and select the relevant Application
- In the top-center menu bar, click the “Learning” tab
- On the left-side, click the “Select Controllers” link
- On the left-side, click the “Install Controller” link
- In the dialog box, find the YAML-formatted text box that contains the following details. You’ll need these details at a later stage below:
controller:
name: {display name for this controller}
host: $your_VF_Server_address
org_id: 93af7f38-0000-0000-0000-bd9516798497
app_id: 9fb228fc-0000-0000-0000-db8e83427e14
client_id: caeadcd1-0000-0000-0000-9c9b37a9e119
client_secret: 68cb85eb-0000-0000-0000-fb9e7f1d9240
- 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.v4.2.1723.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:
### Disable JDBC DB Tracking ###
disable_jdbc: true
### Disable Spring Tracking ###
disable_spring: true
### Optional application servers: weblogic, websphere85, websphere9, liberty, tomcat, wildfly, payara, other ###
application_server: tomcat
### Indicate the application java version when greater than 8. (optional - default to 8) ###
application_java_version: 17
powershell -NoProfile -ExecutionPolicy unrestricted -Command "C:\home\vfunction\controller-installation\install.ps1 -instance default-java -scriptMode 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.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
- In the vFunction Server UI, confirm that the Agent is Status: Up and Start Learning