Installation - Startup Parameters for Java Agent on a Wildfly Application Server
Wildfly Compatibility
vFunction supports RedHat Wildfly 14.0.1 and later.
Installation Workflow
- Install the Dynamic Analysis Controller
- Find and note the base path to your Wildfly Application Server
### This should return the location of the bin/standalone.conf which should be in the Wildfly base path
find / -name 'standalone.conf' -type f - Find and note the location and version of the wildfly-common-VERSION.jar on your Wildfly Application Server
find / -name wildfly-common-*.jar -type f
- Find and note the location and version of the jboss-logmanager-VERSION.jar on your Wildfly Application Server
find / -name jboss-logmanager-*.jar -type f
- Open the vFunction JBoss startup parameters in a text editor
### Replace the INSTANCE_NAME below with the actual values
vi etc/sysconfig/vfunction/agent/instances/INSTANCE_NAME/vmargs-examples/wildfly - Modify the
JAVA_OPTS
:- Change the
YOUR-WILDFLY-BASE-PATH
to be relevant for your environment - Change the
wildfly-common-VERSION.jar
to be relevant for your environment - Change the
jboss-logmanager-VERSION.jar
to be relevant for your environment
- Change the
- Add the startup parameters to your JBoss Application Server's JAVA_OPTS:
### Replace the INSTANCE_NAME and YOUR_WILDFLY_BASE_PATH below with the actual values
cat etc/sysconfig/vfunction/agent/instances/INSTANCE_NAME/vmargs-examples/wildfly >> YOUR_WILDFLY_BASE_PATH/bin/standalone.conf - Restart the Wildfly instance
- Confirm that the Application comes up and functions as expected
- If any issues arise:
Sample contents of vmargs-example/wildfly file
If using this sample below, you will need to:
- Find-and-replace the REPLACE_BASE_DIR with the value relevant to your vFunction installation
- Find-and-replace the REPLACE_INSTANCE with the value relevant to your vFunction installation
- Identify the location and version of the
wildfly-common-VERSION.jar
on your Wildfly Application Server - Replace the placeholder values in the sample below for the wildfly-common-VERSION.jar
- Identify the location and version of the
jboss-logmanager-VERSION.jar
on your Wildfly Application Server - Replace the placeholder values in the sample below for the jboss-logmanager-VERSION.jar
This sample file can be found in /opt/vfunction/controller-installation/stuff/agent/vmargs-examples/java/wildfly
.
Once the install.sh script is run, the relevant placeholder fields are replaced in the version of the environmentally-specific file in /etc/sysconfig/vfunction/agent/instances/INSTANCE_NAME/wildfly
.
Sudo Installation Sample
### Replace REPLACE_INSTANCE with the actual instance name, like default-java
### Replace YOUR_WILDFLY_BASE_PATH with the actual base path
### Replace VERSION with the actual version
VFUN_OPTS="-agentpath:/opt/vfunction/agent/libJVMTIAgent.so -javaagent:/opt/vfunction/agent/runtime-agent.jar -Dcom.vfunction.instance=REPLACE_INSTANCE"
export JAVA_OPTS="$VFUN_OPTS -Dsun.util.logging.disableCallerCheck=true -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/a:YOUR_WILDFLY_BASE_PATH/modules/system/layers/base/org/wildfly/common/main/wildfly-common-VERSION.jar -Xbootclasspath/a:YOUR_WILDFLY_BASE_PATH/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-VERSION.jar $JAVA_OPTS"
Sudoless Installation Sample
### Replace REPLACE_BASE_DIR with the actual path, like /home/USERNAME/
### Replace REPLACE_INSTANCE with the actual instance name, like default-java
### Replace YOUR_WILDFLY_BASE_PATH with the actual base path
### Replace VERSION with the actual version
VFUN_OPTS="-agentpath:/REPLACE_BASE_DIR/vfunction/opt/vfunction/agent/libJVMTIAgent.so=conf=REPLACE_BASE_DIR/vfunction/etc/sysconfig/vfunction/agent/instances/REPLACE_INSTANCE/native-conf.json -javaagent:REPLACE_BASE_DIR/vfunction/opt/vfunction/agent/runtime-agent.jar=ConfigLocation=REPLACE_BASE_DIR/vfunction/etc/sysconfig/vfunction/agent/instances/REPLACE_INSTANCE/vfunction-runtime-override.properties -Dcom.vfunction.runtime.shared.folder=REPLACE_BASE_DIR/vfunction/opt/vfunction/controller/instances/REPLACE_INSTANCE/temp/ -Dcom.vfunction.runtime.offload.tmpFolder=REPLACE_BASE_DIR/vfunction/opt/vfunction/agent/instances/REPLACE_INSTANCE/temp/ -Dcom.vfunction.logging.logFile=REPLACE_BASE_DIR/vfunction/var/log/vfunction/instances/REPLACE_INSTANCE/vfagent.log"
export JAVA_OPTS="$VFUN_OPTS -Dsun.util.logging.disableCallerCheck=true -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/a:YOUR_WILDFLY_BASE_PATH/modules/system/layers/base/org/wildfly/common/main/wildfly-common-VERSION.jar -Xbootclasspath/a:YOUR_WILDFLY_BASE_PATH/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-VERSION.jar $JAVA_OPTS"