Install - Java Agent Controller on Containerized Tomcat App for Dynamic Analysis



Installation Steps

  1. Download the latest vFunction Sudoless Controller Installation TGZ
  2. 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. Create a folder for vFunction artifacts in the Artifact Repository accessible by the Docker Build
  2. Add the vFunction Sudoless Controller Installation TGZ to the Artifact Repository
  3. Create a vFunction specific branch to add the vFunction artificats to the Application’s Dockerfile
  4. Modify the Application’s Dockerfile
FROM <existing_docker_image>

COPY <existing_workflow>
RUN <existing_workflow>

### vFunction workflow

COPY /artifact_repository/vfunction/vfunction-controller-sudo-less-installation*.tgz /tmp/vfunction-controller-sudo-less-installation.tgz

ENV VF_CONTROLLER_DEFAULT_JAVA_AGENT_APPLICATION_SERVER="tomcat"
ENV VF_CONTROLLER_DEFAULT_JAVA_AGENT_APPLICATION_JAVA_VERSION=11

### See https://kb.vfunction.com/installations/configurable-settings/mono-dynamic-agent/java/linux for more details about each of the settings below
ENV VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_HOST="http://vfunction.myorg.com"
ENV VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_NAME="docker-agent"
ENV VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_ORG_ID="1111-11-11-1111"
ENV VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_APP_ID="1111-11-11-1111"
ENV VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_CLIENT_ID="1111-11-11-1111"
ENV VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_CLIENT_SECRET="1111-11-11-1111"
ENV VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_TAGS="prod"

RUN cd /tmp && tar zxvf /tmp/vfunction-controller-sudo-less-installation.tgz     && \
   rm -rf /tmp/vfunction-controller-sudo-less-installation.tgz     && \
   bash /tmp/vfunction/opt/vfunction/controller-installation/install.sh -i default-java -n  
    && \
   cat /tmp/vfunction/etc/sysconfig/vfunction/agent/instances/default-java/vmargs-examples/tomcat >> /usr/local/tomcat/bin/setenv.sh    && \
   chmod -R 777 /tmp/vfunction           && \
   chown -R <tomcat>:<tomcat> /tmp/vfunction                                             

ENTRYPOINT [<existingWorkflowIfUsed>]
CMD [<existingWorkflowIfUsed>]

  1. Build and deploy the Application
  2. Confirm that the Application comes up and functions as expected
  3. If any issues arise:

Video Guided Installation