Install - Java Agent Controller on Containerized Springboot App for Dynamic Analysis
Installation Steps
- Download the latest vFunction Sudoless Controller Installation TGZ
- Create a folder for vFunction artifacts in the Artifact Repository accessible by the Docker Build
- Add the vFunction Sudoless Controller Installation TGZ to the Artifact Repository
- Create a vFunction specific branch to add the vFunction artificats to the Application’s Dockerfile
- 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
ARG VF_CONTROLLER_DEFAULT_JAVA_AGENT_APPLICATION_SERVER="other"
ARG 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
ARG VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_HOST="http://vfunction.myorg.com"
ARG VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_NAME="docker-agent"
ARG VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_ORG_ID="1111-11-11-1111"
ARG VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_APP_ID="1111-11-11-1111"
ARG VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_CLIENT_ID="1111-11-11-1111"
ARG VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_CLIENT_SECRET="1111-11-11-1111"
ARG VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_INSTANCE_ID="container"
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 && \
chmod -R 777 /tmp/vfunction && \
chown -R <appuser>:<appuser> /tmp/vfunction/
ARG jvm_args=$(cat /tmp/vfunction/etc/sysconfig/vfunction/agent/instances/default-java/vmargs-examples/raw)
ENV JAVA_TOOL_OPTIONS="$jvm_args"
ENTRYPOINT [ EXISTING_WORKFLOW ]
- Build and deploy the Application
- Confirm that the Application comes up and functions as expected
- If any issues arise: