Installation - Java Linux Agent on a Payara Application Server



Payara Compatibility

vFunction supports Payara version 5.2020 and later.


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 Workflow

  1. Ensure Prerequisites are met
  2. Download the vFunction Sudoless Controller Installation TGZ
  3. SSH to the Linux VM as the user who runs the Application / Application Server
  4. Move the Installation TGZ to the location on the Linux VM where vFunction should run
  5. Extract the vFunction Installation Package
### Replace VERSION with the actual value
tar -xvzf vfunction-controller-sudo-less-installation.vVERSION.tgz
  1. Retrieve the vFunction UI’s Application UUIDs:
  1. Log into the vFunction Server’s UI in a browser
  2. In the top-left corner, click the dropdown and select the relevant Application
  3. In the top-center menu bar, click the “Learning” tab
  4. On the left-side, click the “Select Controllers” link
  5. On the left-side, click the “Install Controller” link
  6. 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
  1. Optional: Add Environment Variables for the vFunction Dynamic Agent
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-dynamic-agent/java/linux
export VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_NAME="CHANGE_ME"
export VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_HOST="CHANGE_ME"
export VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_ORG_ID="CHANGE_ME"
export VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_APP_ID="CHANGE_ME"
export VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_CLIENT_ID="CHANGE_ME"
export VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_CLIENT_SECRET="CHANGE_ME"
export VF_CONTROLLER_DEFAULT_JAVA_AGENT_APPLICATION_SERVER="CHANGE_ME"
export VF_CONTROLLER_DEFAULT_JAVA_AGENT_APPLICATION_JAVA_VERSION="CHANGE_ME"
  1. Optional: Alternatively to Step #7, open the BASE_DIR/vfunction/etc/sysconfig/vfunction/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/linux
controller:
  name: qa-payara1
  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
  instace_id: qa-pay1
  type: java
  instrconf_additions:
    inclusions:
#      - a.b.c.
    exclusions:
#      - a.b.c.
  tags:
    - qa

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: payara
  ### Indicate the application java version when greater than 8. (optional - default to 8) ###
  application_java_version: 11
  override_properties:
#    - key=value
  1. Run the installation script
### Replace the BASE_DIR with the actual value, such as /tmp/
bash BASE_DIR/vfunction/opt/vfunction/controller-installation/install.sh -i default-java
  1. Find and note the base path to asadmin on your Payara Application Server
find / -name 'asadmin' -type f 2&>/dev/null
  1. Add the vFunction Startup Parameters to the Payara application via asadmin
### Replace the PAYARA_DIR with the actual value
### Replace the BASE_DIR with the value of the vFunction installation directory, such as /tmp
PAYARA_DIR/bin/asadmin create-jvm-options "-agentpath\:BASE_DIR/vfunction/opt/vfunction/agent/libJVMTIAgent.so=conf=BASE_DIR/vfunction/etc/sysconfig/vfunction/agent/instances/default-java/native-conf.json:-javaagent\:BASE_DIR/vfunction/opt/vfunction/agent/runtime-agent.jar=ConfigLocation=BASE_DIR/vfunction/etc/sysconfig/vfunction/agent/instances/default-java/vfunction-runtime-override.properties:-Dcom.vfunction.logging.logFile=BASE_DIR/vfunction/var/log/vfunction/instances/default-java/vfagent.log"
  1. Restart the Payara instance
  2. Confirm that the Application comes up and functions as expected
  3. If any issues arise: