Installation - Startup Parameters for Java Agent on a JBoss Application Server
JBoss Compatibility
vFunction supports RedHat JBoss 7.2 and later.
Installation Workflow
- Install the Dynamic Analysis Controller
- Find and note the base path to your JBoss Application Server
### This should return the location of the bin/standalone.conf which should be in the JBoss base path
find / -name 'standalone.conf' -type f - Find and note the location and version of the wildfly-common-VERSION.jar on your JBoss Application Server
find / -name wildfly-common-*.jar -type f
- Find and note the location and version of the jboss-logmanager-VERSION.jar on your JBoss 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 JBoss 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 JBoss 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 JBoss 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
# vFunction
VFUN_OPTS="-agentpath:REPLACE_BASE_DIR/opt/vfunction/agent/libJVMTIAgent.so -javaagent:REPLACE_BASE_DIR/opt/vfunction/agent/runtime-agent.jar -Dcom.vfunction.instance=REPLACE_INSTANCE"
# PLEASE CHANGE ALL PLACEHOLDERS in < >!!!
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
# vFunction
VFUN_OPTS="-agentpath:REPLACE_BASE_DIR/opt/vfunction/agent/libJVMTIAgent.so=conf=REPLACE_BASE_DIR/etc/sysconfig/vfunction/agent/instances/REPLACE_INSTANCE/native-conf.json -javaagent:REPLACE_BASE_DIR/opt/vfunction/agent/runtime-agent.jar=ConfigLocation=REPLACE_BASE_DIR/etc/sysconfig/vfunction/agent/instances/REPLACE_INSTANCE/vfunction-runtime-override.properties -Dcom.vfunction.runtime.shared.folder=REPLACE_BASE_DIR/opt/vfunction/controller/instances/REPLACE_INSTANCE/temp/ -Dcom.vfunction.runtime.offload.tmpFolder=REPLACE_BASE_DIR/opt/vfunction/agent/instances/REPLACE_INSTANCE/temp/ -Dcom.vfunction.logging.logFile=REPLACE_BASE_DIR/var/log/vfunction/instances/REPLACE_INSTANCE/vfagent.log"
# PLEASE CHANGE ALL PLACEHOLDERS in < >!!!
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"