Install - Java Windows Dynamic Agent on Wildfly App Server
Installation Wizard
To help with the installation process, vFunction offers an Installation Wizard. This Wizard provides additional information about the Prerequisites as well as steps for deploying the vFunction Agent to your environment.
Please contact support@vfunction.com or your vFunction Contact(s) for the password to start using this Wizard.
Installation Steps
- Ensure Prerequisites are met
- Download the vFunction Windows Controller Installation ZIP
- RDP to the Windows Server as the user who runs the Application / Application Server
- Move the Installation ZIP to the location on the Windows Server where vFunction should run
- Extract the vFunction Installation Package
- 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
- Optional: In PowerShell, add Environment Variables for the vFunction Dynamic Agent
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-dynamic-agent/java/windows
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_NAME','CHANGE_ME')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_HOST','CHANGE_ME')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_ORG_ID','CHANGE_ME')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_APP_ID','CHANGE_ME')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_CLIENT_ID','CHANGE_ME')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_CLIENT_SECRET','CHANGE_ME')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_AGENT_APPLICATION_SERVER','wildfly')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_AGENT_APPLICATION_JAVA_VERSION','CHANGE_ME')
- Optional: Alternatively to Step #7, open the BASE_DIR\vfunction\config\installation\instances\default-java\installation.yaml to set the same values instead of using Environment Variables
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-dynamic-agent/java/windows
controller:
name: qa-windows1
host: http://10.0.0.1
org_id: 1111-11-11-1111
app_id: 1111-11-11-1111
client_id: 1111-11-11-1111
client_secret: 1111-11-11-1111
type: java
instrconf_additions:
inclusions:
# - a.b.c.
exclusions:
# - a.b.c.
tags:
- qa
client_certificate:
crt: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
key: |
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
server_application:
# name:
# include_classes: com.
# allowed_users:
# new_user_default_password:
agent:
### Disable JDBC DB Tracking ###
disable_jdbc: false
### Disable Spring Tracking ###
disable_spring: false
### Optional application servers: weblogic, websphere85, websphere9, liberty, tomcat, wildfly, payara, other ###
application_server: wildfly
### Indicate the application java version when greater than 8. (optional - default to 8) ###
application_java_version: 11
override_properties:
# - key=value
- In PowerShell, unblock the files in the installation directory
### Replace the BASE_DIR with the actual value with the actual value where vFunction was extracted, such as C:\vfunction
dir -Path "BASE_DIR" -Recurse | Unblock-File
- In Powershell, run the installation script
### Replace the BASE_DIR with the actual value with the actual value where vFunction was extracted, such as C:\vfunction
powershell -NoProfile -ExecutionPolicy unrestricted -Command "BASE_DIR\vfunction\controller-installation\install.ps1 -instance default-java"
- In a text editor, open the vFunction Startup Parameters Example file
### Replace the BASE_DIR with the actual value with the actual value where vFunction was extracted, such as C:\vfunction
BASE_DIR\config\agent\instances\default-java\vmargs-examples\wildfly
- Find and note the base path to your Wildfly Application Server
### Replace BASE_DIR with the known location of the filesystem such as C:\ or D:\
### This should return the location of the bin\standalone.conf.bat which should be in the Wildfly base path
Get-ChildItem -Path BASE_DIR -Include standalone.conf.bat -Recurse - File
- Find and note the location and version of the wildfly-common-VERSION.jar on your Wildfly Application Server
### Replace BASE_DIR with the known location of the filesystem such as C:\ or D:\
Get-ChildItem -Path BASE_DIR -Include wildfly-common-*.jar -Recurse - File
- Find and note the location and version of the jboss-logmanager-VERSION.jar on your Wildfly Application Server
### Replace BASE_DIR with the known location of the filesystem such as C:\ or D:\
Get-ChildItem -Path BASE_DIR -Include jboss-logmanager-*.jar -Recurse - File
- Modify the standalone.conf.bat to include the vFunction Runtime Agent as part of the JAVA_OPTS. For example
set "VFUN_OPTS=-agentpath:D:\vfunction\agent\JVMTIAgent.dll=conf=D:\vfunction\config\agent\instances\default-java\native-conf.json"
set "VFUN_OPTS=%VFUN_OPTS% -javaagent:D:\vfunction\agent\runtime-agent.jar=ConfigLocation=D:\vfunction\config\agent\instances\default-java\vfunction-runtime-override.properties"
set "VFUN_OPTS=%VFUN_OPTS% -Dcom.vfunction.logging.logFile=D:\vfunction\log\instances\default-java\vfagent.log"
rem # JAVA_OPTS should also be amended
set "JAVA_OPTS=%JAVA_OPTS% -Dsun.util.logging.disableCallerCheck=true -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/a:%JBOSS_HOME%\modules\system\layers\base\org\wildfly\common\main\wildfly-common-1.7.0.Final-redhat-00003.jar -Xbootclasspath/a:%JBOSS_HOME%\modules\system\layers\base\org\jboss\logmanager\main\jboss-logmanager-2.1.19.Final-redhat-00001.jar"
set "JAVA_OPTS=%JAVA_OPTS% %VFUN_OPTS%"
- Restart the Websphere instance
- Confirm that the Application comes up and functions as expected
- If any issues arise: