Installation - Startup Parameters for Java Agent on a WebLogic Application Server
WebLogic Compatibility
vFunction supports Oracle Weblogic 10.3.6 and later.
Installation Workflow
- Install the Dynamic Analysis Controller
- Find and note the base path to your WebLogic Application Server
### This should return the location of the DOMAIN_NAME/bin/startManagedWebLogic.sh for the WebLogic instance
find / -name 'startManagedWebLogic.sh' -type f - Open the WebLogic Application Server's Startup Script in a text editor
### Replace the DOMAIN_NAME with the actual value
vi DOMAIN_NAME/bin/startManagedWebLogic.sh - Find the section of the file for setting the Java VM options
/JAVA_OPTIONS
- Add a section for the vFunction Startup Parameters above the existing JAVA_OPTIONS. Copy and paste the details below into the startManagedWebLogic.sh script
VFUN_OPTS
- Create a variable with the vFunction Agent Startup Parameters
### Replace the INSTANCE_NAME with the actual value
export VFUN_OPTS=`cat etc/sysconfig/vfunction/agent/instances/INSTANCE_NAME/vmargs-examples/weblogic` - Modify the startManagedWebLogic.sh VFUN_OPTS to include the vFunction Agent Startup Parameters
### Replace the DOMAIN_NAME with the actual value
sed -i "s~VFUN_OPTS=~$VFUN_OPTS~g" DOMAIN_NAME/bin/startManagedWebLogic.sh - Restart the WebLogic instance
- Confirm that the Application comes up and functions as expected
- If any issues arise:
Sample contents of vmargs-example/weblogic 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
This sample file can be found in /opt/vfunction/controller-installation/stuff/agent/vmargs-examples/java/weblogic
.
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/weblogic
.
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 REPLACE_EXTRA_JVM -Dcom.vfunction.instance=REPLACE_INSTANCE"
export JAVA_OPTIONS="$VFUN_OPTS $JAVA_OPTIONS"
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 REPLACE_EXTRA_JVM -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"
export JAVA_OPTIONS="$VFUN_OPTS $JAVA_OPTIONS"